Initial Contribution
Signed-off-by: Vinay Vishal <vinay.vishal@oracle.com>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/README b/appserver/tests/v2-tests/appserv-tests/devtests/admin/README
new file mode 100644
index 0000000..0efb40d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/README
@@ -0,0 +1,9 @@
+This workspace contains new cli tests for admin infrastructure.
+This works with v3.1.
+To run the tests execute
+export APS_HOME=<yourdir>/appserv-tests
+ant all
+
+The results will be printed in $APS_HOME/test_results.html
+
+For more information refer to http://wiki.glassfish.java.net/Wiki.jsp?page=AdminTests
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java
new file mode 100644
index 0000000..262e2be
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import com.sun.appserv.server.util.Version;
+
+public class VersionPrinter {
+
+ 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());
+ } 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
new file mode 100644
index 0000000..60696ea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.properties
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+sunone.home=/export/as8pe
+retrieve.directory=/export/as8pe/bin/retrieve
+earApp.file=${sunone.home}/samples/webapps/bookstore/bookstore1/bookstore1.ear
+warApp.file=${sunone.home}/samples/webapps/simple/webapps-simple.war
+rarApp.file=${sunone.home}/samples/connectors/inbound/inbound.rar
+retrieveApp.file=${sunone.home}/samples/ejb/stateless/simple/stateless-simple.ear
+admin.user=admin
+admin.password=adminadmin
+admin.host=localhost
+admin.port=4848
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
new file mode 100644
index 0000000..b7f13df
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.xml
@@ -0,0 +1,128 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="TestAsant" default="all" basedir=".">
+
+<!-- ========== Initialize Properties ================================ -->
+<property file="./build.properties"/>
+
+<!-- all -->
+<target name="all" depends="deploy-rar, deploy-war, deploy-ear, deploy-retrieve, undeploy-all"/>
+
+<target name="deploy-rar"
+ description="Deploy the Connector">
+ <sun-appserv-deploy
+ file="${rarApp.file}"
+ name="inbound"
+ type="connector"
+ force="true"
+ precompilejsp="false"
+ verify="false"
+ upload="true"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="4848"
+ sunonehome="${sunone.home}" />
+</target>
+
+<target name="deploy-war"
+ description="Deploy the WebApp">
+ <sun-appserv-deploy
+ file="${warApp.file}"
+ name="simple"
+ type="web"
+ force="true"
+ precompilejsp="false"
+ verify="false"
+ upload="true"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${sunone.home}" />
+</target>
+
+<target name="deploy-ear"
+ description="Deploy the earApp">
+ <sun-appserv-deploy
+ file="${earApp.file}"
+ name="bookstore"
+ type="application"
+ force="true"
+ precompilejsp="false"
+ verify="false"
+ upload="true"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${sunone.home}" />
+</target>
+
+<target name="deploy-retrieve"
+ description="Deploy the EAR">
+ <sun-appserv-deploy
+ file="${retrieveApp.file}"
+ name="stateless-converter"
+ type="application"
+ force="true"
+ precompilejsp="false"
+ verify="false"
+ upload="true"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ retrievestubs="${retrieve.directory}"
+ sunonehome="${sunone.home}" />
+</target>
+
+<target name="undeploy-all"
+ description="Undeploy all apps">
+ <sun-appserv-undeploy
+ name="inbound"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${sunone.home}" />
+ <sun-appserv-undeploy
+ name="simple"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${sunone.home}" />
+ <sun-appserv-undeploy
+ name="bookstore"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${sunone.home}" />
+ <sun-appserv-undeploy
+ name="stateless-converter"
+ user="${admin.user}"
+ password="${admin.password}"
+ host="${admin.host}"
+ port="${admin.port}"
+ sunonehome="${sunone.home}" />
+</target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/readme.txt b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/readme.txt
new file mode 100644
index 0000000..b92dc30
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/readme.txt
@@ -0,0 +1,11 @@
+This devtest tests the asant sun-appserv-deploy task.
+The build.xml will try to deploy several sample applications from the install root.
+To run this test, you need to first update the build.properties. Following are the properties to be updated:
+ sunone.home="this should be the location of the app server installation"
+ retrieve.directory="this directory is where you want the client to be retrieved. This directory must exist."
+ admin.user="this is the admin user name"
+ admin.password="this is the admin user password"
+ admin.host="this is admin host"
+ admin.port="this is admin port number"
+
+After updating the build.properties file, you can execute the build invoking the asant script. This script is located in ${install.Root}/bin.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/build.xml
new file mode 100644
index 0000000..ec01f00
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/build.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../config/common.xml">
+<!ENTITY reporting SYSTEM "./../../../config/report.xml">
+<!ENTITY run SYSTEM "./../../../config/run.xml">
+]>-->
+
+<project name="admin" default="all" basedir=".">
+
+ <target name="all">
+ <ant dir="cli" target="all"/>
+ </target>
+
+ <target name="usage">
+ <echo>Usage: ant all (Executes the admin tests)</echo>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/JmxUtils.jar b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/JmxUtils.jar
new file mode 100644
index 0000000..923b73e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/JmxUtils.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/Readme b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/Readme
new file mode 100644
index 0000000..556ce24
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/Readme
@@ -0,0 +1,6 @@
+You should just run: java -jar JmxUtils.jar
+
+(Though it is not required, I will check in
+the JmxUtils.jar to the workspace, because that is going
+to be handy. Alternatively, you could open the NB
+Project in NB and create the jar yourself).
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
new file mode 100644
index 0000000..41e9cd3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/build-impl.xml
@@ -0,0 +1,559 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+-->
+<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
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" includes="@{includes}"/>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="stopclassname" default=""/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=none"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target name="-pre-pre-jar" depends="init">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert property="jar.classpath" pathsep=" ">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+ <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target name="run" depends="init,compile" description="Run a main class.">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="run-single" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee" depends="init,compile">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+ <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target name="-javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <j2seproject3:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <customize>
+ <arg line="${test.class}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target name="run-applet" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/project.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/project.properties
new file mode 100644
index 0000000..a9ba634
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/project.properties
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+application.args=
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/JmxUtils.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+jar.compress=false
+javac.classpath=
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=org.gf.jmx.utils.ReadMe
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+src.dir=src
+test.src.dir=test
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/project.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/project.xml
new file mode 100644
index 0000000..c493646
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/project.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>JmxUtils</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ </configuration>
+</project>
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
new file mode 100644
index 0000000..07ec6a0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/JustConnect.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * JustConnect.java
+ *
+ * Created on July 19, 2006, 9:54 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.gf.jmx.utils;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+/**
+ *
+ * @author Administrator
+ */
+public class JustConnect {
+
+ private JMXServiceURL url;
+ private JustConnect(final String urls, final String user, final String pass) throws Exception {
+ url = new JMXServiceURL(urls);
+ final Map<String, Object> env = new HashMap<String, Object>();
+ env.put("jmx.remote.credentials", new String[]{user, pass});
+ 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" +
+ "\n(username and password could be any string, if server is not authenticating)");
+ System.exit(1);
+ }
+ new JustConnect(args[0], args[1], args[2]);
+ }
+}
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
new file mode 100644
index 0000000..4755250
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/ReadMe.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * ReadMe.java
+ *
+ * Created on July 19, 2006, 11:46 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.gf.jmx.utils;
+
+/**
+ *
+ * @author Administrator
+ */
+public class ReadMe {
+
+ private ReadMe() {
+ }
+ public static void main(final String args[]) {
+ System.out.println("java -cp JmxUtils.jar org.gf.jmx.utils.JustConnect jmxserviceurl username password\n" +
+ "-- just connects to a JMX backend with given service url and username and password");
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.properties
new file mode 100755
index 0000000..e4b440b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.properties
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+###########################################################
+# Compilation Flags #
+###########################################################
+javac.debug=on
+javac.optimize=off
+javac.deprecation=off
+javac.source=1.5
+
+### Component Properties ###
+testsrc.dir=testsrc
+testfiles.dir=testfiles
+
+component.publish.home=publish
+appserv-rt.jar=${env.S1AS_HOME}/lib/appserv-rt.jar
+appserv-admin.jar=${env.S1AS_HOME}/lib/appserv-admin.jar
+j2ee.jar=${env.S1AS_HOME}/lib/j2ee.jar
+junit.jar=${env.APS_HOME}/lib/junit.jar
+testng.jar=${env.APS_HOME}/lib/testng.jar
+component.name=admin-framework-devtest
+tests.publish.home=publish
+
+component.tests.classes.dir=${tests.publish.home}/internal/testclasses
+tests.workfiles.dir = ${component.tests.classes.dir}/asadmintest
+
+package=com.sun.enterprise.admin
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
new file mode 100755
index 0000000..71a3fa7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="Admin Framework Devtests" default="all" basedir=".">
+
+<!-- ========== Initialize Properties =================================== -->
+
+ <property environment="env"/>
+ <property file="./build.properties"/>
+
+ <path id="test.compile.classpath">
+ <pathelement location="${appserv-rt.jar}"/>
+ <pathelement location="${appserv-admin.jar}"/>
+ <pathelement location="${j2ee.jar}"/>
+ <pathelement location="${junit.jar}"/>
+ </path>
+ <path id="test.run.classpath">
+ <pathelement location="${tests.workfiles.dir}/testserverbeans.jar"/>
+ <pathelement location="${component.tests.classes.dir}"/>
+ <path refid="test.compile.classpath"/>
+ <!-- <pathelement location="/export/ias/sqe-pe/codecoverage/jcov/lib/jcov.jar"/> -->
+ </path>
+
+
+ <!-- init. Initialization involves creating publishing directories and
+ OS specific targets. -->
+ <target name="init-tests" description="${component.name} initialization">
+ <tstamp>
+ <format property="start.time" pattern="MM/dd/yyyy hh:mm aa"/>
+ </tstamp>
+ <echo message="Building component ${component.name}"/>
+ <mkdir dir="${component.tests.classes.dir}"/>
+ <delete dir="${tests.workfiles.dir}"/>
+ <mkdir dir="${tests.workfiles.dir}"/>
+ <mkdir dir="${tests.workfiles.dir}/samples"/>
+ <copy todir="${tests.workfiles.dir}">
+ <fileset dir="${testfiles.dir}" includes="*"/>
+ <fileset dir="${testfiles.dir}" includes="samples/*"/>
+ </copy>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="run-tests"
+ description="Build entire component">
+ </target>
+
+ <!-- clean -->
+ <target name="clean">
+ <delete dir="${component.publish.home}"/>
+ </target>
+
+
+<target name="compile-tests">
+ <echo message="Compiling {component.name}"/>
+ <javac srcdir="${testsrc.dir}"
+ destdir="${component.tests.classes.dir}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true"
+ classpathref="test.compile.classpath">
+ <include name="**/*.java"/>
+ <!-- <include name="**/*Test.java"/>
+ <include name="**/*Tests.java"/> -->
+ </javac>
+
+</target>
+
+
+<target name="run-tests" depends="init-tests,compile-tests">
+ <java fork="true" failonerror="true"
+ classname="com.sun.enterprise.admin.AdminInfraTest" >
+<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
+-->
+ <arg line="-testpath ${tests.workfiles.dir}" />
+ <classpath refid="test.run.classpath"/>
+ </java>
+</target>
+
+<target name="run-tests-create" depends="init-tests,compile-tests">
+ <delete>
+ <fileset dir="${tests.workfiles.dir}/samples" includes="*"/>
+ <fileset dir="${testfiles.dir}/samples" includes="*"/>
+ </delete>
+ <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="-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"/>
+ </java>
+ <copy todir="${testfiles.dir}">
+ <fileset dir="${tests.workfiles.dir}" includes="samples/*"/>
+ </copy>
+</target>
+
+<target name="run-tests-print" depends="init-tests,compile-tests">
+ <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"/>
+-->
+ <classpath refid="test.run.classpath"/>
+ </java>
+</target>
+
+<path id="tng-run.cp">
+ <path refid="test.run.classpath"/>
+ <pathelement location="${testng.jar}"/>
+</path>
+
+<target name="run-tests-ng"
+ description="run examples with java"
+ depends="init-tests,compile-tests" >
+ <delete dir="./test-output"/>
+ <java fork="yes"
+ classpathref="tng-run.cp"
+ classname="org.testng.TestNG" >
+ <arg value="./testng/testng.xml"/>
+ <jvmarg value="-ea"/>
+ </java>
+</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
new file mode 100755
index 0000000..909a560
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/descriptors.xml
@@ -0,0 +1,1153 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!DOCTYPE mbeans-descriptors PUBLIC
+ "-//Sun One App Server mbean descriptor//DTD Model MBeans Configuration File"
+ "file:/home/sridatta/jws/appserv-admin-core/dtds/mbeans-descriptors.dtd">
+
+<!-- Descriptions of JMX MBeans for Sun One Application Server -->
+
+<mbeans-descriptors>
+
+<!-- +++++++++ 1. domain +++++++++++ -->
+<mbean name="domain" group="config" className="com.sun.enterprise.admin.mbeans.DomainMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=domain,category=config" />
+ <field name="xpath" value="/domain" />
+ <field name="CLIName" value="domain" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 2. applications +++++++++++ -->
+<mbean name="applications" group="config" className="com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=applications,category=config" />
+ <field name="xpath" value="/domain/applications" />
+ <field name="CLIName" value="domain.applications" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 3. lifecycle-module +++++++++++ -->
+<mbean name="lifecycle-module" group="config" >
+ <descriptor>
+ <!-- <field name="elementChangeEvent" value="ModuleDeployEvent" /> -->
+ <field name="ObjectName" value="{0}:type=lifecycle-module,name={1},category=config" />
+ <field name="xpath" value="/domain/applications/lifecycle-module[@name='{1}']" />
+ <field name="CLIName" value="domain.applications.lifecycle-module.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 4. j2ee-application +++++++++++ -->
+<mbean name="j2ee-application" group="config" >
+ <descriptor>
+ <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}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 5. ejb-module +++++++++++ -->
+<mbean name="ejb-module" group="config" >
+ <descriptor>
+ <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}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 6. web-module +++++++++++ -->
+<mbean name="web-module" group="config" >
+ <descriptor>
+ <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}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 7. connector-module +++++++++++ -->
+<mbean name="connector-module" group="config" >
+ <descriptor>
+ <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}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 8. appclient-module +++++++++++ -->
+<mbean name="appclient-module" group="config" >
+ <descriptor>
+ <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"
+ className="com.sun.enterprise.admin.mbeans.ResourcesMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=resources,category=config" />
+ <field name="xpath" value="/domain/resources" />
+ <field name="CLIName" value="domain.resources" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 10. custom-resource +++++++++++ -->
+<mbean name="custom-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=custom-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/custom-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.custom-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 11. external-jndi-resource +++++++++++ -->
+<mbean name="external-jndi-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=external-jndi-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/external-jndi-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.external-jndi-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 12. jdbc-resource +++++++++++ -->
+<mbean name="jdbc-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=jdbc-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/jdbc-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.jdbc-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 13. mail-resource +++++++++++ -->
+<mbean name="mail-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=mail-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/mail-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.mail-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 14. persistence-manager-factory-resource +++++++++++ -->
+<mbean name="persistence-manager-factory-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=persistence-manager-factory-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/persistence-manager-factory-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.persistence-manager-factory-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 15. admin-object-resource +++++++++++ -->
+<mbean name="admin-object-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=admin-object-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/admin-object-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.admin-object-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 16. connector-resource +++++++++++ -->
+<mbean name="connector-resource" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=connector-resource,jndi-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/connector-resource[@jndi-name='{1}']" />
+ <field name="CLIName" value="domain.resources.connector-resource.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 17. resource-adapter-config +++++++++++ MANUALLY MODIFIED -->
+<mbean name="resource-adapter-config" group="config">
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=resource-adapter-config,resource-adapter-name={1},category=config" />
+ <field name="xpath" value="/domain/resources/resource-adapter-config[@resource-adapter-name='{1}']" />
+ <field name="CLIName" value="domain.resources.resource-adapter-config.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 18. jdbc-connection-pool +++++++++++ -->
+<mbean name="jdbc-connection-pool" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=jdbc-connection-pool,name={1},category=config" />
+ <field name="xpath" value="/domain/resources/jdbc-connection-pool[@name='{1}']" />
+ <field name="CLIName" value="domain.resources.jdbc-connection-pool.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 19. connector-connection-pool +++++++++++ -->
+<mbean name="connector-connection-pool" group="config" className="com.sun.enterprise.admin.mbeans.ConnectorConnectionPoolMBean">
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=connector-connection-pool,name={1},category=config" />
+ <field name="xpath" value="/domain/resources/connector-connection-pool[@name='{1}']" />
+ <field name="CLIName" value="domain.resources.connector-connection-pool.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 20. security-map +++++++++++ -->
+<mbean name="security-map" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=security-map,name={2},connector-connection-pool={1},category=config" />
+ <field name="xpath" value="/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']" />
+ <field name="CLIName" value="domain.resources.connector-connection-pool.{1}.security-map.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 21. principal +++++++++++ -->
+<mbean name="principal" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=principal,connector-connection-pool={1},security-map={2},category=config" />
+ <field name="xpath" value="/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']/principal" />
+ <field name="CLIName" value="@domain.resources.connector-connection-pool.{1}.security-map.{2}.principal" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 22. user-group +++++++++++ -->
+<mbean name="user-group" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=user-group,connector-connection-pool={1},security-map={2},category=config" />
+ <field name="xpath" value="/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']/user-group" />
+ <field name="CLIName" value="@domain.resources.connector-connection-pool.{1}.security-map.{2}.user-group" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 23. backend-principal +++++++++++ -->
+<mbean name="backend-principal" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=backend-principal,connector-connection-pool={1},security-map={2},category=config" />
+ <field name="xpath" value="/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']/backend-principal" />
+ <field name="CLIName" value="domain.resources.connector-connection-pool.{1}.security-map.{2}.backend-principal" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 24. configs +++++++++++ -->
+<mbean name="configs" group="config" className="com.sun.enterprise.admin.mbeans.ConfigsMBean" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=configs,category=config" />
+ <field name="xpath" value="/domain/configs" />
+ <field name="CLIName" value="domain.configs" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 25. config +++++++++++ -->
+<mbean name="config" group="config" className="com.sun.enterprise.admin.mbeans.ConfigMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=config,name={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']" />
+ <field name="CLIName" value="{1}" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 26. http-service +++++++++++ -->
+<mbean name="http-service" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.http.HSServiceEvent" />
+ <field name="ObjectName" value="{0}:type=http-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service" />
+ <field name="CLIName" value="{1}.http-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 27. http-listener +++++++++++ -->
+<mbean name="http-listener" group="config" className="com.sun.enterprise.admin.mbeans.HttpListenerMBean" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.http.HSHttpListenerEvent" />
+ <field name="ObjectName" value="{0}:type=http-listener,id={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/http-listener[@id='{2}']" />
+ <field name="CLIName" value="{1}.http-service.http-listener.{2}" />
+ </descriptor>
+ <attribute name="server-name" >
+ <descriptor>
+ <field name="emptyValueAllowed" value="true" />
+ </descriptor>
+ </attribute>
+</mbean>
+<!-- +++++++++ 28. ssl +++++++++++ -->
+<mbean name="ssl" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.http.HSSslEvent" />
+ <field name="ObjectName" value="{0}:type=ssl,config={1},http-listener={2},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/http-listener[@id='{2}']/ssl" />
+ <field name="CLIName" value="{1}.http-service.http-listener.{2}.ssl" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 29. mime +++++++++++ -->
+<mbean name="mime" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=mime,id={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/mime[@id='{2}']" />
+ <field name="CLIName" value="{1}.http-service.mime.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 30. acl +++++++++++ -->
+<mbean name="acl" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=acl,id={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/acl[@id='{2}']" />
+ <field name="CLIName" value="{1}.http-service.acl.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 31. virtual-server +++++++++++ -->
+<mbean name="virtual-server" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.http.HSVirtualServerEvent" />
+ <field name="ObjectName" value="{0}:type=virtual-server,id={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']" />
+ <field name="CLIName" value="{1}.http-service.virtual-server.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 32. http-qos +++++++++++ -->
+<mbean name="http-qos" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=http-qos,config={1},virtual-server={2},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']/http-qos" />
+ <field name="CLIName" value="{1}.http-service.virtual-server.{2}.http-qos" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 33. auth-db +++++++++++ -->
+<mbean name="auth-db" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=auth-db,id={3},config={1},virtual-server={2},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']/auth-db[@id='{3}']" />
+ <field name="CLIName" value="{1}.http-service.virtual-server.{2}.auth-db.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 34. http-qos# +++++++++++ -->
+<mbean name="http-qos#" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=http-qos,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/http-qos" />
+ <field name="CLIName" value="{1}.http-service.http-qos" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 35. iiop-service +++++++++++ -->
+<mbean name="iiop-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=iiop-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/iiop-service" />
+ <field name="CLIName" value="{1}.iiop-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 36. orb +++++++++++ -->
+<mbean name="orb" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=orb,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/iiop-service/orb" />
+ <field name="CLIName" value="{1}.iiop-service.orb" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 37. ssl-client-config +++++++++++ -->
+<mbean name="ssl-client-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ssl-client-config,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/iiop-service/ssl-client-config" />
+ <field name="CLIName" value="{1}.iiop-service.ssl-client-config" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 38. ssl# +++++++++++ -->
+<mbean name="ssl#" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ssl,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/iiop-service/ssl-client-config/ssl" />
+ <field name="CLIName" value="{1}.iiop-service.ssl" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 39. iiop-listener +++++++++++ -->
+<mbean name="iiop-listener" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=iiop-listener,id={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/iiop-service/iiop-listener[@id='{2}']" />
+ <field name="CLIName" value="{1}.iiop-service.iiop-listener.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 40. ssl## +++++++++++ -->
+<mbean name="ssl##" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ssl,config={1},iiop-listener={2},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/iiop-service/iiop-listener[@id='{2}']/ssl" />
+ <field name="CLIName" value="{1}.iiop-service.iiop-listener.{2}.ssl" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 41. admin-service +++++++++++ -->
+<mbean name="admin-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=admin-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/admin-service" />
+ <field name="CLIName" value="{1}.admin-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 42. system +++++++++++ -->
+<mbean name="system" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=system,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/admin-service/system" />
+ <field name="CLIName" value="{1}.admin-service.system" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 45. jmx-connector +++++++++++ -->
+<mbean group="config" name="jmx-connector" className="com.sun.enterprise.admin.mbeans.JmxConnectorMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=jmx-connector,name={2},config={1},category=config"/>
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/admin-service/jmx-connector[@name='{2}']"/>
+ <field name="CLIName" value="{1}.admin-service.jmx-connector.{2}"/>
+ </descriptor>
+ <attribute name="JMXServiceURL" type="java.lang.String" writeable="false" />
+</mbean>
+<!-- +++++++++ 46. ssl#### +++++++++++ -->
+<mbean name="ssl####" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ssl,config={1},jmx-connector={2},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/admin-service/jmx-connector[@name='{2}']/ssl" />
+ <field name="CLIName" value="{1}.admin-service.jmx-connector.{2}.ssl" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 47. das-config +++++++++++ -->
+<mbean name="das-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=das-config,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/admin-service/das-config" />
+ <field name="CLIName" value="{1}.admin-service.das-config" />
+ </descriptor>
+ <attribute name="deploy-xml-validation" writeable="false" />
+
+</mbean>
+<!-- +++++++++ 48. web-container +++++++++++ -->
+<mbean name="web-container" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=web-container,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/web-container" />
+ <field name="CLIName" value="{1}.web-container" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 49. session-config +++++++++++ -->
+<mbean name="session-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=session-config,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/web-container/session-config" />
+ <field name="CLIName" value="{1}.session-config" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 50. session-manager +++++++++++ -->
+<mbean name="session-manager" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=session-manager,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/web-container/session-config/session-manager" />
+ <field name="CLIName" value="{1}.session-config.session-manager" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 51. manager-properties +++++++++++ -->
+<mbean name="manager-properties" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=manager-properties,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/web-container/session-config/session-manager/manager-properties" />
+ <field name="CLIName" value="{1}.session-config.session-manager.manager-properties" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 52. store-properties +++++++++++ -->
+<mbean name="store-properties" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=store-properties,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/web-container/session-config/session-manager/store-properties" />
+ <field name="CLIName" value="{1}.session-config.session-manager.store-properties" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 53. session-properties +++++++++++ -->
+<mbean name="session-properties" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=session-properties,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/web-container/session-config/session-properties" />
+ <field name="CLIName" value="{1}.session-config.session-properties" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 54. ejb-container +++++++++++ -->
+<mbean name="ejb-container" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ejb-container,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/ejb-container" />
+ <field name="CLIName" value="{1}.ejb-container" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 55. ejb-timer-service +++++++++++ -->
+<mbean name="ejb-timer-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ejb-timer-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/ejb-container/ejb-timer-service" />
+ <field name="CLIName" value="{1}.ejb-container.ejb-timer-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 56. mdb-container +++++++++++ -->
+<mbean name="mdb-container" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=mdb-container,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/mdb-container" />
+ <field name="CLIName" value="{1}.mdb-container" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 57. jms-service +++++++++++ -->
+<mbean name="jms-service" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.jms.JmsServiceEvent" />
+ <field name="ObjectName" value="{0}:type=jms-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/jms-service" />
+ <field name="CLIName" value="{1}.jms-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 58. jms-host +++++++++++ -->
+<mbean name="jms-host" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.jms.JmsHostEvent" />
+ <field name="ObjectName" value="{0}:type=jms-host,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/jms-service/jms-host[@name='{2}']" />
+ <field name="CLIName" value="{1}.jms-service.jms-host.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 59. log-service +++++++++++ -->
+<mbean name="log-service" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.log.LogServiceEvent" />
+ <field name="ObjectName" value="{0}:type=log-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/log-service" />
+ <field name="CLIName" value="{1}.log-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 60. module-log-levels +++++++++++ -->
+<mbean name="module-log-levels" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="LogLevelChangeEvent" />
+ <field name="ObjectName" value="{0}:type=module-log-levels,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/log-service/module-log-levels" />
+ <field name="CLIName" value="{1}.log-service.module-log-levels" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 61. security-service +++++++++++ -->
+<mbean name="security-service" className="com.sun.enterprise.admin.mbeans.SecurityServiceMBean" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="SecurityServiceEvent" />
+ <field name="ObjectName" value="{0}:type=security-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service" />
+ <field name="CLIName" value="{1}.security-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 62. auth-realm +++++++++++ -->
+<mbean name="auth-realm" group="config" className="com.sun.enterprise.admin.mbeans.AuthRealmMBean">
+ <descriptor>
+ <field name="elementChangeEvent" value="AuthRealmEvent" />
+ <field name="ObjectName" value="{0}:type=auth-realm,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/auth-realm[@name='{2}']" />
+ <field name="CLIName" value="{1}.security-service.auth-realm.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 63. jacc-provider +++++++++++ -->
+<mbean name="jacc-provider" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=jacc-provider,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/jacc-provider[@name='{2}']" />
+ <field name="CLIName" value="{1}.security-service.jacc-provider.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 64. audit-module +++++++++++ -->
+<mbean name="audit-module" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="AuditModuleEvent" />
+ <field name="ObjectName" value="{0}:type=audit-module,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/audit-module[@name='{2}']" />
+ <field name="CLIName" value="{1}.security-service.audit-module.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 64-1. message-security-config +++++++++++ -->
+<mbean name="message-security-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=message-security-config,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']" />
+ <field name="CLIName" value="{1}.security-service.message-security-config.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 64-2. provider-config +++++++++++ -->
+<mbean name="provider-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=provider-config,name={3},message-security-config={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']/provider-config[@provider-id='{3}']" />
+ <field name="CLIName" value="{1}.security-service.message-security-config.{2}.provider-config.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 64-3. request-policy +++++++++++ -->
+<mbean name="request-policy" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=request-policy,provider-config={3},message-security-config={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']/provider-config[@provider-id='{3}']/request-policy" />
+ <field name="CLIName" value="{1}.security-service.message-security-config.{2}.provider-config.{3}.request-policy" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 64-4. response-policy +++++++++++ -->
+<mbean name="response-policy" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=response-policy,provider-config={3},message-security-config={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']/provider-config[@provider-id='{3}']/response-policy" />
+ <field name="CLIName" value="{1}.security-service.message-security-config.{2}.provider-config.{3}.response-policy" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 65. transaction-service +++++++++++ -->
+<mbean name="transaction-service" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.tx.JTSEvent" />
+ <field name="ObjectName" value="{0}:type=transaction-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/transaction-service" />
+ <field name="CLIName" value="{1}.transaction-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 66. monitoring-service +++++++++++ -->
+<mbean name="monitoring-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=monitoring-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/monitoring-service" />
+ <field name="CLIName" value="{1}.monitoring-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 67. module-monitoring-levels +++++++++++ -->
+<mbean name="module-monitoring-levels" group="config" className="com.sun.enterprise.admin.mbeans.ModuleMonitoringLevelsMBean">
+ <descriptor>
+ <field name="elementChangeEvent" value="MonitoringLevelChangeEvent" />
+ <field name="ObjectName" value="{0}:type=module-monitoring-levels,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/monitoring-service/module-monitoring-levels" />
+ <field name="CLIName" value="{1}.monitoring-service.module-monitoring-levels" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 68. java-config +++++++++++ -->
+<mbean name="java-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=java-config,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/java-config" />
+ <field name="CLIName" value="{1}.java-config" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 69. profiler +++++++++++ -->
+<mbean name="profiler" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=profiler,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/java-config/profiler" />
+ <field name="CLIName" value="{1}.java-config.profiler" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 70. jvm-options +++++++++++ -->
+<mbean name="jvm-options" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=jvm-options,config={1},profiler={2},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/java-config/profiler[@name='{2}']/jvm-options" />
+ <field name="CLIName" value="{1}.java-config.profiler.jvm-options.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 71. jvm-options# +++++++++++ -->
+<mbean name="jvm-options#" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=jvm-options,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/java-config/jvm-options" />
+ <field name="CLIName" value="{1}.java-config.jvm-options" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 72. availability-service +++++++++++ -->
+<mbean name="availability-service" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.availability.AvailabilityServiceEvent" />
+ <field name="ObjectName" value="{0}:type=availability-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/availability-service" />
+ <field name="CLIName" value="{1}.availability-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 73. persistence-store +++++++++++ -->
+<mbean name="persistence-store" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=persistence-store,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/availability-service/persistence-store" />
+ <field name="CLIName" value="{1}.availability-service.persistence-store" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 74. group-service +++++++++++ -->
+<mbean name="group-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=group-service,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/group-service[@name='{2}']" />
+ <field name="CLIName" value="{1}.group-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 75. thread-pools +++++++++++ -->
+<mbean name="thread-pools" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=thread-pools,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/thread-pools" />
+ <field name="CLIName" value="{1}.thread-pools" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 76. thread-pool +++++++++++ -->
+<mbean name="thread-pool" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=thread-pool,thread-pool-id={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/thread-pools/thread-pool[@thread-pool-id='{2}']" />
+ <field name="CLIName" value="{1}.thread-pools.thread-pool.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 77. servers +++++++++++ -->
+<mbean name="servers" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=servers,category=config" />
+ <field name="xpath" value="/domain/servers" />
+ <field name="CLIName" value="domain.servers" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 78. server +++++++++++ -->
+<mbean name="server" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=server,name={1},category=config" />
+ <field name="xpath" value="/domain/servers/server[@name='{1}']" />
+ <field name="CLIName" value="{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 79. application-ref +++++++++++ -->
+<mbean name="application-ref" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ApplicationDeployEvent" />
+ <field name="ObjectName" value="{0}:type=application-ref,ref={2},server={1},category=config" />
+ <field name="xpath" value="/domain/servers/server[@name='{1}']/application-ref[@ref='{2}']" />
+ <field name="CLIName" value="{1}.application-ref.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 80. resource-ref +++++++++++ -->
+<mbean name="resource-ref" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=resource-ref,ref={2},server={1},category=config" />
+ <field name="xpath" value="/domain/servers/server[@name='{1}']/resource-ref[@ref='{2}']" />
+ <field name="CLIName" value="{1}.resource-ref.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 84. node-agents +++++++++++ -->
+<mbean name="node-agents" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=node-agents,category=config" />
+ <field name="xpath" value="/domain/node-agents" />
+ <field name="CLIName" value="domain.node-agents" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 85. node-agent +++++++++++ -->
+<mbean name="node-agent" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=node-agent,name={1},category=config" />
+ <field name="xpath" value="/domain/node-agents/node-agent[@name='{1}']" />
+ <field name="CLIName" value="domain.node-agent.{1}" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 86. log-service# +++++++++++ -->
+<mbean name="log-service#" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=log-service,node-agent={1},category=config" />
+ <field name="xpath" value="/domain/node-agents/node-agent[@name='{1}']/log-service" />
+ <field name="CLIName" value="domain.node-agent.{1}.log-service" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 87. module-log-levels# +++++++++++ -->
+<mbean name="module-log-levels#" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=module-log-levels,node-agent={1},category=config" />
+ <field name="xpath" value="/domain/node-agents/node-agent[@name='{1}']/log-service/module-log-levels" />
+ <field name="CLIName" value="domain.node-agent.{1}.log-service.odule-log-levels" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 88. loadbalancers +++++++++++ -->
+<mbean name="lb-configs" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=lb-configs,category=config" />
+ <field name="xpath" value="/domain/lb-configs" />
+ <field name="CLIName" value="domain.lb-configs" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 89. loadbalancer +++++++++++ -->
+<mbean name="lb-config" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=lb-config,name={1},category=config" />
+ <field name="xpath" value="/domain/lb-configs/lb-config[@name='{1}']" />
+ <field name="CLIName" value="domain.lb-configs.lb-config.{1}" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 90. server-ref +++++++++++ -->
+<mbean name="lb-server-ref" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=server-ref,ref={2},lb-config={1},category=config" />
+ <field name="xpath" value="/domain/lb-configs/lb-config[@name='{1}']/server-ref[@ref='{2}']" />
+ <field name="CLIName" value="domain.lb-configs.lb-config.{1}.server-ref.{2}" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+
+<!-- +++++++++ 91. lb-cluster-ref +++++++++++ -->
+<mbean name="lb-cluster-ref" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=cluster-ref,ref={2},lb-config={1},category=config" />
+ <field name="xpath" value="/domain/lb-configs/lb-config[@name='{1}']/cluster-ref[@ref='{2}']" />
+ <field name="CLIName" value="domain.lb-configs.lb-config.{1}.cluster-ref.{2}" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+
+<!-- +++++++++ 92. lb-server-ref-health-checker +++++++++++ -->
+<mbean name="lb-server-ref-health-checker" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=health-checker,server-ref={2},lb-config={1},category=config" />
+ <field name="xpath" value="/domain/lb-configs/lb-config[@name='{1}']/server-ref[@ref='{2}']/health-checker" />
+ <field name="CLIName" value="domain.lb-configs.lb-config.{1}.server-ref.{2}.health-checker" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+
+<!-- +++++++++ 93. lb-cluster-ref-health-checker +++++++++++ -->
+<mbean name="lb-cluster-ref-health-checker" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=health-checker,cluster-ref={2},lb-config={1},category=config" />
+ <field name="xpath" value="/domain/lb-configs/lb-config[@name='{1}']/cluster-ref[@ref='{2}']/health-checker" />
+ <field name="CLIName" value="domain.lb-configs.lb-config.{1}.cluster-ref.{2}.health-checker" />
+ <field name="dynamicallyReconfigurable" value="**" />
+ </descriptor>
+</mbean>
+
+<!-- +++++++++ 116. request-processing +++++++++++ -->
+<mbean name="request-processing" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=request-processing,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/request-processing" />
+ <field name="CLIName" value="{1}.http-service.request-processing" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 117. keep-alive +++++++++++ -->
+<mbean name="keep-alive" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=keep-alive,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/keep-alive" />
+ <field name="CLIName" value="{1}.http-service.keep-alive" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 118. connection-pool +++++++++++ -->
+<mbean name="connection-pool" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=connection-pool,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/connection-pool" />
+ <field name="CLIName" value="{1}.http-service.connection-pool" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 119. http-protocol +++++++++++ -->
+<mbean name="http-protocol" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=http-protocol,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/http-protocol" />
+ <field name="CLIName" value="{1}.http-service.http-protocol" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 120. http-file-cache +++++++++++ -->
+<mbean name="http-file-cache" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=http-file-cache,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/http-file-cache" />
+ <field name="CLIName" value="{1}.http-service.http-file-cache" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 121. access-log +++++++++++ -->
+<mbean name="access-log" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.http.HSAccessLogEvent" />
+ <field name="ObjectName" value="{0}:type=access-log,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/access-log" />
+ <field name="CLIName" value="{1}.http-service.access-log" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 122. failure-notification-service +++++++++++ -->
+<mbean name="failure-notification-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=failure-notification-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/group-management-service/failure-notification-service" />
+ <field name="CLIName" value="{1}.failure-notification-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 123. web-container-availability +++++++++++ -->
+<mbean name="web-container-availability" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=web-container-availability,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/availability-service/web-container-availability" />
+ <field name="CLIName" value="{1}.web-container-availability" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 124. ejb-container-availability +++++++++++ -->
+<mbean name="ejb-container-availability" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ejb-container-availability,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/availability-service/ejb-container-availability" />
+ <field name="CLIName" value="{1}.ejb-container-availability" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 125. ejb-timer-management +++++++++++ -->
+<mbean name="ejb-timer-management" group="config" className="com.sun.enterprise.admin.mbeans.EJBTimerManagementMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ejb-timer-management,category=config"/>
+ </descriptor>
+ </mbean>
+<!-- +++++++++ 126. password-alias +++++++++++ -->
+<mbean name="password-alias" group="config" className="com.sun.enterprise.admin.mbeans.PasswordAliasConfigMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=password-alias,category=config"/>
+ </descriptor>
+</mbean>
+<!-- +++++++++ 126. cluster-application-ref +++++++++++ -->
+<mbean name="cluster-application-ref" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ApplicationDeployEvent" />
+ <field name="ObjectName" value="{0}:type=application-ref,ref={2},cluster={1},category=config" />
+ <field name="xpath" value="/domain/clusters/cluster[@name='{1}']/application-ref[@ref='{2}']" />
+ <field name="CLIName" value="{1}.application-ref.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 127. cluster-resource-ref +++++++++++ -->
+<mbean name="cluster-resource-ref" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="ResourceDeployEvent" />
+ <field name="ObjectName" value="{0}:type=resource-ref,ref={2},cluster={1},category=config" />
+ <field name="xpath" value="/domain/clusters/cluster[@name='{1}']/resource-ref[@ref='{2}']" />
+ <field name="CLIName" value="{1}.resource-ref.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 127-a. cluster-server-ref +++++++++++ -->
+<mbean name="cluster-server-ref" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=server-ref,ref={2},cluster={1},category=config" />
+ <field name="xpath" value="/domain/clusters/cluster[@name='{1}']/server-ref[@ref='{2}']" />
+ <field name="CLIName" value="{1}.server-ref.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 128. connector-service +++++++++++ -->
+<mbean name="connector-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=connector-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/connector-service" />
+ <field name="CLIName" value="{1}.connector-service" />
+ </descriptor>
+</mbean>
+
+<!-- +++++++++ 129. nodeagent-jmx-connector +++++++++++ -->
+<mbean name="nodeagent-jmx-connector" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=jmx-connector,node-agent={1},category=config" />
+ <field name="xpath" value="/domain/node-agents/node-agent[@name='{1}']/jmx-connector" />
+ <field name="CLIName" value="domain.node-agent.{1}.jmx-connector" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 130. nodeagent-jmx-connector-ssl +++++++++++ -->
+<mbean name="nodeagent-jmx-connector-ssl" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=ssl,node-agent={1},category=config" />
+ <field name="xpath" value="/domain/node-agents/node-agent[@name='{1}']/jmx-connector/ssl" />
+ <field name="CLIName" value="domain.node-agent.{1}.jmx-connector.ssl" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 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="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" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 132. transactions-recovery +++++++++++ -->
+<mbean name="transactions-recovery" group="config" className="com.sun.enterprise.admin.mbeans.TransactionsRecoveryMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=transactions-recovery,category=config" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 133. transaction-service-manager +++++++++++ -->
+<mbean name="transaction-service-manager" group="config" className="com.sun.enterprise.admin.mbeans.TransactionServiceManagerMBean">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=transaction-service-manager,category=config" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 134. http-access-log +++++++++++ -->
+<mbean name="http-access-log" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=http-access-log,virtual-server={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']/http-access-log" />
+ <field name="CLIName" value="{1}.http-service.virtual-server.{2}.http-access-log" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 134. diagnostic-service +++++++++++ -->
+<mbean name="diagnostic-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=diagnostic-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/diagnostic-service" />
+ <field name="CLIName" value="{1}.diagnostic-service" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 135. group-management-service +++++++++++ -->
+<mbean name="group-management-service" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=group-management-service,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/group-management-service" />
+ <field name="CLIName" value="{1}.group-management-service" />
+ </descriptor>
+</mbean>
+
+<!-- +++++++++ 136. j2ee-application-web-service-endpoint +++++++++++ -->
+<mbean name="j2ee-application-web-service-endpoint" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.WebServiceEndpointEvent" />
+ <field name="ObjectName" value="{0}:type=web-service-endpoint,name={2},j2ee-application={1},category=config" />
+ <field name="xpath" value="/domain/applications/j2ee-application[@name='{1}']/web-service-endpoint[@name='{2}']" />
+ <field name="CLIName" value="domain.applications.j2ee-application.{1}.web-service-endpoint.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 137. ejb-module-web-service-endpoint +++++++++++ -->
+<mbean name="ejb-module-web-service-endpoint" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.WebServiceEndpointEvent" />
+ <field name="ObjectName" value="{0}:type=web-service-endpoint,name={2},ejb-module={1},category=config" />
+ <field name="xpath" value="/domain/applications/ejb-module[@name='{1}']/web-service-endpoint[@name='{2}']" />
+ <field name="CLIName" value="domain.applications.ejb-module.{1}.web-service-endpoint.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 138. web-module-web-service-endpoint +++++++++++ -->
+<mbean name="web-module-web-service-endpoint" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.WebServiceEndpointEvent" />
+ <field name="ObjectName" value="{0}:type=web-service-endpoint,name={2},web-module={1},category=config" />
+ <field name="xpath" value="/domain/applications/web-module[@name='{1}']/web-service-endpoint[@name='{2}']" />
+ <field name="CLIName" value="domain.applications.web-module.{1}.web-service-endpoint.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 142. j2ee-application-web-service-endpoint-registry-location +++++++++++ -->
+<mbean name="j2ee-application-web-service-endpoint-registry-location" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.RegistryLocationEvent" />
+ <field name="ObjectName" value="{0}:type=registry-location,connector-resource-jndi-name={3},web-service-endpoint={2},j2ee-application={1},category=config" />
+ <field name="xpath" value="/domain/applications/j2ee-application[@name='{1}']/web-service-endpoint[@name='{2}']/registry-location[@connector-resource-jndi-name='{3}']" />
+ <field name="CLIName" value="domain.applications.j2ee-application.{1}.web-service-endpoint.{2}.registry-location.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 143. ejb-module-web-service-endpoint-registry-location +++++++++++ -->
+<mbean name="ejb-module-web-service-endpoint-registry-location" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.RegistryLocationEvent" />
+ <field name="ObjectName" value="{0}:type=registry-location,connector-resource-jndi-name={3},web-service-endpoint={2},ejb-module={1},category=config" />
+ <field name="xpath" value="/domain/applications/ejb-module[@name='{1}']/web-service-endpoint[@name='{2}']/registry-location[@connector-resource-jndi-name='{3}']" />
+ <field name="CLIName" value="domain.applications.ejb-module.{1}.web-service-endpoint.{2}.registry-location.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 144. web-module-web-service-endpoint-registry-location +++++++++++ -->
+<mbean name="web-module-web-service-endpoint-registry-location" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.RegistryLocationEvent" />
+ <field name="ObjectName" value="{0}:type=registry-location,connector-resource-jndi-name={3},web-service-endpoint={2},web-module={1},category=config" />
+ <field name="xpath" value="/domain/applications/web-module[@name='{1}']/web-service-endpoint[@name='{2}']/registry-location[@connector-resource-jndi-name='{3}']" />
+ <field name="CLIName" value="domain.applications.web-module.{1}.web-service-endpoint.{2}.registry-location.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 147. j2ee-application-web-service-endpoint-transformation-rule +++++++++++ -->
+<mbean name="j2ee-application-web-service-endpoint-transformation-rule" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent" />
+ <field name="ObjectName" value="{0}:type=transformation-rule,name={3},web-service-endpoint={2},j2ee-application={1},category=config" />
+ <field name="xpath" value="/domain/applications/j2ee-application[@name='{1}']/web-service-endpoint[@name='{2}']/transformation-rule[@name='{3}']" />
+ <field name="CLIName" value="domain.applications.j2ee-application.{1}.web-service-endpoint.{2}.transformation-rule.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 148. ejb-module-web-service-endpoint-transformation-rule +++++++++++ -->
+<mbean name="ejb-module-web-service-endpoint-transformation-rule" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent" />
+ <field name="ObjectName" value="{0}:type=transformation-rule,name={3},web-service-endpoint={2},ejb-module={1},category=config" />
+ <field name="xpath" value="/domain/applications/ejb-module[@name='{1}']/web-service-endpoint[@name='{2}']/transformation-rule[@name='{3}']" />
+ <field name="CLIName" value="domain.applications.ejb-module.{1}.web-service-endpoint.{2}.transformation-rule.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 149. web-module-web-service-endpoint-transformation-rule +++++++++++ -->
+<mbean name="web-module-web-service-endpoint-transformation-rule" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent" />
+ <field name="ObjectName" value="{0}:type=transformation-rule,name={3},web-service-endpoint={2},web-module={1},category=config" />
+ <field name="xpath" value="/domain/applications/web-module[@name='{1}']/web-service-endpoint[@name='{2}']/transformation-rule[@name='{3}']" />
+ <field name="CLIName" value="domain.applications.web-module.{1}.web-service-endpoint.{2}.transformation-rule.{3}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 152. load-balancers +++++++++++ -->
+<mbean name="load-balancers" group="config">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=load-balancers,category=config" />
+ <field name="xpath" value="/domain/load-balancers" />
+ <field name="CLIName" value="domain.load-balancers" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 153. load-balancer +++++++++++ -->
+<mbean name="load-balancer" group="config">
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=load-balancer,name={1},category=config" />
+ <field name="xpath" value="/domain/load-balancers/load-balancer[@name='{1}']" />
+ <field name="CLIName" value="domain.load-balancers.load-balancer.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 154. mbean +++++++++++ -->
+<mbean name="mbean" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.MBeanElementChangeEvent"/>
+ <field name="ObjectName" value="{0}:type=mbean,name={1},category=config" />
+ <field name="xpath" value="/domain/applications/mbean[@name='{1}']" />
+ <field name="CLIName" value="domain.applications.mbean.{1}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 155. jms-availability +++++++++++ -->
+<mbean name="jms-availability" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=jms-availability,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/availability-service/jms-availability" />
+ <field name="CLIName" value="{1}.availability-service.jms-availability" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 156. management-rules +++++++++++ -->
+<mbean name="management-rules" group="config" className="com.sun.enterprise.admin.mbeans.ManagementRulesMBean">
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.selfmanagement.ManagementRuleEvent"/>
+ <field name="ObjectName" value="{0}:type=management-rules,config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/management-rules" />
+ <field name="CLIName" value="{1}.management-rules" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 157. management-rule +++++++++++ -->
+<mbean name="management-rule" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.selfmanagement.ManagementRuleEvent"/>
+ <field name="ObjectName" value="{0}:type=management-rule,name={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/management-rules/management-rule[@name='{2}']" />
+ <field name="CLIName" value="{1}.management-rules.management-rule.{2}" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 158. event +++++++++++ -->
+<mbean name="event" group="config" >
+ <descriptor>
+ <field name="ObjectName" value="{0}:type=event,management-rule={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/management-rules/management-rule[@name='{2}']/event" />
+ <field name="CLIName" value="{1}.management-rules.management-rule.{2}.event" />
+ </descriptor>
+</mbean>
+<!-- +++++++++ 158. event +++++++++++ -->
+<mbean name="action" group="config" >
+ <descriptor>
+ <field name="elementChangeEvent" value="com.sun.enterprise.admin.event.selfmanagement.ManagementRuleEvent"/>
+ <field name="ObjectName" value="{0}:type=action,management-rule={2},config={1},category=config" />
+ <field name="xpath" value="/domain/configs/config[@name='{1}']/management-rules/management-rule[@name='{2}']/action" />
+ <field name="CLIName" value="{1}.management-rules.management-rule.{2}.action" />
+ </descriptor>
+</mbean>
+</mbeans-descriptors>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/GettersSetters.smp b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/GettersSetters.smp
new file mode 100755
index 0000000..dc186a2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/GettersSetters.smp
@@ -0,0 +1,32 @@
+
+
+************* ejb-container INSTANTIATION *******************
+32
+
+
+************* ejb-container set steady_pool_size to 20 *******************
+************BEFORE SET ******
+ victim-selection-policy=nru
+ pool-idle-timeout-in-seconds=600
+ cache-idle-timeout-in-seconds=600
+ max-pool-size=32
+ session-store=/qq/session-store
+ steady-pool-size=0
+ max-cache-size=512
+ cache-resize-quantity=32
+ removal-timeout-in-seconds=5400
+ commit-option=B
+ pool-resize-quantity=8
+
+************AFTER SET******
+ victim-selection-policy=nru
+ pool-idle-timeout-in-seconds=600
+ cache-idle-timeout-in-seconds=600
+ max-pool-size=32
+ session-store=/qq/session-store
+ steady-pool-size=20
+ max-cache-size=512
+ cache-resize-quantity=32
+ removal-timeout-in-seconds=5400
+ commit-option=B
+ pool-resize-quantity=8
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/LICENSE.md b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/LICENSE.md
new file mode 100644
index 0000000..e0358f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/LICENSE.md
@@ -0,0 +1,29 @@
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/README.md b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/README.md
new file mode 100644
index 0000000..766dda6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/README.md
@@ -0,0 +1 @@
+This directory contains sample code and hence files within this directory and below are covered under EDL 1.0.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/childOperations.smp b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/childOperations.smp
new file mode 100755
index 0000000..de87cab
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/childOperations.smp
@@ -0,0 +1,71 @@
+
+
+************* resources Instantiate() *******************
+
+
+************* resources-> getCustomResource() *******************
+Returned object:
+ array.length = 0
+
+
+************* resources-> createCustomResource(testJndiName2/testResType2/testFactoryClass2) *******************
+Input Attributes:
+ jndi_name=testJndiName2
+ res_type=testResType2
+ factory_class=testFactoryClass2
+Returned object:
+ testdomain:type=custom-resource,jndi-name=testJndiName2,category=config
+
+
+************* resources-> getCustomResourceByJndiName(testJndiName2) *******************
+Returned object:
+ testdomain:type=custom-resource,jndi-name=testJndiName2,category=config
+
+
+************* resources-> getCustomResource() *******************
+Returned object:
+ [0] -> testdomain:type=custom-resource,jndi-name=testJndiName2,category=config
+
+
+************* custom-resource-> Instantiate(testJndiName2) *******************
+returned custom-resource[testJndiName2] mbean:com.sun.enterprise.admin.config.BaseConfigMBean
+
+
+************* custom-resource[testJndiName2]-> getAttributes() *******************
+Attributes:
+ factory-class=testFactoryClass2
+ enabled=true
+ description=null
+ res-type=testResType2
+ jndi-name=testJndiName2
+ object-type=user
+
+
+************* custom-resource-> Instantiate(testJndiName2) using ObjectName *******************
+returned custom-resource[testJndiName2] mbean:com.sun.enterprise.admin.config.BaseConfigMBean
+
+
+************* custom-resource[testJndiName2]-> getAttributes() *******************
+Attributes:
+ factory-class=testFactoryClass2
+ enabled=true
+ description=null
+ res-type=testResType2
+ jndi-name=testJndiName2
+ object-type=user
+
+
+************* resources-> getCustomResource() *******************
+Returned object:
+ [0] -> testdomain:type=custom-resource,jndi-name=testJndiName2,category=config
+
+
+************* resources-> removeCustomResourceByJndiName(testJndiName2) *******************
+Returned object:
+ null
+ null
+
+
+************* resources-> getCustomResource() *******************
+Returned object:
+ array.length = 0
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testArrayAttrs.smp b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testArrayAttrs.smp
new file mode 100755
index 0000000..c6154b2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testArrayAttrs.smp
@@ -0,0 +1,16 @@
+
+
+************* thread-pools Instantiate() *******************
+Returned object:
+ com.sun.enterprise.admin.config.BaseConfigMBean
+
+
+************* thread-pools-> createThreadPool *******************
+Input Attributes:
+ thread_pool_id=mytestThreadPool
+ min_thread_pool_size=100
+ max_thread_pool_size=200
+ num_work_queues=12
+ idle_thread_timeout_in_seconds=50
+Returned object:
+ testdomain:type=thread-pool,thread-pool-id=mytestThreadPool,config=server-config,category=config
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testDefaultValues.smp b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testDefaultValues.smp
new file mode 100755
index 0000000..37f3ca5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testDefaultValues.smp
@@ -0,0 +1,3 @@
+
+
+************* Domain MBean Instantiate() *******************
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testMBeanRegistry.smp b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testMBeanRegistry.smp
new file mode 100755
index 0000000..dd49699
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testMBeanRegistry.smp
@@ -0,0 +1,5508 @@
+MBeanRegistry(132 entries):
+
+--- MBeanRegistryEntry:
+ ManagedBean[name=access-log, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.http.HSAccessLogEvent ObjectName={0}:type=access-log,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/access-log CLIName={1}.http-service.access-log ]
+
+ --- Attributes:
+ AttributeInfo[name=rotation-enabled, description=null, type=boolean]
+ Descriptor[setter=setRotationEnabled getter=isRotationEnabled bean=CBEAN ]
+ AttributeInfo[name=rotation-interval-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setRotationIntervalInMinutes getter=getRotationIntervalInMinutes bean=CBEAN ]
+ AttributeInfo[name=format, description=null, type=java.lang.String]
+ Descriptor[setter=setFormat getter=getFormat bean=CBEAN ]
+ AttributeInfo[name=rotation-suffix, description=null, type=java.lang.String]
+ Descriptor[setter=setRotationSuffix getter=getRotationSuffix bean=CBEAN ]
+ AttributeInfo[name=rotation-policy, description=null, type=java.lang.String]
+ Descriptor[setter=setRotationPolicy getter=getRotationPolicy bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=acl, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=acl,id={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/acl[@id='{2}'] CLIName={1}.http-service.acl.{2} ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=action, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.selfmanagement.ManagementRuleEvent ObjectName={0}:type=action,management-rule={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/management-rules/management-rule[@name='{2}']/action CLIName={1}.management-rules.management-rule.{2}.action ]
+
+ --- Attributes:
+ AttributeInfo[name=action-mbean-name, description=null, type=java.lang.String]
+ Descriptor[setter=setActionMbeanName getter=getActionMbeanName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=admin-object-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=admin-object-resource,jndi-name={1},category=config xpath=/domain/resources/admin-object-resource[@jndi-name='{1}'] CLIName=domain.resources.admin-object-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=res-adapter, description=null, type=java.lang.String]
+ Descriptor[setter=setResAdapter getter=getResAdapter bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=res-type, description=null, type=java.lang.String]
+ Descriptor[setter=setResType getter=getResType bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=admin-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=admin-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/admin-service CLIName={1}.admin-service ]
+
+ --- Attributes:
+ AttributeInfo[name=type, description=null, type=java.lang.String]
+ Descriptor[setter=setType getter=getType bean=CBEAN ]
+ AttributeInfo[name=system-jmx-connector-name, description=null, type=java.lang.String]
+ Descriptor[setter=setSystemJmxConnectorName getter=getSystemJmxConnectorName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getDasConfig, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=das-config ]
+ OperationInfo[name=createDasConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=das-config ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeDasConfig, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=das-config ]
+ OperationInfo[name=getJmxConnector, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=jmx-connector multi=true ]
+ OperationInfo[name=getJmxConnectorNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=jmx-connector multi=true ]
+ OperationInfo[name=getJmxConnectorByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jmx-connector multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createJmxConnector, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jmx-connector multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJmxConnectorByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=jmx-connector multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=appclient-module, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ModuleDeployEvent ObjectName={0}:type=appclient-module,name={1},category=config xpath=/domain/applications/appclient-module[@name='{1}'] CLIName=domain.applications.appclient-module.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=location, description=null, type=java.lang.String]
+ Descriptor[setter=setLocation getter=getLocation bean=CBEAN ]
+ AttributeInfo[name=directory-deployed, description=null, type=boolean]
+ Descriptor[setter=setDirectoryDeployed getter=isDirectoryDeployed bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=java-web-start-enabled, description=null, type=boolean]
+ Descriptor[setter=setJavaWebStartEnabled getter=isJavaWebStartEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=application-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ApplicationDeployEvent ObjectName={0}:type=application-ref,ref={2},server={1},category=config xpath=/domain/servers/server[@name='{1}']/application-ref[@ref='{2}'] CLIName={1}.application-ref.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=disable-timeout-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setDisableTimeoutInMinutes getter=getDisableTimeoutInMinutes bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=virtual-servers, description=null, type=java.lang.String]
+ Descriptor[setter=setVirtualServers getter=getVirtualServers bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+ AttributeInfo[name=lb-enabled, description=null, type=boolean]
+ Descriptor[setter=setLbEnabled getter=isLbEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=applications, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=applications,category=config xpath=/domain/applications CLIName=domain.applications ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getAppclientModule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=appclient-module multi=true ]
+ OperationInfo[name=getAppclientModuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=appclient-module multi=true ]
+ OperationInfo[name=getAppclientModuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=appclient-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createAppclientModule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=appclient-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAppclientModuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=appclient-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getLifecycleModule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=lifecycle-module multi=true ]
+ OperationInfo[name=getLifecycleModuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=lifecycle-module multi=true ]
+ OperationInfo[name=getLifecycleModuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=lifecycle-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createLifecycleModule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=lifecycle-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLifecycleModuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=lifecycle-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getMbean, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=mbean multi=true ]
+ OperationInfo[name=getMbeanNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=mbean multi=true ]
+ OperationInfo[name=getMbeanByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=mbean multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createMbean, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=mbean multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeMbeanByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=mbean multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getConnectorModule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=connector-module multi=true ]
+ OperationInfo[name=getConnectorModuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=connector-module multi=true ]
+ OperationInfo[name=getConnectorModuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createConnectorModule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConnectorModuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=connector-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getEjbModule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-module multi=true ]
+ OperationInfo[name=getEjbModuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=ejb-module multi=true ]
+ OperationInfo[name=getEjbModuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ejb-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createEjbModule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ejb-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeEjbModuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=ejb-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getWebModule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=web-module multi=true ]
+ OperationInfo[name=getWebModuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=web-module multi=true ]
+ OperationInfo[name=getWebModuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createWebModule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeWebModuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=web-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getJ2eeApplication, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=j2ee-application multi=true ]
+ OperationInfo[name=getJ2eeApplicationNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=j2ee-application multi=true ]
+ OperationInfo[name=getJ2eeApplicationByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=j2ee-application multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createJ2eeApplication, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=j2ee-application multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJ2eeApplicationByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=j2ee-application multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=audit-module, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=AuditModuleEvent ObjectName={0}:type=audit-module,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/audit-module[@name='{2}'] CLIName={1}.security-service.audit-module.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=classname, description=null, type=java.lang.String]
+ Descriptor[setter=setClassname getter=getClassname bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=auth-db, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=auth-db,id={3},config={1},virtual-server={2},category=config xpath=/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']/auth-db[@id='{3}'] CLIName={1}.http-service.virtual-server.{2}.auth-db.{3} ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=auth-realm, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=AuthRealmEvent ObjectName={0}:type=auth-realm,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/auth-realm[@name='{2}'] CLIName={1}.security-service.auth-realm.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=classname, description=null, type=java.lang.String]
+ Descriptor[setter=setClassname getter=getClassname bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=availability-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.availability.AvailabilityServiceEvent ObjectName={0}:type=availability-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/availability-service CLIName={1}.availability-service ]
+
+ --- Attributes:
+ AttributeInfo[name=ha-agent-hosts, description=null, type=java.lang.String]
+ Descriptor[setter=setHaAgentHosts getter=getHaAgentHosts bean=CBEAN ]
+ AttributeInfo[name=ha-store-healthcheck-enabled, description=null, type=boolean]
+ Descriptor[setter=setHaStoreHealthcheckEnabled getter=isHaStoreHealthcheckEnabled bean=CBEAN ]
+ AttributeInfo[name=ha-store-healthcheck-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setHaStoreHealthcheckIntervalInSeconds getter=getHaStoreHealthcheckIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=ha-agent-password, description=null, type=java.lang.String]
+ Descriptor[setter=setHaAgentPassword getter=getHaAgentPassword bean=CBEAN ]
+ AttributeInfo[name=auto-manage-ha-store, description=null, type=boolean]
+ Descriptor[setter=setAutoManageHaStore getter=isAutoManageHaStore bean=CBEAN ]
+ AttributeInfo[name=availability-enabled, description=null, type=boolean]
+ Descriptor[setter=setAvailabilityEnabled getter=isAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=ha-store-name, description=null, type=java.lang.String]
+ Descriptor[setter=setHaStoreName getter=getHaStoreName bean=CBEAN ]
+ AttributeInfo[name=store-pool-name, description=null, type=java.lang.String]
+ Descriptor[setter=setStorePoolName getter=getStorePoolName bean=CBEAN ]
+ AttributeInfo[name=ha-agent-port, description=null, type=java.lang.String]
+ Descriptor[setter=setHaAgentPort getter=getHaAgentPort bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getWebContainerAvailability, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=web-container-availability ]
+ OperationInfo[name=createWebContainerAvailability, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-container-availability ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeWebContainerAvailability, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=web-container-availability ]
+ OperationInfo[name=getJmsAvailability, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=jms-availability ]
+ OperationInfo[name=createJmsAvailability, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jms-availability ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJmsAvailability, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=jms-availability ]
+ OperationInfo[name=getEjbContainerAvailability, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-container-availability ]
+ OperationInfo[name=createEjbContainerAvailability, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ejb-container-availability ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeEjbContainerAvailability, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-container-availability ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=backend-principal, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=backend-principal,connector-connection-pool={1},security-map={2},category=config xpath=/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']/backend-principal CLIName=domain.resources.connector-connection-pool.{1}.security-map.{2}.backend-principal ]
+
+ --- Attributes:
+ AttributeInfo[name=password, description=null, type=java.lang.String]
+ Descriptor[setter=setPassword getter=getPassword bean=CBEAN ]
+ AttributeInfo[name=user-name, description=null, type=java.lang.String]
+ Descriptor[setter=setUserName getter=getUserName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=cluster-application-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ApplicationDeployEvent ObjectName={0}:type=application-ref,ref={2},cluster={1},category=config xpath=/domain/clusters/cluster[@name='{1}']/application-ref[@ref='{2}'] CLIName={1}.application-ref.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=disable-timeout-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setDisableTimeoutInMinutes getter=getDisableTimeoutInMinutes bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=virtual-servers, description=null, type=java.lang.String]
+ Descriptor[setter=setVirtualServers getter=getVirtualServers bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+ AttributeInfo[name=lb-enabled, description=null, type=boolean]
+ Descriptor[setter=setLbEnabled getter=isLbEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=cluster-resource-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=resource-ref,ref={2},cluster={1},category=config xpath=/domain/clusters/cluster[@name='{1}']/resource-ref[@ref='{2}'] CLIName={1}.resource-ref.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=cluster-server-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=server-ref,ref={2},cluster={1},category=config xpath=/domain/clusters/cluster[@name='{1}']/server-ref[@ref='{2}'] CLIName={1}.server-ref.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=disable-timeout-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setDisableTimeoutInMinutes getter=getDisableTimeoutInMinutes bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+ AttributeInfo[name=lb-enabled, description=null, type=boolean]
+ Descriptor[setter=setLbEnabled getter=isLbEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getHealthChecker, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=health-checker ]
+ OperationInfo[name=createHealthChecker, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=health-checker ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHealthChecker, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=health-checker ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=config,name={1},category=config xpath=/domain/configs/config[@name='{1}'] CLIName={1} dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=dynamic-reconfiguration-enabled, description=null, type=boolean]
+ Descriptor[setter=setDynamicReconfigurationEnabled getter=isDynamicReconfigurationEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSystemProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getSystemPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setSystemProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getDiagnosticService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=diagnostic-service ]
+ OperationInfo[name=createDiagnosticService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=diagnostic-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeDiagnosticService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=diagnostic-service ]
+ OperationInfo[name=getEjbContainer, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-container ]
+ OperationInfo[name=createEjbContainer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ejb-container ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeEjbContainer, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-container ]
+ OperationInfo[name=getMonitoringService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=monitoring-service ]
+ OperationInfo[name=createMonitoringService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=monitoring-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeMonitoringService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=monitoring-service ]
+ OperationInfo[name=getTransactionService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=transaction-service ]
+ OperationInfo[name=createTransactionService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transaction-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeTransactionService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=transaction-service ]
+ OperationInfo[name=getJmsService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=jms-service ]
+ OperationInfo[name=createJmsService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jms-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJmsService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=jms-service ]
+ OperationInfo[name=getSecurityService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=security-service ]
+ OperationInfo[name=createSecurityService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=security-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSecurityService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=security-service ]
+ OperationInfo[name=getWebContainer, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=web-container ]
+ OperationInfo[name=createWebContainer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-container ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeWebContainer, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=web-container ]
+ OperationInfo[name=getThreadPools, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=thread-pools ]
+ OperationInfo[name=createThreadPools, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=thread-pools ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeThreadPools, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=thread-pools ]
+ OperationInfo[name=getAvailabilityService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=availability-service ]
+ OperationInfo[name=createAvailabilityService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=availability-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAvailabilityService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=availability-service ]
+ OperationInfo[name=getConnectorService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=connector-service ]
+ OperationInfo[name=createConnectorService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConnectorService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=connector-service ]
+ OperationInfo[name=getHttpService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=http-service ]
+ OperationInfo[name=createHttpService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=http-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHttpService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=http-service ]
+ OperationInfo[name=getJavaConfig, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=java-config ]
+ OperationInfo[name=createJavaConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=java-config ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJavaConfig, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=java-config ]
+ OperationInfo[name=getIiopService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=iiop-service ]
+ OperationInfo[name=createIiopService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=iiop-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeIiopService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=iiop-service ]
+ OperationInfo[name=getAlertService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=alert-service ]
+ OperationInfo[name=createAlertService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=alert-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAlertService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=alert-service ]
+ OperationInfo[name=getAdminService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=admin-service ]
+ OperationInfo[name=createAdminService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=admin-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAdminService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=admin-service ]
+ OperationInfo[name=getManagementRules, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=management-rules ]
+ OperationInfo[name=createManagementRules, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=management-rules ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeManagementRules, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=management-rules ]
+ OperationInfo[name=getGroupManagementService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=group-management-service ]
+ OperationInfo[name=createGroupManagementService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=group-management-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeGroupManagementService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=group-management-service ]
+ OperationInfo[name=getMdbContainer, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=mdb-container ]
+ OperationInfo[name=createMdbContainer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=mdb-container ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeMdbContainer, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=mdb-container ]
+ OperationInfo[name=getLogService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=log-service ]
+ OperationInfo[name=createLogService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=log-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLogService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=log-service ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=configs, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=configs,category=config xpath=/domain/configs CLIName=domain.configs dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getConfig, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=config multi=true ]
+ OperationInfo[name=getConfigNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=config multi=true ]
+ OperationInfo[name=getConfigByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConfigByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=connection-pool, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=connection-pool,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/connection-pool CLIName={1}.http-service.connection-pool ]
+
+ --- Attributes:
+ AttributeInfo[name=queue-size-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setQueueSizeInBytes getter=getQueueSizeInBytes bean=CBEAN ]
+ AttributeInfo[name=receive-buffer-size-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setReceiveBufferSizeInBytes getter=getReceiveBufferSizeInBytes bean=CBEAN ]
+ AttributeInfo[name=max-pending-count, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxPendingCount getter=getMaxPendingCount bean=CBEAN ]
+ AttributeInfo[name=send-buffer-size-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setSendBufferSizeInBytes getter=getSendBufferSizeInBytes bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=connector-connection-pool, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=connector-connection-pool,name={1},category=config xpath=/domain/resources/connector-connection-pool[@name='{1}'] CLIName=domain.resources.connector-connection-pool.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=resource-adapter-name, description=null, type=java.lang.String]
+ Descriptor[setter=setResourceAdapterName getter=getResourceAdapterName bean=CBEAN ]
+ AttributeInfo[name=max-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxPoolSize getter=getMaxPoolSize bean=CBEAN ]
+ AttributeInfo[name=idle-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setIdleTimeoutInSeconds getter=getIdleTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=steady-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setSteadyPoolSize getter=getSteadyPoolSize bean=CBEAN ]
+ AttributeInfo[name=is-connection-validation-required, description=null, type=boolean]
+ Descriptor[setter=setIsConnectionValidationRequired getter=isIsConnectionValidationRequired bean=CBEAN ]
+ AttributeInfo[name=max-wait-time-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxWaitTimeInMillis getter=getMaxWaitTimeInMillis bean=CBEAN ]
+ AttributeInfo[name=fail-all-connections, description=null, type=boolean]
+ Descriptor[setter=setFailAllConnections getter=isFailAllConnections bean=CBEAN ]
+ AttributeInfo[name=connection-definition-name, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectionDefinitionName getter=getConnectionDefinitionName bean=CBEAN ]
+ AttributeInfo[name=pool-resize-quantity, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolResizeQuantity getter=getPoolResizeQuantity bean=CBEAN ]
+ AttributeInfo[name=transaction-support, description=null, type=java.lang.String]
+ Descriptor[setter=setTransactionSupport getter=getTransactionSupport bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSecurityMap, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=security-map multi=true ]
+ OperationInfo[name=getSecurityMapNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=security-map multi=true ]
+ OperationInfo[name=getSecurityMapByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=security-map multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createSecurityMap, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=security-map multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSecurityMapByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=security-map multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=connector-module, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ModuleDeployEvent ObjectName={0}:type=connector-module,name={1},category=config xpath=/domain/applications/connector-module[@name='{1}'] CLIName=domain.applications.connector-module.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=location, description=null, type=java.lang.String]
+ Descriptor[setter=setLocation getter=getLocation bean=CBEAN ]
+ AttributeInfo[name=directory-deployed, description=null, type=boolean]
+ Descriptor[setter=setDirectoryDeployed getter=isDirectoryDeployed bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=connector-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=connector-resource,jndi-name={1},category=config xpath=/domain/resources/connector-resource[@jndi-name='{1}'] CLIName=domain.resources.connector-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=pool-name, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolName getter=getPoolName bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=connector-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=connector-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/connector-service CLIName={1}.connector-service ]
+
+ --- Attributes:
+ AttributeInfo[name=shutdown-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setShutdownTimeoutInSeconds getter=getShutdownTimeoutInSeconds bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=custom-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=custom-resource,jndi-name={1},category=config xpath=/domain/resources/custom-resource[@jndi-name='{1}'] CLIName=domain.resources.custom-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=factory-class, description=null, type=java.lang.String]
+ Descriptor[setter=setFactoryClass getter=getFactoryClass bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=res-type, description=null, type=java.lang.String]
+ Descriptor[setter=setResType getter=getResType bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=das-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=das-config,config={1},category=config xpath=/domain/configs/config[@name='{1}']/admin-service/das-config CLIName={1}.admin-service.das-config ]
+
+ --- Attributes:
+ AttributeInfo[name=deploy-xml-validation, description=null, type=java.lang.String, writeable=false]
+ AttributeInfo[name=admin-session-timeout-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setAdminSessionTimeoutInMinutes getter=getAdminSessionTimeoutInMinutes bean=CBEAN ]
+ AttributeInfo[name=autodeploy-enabled, description=null, type=boolean]
+ Descriptor[setter=setAutodeployEnabled getter=isAutodeployEnabled bean=CBEAN ]
+ AttributeInfo[name=autodeploy-polling-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setAutodeployPollingIntervalInSeconds getter=getAutodeployPollingIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=dynamic-reload-enabled, description=null, type=boolean]
+ Descriptor[setter=setDynamicReloadEnabled getter=isDynamicReloadEnabled bean=CBEAN ]
+ AttributeInfo[name=autodeploy-verifier-enabled, description=null, type=boolean]
+ Descriptor[setter=setAutodeployVerifierEnabled getter=isAutodeployVerifierEnabled bean=CBEAN ]
+ AttributeInfo[name=autodeploy-dir, description=null, type=java.lang.String]
+ Descriptor[setter=setAutodeployDir getter=getAutodeployDir bean=CBEAN ]
+ AttributeInfo[name=dynamic-reload-poll-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setDynamicReloadPollIntervalInSeconds getter=getDynamicReloadPollIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=autodeploy-jsp-precompilation-enabled, description=null, type=boolean]
+ Descriptor[setter=setAutodeployJspPrecompilationEnabled getter=isAutodeployJspPrecompilationEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=diagnostic-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=diagnostic-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/diagnostic-service CLIName={1}.diagnostic-service ]
+
+ --- Attributes:
+ AttributeInfo[name=capture-hadb-info, description=null, type=boolean]
+ Descriptor[setter=setCaptureHadbInfo getter=isCaptureHadbInfo bean=CBEAN ]
+ AttributeInfo[name=max-log-entries, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxLogEntries getter=getMaxLogEntries bean=CBEAN ]
+ AttributeInfo[name=min-log-level, description=null, type=java.lang.String]
+ Descriptor[setter=setMinLogLevel getter=getMinLogLevel bean=CBEAN ]
+ AttributeInfo[name=capture-app-dd, description=null, type=boolean]
+ Descriptor[setter=setCaptureAppDd getter=isCaptureAppDd bean=CBEAN ]
+ AttributeInfo[name=compute-checksum, description=null, type=boolean]
+ Descriptor[setter=setComputeChecksum getter=isComputeChecksum bean=CBEAN ]
+ AttributeInfo[name=verify-config, description=null, type=boolean]
+ Descriptor[setter=setVerifyConfig getter=isVerifyConfig bean=CBEAN ]
+ AttributeInfo[name=capture-system-info, description=null, type=boolean]
+ Descriptor[setter=setCaptureSystemInfo getter=isCaptureSystemInfo bean=CBEAN ]
+ AttributeInfo[name=capture-install-log, description=null, type=boolean]
+ Descriptor[setter=setCaptureInstallLog getter=isCaptureInstallLog bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=domain, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=domain,category=config xpath=/domain CLIName=domain ]
+
+ --- Attributes:
+ AttributeInfo[name=locale, description=null, type=java.lang.String]
+ Descriptor[setter=setLocale getter=getLocale bean=CBEAN ]
+ AttributeInfo[name=log-root, description=null, type=java.lang.String]
+ Descriptor[setter=setLogRoot getter=getLogRoot bean=CBEAN ]
+ AttributeInfo[name=application-root, description=null, type=java.lang.String]
+ Descriptor[setter=setApplicationRoot getter=getApplicationRoot bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSystemProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getSystemPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setSystemProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getLoadBalancers, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=load-balancers ]
+ OperationInfo[name=createLoadBalancers, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=load-balancers ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLoadBalancers, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=load-balancers ]
+ OperationInfo[name=getNodeAgents, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=node-agents ]
+ OperationInfo[name=createNodeAgents, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=node-agents ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeNodeAgents, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=node-agents ]
+ OperationInfo[name=getConfigs, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=configs ]
+ OperationInfo[name=createConfigs, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=configs ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConfigs, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=configs ]
+ OperationInfo[name=getResources, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=resources ]
+ OperationInfo[name=createResources, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=resources ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeResources, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=resources ]
+ OperationInfo[name=getLbConfigs, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=lb-configs ]
+ OperationInfo[name=createLbConfigs, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=lb-configs ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLbConfigs, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=lb-configs ]
+ OperationInfo[name=getClusters, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=clusters ]
+ OperationInfo[name=createClusters, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=clusters ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeClusters, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=clusters ]
+ OperationInfo[name=getServers, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=servers ]
+ OperationInfo[name=createServers, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=servers ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeServers, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=servers ]
+ OperationInfo[name=getApplications, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=applications ]
+ OperationInfo[name=createApplications, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=applications ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeApplications, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=applications ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-container, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ejb-container,config={1},category=config xpath=/domain/configs/config[@name='{1}']/ejb-container CLIName={1}.ejb-container ]
+
+ --- Attributes:
+ AttributeInfo[name=victim-selection-policy, description=null, type=java.lang.String]
+ Descriptor[setter=setVictimSelectionPolicy getter=getVictimSelectionPolicy bean=CBEAN ]
+ AttributeInfo[name=pool-idle-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolIdleTimeoutInSeconds getter=getPoolIdleTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=cache-idle-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setCacheIdleTimeoutInSeconds getter=getCacheIdleTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=max-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxPoolSize getter=getMaxPoolSize bean=CBEAN ]
+ AttributeInfo[name=session-store, description=null, type=java.lang.String]
+ Descriptor[setter=setSessionStore getter=getSessionStore bean=CBEAN ]
+ AttributeInfo[name=steady-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setSteadyPoolSize getter=getSteadyPoolSize bean=CBEAN ]
+ AttributeInfo[name=max-cache-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxCacheSize getter=getMaxCacheSize bean=CBEAN ]
+ AttributeInfo[name=cache-resize-quantity, description=null, type=java.lang.String]
+ Descriptor[setter=setCacheResizeQuantity getter=getCacheResizeQuantity bean=CBEAN ]
+ AttributeInfo[name=removal-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setRemovalTimeoutInSeconds getter=getRemovalTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=commit-option, description=null, type=java.lang.String]
+ Descriptor[setter=setCommitOption getter=getCommitOption bean=CBEAN ]
+ AttributeInfo[name=pool-resize-quantity, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolResizeQuantity getter=getPoolResizeQuantity bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getEjbTimerService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-timer-service ]
+ OperationInfo[name=createEjbTimerService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ejb-timer-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeEjbTimerService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ejb-timer-service ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-container-availability, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ejb-container-availability,config={1},category=config xpath=/domain/configs/config[@name='{1}']/availability-service/ejb-container-availability CLIName={1}.ejb-container-availability ]
+
+ --- Attributes:
+ AttributeInfo[name=sfsb-checkpoint-enabled, description=null, type=java.lang.String]
+ Descriptor[setter=setSfsbCheckpointEnabled getter=getSfsbCheckpointEnabled bean=CBEAN ]
+ AttributeInfo[name=availability-enabled, description=null, type=java.lang.String]
+ Descriptor[setter=setAvailabilityEnabled getter=getAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=sfsb-ha-persistence-type, description=null, type=java.lang.String]
+ Descriptor[setter=setSfsbHaPersistenceType getter=getSfsbHaPersistenceType bean=CBEAN ]
+ AttributeInfo[name=sfsb-quick-checkpoint-enabled, description=null, type=java.lang.String]
+ Descriptor[setter=setSfsbQuickCheckpointEnabled getter=getSfsbQuickCheckpointEnabled bean=CBEAN ]
+ AttributeInfo[name=sfsb-store-pool-name, description=null, type=java.lang.String]
+ Descriptor[setter=setSfsbStorePoolName getter=getSfsbStorePoolName bean=CBEAN ]
+ AttributeInfo[name=sfsb-persistence-type, description=null, type=java.lang.String]
+ Descriptor[setter=setSfsbPersistenceType getter=getSfsbPersistenceType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-module, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ModuleDeployEvent ObjectName={0}:type=ejb-module,name={1},category=config xpath=/domain/applications/ejb-module[@name='{1}'] CLIName=domain.applications.ejb-module.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=location, description=null, type=java.lang.String]
+ Descriptor[setter=setLocation getter=getLocation bean=CBEAN ]
+ AttributeInfo[name=directory-deployed, description=null, type=boolean]
+ Descriptor[setter=setDirectoryDeployed getter=isDirectoryDeployed bean=CBEAN ]
+ AttributeInfo[name=libraries, description=null, type=java.lang.String]
+ Descriptor[setter=setLibraries getter=getLibraries bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=availability-enabled, description=null, type=boolean]
+ Descriptor[setter=setAvailabilityEnabled getter=isAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getWebServiceEndpoint, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ OperationInfo[name=getWebServiceEndpointNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=web-service-endpoint multi=true ]
+ OperationInfo[name=getWebServiceEndpointByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createWebServiceEndpoint, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeWebServiceEndpointByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-module-web-service-endpoint, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.WebServiceEndpointEvent ObjectName={0}:type=web-service-endpoint,name={2},ejb-module={1},category=config xpath=/domain/applications/ejb-module[@name='{1}']/web-service-endpoint[@name='{2}'] CLIName=domain.applications.ejb-module.{1}.web-service-endpoint.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=jbi-enabled, description=null, type=boolean]
+ Descriptor[setter=setJbiEnabled getter=isJbiEnabled bean=CBEAN ]
+ AttributeInfo[name=max-history-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxHistorySize getter=getMaxHistorySize bean=CBEAN ]
+ AttributeInfo[name=monitoring, description=null, type=java.lang.String]
+ Descriptor[setter=setMonitoring getter=getMonitoring bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getRegistryLocation, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ OperationInfo[name=getRegistryLocationNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=registry-location multi=true ]
+ OperationInfo[name=getRegistryLocationByConnectorResourceJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createRegistryLocation, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeRegistryLocationByConnectorResourceJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getTransformationRule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ OperationInfo[name=getTransformationRuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=transformation-rule multi=true ]
+ OperationInfo[name=getTransformationRuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createTransformationRule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeTransformationRuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-module-web-service-endpoint-registry-location, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.RegistryLocationEvent ObjectName={0}:type=registry-location,connector-resource-jndi-name={3},web-service-endpoint={2},ejb-module={1},category=config xpath=/domain/applications/ejb-module[@name='{1}']/web-service-endpoint[@name='{2}']/registry-location[@connector-resource-jndi-name='{3}'] CLIName=domain.applications.ejb-module.{1}.web-service-endpoint.{2}.registry-location.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=connector-resource-jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectorResourceJndiName getter=getConnectorResourceJndiName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-module-web-service-endpoint-transformation-rule, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent ObjectName={0}:type=transformation-rule,name={3},web-service-endpoint={2},ejb-module={1},category=config xpath=/domain/applications/ejb-module[@name='{1}']/web-service-endpoint[@name='{2}']/transformation-rule[@name='{3}'] CLIName=domain.applications.ejb-module.{1}.web-service-endpoint.{2}.transformation-rule.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=rule-file-location, description=null, type=java.lang.String]
+ Descriptor[setter=setRuleFileLocation getter=getRuleFileLocation bean=CBEAN ]
+ AttributeInfo[name=apply-to, description=null, type=java.lang.String]
+ Descriptor[setter=setApplyTo getter=getApplyTo bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-timer-management, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ejb-timer-management,category=config ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ejb-timer-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ejb-timer-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/ejb-container/ejb-timer-service CLIName={1}.ejb-container.ejb-timer-service ]
+
+ --- Attributes:
+ AttributeInfo[name=minimum-delivery-interval-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setMinimumDeliveryIntervalInMillis getter=getMinimumDeliveryIntervalInMillis bean=CBEAN ]
+ AttributeInfo[name=redelivery-interval-internal-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setRedeliveryIntervalInternalInMillis getter=getRedeliveryIntervalInternalInMillis bean=CBEAN ]
+ AttributeInfo[name=timer-datasource, description=null, type=java.lang.String]
+ Descriptor[setter=setTimerDatasource getter=getTimerDatasource bean=CBEAN ]
+ AttributeInfo[name=max-redeliveries, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxRedeliveries getter=getMaxRedeliveries bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=event, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=event,management-rule={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/management-rules/management-rule[@name='{2}']/event CLIName={1}.management-rules.management-rule.{2}.event ]
+
+ --- Attributes:
+ AttributeInfo[name=record-event, description=null, type=boolean]
+ Descriptor[setter=setRecordEvent getter=isRecordEvent bean=CBEAN ]
+ AttributeInfo[name=type, description=null, type=java.lang.String]
+ Descriptor[setter=setType getter=getType bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=level, description=null, type=java.lang.String]
+ Descriptor[setter=setLevel getter=getLevel bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=external-jndi-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=external-jndi-resource,jndi-name={1},category=config xpath=/domain/resources/external-jndi-resource[@jndi-name='{1}'] CLIName=domain.resources.external-jndi-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=factory-class, description=null, type=java.lang.String]
+ Descriptor[setter=setFactoryClass getter=getFactoryClass bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=res-type, description=null, type=java.lang.String]
+ Descriptor[setter=setResType getter=getResType bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=jndi-lookup-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiLookupName getter=getJndiLookupName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=failure-notification-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=failure-notification-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/group-management-service/failure-notification-service CLIName={1}.failure-notification-service ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=group-management-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=group-management-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/group-management-service CLIName={1}.group-management-service ]
+
+ --- Attributes:
+ AttributeInfo[name=merge-protocol-max-interval-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setMergeProtocolMaxIntervalInMillis getter=getMergeProtocolMaxIntervalInMillis bean=CBEAN ]
+ AttributeInfo[name=fd-protocol-timeout-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setFdProtocolTimeoutInMillis getter=getFdProtocolTimeoutInMillis bean=CBEAN ]
+ AttributeInfo[name=merge-protocol-min-interval-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setMergeProtocolMinIntervalInMillis getter=getMergeProtocolMinIntervalInMillis bean=CBEAN ]
+ AttributeInfo[name=fd-protocol-max-tries, description=null, type=java.lang.String]
+ Descriptor[setter=setFdProtocolMaxTries getter=getFdProtocolMaxTries bean=CBEAN ]
+ AttributeInfo[name=vs-protocol-timeout-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setVsProtocolTimeoutInMillis getter=getVsProtocolTimeoutInMillis bean=CBEAN ]
+ AttributeInfo[name=ping-protocol-timeout-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setPingProtocolTimeoutInMillis getter=getPingProtocolTimeoutInMillis bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=group-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=group-service,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/group-service[@name='{2}'] CLIName={1}.group-service ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-access-log, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=http-access-log,virtual-server={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']/http-access-log CLIName={1}.http-service.virtual-server.{2}.http-access-log ]
+
+ --- Attributes:
+ AttributeInfo[name=iponly, description=null, type=boolean]
+ Descriptor[setter=setIponly getter=isIponly bean=CBEAN ]
+ AttributeInfo[name=log-directory, description=null, type=java.lang.String]
+ Descriptor[setter=setLogDirectory getter=getLogDirectory bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-file-cache, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=http-file-cache,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/http-file-cache CLIName={1}.http-service.http-file-cache ]
+
+ --- Attributes:
+ AttributeInfo[name=medium-file-space-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setMediumFileSpaceInBytes getter=getMediumFileSpaceInBytes bean=CBEAN ]
+ AttributeInfo[name=file-caching-enabled, description=null, type=java.lang.String]
+ Descriptor[setter=setFileCachingEnabled getter=getFileCachingEnabled bean=CBEAN ]
+ AttributeInfo[name=hash-init-size, description=null, type=java.lang.String]
+ Descriptor[setter=setHashInitSize getter=getHashInitSize bean=CBEAN ]
+ AttributeInfo[name=max-age-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxAgeInSeconds getter=getMaxAgeInSeconds bean=CBEAN ]
+ AttributeInfo[name=max-files-count, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxFilesCount getter=getMaxFilesCount bean=CBEAN ]
+ AttributeInfo[name=small-file-space-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setSmallFileSpaceInBytes getter=getSmallFileSpaceInBytes bean=CBEAN ]
+ AttributeInfo[name=file-transmission-enabled, description=null, type=boolean]
+ Descriptor[setter=setFileTransmissionEnabled getter=isFileTransmissionEnabled bean=CBEAN ]
+ AttributeInfo[name=small-file-size-limit-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setSmallFileSizeLimitInBytes getter=getSmallFileSizeLimitInBytes bean=CBEAN ]
+ AttributeInfo[name=globally-enabled, description=null, type=boolean]
+ Descriptor[setter=setGloballyEnabled getter=isGloballyEnabled bean=CBEAN ]
+ AttributeInfo[name=medium-file-size-limit-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setMediumFileSizeLimitInBytes getter=getMediumFileSizeLimitInBytes bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-listener, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.http.HSHttpListenerEvent ObjectName={0}:type=http-listener,id={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/http-listener[@id='{2}'] CLIName={1}.http-service.http-listener.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=server-name, description=null, type=java.lang.String]
+ Descriptor[emptyValueAllowed=true ]
+ AttributeInfo[name=id, description=null, type=java.lang.String]
+ Descriptor[setter=setId getter=getId bean=CBEAN ]
+ AttributeInfo[name=port, description=null, type=java.lang.String]
+ Descriptor[setter=setPort getter=getPort bean=CBEAN ]
+ AttributeInfo[name=default-virtual-server, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultVirtualServer getter=getDefaultVirtualServer bean=CBEAN ]
+ AttributeInfo[name=family, description=null, type=java.lang.String]
+ Descriptor[setter=setFamily getter=getFamily bean=CBEAN ]
+ AttributeInfo[name=xpowered-by, description=null, type=boolean]
+ Descriptor[setter=setXpoweredBy getter=isXpoweredBy bean=CBEAN ]
+ AttributeInfo[name=acceptor-threads, description=null, type=java.lang.String]
+ Descriptor[setter=setAcceptorThreads getter=getAcceptorThreads bean=CBEAN ]
+ AttributeInfo[name=redirect-port, description=null, type=java.lang.String]
+ Descriptor[setter=setRedirectPort getter=getRedirectPort bean=CBEAN ]
+ AttributeInfo[name=external-port, description=null, type=java.lang.String]
+ Descriptor[setter=setExternalPort getter=getExternalPort bean=CBEAN ]
+ AttributeInfo[name=blocking-enabled, description=null, type=boolean]
+ Descriptor[setter=setBlockingEnabled getter=isBlockingEnabled bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=address, description=null, type=java.lang.String]
+ Descriptor[setter=setAddress getter=getAddress bean=CBEAN ]
+ AttributeInfo[name=security-enabled, description=null, type=boolean]
+ Descriptor[setter=setSecurityEnabled getter=isSecurityEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSsl, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=createSsl, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ssl ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSsl, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-protocol, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=http-protocol,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/http-protocol CLIName={1}.http-service.http-protocol ]
+
+ --- Attributes:
+ AttributeInfo[name=version, description=null, type=java.lang.String]
+ Descriptor[setter=setVersion getter=getVersion bean=CBEAN ]
+ AttributeInfo[name=forced-response-type, description=null, type=java.lang.String]
+ Descriptor[setter=setForcedResponseType getter=getForcedResponseType bean=CBEAN ]
+ AttributeInfo[name=ssl-enabled, description=null, type=boolean]
+ Descriptor[setter=setSslEnabled getter=isSslEnabled bean=CBEAN ]
+ AttributeInfo[name=default-response-type, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultResponseType getter=getDefaultResponseType bean=CBEAN ]
+ AttributeInfo[name=dns-lookup-enabled, description=null, type=boolean]
+ Descriptor[setter=setDnsLookupEnabled getter=isDnsLookupEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-qos, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=http-qos,config={1},virtual-server={2},category=config xpath=/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}']/http-qos CLIName={1}.http-service.virtual-server.{2}.http-qos ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-qos#, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=http-qos,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/http-qos CLIName={1}.http-service.http-qos ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=http-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.http.HSServiceEvent ObjectName={0}:type=http-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service CLIName={1}.http-service ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getConnectionPool, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=connection-pool ]
+ OperationInfo[name=createConnectionPool, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connection-pool ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConnectionPool, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=connection-pool ]
+ OperationInfo[name=getVirtualServer, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=virtual-server multi=true ]
+ OperationInfo[name=getVirtualServerNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=virtual-server multi=true ]
+ OperationInfo[name=getVirtualServerById, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=virtual-server multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createVirtualServer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=virtual-server multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeVirtualServerById, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=virtual-server multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getHttpProtocol, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=http-protocol ]
+ OperationInfo[name=createHttpProtocol, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=http-protocol ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHttpProtocol, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=http-protocol ]
+ OperationInfo[name=getHttpFileCache, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=http-file-cache ]
+ OperationInfo[name=createHttpFileCache, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=http-file-cache ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHttpFileCache, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=http-file-cache ]
+ OperationInfo[name=getKeepAlive, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=keep-alive ]
+ OperationInfo[name=createKeepAlive, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=keep-alive ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeKeepAlive, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=keep-alive ]
+ OperationInfo[name=getAccessLog, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=access-log ]
+ OperationInfo[name=createAccessLog, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=access-log ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAccessLog, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=access-log ]
+ OperationInfo[name=getHttpListener, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=http-listener multi=true ]
+ OperationInfo[name=getHttpListenerNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=http-listener multi=true ]
+ OperationInfo[name=getHttpListenerById, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=http-listener multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createHttpListener, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=http-listener multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHttpListenerById, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=http-listener multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getRequestProcessing, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=request-processing ]
+ OperationInfo[name=createRequestProcessing, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=request-processing ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeRequestProcessing, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=request-processing ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=iiop-listener, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=iiop-listener,id={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/iiop-service/iiop-listener[@id='{2}'] CLIName={1}.iiop-service.iiop-listener.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=security-enabled, description=null, type=boolean]
+ Descriptor[setter=setSecurityEnabled getter=isSecurityEnabled bean=CBEAN ]
+ AttributeInfo[name=address, description=null, type=java.lang.String]
+ Descriptor[setter=setAddress getter=getAddress bean=CBEAN ]
+ AttributeInfo[name=port, description=null, type=java.lang.String]
+ Descriptor[setter=setPort getter=getPort bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=id, description=null, type=java.lang.String]
+ Descriptor[setter=setId getter=getId bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSsl, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=createSsl, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ssl ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSsl, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=iiop-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=iiop-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/iiop-service CLIName={1}.iiop-service ]
+
+ --- Attributes:
+ AttributeInfo[name=client-authentication-required, description=null, type=boolean]
+ Descriptor[setter=setClientAuthenticationRequired getter=isClientAuthenticationRequired bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getOrb, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=orb ]
+ OperationInfo[name=createOrb, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=orb ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeOrb, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=orb ]
+ OperationInfo[name=getIiopListener, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=iiop-listener multi=true ]
+ OperationInfo[name=getIiopListenerNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=iiop-listener multi=true ]
+ OperationInfo[name=getIiopListenerById, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=iiop-listener multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createIiopListener, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=iiop-listener multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeIiopListenerById, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=iiop-listener multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getSslClientConfig, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ssl-client-config ]
+ OperationInfo[name=createSslClientConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ssl-client-config ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSslClientConfig, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ssl-client-config ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=j2ee-application, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ApplicationDeployEvent ObjectName={0}:type=j2ee-application,name={1},category=config xpath=/domain/applications/j2ee-application[@name='{1}'] CLIName=domain.applications.j2ee-application.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=java-web-start-enabled, description=null, type=boolean]
+ Descriptor[setter=setJavaWebStartEnabled getter=isJavaWebStartEnabled bean=CBEAN ]
+ AttributeInfo[name=directory-deployed, description=null, type=boolean]
+ Descriptor[setter=setDirectoryDeployed getter=isDirectoryDeployed bean=CBEAN ]
+ AttributeInfo[name=libraries, description=null, type=java.lang.String]
+ Descriptor[setter=setLibraries getter=getLibraries bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=availability-enabled, description=null, type=boolean]
+ Descriptor[setter=setAvailabilityEnabled getter=isAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=location, description=null, type=java.lang.String]
+ Descriptor[setter=setLocation getter=getLocation bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getWebServiceEndpoint, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ OperationInfo[name=getWebServiceEndpointNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=web-service-endpoint multi=true ]
+ OperationInfo[name=getWebServiceEndpointByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createWebServiceEndpoint, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeWebServiceEndpointByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=j2ee-application-web-service-endpoint, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.WebServiceEndpointEvent ObjectName={0}:type=web-service-endpoint,name={2},j2ee-application={1},category=config xpath=/domain/applications/j2ee-application[@name='{1}']/web-service-endpoint[@name='{2}'] CLIName=domain.applications.j2ee-application.{1}.web-service-endpoint.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=jbi-enabled, description=null, type=boolean]
+ Descriptor[setter=setJbiEnabled getter=isJbiEnabled bean=CBEAN ]
+ AttributeInfo[name=max-history-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxHistorySize getter=getMaxHistorySize bean=CBEAN ]
+ AttributeInfo[name=monitoring, description=null, type=java.lang.String]
+ Descriptor[setter=setMonitoring getter=getMonitoring bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getRegistryLocation, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ OperationInfo[name=getRegistryLocationNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=registry-location multi=true ]
+ OperationInfo[name=getRegistryLocationByConnectorResourceJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createRegistryLocation, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeRegistryLocationByConnectorResourceJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getTransformationRule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ OperationInfo[name=getTransformationRuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=transformation-rule multi=true ]
+ OperationInfo[name=getTransformationRuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createTransformationRule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeTransformationRuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=j2ee-application-web-service-endpoint-registry-location, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.RegistryLocationEvent ObjectName={0}:type=registry-location,connector-resource-jndi-name={3},web-service-endpoint={2},j2ee-application={1},category=config xpath=/domain/applications/j2ee-application[@name='{1}']/web-service-endpoint[@name='{2}']/registry-location[@connector-resource-jndi-name='{3}'] CLIName=domain.applications.j2ee-application.{1}.web-service-endpoint.{2}.registry-location.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=connector-resource-jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectorResourceJndiName getter=getConnectorResourceJndiName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=j2ee-application-web-service-endpoint-transformation-rule, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent ObjectName={0}:type=transformation-rule,name={3},web-service-endpoint={2},j2ee-application={1},category=config xpath=/domain/applications/j2ee-application[@name='{1}']/web-service-endpoint[@name='{2}']/transformation-rule[@name='{3}'] CLIName=domain.applications.j2ee-application.{1}.web-service-endpoint.{2}.transformation-rule.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=rule-file-location, description=null, type=java.lang.String]
+ Descriptor[setter=setRuleFileLocation getter=getRuleFileLocation bean=CBEAN ]
+ AttributeInfo[name=apply-to, description=null, type=java.lang.String]
+ Descriptor[setter=setApplyTo getter=getApplyTo bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jacc-provider, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=jacc-provider,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/jacc-provider[@name='{2}'] CLIName={1}.security-service.jacc-provider.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=policy-configuration-factory-provider, description=null, type=java.lang.String]
+ Descriptor[setter=setPolicyConfigurationFactoryProvider getter=getPolicyConfigurationFactoryProvider bean=CBEAN ]
+ AttributeInfo[name=policy-provider, description=null, type=java.lang.String]
+ Descriptor[setter=setPolicyProvider getter=getPolicyProvider bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=java-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=java-config,config={1},category=config xpath=/domain/configs/config[@name='{1}']/java-config CLIName={1}.java-config ]
+
+ --- Attributes:
+ AttributeInfo[name=debug-enabled, description=null, type=boolean]
+ Descriptor[setter=setDebugEnabled getter=isDebugEnabled bean=CBEAN ]
+ AttributeInfo[name=system-classpath, description=null, type=java.lang.String]
+ Descriptor[setter=setSystemClasspath getter=getSystemClasspath bean=CBEAN ]
+ AttributeInfo[name=rmic-options, description=null, type=java.lang.String]
+ Descriptor[setter=setRmicOptions getter=getRmicOptions bean=CBEAN ]
+ AttributeInfo[name=native-library-path-suffix, description=null, type=java.lang.String]
+ Descriptor[setter=setNativeLibraryPathSuffix getter=getNativeLibraryPathSuffix bean=CBEAN ]
+ AttributeInfo[name=bytecode-preprocessors, description=null, type=java.lang.String]
+ Descriptor[setter=setBytecodePreprocessors getter=getBytecodePreprocessors bean=CBEAN ]
+ AttributeInfo[name=env-classpath-ignored, description=null, type=boolean]
+ Descriptor[setter=setEnvClasspathIgnored getter=isEnvClasspathIgnored bean=CBEAN ]
+ AttributeInfo[name=debug-options, description=null, type=java.lang.String]
+ Descriptor[setter=setDebugOptions getter=getDebugOptions bean=CBEAN ]
+ AttributeInfo[name=javac-options, description=null, type=java.lang.String]
+ Descriptor[setter=setJavacOptions getter=getJavacOptions bean=CBEAN ]
+ AttributeInfo[name=classpath-suffix, description=null, type=java.lang.String]
+ Descriptor[setter=setClasspathSuffix getter=getClasspathSuffix bean=CBEAN ]
+ AttributeInfo[name=jvm-options, description=null, type=[Ljava.lang.String;]
+ Descriptor[setter=setJvmOptions getter=getJvmOptions bean=CBEAN ]
+ AttributeInfo[name=server-classpath, description=null, type=java.lang.String]
+ Descriptor[setter=setServerClasspath getter=getServerClasspath bean=CBEAN ]
+ AttributeInfo[name=classpath-prefix, description=null, type=java.lang.String]
+ Descriptor[setter=setClasspathPrefix getter=getClasspathPrefix bean=CBEAN ]
+ AttributeInfo[name=native-library-path-prefix, description=null, type=java.lang.String]
+ Descriptor[setter=setNativeLibraryPathPrefix getter=getNativeLibraryPathPrefix bean=CBEAN ]
+ AttributeInfo[name=java-home, description=null, type=java.lang.String]
+ Descriptor[setter=setJavaHome getter=getJavaHome bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getProfiler, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=profiler ]
+ OperationInfo[name=createProfiler, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=profiler ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeProfiler, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=profiler ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jdbc-connection-pool, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=jdbc-connection-pool,name={1},category=config xpath=/domain/resources/jdbc-connection-pool[@name='{1}'] CLIName=domain.resources.jdbc-connection-pool.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=validation-table-name, description=null, type=java.lang.String]
+ Descriptor[setter=setValidationTableName getter=getValidationTableName bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=non-transactional-connections, description=null, type=boolean]
+ Descriptor[setter=setNonTransactionalConnections getter=isNonTransactionalConnections bean=CBEAN ]
+ AttributeInfo[name=max-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxPoolSize getter=getMaxPoolSize bean=CBEAN ]
+ AttributeInfo[name=idle-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setIdleTimeoutInSeconds getter=getIdleTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=steady-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setSteadyPoolSize getter=getSteadyPoolSize bean=CBEAN ]
+ AttributeInfo[name=res-type, description=null, type=java.lang.String]
+ Descriptor[setter=setResType getter=getResType bean=CBEAN ]
+ AttributeInfo[name=is-connection-validation-required, description=null, type=boolean]
+ Descriptor[setter=setIsConnectionValidationRequired getter=isIsConnectionValidationRequired bean=CBEAN ]
+ AttributeInfo[name=max-wait-time-in-millis, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxWaitTimeInMillis getter=getMaxWaitTimeInMillis bean=CBEAN ]
+ AttributeInfo[name=transaction-isolation-level, description=null, type=java.lang.String]
+ Descriptor[setter=setTransactionIsolationLevel getter=getTransactionIsolationLevel bean=CBEAN ]
+ AttributeInfo[name=fail-all-connections, description=null, type=boolean]
+ Descriptor[setter=setFailAllConnections getter=isFailAllConnections bean=CBEAN ]
+ AttributeInfo[name=pool-resize-quantity, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolResizeQuantity getter=getPoolResizeQuantity bean=CBEAN ]
+ AttributeInfo[name=allow-non-component-callers, description=null, type=boolean]
+ Descriptor[setter=setAllowNonComponentCallers getter=isAllowNonComponentCallers bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=connection-validation-method, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectionValidationMethod getter=getConnectionValidationMethod bean=CBEAN ]
+ AttributeInfo[name=is-isolation-level-guaranteed, description=null, type=boolean]
+ Descriptor[setter=setIsIsolationLevelGuaranteed getter=isIsIsolationLevelGuaranteed bean=CBEAN ]
+ AttributeInfo[name=datasource-classname, description=null, type=java.lang.String]
+ Descriptor[setter=setDatasourceClassname getter=getDatasourceClassname bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jdbc-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=jdbc-resource,jndi-name={1},category=config xpath=/domain/resources/jdbc-resource[@jndi-name='{1}'] CLIName=domain.resources.jdbc-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=pool-name, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolName getter=getPoolName bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jms-availability, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=jms-availability,config={1},category=config xpath=/domain/configs/config[@name='{1}']/availability-service/jms-availability CLIName={1}.availability-service.jms-availability ]
+
+ --- Attributes:
+ AttributeInfo[name=availability-enabled, description=null, type=boolean]
+ Descriptor[setter=setAvailabilityEnabled getter=isAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=mq-store-pool-name, description=null, type=java.lang.String]
+ Descriptor[setter=setMqStorePoolName getter=getMqStorePoolName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jms-host, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.jms.JmsHostEvent ObjectName={0}:type=jms-host,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/jms-service/jms-host[@name='{2}'] CLIName={1}.jms-service.jms-host.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=admin-password, description=null, type=java.lang.String]
+ Descriptor[setter=setAdminPassword getter=getAdminPassword bean=CBEAN ]
+ AttributeInfo[name=port, description=null, type=java.lang.String]
+ Descriptor[setter=setPort getter=getPort bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=host, description=null, type=java.lang.String]
+ Descriptor[setter=setHost getter=getHost bean=CBEAN ]
+ AttributeInfo[name=admin-user-name, description=null, type=java.lang.String]
+ Descriptor[setter=setAdminUserName getter=getAdminUserName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jms-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.jms.JmsServiceEvent ObjectName={0}:type=jms-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/jms-service CLIName={1}.jms-service ]
+
+ --- Attributes:
+ AttributeInfo[name=reconnect-enabled, description=null, type=boolean]
+ Descriptor[setter=setReconnectEnabled getter=isReconnectEnabled bean=CBEAN ]
+ AttributeInfo[name=default-jms-host, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultJmsHost getter=getDefaultJmsHost bean=CBEAN ]
+ AttributeInfo[name=start-args, description=null, type=java.lang.String]
+ Descriptor[setter=setStartArgs getter=getStartArgs bean=CBEAN ]
+ AttributeInfo[name=addresslist-behavior, description=null, type=java.lang.String]
+ Descriptor[setter=setAddresslistBehavior getter=getAddresslistBehavior bean=CBEAN ]
+ AttributeInfo[name=mq-service, description=null, type=java.lang.String]
+ Descriptor[setter=setMqService getter=getMqService bean=CBEAN ]
+ AttributeInfo[name=mq-scheme, description=null, type=java.lang.String]
+ Descriptor[setter=setMqScheme getter=getMqScheme bean=CBEAN ]
+ AttributeInfo[name=reconnect-attempts, description=null, type=java.lang.String]
+ Descriptor[setter=setReconnectAttempts getter=getReconnectAttempts bean=CBEAN ]
+ AttributeInfo[name=reconnect-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setReconnectIntervalInSeconds getter=getReconnectIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=type, description=null, type=java.lang.String]
+ Descriptor[setter=setType getter=getType bean=CBEAN ]
+ AttributeInfo[name=addresslist-iterations, description=null, type=java.lang.String]
+ Descriptor[setter=setAddresslistIterations getter=getAddresslistIterations bean=CBEAN ]
+ AttributeInfo[name=init-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setInitTimeoutInSeconds getter=getInitTimeoutInSeconds bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getJmsHost, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=jms-host multi=true ]
+ OperationInfo[name=getJmsHostNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=jms-host multi=true ]
+ OperationInfo[name=getJmsHostByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jms-host multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createJmsHost, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jms-host multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJmsHostByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=jms-host multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jmx-connector, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=jmx-connector,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/admin-service/jmx-connector[@name='{2}'] CLIName={1}.admin-service.jmx-connector.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=JMXServiceURL, description=null, type=java.lang.String, writeable=false]
+ AttributeInfo[name=accept-all, description=null, type=boolean]
+ Descriptor[setter=setAcceptAll getter=isAcceptAll bean=CBEAN ]
+ AttributeInfo[name=security-enabled, description=null, type=boolean]
+ Descriptor[setter=setSecurityEnabled getter=isSecurityEnabled bean=CBEAN ]
+ AttributeInfo[name=address, description=null, type=java.lang.String]
+ Descriptor[setter=setAddress getter=getAddress bean=CBEAN ]
+ AttributeInfo[name=port, description=null, type=java.lang.String]
+ Descriptor[setter=setPort getter=getPort bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=auth-realm-name, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthRealmName getter=getAuthRealmName bean=CBEAN ]
+ AttributeInfo[name=protocol, description=null, type=java.lang.String]
+ Descriptor[setter=setProtocol getter=getProtocol bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSsl, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=createSsl, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ssl ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSsl, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jvm-options, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=jvm-options,config={1},profiler={2},category=config xpath=/domain/configs/config[@name='{1}']/java-config/profiler[@name='{2}']/jvm-options CLIName={1}.java-config.profiler.jvm-options.{2} ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=jvm-options#, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=jvm-options,config={1},category=config xpath=/domain/configs/config[@name='{1}']/java-config/jvm-options CLIName={1}.java-config.jvm-options ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=keep-alive, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=keep-alive,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/keep-alive CLIName={1}.http-service.keep-alive ]
+
+ --- Attributes:
+ AttributeInfo[name=thread-count, description=null, type=java.lang.String]
+ Descriptor[setter=setThreadCount getter=getThreadCount bean=CBEAN ]
+ AttributeInfo[name=timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setTimeoutInSeconds getter=getTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=max-connections, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxConnections getter=getMaxConnections bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lb-cluster-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=cluster-ref,ref={2},lb-config={1},category=config xpath=/domain/lb-configs/lb-config[@name='{1}']/cluster-ref[@ref='{2}'] CLIName=domain.lb-configs.lb-config.{1}.cluster-ref.{2} dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=lb-policy, description=null, type=java.lang.String]
+ Descriptor[setter=setLbPolicy getter=getLbPolicy bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+ AttributeInfo[name=lb-policy-module, description=null, type=java.lang.String]
+ Descriptor[setter=setLbPolicyModule getter=getLbPolicyModule bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getHealthChecker, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=health-checker ]
+ OperationInfo[name=createHealthChecker, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=health-checker ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHealthChecker, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=health-checker ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lb-cluster-ref-health-checker, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=health-checker,cluster-ref={2},lb-config={1},category=config xpath=/domain/lb-configs/lb-config[@name='{1}']/cluster-ref[@ref='{2}']/health-checker CLIName=domain.lb-configs.lb-config.{1}.cluster-ref.{2}.health-checker dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setTimeoutInSeconds getter=getTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setIntervalInSeconds getter=getIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=url, description=null, type=java.lang.String]
+ Descriptor[setter=setUrl getter=getUrl bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lb-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=lb-config,name={1},category=config xpath=/domain/lb-configs/lb-config[@name='{1}'] CLIName=domain.lb-configs.lb-config.{1} dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=route-cookie-enabled, description=null, type=boolean]
+ Descriptor[setter=setRouteCookieEnabled getter=isRouteCookieEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=reload-poll-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setReloadPollIntervalInSeconds getter=getReloadPollIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=https-routing, description=null, type=boolean]
+ Descriptor[setter=setHttpsRouting getter=isHttpsRouting bean=CBEAN ]
+ AttributeInfo[name=response-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setResponseTimeoutInSeconds getter=getResponseTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=monitoring-enabled, description=null, type=boolean]
+ Descriptor[setter=setMonitoringEnabled getter=isMonitoringEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getServerRef, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=server-ref multi=true ]
+ OperationInfo[name=getServerRefNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=server-ref multi=true ]
+ OperationInfo[name=getServerRefByRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=server-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createServerRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=server-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeServerRefByRef, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=server-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getClusterRef, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=cluster-ref multi=true ]
+ OperationInfo[name=getClusterRefNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=cluster-ref multi=true ]
+ OperationInfo[name=getClusterRefByRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=cluster-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createClusterRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=cluster-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeClusterRefByRef, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=cluster-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lb-configs, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=lb-configs,category=config xpath=/domain/lb-configs CLIName=domain.lb-configs dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getLbConfig, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=lb-config multi=true ]
+ OperationInfo[name=getLbConfigNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=lb-config multi=true ]
+ OperationInfo[name=getLbConfigByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=lb-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createLbConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=lb-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLbConfigByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=lb-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lb-server-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=server-ref,ref={2},lb-config={1},category=config xpath=/domain/lb-configs/lb-config[@name='{1}']/server-ref[@ref='{2}'] CLIName=domain.lb-configs.lb-config.{1}.server-ref.{2} dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=disable-timeout-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setDisableTimeoutInMinutes getter=getDisableTimeoutInMinutes bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+ AttributeInfo[name=lb-enabled, description=null, type=boolean]
+ Descriptor[setter=setLbEnabled getter=isLbEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getHealthChecker, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=health-checker ]
+ OperationInfo[name=createHealthChecker, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=health-checker ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHealthChecker, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=health-checker ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lb-server-ref-health-checker, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=health-checker,server-ref={2},lb-config={1},category=config xpath=/domain/lb-configs/lb-config[@name='{1}']/server-ref[@ref='{2}']/health-checker CLIName=domain.lb-configs.lb-config.{1}.server-ref.{2}.health-checker dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setTimeoutInSeconds getter=getTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setIntervalInSeconds getter=getIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=url, description=null, type=java.lang.String]
+ Descriptor[setter=setUrl getter=getUrl bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=lifecycle-module, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=lifecycle-module,name={1},category=config xpath=/domain/applications/lifecycle-module[@name='{1}'] CLIName=domain.applications.lifecycle-module.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=classpath, description=null, type=java.lang.String]
+ Descriptor[setter=setClasspath getter=getClasspath bean=CBEAN ]
+ AttributeInfo[name=is-failure-fatal, description=null, type=boolean]
+ Descriptor[setter=setIsFailureFatal getter=isIsFailureFatal bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=class-name, description=null, type=java.lang.String]
+ Descriptor[setter=setClassName getter=getClassName bean=CBEAN ]
+ AttributeInfo[name=load-order, description=null, type=java.lang.String]
+ Descriptor[setter=setLoadOrder getter=getLoadOrder bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=load-balancer, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=load-balancer,name={1},category=config xpath=/domain/load-balancers/load-balancer[@name='{1}'] CLIName=domain.load-balancers.load-balancer.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=auto-apply-enabled, description=null, type=boolean]
+ Descriptor[setter=setAutoApplyEnabled getter=isAutoApplyEnabled bean=CBEAN ]
+ AttributeInfo[name=lb-config-name, description=null, type=java.lang.String]
+ Descriptor[setter=setLbConfigName getter=getLbConfigName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=load-balancers, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=load-balancers,category=config xpath=/domain/load-balancers CLIName=domain.load-balancers ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getLoadBalancer, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=load-balancer multi=true ]
+ OperationInfo[name=getLoadBalancerNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=load-balancer multi=true ]
+ OperationInfo[name=getLoadBalancerByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=load-balancer multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createLoadBalancer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=load-balancer multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLoadBalancerByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=load-balancer multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=log-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.log.LogServiceEvent ObjectName={0}:type=log-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/log-service CLIName={1}.log-service ]
+
+ --- Attributes:
+ AttributeInfo[name=log-rotation-limit-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setLogRotationLimitInBytes getter=getLogRotationLimitInBytes bean=CBEAN ]
+ AttributeInfo[name=file, description=null, type=java.lang.String]
+ Descriptor[setter=setFile getter=getFile bean=CBEAN ]
+ AttributeInfo[name=log-to-console, description=null, type=boolean]
+ Descriptor[setter=setLogToConsole getter=isLogToConsole bean=CBEAN ]
+ AttributeInfo[name=log-filter, description=null, type=java.lang.String]
+ Descriptor[setter=setLogFilter getter=getLogFilter bean=CBEAN ]
+ AttributeInfo[name=log-rotation-timelimit-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setLogRotationTimelimitInMinutes getter=getLogRotationTimelimitInMinutes bean=CBEAN ]
+ AttributeInfo[name=log-handler, description=null, type=java.lang.String]
+ Descriptor[setter=setLogHandler getter=getLogHandler bean=CBEAN ]
+ AttributeInfo[name=retain-error-statistics-for-hours, description=null, type=java.lang.String]
+ Descriptor[setter=setRetainErrorStatisticsForHours getter=getRetainErrorStatisticsForHours bean=CBEAN ]
+ AttributeInfo[name=use-system-logging, description=null, type=boolean]
+ Descriptor[setter=setUseSystemLogging getter=isUseSystemLogging bean=CBEAN ]
+ AttributeInfo[name=alarms, description=null, type=boolean]
+ Descriptor[setter=setAlarms getter=isAlarms bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getModuleLogLevels, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=module-log-levels ]
+ OperationInfo[name=createModuleLogLevels, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=module-log-levels ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeModuleLogLevels, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=module-log-levels ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=log-service#, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=log-service,node-agent={1},category=config xpath=/domain/node-agents/node-agent[@name='{1}']/log-service CLIName=domain.node-agent.{1}.log-service dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=log-rotation-limit-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setLogRotationLimitInBytes getter=getLogRotationLimitInBytes bean=CBEAN ]
+ AttributeInfo[name=file, description=null, type=java.lang.String]
+ Descriptor[setter=setFile getter=getFile bean=CBEAN ]
+ AttributeInfo[name=log-to-console, description=null, type=boolean]
+ Descriptor[setter=setLogToConsole getter=isLogToConsole bean=CBEAN ]
+ AttributeInfo[name=log-filter, description=null, type=java.lang.String]
+ Descriptor[setter=setLogFilter getter=getLogFilter bean=CBEAN ]
+ AttributeInfo[name=log-rotation-timelimit-in-minutes, description=null, type=java.lang.String]
+ Descriptor[setter=setLogRotationTimelimitInMinutes getter=getLogRotationTimelimitInMinutes bean=CBEAN ]
+ AttributeInfo[name=log-handler, description=null, type=java.lang.String]
+ Descriptor[setter=setLogHandler getter=getLogHandler bean=CBEAN ]
+ AttributeInfo[name=retain-error-statistics-for-hours, description=null, type=java.lang.String]
+ Descriptor[setter=setRetainErrorStatisticsForHours getter=getRetainErrorStatisticsForHours bean=CBEAN ]
+ AttributeInfo[name=use-system-logging, description=null, type=boolean]
+ Descriptor[setter=setUseSystemLogging getter=isUseSystemLogging bean=CBEAN ]
+ AttributeInfo[name=alarms, description=null, type=boolean]
+ Descriptor[setter=setAlarms getter=isAlarms bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getModuleLogLevels, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=module-log-levels ]
+ OperationInfo[name=createModuleLogLevels, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=module-log-levels ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeModuleLogLevels, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=module-log-levels ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=mail-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=mail-resource,jndi-name={1},category=config xpath=/domain/resources/mail-resource[@jndi-name='{1}'] CLIName=domain.resources.mail-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+ AttributeInfo[name=debug, description=null, type=boolean]
+ Descriptor[setter=setDebug getter=isDebug bean=CBEAN ]
+ AttributeInfo[name=user, description=null, type=java.lang.String]
+ Descriptor[setter=setUser getter=getUser bean=CBEAN ]
+ AttributeInfo[name=store-protocol, description=null, type=java.lang.String]
+ Descriptor[setter=setStoreProtocol getter=getStoreProtocol bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=transport-protocol, description=null, type=java.lang.String]
+ Descriptor[setter=setTransportProtocol getter=getTransportProtocol bean=CBEAN ]
+ AttributeInfo[name=store-protocol-class, description=null, type=java.lang.String]
+ Descriptor[setter=setStoreProtocolClass getter=getStoreProtocolClass bean=CBEAN ]
+ AttributeInfo[name=transport-protocol-class, description=null, type=java.lang.String]
+ Descriptor[setter=setTransportProtocolClass getter=getTransportProtocolClass bean=CBEAN ]
+ AttributeInfo[name=from, description=null, type=java.lang.String]
+ Descriptor[setter=setFrom getter=getFrom bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=host, description=null, type=java.lang.String]
+ Descriptor[setter=setHost getter=getHost bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=management-rule, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.selfmanagement.ManagementRuleEvent ObjectName={0}:type=management-rule,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/management-rules/management-rule[@name='{2}'] CLIName={1}.management-rules.management-rule.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getEvent, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=event ]
+ OperationInfo[name=createEvent, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=event ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeEvent, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=event ]
+ OperationInfo[name=getAction, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=action ]
+ OperationInfo[name=createAction, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=action ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAction, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=action ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=management-rules, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.selfmanagement.ManagementRuleEvent ObjectName={0}:type=management-rules,config={1},category=config xpath=/domain/configs/config[@name='{1}']/management-rules CLIName={1}.management-rules ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getManagementRule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=management-rule multi=true ]
+ OperationInfo[name=getManagementRuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=management-rule multi=true ]
+ OperationInfo[name=getManagementRuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=management-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createManagementRule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=management-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeManagementRuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=management-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=manager-properties, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=manager-properties,config={1},category=config xpath=/domain/configs/config[@name='{1}']/web-container/session-config/session-manager/manager-properties CLIName={1}.session-config.session-manager.manager-properties ]
+
+ --- Attributes:
+ AttributeInfo[name=session-id-generator-classname, description=null, type=java.lang.String]
+ Descriptor[setter=setSessionIdGeneratorClassname getter=getSessionIdGeneratorClassname bean=CBEAN ]
+ AttributeInfo[name=max-sessions, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxSessions getter=getMaxSessions bean=CBEAN ]
+ AttributeInfo[name=reap-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setReapIntervalInSeconds getter=getReapIntervalInSeconds bean=CBEAN ]
+ AttributeInfo[name=session-file-name, description=null, type=java.lang.String]
+ Descriptor[setter=setSessionFileName getter=getSessionFileName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=mbean, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.MBeanElementChangeEvent ObjectName={0}:type=mbean,name={1},category=config xpath=/domain/applications/mbean[@name='{1}'] CLIName=domain.applications.mbean.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=impl-class-name, description=null, type=java.lang.String]
+ Descriptor[setter=setImplClassName getter=getImplClassName bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=object-name, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectName getter=getObjectName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=mdb-container, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=mdb-container,config={1},category=config xpath=/domain/configs/config[@name='{1}']/mdb-container CLIName={1}.mdb-container ]
+
+ --- Attributes:
+ AttributeInfo[name=steady-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setSteadyPoolSize getter=getSteadyPoolSize bean=CBEAN ]
+ AttributeInfo[name=pool-resize-quantity, description=null, type=java.lang.String]
+ Descriptor[setter=setPoolResizeQuantity getter=getPoolResizeQuantity bean=CBEAN ]
+ AttributeInfo[name=idle-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setIdleTimeoutInSeconds getter=getIdleTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=max-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxPoolSize getter=getMaxPoolSize bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=message-security-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=message-security-config,name={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}'] CLIName={1}.security-service.message-security-config.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=auth-layer, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthLayer getter=getAuthLayer bean=CBEAN ]
+ AttributeInfo[name=default-client-provider, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultClientProvider getter=getDefaultClientProvider bean=CBEAN ]
+ AttributeInfo[name=default-provider, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultProvider getter=getDefaultProvider bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProviderConfig, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=provider-config multi=true ]
+ OperationInfo[name=getProviderConfigNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=provider-config multi=true ]
+ OperationInfo[name=getProviderConfigByProviderId, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=provider-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createProviderConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=provider-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeProviderConfigByProviderId, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=provider-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=mime, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=mime,id={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/mime[@id='{2}'] CLIName={1}.http-service.mime.{2} ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=module-log-levels, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=LogLevelChangeEvent ObjectName={0}:type=module-log-levels,config={1},category=config xpath=/domain/configs/config[@name='{1}']/log-service/module-log-levels CLIName={1}.log-service.module-log-levels ]
+
+ --- Attributes:
+ AttributeInfo[name=util, description=null, type=java.lang.String]
+ Descriptor[setter=setUtil getter=getUtil bean=CBEAN ]
+ AttributeInfo[name=connector, description=null, type=java.lang.String]
+ Descriptor[setter=setConnector getter=getConnector bean=CBEAN ]
+ AttributeInfo[name=node-agent, description=null, type=java.lang.String]
+ Descriptor[setter=setNodeAgent getter=getNodeAgent bean=CBEAN ]
+ AttributeInfo[name=jta, description=null, type=java.lang.String]
+ Descriptor[setter=setJta getter=getJta bean=CBEAN ]
+ AttributeInfo[name=security, description=null, type=java.lang.String]
+ Descriptor[setter=setSecurity getter=getSecurity bean=CBEAN ]
+ AttributeInfo[name=self-management, description=null, type=java.lang.String]
+ Descriptor[setter=setSelfManagement getter=getSelfManagement bean=CBEAN ]
+ AttributeInfo[name=jms, description=null, type=java.lang.String]
+ Descriptor[setter=setJms getter=getJms bean=CBEAN ]
+ AttributeInfo[name=jdo, description=null, type=java.lang.String]
+ Descriptor[setter=setJdo getter=getJdo bean=CBEAN ]
+ AttributeInfo[name=javamail, description=null, type=java.lang.String]
+ Descriptor[setter=setJavamail getter=getJavamail bean=CBEAN ]
+ AttributeInfo[name=mdb-container, description=null, type=java.lang.String]
+ Descriptor[setter=setMdbContainer getter=getMdbContainer bean=CBEAN ]
+ AttributeInfo[name=verifier, description=null, type=java.lang.String]
+ Descriptor[setter=setVerifier getter=getVerifier bean=CBEAN ]
+ AttributeInfo[name=admin, description=null, type=java.lang.String]
+ Descriptor[setter=setAdmin getter=getAdmin bean=CBEAN ]
+ AttributeInfo[name=cmp, description=null, type=java.lang.String]
+ Descriptor[setter=setCmp getter=getCmp bean=CBEAN ]
+ AttributeInfo[name=configuration, description=null, type=java.lang.String]
+ Descriptor[setter=setConfiguration getter=getConfiguration bean=CBEAN ]
+ AttributeInfo[name=saaj, description=null, type=java.lang.String]
+ Descriptor[setter=setSaaj getter=getSaaj bean=CBEAN ]
+ AttributeInfo[name=server, description=null, type=java.lang.String]
+ Descriptor[setter=setServer getter=getServer bean=CBEAN ]
+ AttributeInfo[name=jts, description=null, type=java.lang.String]
+ Descriptor[setter=setJts getter=getJts bean=CBEAN ]
+ AttributeInfo[name=cmp-container, description=null, type=java.lang.String]
+ Descriptor[setter=setCmpContainer getter=getCmpContainer bean=CBEAN ]
+ AttributeInfo[name=management-event, description=null, type=java.lang.String]
+ Descriptor[setter=setManagementEvent getter=getManagementEvent bean=CBEAN ]
+ AttributeInfo[name=root, description=null, type=java.lang.String]
+ Descriptor[setter=setRoot getter=getRoot bean=CBEAN ]
+ AttributeInfo[name=resource-adapter, description=null, type=java.lang.String]
+ Descriptor[setter=setResourceAdapter getter=getResourceAdapter bean=CBEAN ]
+ AttributeInfo[name=jaxrpc, description=null, type=java.lang.String]
+ Descriptor[setter=setJaxrpc getter=getJaxrpc bean=CBEAN ]
+ AttributeInfo[name=web-container, description=null, type=java.lang.String]
+ Descriptor[setter=setWebContainer getter=getWebContainer bean=CBEAN ]
+ AttributeInfo[name=deployment, description=null, type=java.lang.String]
+ Descriptor[setter=setDeployment getter=getDeployment bean=CBEAN ]
+ AttributeInfo[name=synchronization, description=null, type=java.lang.String]
+ Descriptor[setter=setSynchronization getter=getSynchronization bean=CBEAN ]
+ AttributeInfo[name=jaxr, description=null, type=java.lang.String]
+ Descriptor[setter=setJaxr getter=getJaxr bean=CBEAN ]
+ AttributeInfo[name=naming, description=null, type=java.lang.String]
+ Descriptor[setter=setNaming getter=getNaming bean=CBEAN ]
+ AttributeInfo[name=classloader, description=null, type=java.lang.String]
+ Descriptor[setter=setClassloader getter=getClassloader bean=CBEAN ]
+ AttributeInfo[name=group-management-service, description=null, type=java.lang.String]
+ Descriptor[setter=setGroupManagementService getter=getGroupManagementService bean=CBEAN ]
+ AttributeInfo[name=ejb-container, description=null, type=java.lang.String]
+ Descriptor[setter=setEjbContainer getter=getEjbContainer bean=CBEAN ]
+ AttributeInfo[name=corba, description=null, type=java.lang.String]
+ Descriptor[setter=setCorba getter=getCorba bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=module-log-levels#, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=module-log-levels,node-agent={1},category=config xpath=/domain/node-agents/node-agent[@name='{1}']/log-service/module-log-levels CLIName=domain.node-agent.{1}.log-service.odule-log-levels dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=util, description=null, type=java.lang.String]
+ Descriptor[setter=setUtil getter=getUtil bean=CBEAN ]
+ AttributeInfo[name=connector, description=null, type=java.lang.String]
+ Descriptor[setter=setConnector getter=getConnector bean=CBEAN ]
+ AttributeInfo[name=node-agent, description=null, type=java.lang.String]
+ Descriptor[setter=setNodeAgent getter=getNodeAgent bean=CBEAN ]
+ AttributeInfo[name=jta, description=null, type=java.lang.String]
+ Descriptor[setter=setJta getter=getJta bean=CBEAN ]
+ AttributeInfo[name=security, description=null, type=java.lang.String]
+ Descriptor[setter=setSecurity getter=getSecurity bean=CBEAN ]
+ AttributeInfo[name=self-management, description=null, type=java.lang.String]
+ Descriptor[setter=setSelfManagement getter=getSelfManagement bean=CBEAN ]
+ AttributeInfo[name=jms, description=null, type=java.lang.String]
+ Descriptor[setter=setJms getter=getJms bean=CBEAN ]
+ AttributeInfo[name=jdo, description=null, type=java.lang.String]
+ Descriptor[setter=setJdo getter=getJdo bean=CBEAN ]
+ AttributeInfo[name=javamail, description=null, type=java.lang.String]
+ Descriptor[setter=setJavamail getter=getJavamail bean=CBEAN ]
+ AttributeInfo[name=mdb-container, description=null, type=java.lang.String]
+ Descriptor[setter=setMdbContainer getter=getMdbContainer bean=CBEAN ]
+ AttributeInfo[name=verifier, description=null, type=java.lang.String]
+ Descriptor[setter=setVerifier getter=getVerifier bean=CBEAN ]
+ AttributeInfo[name=admin, description=null, type=java.lang.String]
+ Descriptor[setter=setAdmin getter=getAdmin bean=CBEAN ]
+ AttributeInfo[name=cmp, description=null, type=java.lang.String]
+ Descriptor[setter=setCmp getter=getCmp bean=CBEAN ]
+ AttributeInfo[name=configuration, description=null, type=java.lang.String]
+ Descriptor[setter=setConfiguration getter=getConfiguration bean=CBEAN ]
+ AttributeInfo[name=saaj, description=null, type=java.lang.String]
+ Descriptor[setter=setSaaj getter=getSaaj bean=CBEAN ]
+ AttributeInfo[name=server, description=null, type=java.lang.String]
+ Descriptor[setter=setServer getter=getServer bean=CBEAN ]
+ AttributeInfo[name=jts, description=null, type=java.lang.String]
+ Descriptor[setter=setJts getter=getJts bean=CBEAN ]
+ AttributeInfo[name=cmp-container, description=null, type=java.lang.String]
+ Descriptor[setter=setCmpContainer getter=getCmpContainer bean=CBEAN ]
+ AttributeInfo[name=management-event, description=null, type=java.lang.String]
+ Descriptor[setter=setManagementEvent getter=getManagementEvent bean=CBEAN ]
+ AttributeInfo[name=root, description=null, type=java.lang.String]
+ Descriptor[setter=setRoot getter=getRoot bean=CBEAN ]
+ AttributeInfo[name=resource-adapter, description=null, type=java.lang.String]
+ Descriptor[setter=setResourceAdapter getter=getResourceAdapter bean=CBEAN ]
+ AttributeInfo[name=jaxrpc, description=null, type=java.lang.String]
+ Descriptor[setter=setJaxrpc getter=getJaxrpc bean=CBEAN ]
+ AttributeInfo[name=web-container, description=null, type=java.lang.String]
+ Descriptor[setter=setWebContainer getter=getWebContainer bean=CBEAN ]
+ AttributeInfo[name=deployment, description=null, type=java.lang.String]
+ Descriptor[setter=setDeployment getter=getDeployment bean=CBEAN ]
+ AttributeInfo[name=synchronization, description=null, type=java.lang.String]
+ Descriptor[setter=setSynchronization getter=getSynchronization bean=CBEAN ]
+ AttributeInfo[name=jaxr, description=null, type=java.lang.String]
+ Descriptor[setter=setJaxr getter=getJaxr bean=CBEAN ]
+ AttributeInfo[name=naming, description=null, type=java.lang.String]
+ Descriptor[setter=setNaming getter=getNaming bean=CBEAN ]
+ AttributeInfo[name=classloader, description=null, type=java.lang.String]
+ Descriptor[setter=setClassloader getter=getClassloader bean=CBEAN ]
+ AttributeInfo[name=group-management-service, description=null, type=java.lang.String]
+ Descriptor[setter=setGroupManagementService getter=getGroupManagementService bean=CBEAN ]
+ AttributeInfo[name=ejb-container, description=null, type=java.lang.String]
+ Descriptor[setter=setEjbContainer getter=getEjbContainer bean=CBEAN ]
+ AttributeInfo[name=corba, description=null, type=java.lang.String]
+ Descriptor[setter=setCorba getter=getCorba bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=module-monitoring-levels, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=MonitoringLevelChangeEvent ObjectName={0}:type=module-monitoring-levels,config={1},category=config xpath=/domain/configs/config[@name='{1}']/monitoring-service/module-monitoring-levels CLIName={1}.monitoring-service.module-monitoring-levels ]
+
+ --- Attributes:
+ AttributeInfo[name=web-container, description=null, type=java.lang.String]
+ Descriptor[setter=setWebContainer getter=getWebContainer bean=CBEAN ]
+ AttributeInfo[name=orb, description=null, type=java.lang.String]
+ Descriptor[setter=setOrb getter=getOrb bean=CBEAN ]
+ AttributeInfo[name=jvm, description=null, type=java.lang.String]
+ Descriptor[setter=setJvm getter=getJvm bean=CBEAN ]
+ AttributeInfo[name=jms-service, description=null, type=java.lang.String]
+ Descriptor[setter=setJmsService getter=getJmsService bean=CBEAN ]
+ AttributeInfo[name=http-service, description=null, type=java.lang.String]
+ Descriptor[setter=setHttpService getter=getHttpService bean=CBEAN ]
+ AttributeInfo[name=jdbc-connection-pool, description=null, type=java.lang.String]
+ Descriptor[setter=setJdbcConnectionPool getter=getJdbcConnectionPool bean=CBEAN ]
+ AttributeInfo[name=thread-pool, description=null, type=java.lang.String]
+ Descriptor[setter=setThreadPool getter=getThreadPool bean=CBEAN ]
+ AttributeInfo[name=ejb-container, description=null, type=java.lang.String]
+ Descriptor[setter=setEjbContainer getter=getEjbContainer bean=CBEAN ]
+ AttributeInfo[name=connector-service, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectorService getter=getConnectorService bean=CBEAN ]
+ AttributeInfo[name=transaction-service, description=null, type=java.lang.String]
+ Descriptor[setter=setTransactionService getter=getTransactionService bean=CBEAN ]
+ AttributeInfo[name=connector-connection-pool, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectorConnectionPool getter=getConnectorConnectionPool bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=monitoring-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=monitoring-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/monitoring-service CLIName={1}.monitoring-service ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getModuleMonitoringLevels, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=module-monitoring-levels ]
+ OperationInfo[name=createModuleMonitoringLevels, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=module-monitoring-levels ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeModuleMonitoringLevels, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=module-monitoring-levels ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=node-agent, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=node-agent,name={1},category=config xpath=/domain/node-agents/node-agent[@name='{1}'] CLIName=domain.node-agent.{1} dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=system-jmx-connector-name, description=null, type=java.lang.String]
+ Descriptor[setter=setSystemJmxConnectorName getter=getSystemJmxConnectorName bean=CBEAN ]
+ AttributeInfo[name=start-servers-in-startup, description=null, type=boolean]
+ Descriptor[setter=setStartServersInStartup getter=isStartServersInStartup bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getLogService, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=log-service ]
+ OperationInfo[name=createLogService, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=log-service ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeLogService, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=log-service ]
+ OperationInfo[name=getAuthRealm, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=auth-realm ]
+ OperationInfo[name=createAuthRealm, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=auth-realm ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAuthRealm, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=auth-realm ]
+ OperationInfo[name=getJmxConnector, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=jmx-connector ]
+ OperationInfo[name=createJmxConnector, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jmx-connector ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJmxConnector, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=jmx-connector ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=node-agents, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=node-agents,category=config xpath=/domain/node-agents CLIName=domain.node-agents dynamicallyReconfigurable=** ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getNodeAgent, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=node-agent multi=true ]
+ OperationInfo[name=getNodeAgentNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=node-agent multi=true ]
+ OperationInfo[name=getNodeAgentByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=node-agent multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createNodeAgent, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=node-agent multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeNodeAgentByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=node-agent multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=nodeagent-auth-realm, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=AuthRealmEvent ObjectName={0}:type=auth-realm,node-agent={1},category=config xpath=/domain/node-agents/node-agent[@name='{1}']/auth-realm CLIName=domain.node-agent.{1}.auth-realm ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=classname, description=null, type=java.lang.String]
+ Descriptor[setter=setClassname getter=getClassname bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=nodeagent-jmx-connector, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=jmx-connector,node-agent={1},category=config xpath=/domain/node-agents/node-agent[@name='{1}']/jmx-connector CLIName=domain.node-agent.{1}.jmx-connector ]
+
+ --- Attributes:
+ AttributeInfo[name=accept-all, description=null, type=boolean]
+ Descriptor[setter=setAcceptAll getter=isAcceptAll bean=CBEAN ]
+ AttributeInfo[name=security-enabled, description=null, type=boolean]
+ Descriptor[setter=setSecurityEnabled getter=isSecurityEnabled bean=CBEAN ]
+ AttributeInfo[name=address, description=null, type=java.lang.String]
+ Descriptor[setter=setAddress getter=getAddress bean=CBEAN ]
+ AttributeInfo[name=port, description=null, type=java.lang.String]
+ Descriptor[setter=setPort getter=getPort bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=auth-realm-name, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthRealmName getter=getAuthRealmName bean=CBEAN ]
+ AttributeInfo[name=protocol, description=null, type=java.lang.String]
+ Descriptor[setter=setProtocol getter=getProtocol bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSsl, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=createSsl, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ssl ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSsl, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=nodeagent-jmx-connector-ssl, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ssl,node-agent={1},category=config xpath=/domain/node-agents/node-agent[@name='{1}']/jmx-connector/ssl CLIName=domain.node-agent.{1}.jmx-connector.ssl ]
+
+ --- Attributes:
+ AttributeInfo[name=ssl3-tls-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl3TlsCiphers getter=getSsl3TlsCiphers bean=CBEAN ]
+ AttributeInfo[name=tls-rollback-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsRollbackEnabled getter=isTlsRollbackEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl3-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl3Enabled getter=isSsl3Enabled bean=CBEAN ]
+ AttributeInfo[name=client-auth-enabled, description=null, type=boolean]
+ Descriptor[setter=setClientAuthEnabled getter=isClientAuthEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl2-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl2Ciphers getter=getSsl2Ciphers bean=CBEAN ]
+ AttributeInfo[name=ssl2-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl2Enabled getter=isSsl2Enabled bean=CBEAN ]
+ AttributeInfo[name=cert-nickname, description=null, type=java.lang.String]
+ Descriptor[setter=setCertNickname getter=getCertNickname bean=CBEAN ]
+ AttributeInfo[name=tls-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsEnabled getter=isTlsEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=orb, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=orb,config={1},category=config xpath=/domain/configs/config[@name='{1}']/iiop-service/orb CLIName={1}.iiop-service.orb ]
+
+ --- Attributes:
+ AttributeInfo[name=message-fragment-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMessageFragmentSize getter=getMessageFragmentSize bean=CBEAN ]
+ AttributeInfo[name=use-thread-pool-ids, description=null, type=java.lang.String]
+ Descriptor[setter=setUseThreadPoolIds getter=getUseThreadPoolIds bean=CBEAN ]
+ AttributeInfo[name=max-connections, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxConnections getter=getMaxConnections bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=password-alias, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=password-alias,category=config ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=persistence-manager-factory-resource, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=persistence-manager-factory-resource,jndi-name={1},category=config xpath=/domain/resources/persistence-manager-factory-resource[@jndi-name='{1}'] CLIName=domain.resources.persistence-manager-factory-resource.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=jdbc-resource-jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJdbcResourceJndiName getter=getJdbcResourceJndiName bean=CBEAN ]
+ AttributeInfo[name=factory-class, description=null, type=java.lang.String]
+ Descriptor[setter=setFactoryClass getter=getFactoryClass bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+ AttributeInfo[name=jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setJndiName getter=getJndiName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=persistence-store, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=persistence-store,config={1},category=config xpath=/domain/configs/config[@name='{1}']/availability-service/persistence-store CLIName={1}.availability-service.persistence-store ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=principal, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=principal,connector-connection-pool={1},security-map={2},category=config xpath=/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']/principal CLIName=@domain.resources.connector-connection-pool.{1}.security-map.{2}.principal ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=profiler, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=profiler,config={1},category=config xpath=/domain/configs/config[@name='{1}']/java-config/profiler CLIName={1}.java-config.profiler ]
+
+ --- Attributes:
+ AttributeInfo[name=classpath, description=null, type=java.lang.String]
+ Descriptor[setter=setClasspath getter=getClasspath bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=native-library-path, description=null, type=java.lang.String]
+ Descriptor[setter=setNativeLibraryPath getter=getNativeLibraryPath bean=CBEAN ]
+ AttributeInfo[name=jvm-options, description=null, type=[Ljava.lang.String;]
+ Descriptor[setter=setJvmOptions getter=getJvmOptions bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=provider-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=provider-config,name={3},message-security-config={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']/provider-config[@provider-id='{3}'] CLIName={1}.security-service.message-security-config.{2}.provider-config.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=provider-type, description=null, type=java.lang.String]
+ Descriptor[setter=setProviderType getter=getProviderType bean=CBEAN ]
+ AttributeInfo[name=class-name, description=null, type=java.lang.String]
+ Descriptor[setter=setClassName getter=getClassName bean=CBEAN ]
+ AttributeInfo[name=provider-id, description=null, type=java.lang.String]
+ Descriptor[setter=setProviderId getter=getProviderId bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getRequestPolicy, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=request-policy ]
+ OperationInfo[name=createRequestPolicy, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=request-policy ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeRequestPolicy, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=request-policy ]
+ OperationInfo[name=getResponsePolicy, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=response-policy ]
+ OperationInfo[name=createResponsePolicy, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=response-policy ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeResponsePolicy, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=response-policy ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=request-policy, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=request-policy,provider-config={3},message-security-config={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']/provider-config[@provider-id='{3}']/request-policy CLIName={1}.security-service.message-security-config.{2}.provider-config.{3}.request-policy ]
+
+ --- Attributes:
+ AttributeInfo[name=auth-recipient, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthRecipient getter=getAuthRecipient bean=CBEAN ]
+ AttributeInfo[name=auth-source, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthSource getter=getAuthSource bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=request-processing, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=request-processing,config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/request-processing CLIName={1}.http-service.request-processing ]
+
+ --- Attributes:
+ AttributeInfo[name=thread-count, description=null, type=java.lang.String]
+ Descriptor[setter=setThreadCount getter=getThreadCount bean=CBEAN ]
+ AttributeInfo[name=initial-thread-count, description=null, type=java.lang.String]
+ Descriptor[setter=setInitialThreadCount getter=getInitialThreadCount bean=CBEAN ]
+ AttributeInfo[name=thread-increment, description=null, type=java.lang.String]
+ Descriptor[setter=setThreadIncrement getter=getThreadIncrement bean=CBEAN ]
+ AttributeInfo[name=request-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setRequestTimeoutInSeconds getter=getRequestTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=header-buffer-length-in-bytes, description=null, type=java.lang.String]
+ Descriptor[setter=setHeaderBufferLengthInBytes getter=getHeaderBufferLengthInBytes bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=resource-adapter-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=resource-adapter-config,resource-adapter-name={1},category=config xpath=/domain/resources/resource-adapter-config[@resource-adapter-name='{1}'] CLIName=domain.resources.resource-adapter-config.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=thread-pool-ids, description=null, type=java.lang.String]
+ Descriptor[setter=setThreadPoolIds getter=getThreadPoolIds bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=resource-adapter-name, description=null, type=java.lang.String]
+ Descriptor[setter=setResourceAdapterName getter=getResourceAdapterName bean=CBEAN ]
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=resource-ref, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=resource-ref,ref={2},server={1},category=config xpath=/domain/servers/server[@name='{1}']/resource-ref[@ref='{2}'] CLIName={1}.resource-ref.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=ref, description=null, type=java.lang.String]
+ Descriptor[setter=setRef getter=getRef bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=resources, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=resources,category=config xpath=/domain/resources CLIName=domain.resources ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getPersistenceManagerFactoryResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=persistence-manager-factory-resource multi=true ]
+ OperationInfo[name=getPersistenceManagerFactoryResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=persistence-manager-factory-resource multi=true ]
+ OperationInfo[name=getPersistenceManagerFactoryResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=persistence-manager-factory-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createPersistenceManagerFactoryResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=persistence-manager-factory-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removePersistenceManagerFactoryResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=persistence-manager-factory-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getJdbcConnectionPool, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=jdbc-connection-pool multi=true ]
+ OperationInfo[name=getJdbcConnectionPoolNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=jdbc-connection-pool multi=true ]
+ OperationInfo[name=getJdbcConnectionPoolByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jdbc-connection-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createJdbcConnectionPool, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jdbc-connection-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJdbcConnectionPoolByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=jdbc-connection-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getConnectorResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=connector-resource multi=true ]
+ OperationInfo[name=getConnectorResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=connector-resource multi=true ]
+ OperationInfo[name=getConnectorResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createConnectorResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConnectorResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=connector-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getAdminObjectResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=admin-object-resource multi=true ]
+ OperationInfo[name=getAdminObjectResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=admin-object-resource multi=true ]
+ OperationInfo[name=getAdminObjectResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=admin-object-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createAdminObjectResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=admin-object-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAdminObjectResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=admin-object-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getConnectorConnectionPool, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=connector-connection-pool multi=true ]
+ OperationInfo[name=getConnectorConnectionPoolNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=connector-connection-pool multi=true ]
+ OperationInfo[name=getConnectorConnectionPoolByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-connection-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createConnectorConnectionPool, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=connector-connection-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeConnectorConnectionPoolByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=connector-connection-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getCustomResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=custom-resource multi=true ]
+ OperationInfo[name=getCustomResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=custom-resource multi=true ]
+ OperationInfo[name=getCustomResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=custom-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createCustomResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=custom-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeCustomResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=custom-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getJdbcResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=jdbc-resource multi=true ]
+ OperationInfo[name=getJdbcResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=jdbc-resource multi=true ]
+ OperationInfo[name=getJdbcResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jdbc-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createJdbcResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jdbc-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJdbcResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=jdbc-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getResourceAdapterConfig, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=resource-adapter-config multi=true ]
+ OperationInfo[name=getResourceAdapterConfigNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=resource-adapter-config multi=true ]
+ OperationInfo[name=getResourceAdapterConfigByResourceAdapterName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=resource-adapter-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createResourceAdapterConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=resource-adapter-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeResourceAdapterConfigByResourceAdapterName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=resource-adapter-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getMailResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=mail-resource multi=true ]
+ OperationInfo[name=getMailResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=mail-resource multi=true ]
+ OperationInfo[name=getMailResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=mail-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createMailResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=mail-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeMailResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=mail-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getExternalJndiResource, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=external-jndi-resource multi=true ]
+ OperationInfo[name=getExternalJndiResourceNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=external-jndi-resource multi=true ]
+ OperationInfo[name=getExternalJndiResourceByJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=external-jndi-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createExternalJndiResource, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=external-jndi-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeExternalJndiResourceByJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=external-jndi-resource multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=response-policy, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=response-policy,provider-config={3},message-security-config={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service/message-security-config[@auth-layer='{2}']/provider-config[@provider-id='{3}']/response-policy CLIName={1}.security-service.message-security-config.{2}.provider-config.{3}.response-policy ]
+
+ --- Attributes:
+ AttributeInfo[name=auth-recipient, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthRecipient getter=getAuthRecipient bean=CBEAN ]
+ AttributeInfo[name=auth-source, description=null, type=java.lang.String]
+ Descriptor[setter=setAuthSource getter=getAuthSource bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=security-map, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ResourceDeployEvent ObjectName={0}:type=security-map,name={2},connector-connection-pool={1},category=config xpath=/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}'] CLIName=domain.resources.connector-connection-pool.{1}.security-map.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=user-group, description=null, type=[Ljava.lang.String;]
+ Descriptor[setter=setUserGroup getter=getUserGroup bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=principal, description=null, type=[Ljava.lang.String;]
+ Descriptor[setter=setPrincipal getter=getPrincipal bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getBackendPrincipal, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=backend-principal ]
+ OperationInfo[name=createBackendPrincipal, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=backend-principal ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeBackendPrincipal, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=backend-principal ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=security-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=SecurityServiceEvent ObjectName={0}:type=security-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/security-service CLIName={1}.security-service ]
+
+ --- Attributes:
+ AttributeInfo[name=audit-enabled, description=null, type=boolean]
+ Descriptor[setter=setAuditEnabled getter=isAuditEnabled bean=CBEAN ]
+ AttributeInfo[name=default-realm, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultRealm getter=getDefaultRealm bean=CBEAN ]
+ AttributeInfo[name=anonymous-role, description=null, type=java.lang.String]
+ Descriptor[setter=setAnonymousRole getter=getAnonymousRole bean=CBEAN ]
+ AttributeInfo[name=default-principal-password, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultPrincipalPassword getter=getDefaultPrincipalPassword bean=CBEAN ]
+ AttributeInfo[name=default-principal, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultPrincipal getter=getDefaultPrincipal bean=CBEAN ]
+ AttributeInfo[name=mapped-principal-class, description=null, type=java.lang.String]
+ Descriptor[setter=setMappedPrincipalClass getter=getMappedPrincipalClass bean=CBEAN ]
+ AttributeInfo[name=jacc, description=null, type=java.lang.String]
+ Descriptor[setter=setJacc getter=getJacc bean=CBEAN ]
+ AttributeInfo[name=activate-default-principal-to-role-mapping, description=null, type=boolean]
+ Descriptor[setter=setActivateDefaultPrincipalToRoleMapping getter=isActivateDefaultPrincipalToRoleMapping bean=CBEAN ]
+ AttributeInfo[name=audit-modules, description=null, type=java.lang.String]
+ Descriptor[setter=setAuditModules getter=getAuditModules bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getAuthRealm, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=auth-realm multi=true ]
+ OperationInfo[name=getAuthRealmNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=auth-realm multi=true ]
+ OperationInfo[name=getAuthRealmByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=auth-realm multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createAuthRealm, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=auth-realm multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAuthRealmByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=auth-realm multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getJaccProvider, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=jacc-provider multi=true ]
+ OperationInfo[name=getJaccProviderNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=jacc-provider multi=true ]
+ OperationInfo[name=getJaccProviderByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jacc-provider multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createJaccProvider, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=jacc-provider multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeJaccProviderByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=jacc-provider multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getMessageSecurityConfig, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=message-security-config multi=true ]
+ OperationInfo[name=getMessageSecurityConfigNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=message-security-config multi=true ]
+ OperationInfo[name=getMessageSecurityConfigByAuthLayer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=message-security-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createMessageSecurityConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=message-security-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeMessageSecurityConfigByAuthLayer, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=message-security-config multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getAuditModule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=audit-module multi=true ]
+ OperationInfo[name=getAuditModuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=audit-module multi=true ]
+ OperationInfo[name=getAuditModuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=audit-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createAuditModule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=audit-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeAuditModuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=audit-module multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=server, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=server,name={1},category=config xpath=/domain/servers/server[@name='{1}'] CLIName={1} ]
+
+ --- Attributes:
+ AttributeInfo[name=config-ref, description=null, type=java.lang.String]
+ Descriptor[setter=setConfigRef getter=getConfigRef bean=CBEAN ]
+ AttributeInfo[name=lb-weight, description=null, type=java.lang.String]
+ Descriptor[setter=setLbWeight getter=getLbWeight bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=node-agent-ref, description=null, type=java.lang.String]
+ Descriptor[setter=setNodeAgentRef getter=getNodeAgentRef bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSystemProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getSystemPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setSystemProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getApplicationRef, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=application-ref multi=true ]
+ OperationInfo[name=getApplicationRefNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=application-ref multi=true ]
+ OperationInfo[name=getApplicationRefByRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=application-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createApplicationRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=application-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeApplicationRefByRef, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=application-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getResourceRef, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=resource-ref multi=true ]
+ OperationInfo[name=getResourceRefNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=resource-ref multi=true ]
+ OperationInfo[name=getResourceRefByRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=resource-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createResourceRef, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=resource-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeResourceRefByRef, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=resource-ref multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=servers, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=servers,category=config xpath=/domain/servers CLIName=domain.servers ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getServer, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=server multi=true ]
+ OperationInfo[name=getServerNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=server multi=true ]
+ OperationInfo[name=getServerByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=server multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createServer, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=server multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeServerByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=server multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=session-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=session-config,config={1},category=config xpath=/domain/configs/config[@name='{1}']/web-container/session-config CLIName={1}.session-config ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getSessionManager, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=session-manager ]
+ OperationInfo[name=createSessionManager, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=session-manager ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSessionManager, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=session-manager ]
+ OperationInfo[name=getSessionProperties, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=session-properties ]
+ OperationInfo[name=createSessionProperties, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=session-properties ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSessionProperties, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=session-properties ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=session-manager, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=session-manager,config={1},category=config xpath=/domain/configs/config[@name='{1}']/web-container/session-config/session-manager CLIName={1}.session-config.session-manager ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getStoreProperties, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=store-properties ]
+ OperationInfo[name=createStoreProperties, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=store-properties ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeStoreProperties, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=store-properties ]
+ OperationInfo[name=getManagerProperties, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=manager-properties ]
+ OperationInfo[name=createManagerProperties, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=manager-properties ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeManagerProperties, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=manager-properties ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=session-properties, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=session-properties,config={1},category=config xpath=/domain/configs/config[@name='{1}']/web-container/session-config/session-properties CLIName={1}.session-config.session-properties ]
+
+ --- Attributes:
+ AttributeInfo[name=timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setTimeoutInSeconds getter=getTimeoutInSeconds bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ssl, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.http.HSSslEvent ObjectName={0}:type=ssl,config={1},http-listener={2},category=config xpath=/domain/configs/config[@name='{1}']/http-service/http-listener[@id='{2}']/ssl CLIName={1}.http-service.http-listener.{2}.ssl ]
+
+ --- Attributes:
+ AttributeInfo[name=ssl3-tls-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl3TlsCiphers getter=getSsl3TlsCiphers bean=CBEAN ]
+ AttributeInfo[name=tls-rollback-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsRollbackEnabled getter=isTlsRollbackEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl3-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl3Enabled getter=isSsl3Enabled bean=CBEAN ]
+ AttributeInfo[name=client-auth-enabled, description=null, type=boolean]
+ Descriptor[setter=setClientAuthEnabled getter=isClientAuthEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl2-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl2Ciphers getter=getSsl2Ciphers bean=CBEAN ]
+ AttributeInfo[name=ssl2-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl2Enabled getter=isSsl2Enabled bean=CBEAN ]
+ AttributeInfo[name=cert-nickname, description=null, type=java.lang.String]
+ Descriptor[setter=setCertNickname getter=getCertNickname bean=CBEAN ]
+ AttributeInfo[name=tls-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsEnabled getter=isTlsEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ssl#, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ssl,config={1},category=config xpath=/domain/configs/config[@name='{1}']/iiop-service/ssl-client-config/ssl CLIName={1}.iiop-service.ssl ]
+
+ --- Attributes:
+ AttributeInfo[name=ssl3-tls-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl3TlsCiphers getter=getSsl3TlsCiphers bean=CBEAN ]
+ AttributeInfo[name=tls-rollback-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsRollbackEnabled getter=isTlsRollbackEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl3-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl3Enabled getter=isSsl3Enabled bean=CBEAN ]
+ AttributeInfo[name=client-auth-enabled, description=null, type=boolean]
+ Descriptor[setter=setClientAuthEnabled getter=isClientAuthEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl2-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl2Ciphers getter=getSsl2Ciphers bean=CBEAN ]
+ AttributeInfo[name=ssl2-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl2Enabled getter=isSsl2Enabled bean=CBEAN ]
+ AttributeInfo[name=cert-nickname, description=null, type=java.lang.String]
+ Descriptor[setter=setCertNickname getter=getCertNickname bean=CBEAN ]
+ AttributeInfo[name=tls-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsEnabled getter=isTlsEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ssl##, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ssl,config={1},iiop-listener={2},category=config xpath=/domain/configs/config[@name='{1}']/iiop-service/iiop-listener[@id='{2}']/ssl CLIName={1}.iiop-service.iiop-listener.{2}.ssl ]
+
+ --- Attributes:
+ AttributeInfo[name=ssl3-tls-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl3TlsCiphers getter=getSsl3TlsCiphers bean=CBEAN ]
+ AttributeInfo[name=tls-rollback-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsRollbackEnabled getter=isTlsRollbackEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl3-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl3Enabled getter=isSsl3Enabled bean=CBEAN ]
+ AttributeInfo[name=client-auth-enabled, description=null, type=boolean]
+ Descriptor[setter=setClientAuthEnabled getter=isClientAuthEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl2-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl2Ciphers getter=getSsl2Ciphers bean=CBEAN ]
+ AttributeInfo[name=ssl2-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl2Enabled getter=isSsl2Enabled bean=CBEAN ]
+ AttributeInfo[name=cert-nickname, description=null, type=java.lang.String]
+ Descriptor[setter=setCertNickname getter=getCertNickname bean=CBEAN ]
+ AttributeInfo[name=tls-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsEnabled getter=isTlsEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ssl####, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ssl,config={1},jmx-connector={2},category=config xpath=/domain/configs/config[@name='{1}']/admin-service/jmx-connector[@name='{2}']/ssl CLIName={1}.admin-service.jmx-connector.{2}.ssl ]
+
+ --- Attributes:
+ AttributeInfo[name=ssl3-tls-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl3TlsCiphers getter=getSsl3TlsCiphers bean=CBEAN ]
+ AttributeInfo[name=tls-rollback-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsRollbackEnabled getter=isTlsRollbackEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl3-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl3Enabled getter=isSsl3Enabled bean=CBEAN ]
+ AttributeInfo[name=client-auth-enabled, description=null, type=boolean]
+ Descriptor[setter=setClientAuthEnabled getter=isClientAuthEnabled bean=CBEAN ]
+ AttributeInfo[name=ssl2-ciphers, description=null, type=java.lang.String]
+ Descriptor[setter=setSsl2Ciphers getter=getSsl2Ciphers bean=CBEAN ]
+ AttributeInfo[name=ssl2-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsl2Enabled getter=isSsl2Enabled bean=CBEAN ]
+ AttributeInfo[name=cert-nickname, description=null, type=java.lang.String]
+ Descriptor[setter=setCertNickname getter=getCertNickname bean=CBEAN ]
+ AttributeInfo[name=tls-enabled, description=null, type=boolean]
+ Descriptor[setter=setTlsEnabled getter=isTlsEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=ssl-client-config, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=ssl-client-config,config={1},category=config xpath=/domain/configs/config[@name='{1}']/iiop-service/ssl-client-config CLIName={1}.iiop-service.ssl-client-config ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getSsl, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=createSsl, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=ssl ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSsl, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=ssl ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=store-properties, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=store-properties,config={1},category=config xpath=/domain/configs/config[@name='{1}']/web-container/session-config/session-manager/store-properties CLIName={1}.session-config.session-manager.store-properties ]
+
+ --- Attributes:
+ AttributeInfo[name=directory, description=null, type=java.lang.String]
+ Descriptor[setter=setDirectory getter=getDirectory bean=CBEAN ]
+ AttributeInfo[name=reap-interval-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setReapIntervalInSeconds getter=getReapIntervalInSeconds bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=system, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=system,config={1},category=config xpath=/domain/configs/config[@name='{1}']/admin-service/system CLIName={1}.admin-service.system ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=thread-pool, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=thread-pool,thread-pool-id={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/thread-pools/thread-pool[@thread-pool-id='{2}'] CLIName={1}.thread-pools.thread-pool.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=num-work-queues, description=null, type=java.lang.String]
+ Descriptor[setter=setNumWorkQueues getter=getNumWorkQueues bean=CBEAN ]
+ AttributeInfo[name=max-thread-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxThreadPoolSize getter=getMaxThreadPoolSize bean=CBEAN ]
+ AttributeInfo[name=min-thread-pool-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMinThreadPoolSize getter=getMinThreadPoolSize bean=CBEAN ]
+ AttributeInfo[name=idle-thread-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setIdleThreadTimeoutInSeconds getter=getIdleThreadTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=thread-pool-id, description=null, type=java.lang.String]
+ Descriptor[setter=setThreadPoolId getter=getThreadPoolId bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=thread-pools, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=thread-pools,config={1},category=config xpath=/domain/configs/config[@name='{1}']/thread-pools CLIName={1}.thread-pools ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getThreadPool, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=thread-pool multi=true ]
+ OperationInfo[name=getThreadPoolNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=thread-pool multi=true ]
+ OperationInfo[name=getThreadPoolByThreadPoolId, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=thread-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createThreadPool, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=thread-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeThreadPoolByThreadPoolId, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=thread-pool multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=transaction-service, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.tx.JTSEvent ObjectName={0}:type=transaction-service,config={1},category=config xpath=/domain/configs/config[@name='{1}']/transaction-service CLIName={1}.transaction-service ]
+
+ --- Attributes:
+ AttributeInfo[name=timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setTimeoutInSeconds getter=getTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=heuristic-decision, description=null, type=java.lang.String]
+ Descriptor[setter=setHeuristicDecision getter=getHeuristicDecision bean=CBEAN ]
+ AttributeInfo[name=keypoint-interval, description=null, type=java.lang.String]
+ Descriptor[setter=setKeypointInterval getter=getKeypointInterval bean=CBEAN ]
+ AttributeInfo[name=retry-timeout-in-seconds, description=null, type=java.lang.String]
+ Descriptor[setter=setRetryTimeoutInSeconds getter=getRetryTimeoutInSeconds bean=CBEAN ]
+ AttributeInfo[name=tx-log-dir, description=null, type=java.lang.String]
+ Descriptor[setter=setTxLogDir getter=getTxLogDir bean=CBEAN ]
+ AttributeInfo[name=automatic-recovery, description=null, type=boolean]
+ Descriptor[setter=setAutomaticRecovery getter=isAutomaticRecovery bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=transaction-service-manager, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=transaction-service-manager,category=config ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=transactions-recovery, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=transactions-recovery,category=config ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=user-group, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=user-group,connector-connection-pool={1},security-map={2},category=config xpath=/domain/resources/connector-connection-pool[@name='{1}']/security-map[@name='{2}']/user-group CLIName=@domain.resources.connector-connection-pool.{1}.security-map.{2}.user-group ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=virtual-server, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.http.HSVirtualServerEvent ObjectName={0}:type=virtual-server,id={2},config={1},category=config xpath=/domain/configs/config[@name='{1}']/http-service/virtual-server[@id='{2}'] CLIName={1}.http-service.virtual-server.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=hosts, description=null, type=java.lang.String]
+ Descriptor[setter=setHosts getter=getHosts bean=CBEAN ]
+ AttributeInfo[name=log-file, description=null, type=java.lang.String]
+ Descriptor[setter=setLogFile getter=getLogFile bean=CBEAN ]
+ AttributeInfo[name=default-web-module, description=null, type=java.lang.String]
+ Descriptor[setter=setDefaultWebModule getter=getDefaultWebModule bean=CBEAN ]
+ AttributeInfo[name=http-listeners, description=null, type=java.lang.String]
+ Descriptor[setter=setHttpListeners getter=getHttpListeners bean=CBEAN ]
+ AttributeInfo[name=state, description=null, type=java.lang.String]
+ Descriptor[setter=setState getter=getState bean=CBEAN ]
+ AttributeInfo[name=docroot, description=null, type=java.lang.String]
+ Descriptor[setter=setDocroot getter=getDocroot bean=CBEAN ]
+ AttributeInfo[name=id, description=null, type=java.lang.String]
+ Descriptor[setter=setId getter=getId bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getHttpAccessLog, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=http-access-log ]
+ OperationInfo[name=createHttpAccessLog, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=http-access-log ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeHttpAccessLog, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=http-access-log ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=web-container, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=web-container,config={1},category=config xpath=/domain/configs/config[@name='{1}']/web-container CLIName={1}.web-container ]
+
+ --- Attributes:
+
+ --- Operations:
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getSessionConfig, description=null, returnType=javax.management.ObjectName, parameters=0]
+ Descriptor[bean=CBEAN child=session-config ]
+ OperationInfo[name=createSessionConfig, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=session-config ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeSessionConfig, description=null, returnType=void, parameters=0]
+ Descriptor[bean=CBEAN child=session-config ]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=web-container-availability, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[ObjectName={0}:type=web-container-availability,config={1},category=config xpath=/domain/configs/config[@name='{1}']/availability-service/web-container-availability CLIName={1}.web-container-availability ]
+
+ --- Attributes:
+ AttributeInfo[name=persistence-frequency, description=null, type=java.lang.String]
+ Descriptor[setter=setPersistenceFrequency getter=getPersistenceFrequency bean=CBEAN ]
+ AttributeInfo[name=availability-enabled, description=null, type=java.lang.String]
+ Descriptor[setter=setAvailabilityEnabled getter=getAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=http-session-store-pool-name, description=null, type=java.lang.String]
+ Descriptor[setter=setHttpSessionStorePoolName getter=getHttpSessionStorePoolName bean=CBEAN ]
+ AttributeInfo[name=persistence-scope, description=null, type=java.lang.String]
+ Descriptor[setter=setPersistenceScope getter=getPersistenceScope bean=CBEAN ]
+ AttributeInfo[name=persistence-type, description=null, type=java.lang.String]
+ Descriptor[setter=setPersistenceType getter=getPersistenceType bean=CBEAN ]
+ AttributeInfo[name=sso-failover-enabled, description=null, type=boolean]
+ Descriptor[setter=setSsoFailoverEnabled getter=isSsoFailoverEnabled bean=CBEAN ]
+ AttributeInfo[name=persistence-store-health-check-enabled, description=null, type=boolean]
+ Descriptor[setter=setPersistenceStoreHealthCheckEnabled getter=isPersistenceStoreHealthCheckEnabled bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=web-module, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=ModuleDeployEvent ObjectName={0}:type=web-module,name={1},category=config xpath=/domain/applications/web-module[@name='{1}'] CLIName=domain.applications.web-module.{1} ]
+
+ --- Attributes:
+ AttributeInfo[name=object-type, description=null, type=java.lang.String]
+ Descriptor[setter=setObjectType getter=getObjectType bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=context-root, description=null, type=java.lang.String]
+ Descriptor[setter=setContextRoot getter=getContextRoot bean=CBEAN ]
+ AttributeInfo[name=directory-deployed, description=null, type=boolean]
+ Descriptor[setter=setDirectoryDeployed getter=isDirectoryDeployed bean=CBEAN ]
+ AttributeInfo[name=libraries, description=null, type=java.lang.String]
+ Descriptor[setter=setLibraries getter=getLibraries bean=CBEAN ]
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=availability-enabled, description=null, type=boolean]
+ Descriptor[setter=setAvailabilityEnabled getter=isAvailabilityEnabled bean=CBEAN ]
+ AttributeInfo[name=location, description=null, type=java.lang.String]
+ Descriptor[setter=setLocation getter=getLocation bean=CBEAN ]
+ AttributeInfo[name=description, description=null, type=java.lang.String]
+ Descriptor[setter=setDescription getter=getDescription bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getProperties, description=null, returnType=javax.management.AttributeList, parameters=0]
+ Descriptor[bean=CBEAN ]
+ OperationInfo[name=getPropertyValue, description=null, returnType=java.lang.Object, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=propertyName, description=null, type=java.lang.String]
+ OperationInfo[name=setProperty, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=nameAndValue, description=null, type=javax.management.Attribute]
+ OperationInfo[name=getWebServiceEndpoint, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ OperationInfo[name=getWebServiceEndpointNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=web-service-endpoint multi=true ]
+ OperationInfo[name=getWebServiceEndpointByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createWebServiceEndpoint, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeWebServiceEndpointByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=web-service-endpoint multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=web-module-web-service-endpoint, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.WebServiceEndpointEvent ObjectName={0}:type=web-service-endpoint,name={2},web-module={1},category=config xpath=/domain/applications/web-module[@name='{1}']/web-service-endpoint[@name='{2}'] CLIName=domain.applications.web-module.{1}.web-service-endpoint.{2} ]
+
+ --- Attributes:
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=jbi-enabled, description=null, type=boolean]
+ Descriptor[setter=setJbiEnabled getter=isJbiEnabled bean=CBEAN ]
+ AttributeInfo[name=max-history-size, description=null, type=java.lang.String]
+ Descriptor[setter=setMaxHistorySize getter=getMaxHistorySize bean=CBEAN ]
+ AttributeInfo[name=monitoring, description=null, type=java.lang.String]
+ Descriptor[setter=setMonitoring getter=getMonitoring bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=getRegistryLocation, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ OperationInfo[name=getRegistryLocationNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=registry-location multi=true ]
+ OperationInfo[name=getRegistryLocationByConnectorResourceJndiName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createRegistryLocation, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeRegistryLocationByConnectorResourceJndiName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=registry-location multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=getTransformationRule, description=null, returnType=[Ljavax.management.ObjectName;, parameters=0]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ OperationInfo[name=getTransformationRuleNamesList, description=null, returnType=[Ljava.lang.String;, parameters=0]
+ Descriptor[child=transformation-rule multi=true ]
+ OperationInfo[name=getTransformationRuleByName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=createTransformationRule, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=attribute_list, description=null, type=javax.management.AttributeList]
+ OperationInfo[name=removeTransformationRuleByName, description=null, returnType=void, parameters=1]
+ Descriptor[bean=CBEAN child=transformation-rule multi=true ]
+ --- Parameters:
+ ParameterInfo[name=key, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=web-module-web-service-endpoint-registry-location, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.RegistryLocationEvent ObjectName={0}:type=registry-location,connector-resource-jndi-name={3},web-service-endpoint={2},web-module={1},category=config xpath=/domain/applications/web-module[@name='{1}']/web-service-endpoint[@name='{2}']/registry-location[@connector-resource-jndi-name='{3}'] CLIName=domain.applications.web-module.{1}.web-service-endpoint.{2}.registry-location.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=connector-resource-jndi-name, description=null, type=java.lang.String]
+ Descriptor[setter=setConnectorResourceJndiName getter=getConnectorResourceJndiName bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
+--- MBeanRegistryEntry:
+ ManagedBean[name=web-module-web-service-endpoint-transformation-rule, className=com.sun.enterprise.admin.config.BaseConfigMBean, description=null, group=config, type=null]
+ Descriptor[elementChangeEvent=com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent ObjectName={0}:type=transformation-rule,name={3},web-service-endpoint={2},web-module={1},category=config xpath=/domain/applications/web-module[@name='{1}']/web-service-endpoint[@name='{2}']/transformation-rule[@name='{3}'] CLIName=domain.applications.web-module.{1}.web-service-endpoint.{2}.transformation-rule.{3} ]
+
+ --- Attributes:
+ AttributeInfo[name=enabled, description=null, type=boolean]
+ Descriptor[setter=setEnabled getter=isEnabled bean=CBEAN ]
+ AttributeInfo[name=name, description=null, type=java.lang.String]
+ Descriptor[setter=setName getter=getName bean=CBEAN ]
+ AttributeInfo[name=rule-file-location, description=null, type=java.lang.String]
+ Descriptor[setter=setRuleFileLocation getter=getRuleFileLocation bean=CBEAN ]
+ AttributeInfo[name=apply-to, description=null, type=java.lang.String]
+ Descriptor[setter=setApplyTo getter=getApplyTo bean=CBEAN ]
+
+ --- Operations:
+ OperationInfo[name=getDefaultAttributeValue, description=null, returnType=java.lang.String, parameters=1]
+ Descriptor[bean=CBEAN ]
+ --- Parameters:
+ ParameterInfo[name=attributeName, description=null, type=java.lang.String]
+ OperationInfo[name=destroyConfigElement, description=null, returnType=boolean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getBaseConfigBean, description=null, returnType=com.sun.enterprise.config.ConfigBean, parameters=0]
+ Descriptor[bean=MBEAN ]
+ OperationInfo[name=getConfigBeanObjectName, description=null, returnType=javax.management.ObjectName, parameters=1]
+ Descriptor[bean=MBEAN ]
+ --- Parameters:
+ ParameterInfo[name=param1, description=null, type=com.sun.enterprise.config.ConfigBean]
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testPropertiesOperations.smp b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testPropertiesOperations.smp
new file mode 100755
index 0000000..00253e9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/samples/testPropertiesOperations.smp
@@ -0,0 +1,15 @@
+
+
+************* Domain MBean Instantiate() *******************
+
+
+************* Domain -> setProperty() *******************
+
+
+************* Domain -> getProperties() *******************
+Properties:
+ administrative.domain.name=domain1
+ testPropName1=testPropValue1
+ testPropName2=testPropValue2
+ testPropName3=testPropValue3
+ testPropName4=testPropValue4
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/test.dtd b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/test.dtd
new file mode 100755
index 0000000..d8e62eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/test.dtd
@@ -0,0 +1,3693 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- ENTITIES -->
+<!-- boolean
+
+ Used in:
+ access-log, admin-object-resource, appclient-module,
+ application-ref, availability-service, cluster, config,
+ connector-connection-pool, connector-module, connector-resource,
+ custom-resource, das-config, diagnostic-service,
+ ejb-container-availability, ejb-module, event,
+ external-jndi-resource, http-access-log, http-file-cache,
+ http-listener, http-protocol, iiop-listener, iiop-service,
+ j2ee-application, java-config, jdbc-connection-pool,
+ jdbc-resource, jms-availability, jms-service, jmx-connector,
+ lb-config, lifecycle-module, load-balancer, log-service,
+ mail-resource, management-rule, management-rules, mbean,
+ node-agent, persistence-manager-factory-resource, profiler,
+ resource-ref, security-service, server-ref, ssl,
+ transaction-service, transformation-rule,
+ web-container-availability, web-module, web-service-endpoint
+-->
+<!ENTITY % boolean "(yes | no | on | off | 1 | 0 | true | false)">
+
+<!-- isolation
+
+ Used in:
+ jdbc-connection-pool
+-->
+<!ENTITY % isolation
+ "(read-uncommitted | read-committed | repeatable-read | serializable)">
+
+
+<!-- validation-level
+
+ Used in:
+ das-config
+-->
+<!ENTITY % validation-level "(full | parsing | none)">
+
+<!-- object-type
+ defines the type of the resource. It can be:
+ system-all
+ These are system resources for all instances and DAS
+ system-admin
+ These are system resources only in DAS
+ system-instance
+ These are system resources only in instances (and not DAS)
+ user
+ User resources (This is the default for all elements)
+
+ Used in:
+ admin-object-resource, connector-module, connector-resource,
+ custom-resource, ejb-module, external-jndi-resource,
+ j2ee-application, jdbc-resource, mail-resource, mbean,
+ persistence-manager-factory-resource, resource-adapter-config,
+ web-module
+-->
+<!ENTITY % object-type "(system-all | system-admin | system-instance | user)">
+
+<!-- rjmx-protocol
+ SE/EE related ENTITIES: This will define the available JSR 160
+ connector transport protocols.
+
+ Used in:
+ jmx-connector
+-->
+<!ENTITY % rjmx-protocol "(rmi_jrmp | rmi_iiop | jmxmp)">
+
+<!-- monitoring-level
+ monitoring-level controls the amount of monitoring data collected
+ and exposed to clients
+ OFF
+ no monitoring/statistical data is exposed to the clients.
+ LOW
+ SE/EE only
+ HIGH
+ maximum data is gathered and released.
+
+ Used in:
+ module-monitoring-levels, web-service-endpoint
+-->
+<!ENTITY % monitoring-level "(OFF | LOW | HIGH)">
+
+<!-- persistence-type
+ SE/EE related ENTITIES
+
+ Used in:
+ web-container-availability
+-->
+<!ENTITY % persistence-type "(memory | file | ha)">
+
+<!-- session-save-frequency
+
+ Used in:
+ web-container-availability
+-->
+<!ENTITY % session-save-frequency "(web-method | time-based | on-demand)">
+
+<!-- session-save-scope
+
+ Used in:
+ web-container-availability
+-->
+<!ENTITY % session-save-scope
+ "(session | modified-session | modified-attribute)">
+
+
+<!-- sfsb-persistence-type
+
+ Used in:
+ ejb-container-availability
+-->
+<!ENTITY % sfsb-persistence-type "(file | ha)">
+
+<!-- apply-to-type
+
+ Used in:
+ transformation-rule
+-->
+<!ENTITY % apply-to-type "(request | response | both)">
+
+<!-- lb-policy-type
+
+ Used in:
+ cluster-ref
+-->
+<!ENTITY % lb-policy-type
+ "(round-robin | weighted-round-robin | user-defined)">
+
+
+<!-- event-type
+
+ Used in:
+ event
+-->
+<!ENTITY % event-type
+ "(log | timer | trace | monitor | cluster | lifecycle | notification)">
+
+
+<!-- message-layer
+
+ Used in:
+ message-security-config
+-->
+<!ENTITY % message-layer "(SOAP | HttpServlet)">
+
+<!-- log-level
+ Configure the Log Levels for Various Loggers in the SUN ONE
+ Modules. The Default level is set to INFO, The log levels can be
+ changed using one of the seven levels. Please refer JSR 047 to
+ understand the Log Levels.
+
+ The Logs can be completely turned off by using 'OFF' value. The names of
+ the module loggers are self-explanatory
+
+
+ Used in:
+ diagnostic-service, event, module-log-levels
+-->
+<!ENTITY % log-level
+ "(FINEST | FINER | FINE | CONFIG | INFO | WARNING | SEVERE | OFF)">
+
+
+<!-- ELEMENTS -->
+
+<!-- domain
+ Top level Domain Element that includes applications, resources,
+ configs, servers, clusters and node-agents, load balancer
+ configurations and load balancers. node-agents and load balancers
+ are SE/EE related entities only.
+
+ attributes
+ application-root
+ for PE this defines the location where applications are
+ deployed
+ locale
+ If present, overrides OS locale setting.
+ log-root
+ specifies where the server instance's log files are kept,
+ including HTTP access logs, server logs, and transaction
+ logs. Default is $INSTANCE-ROOT/logs
+-->
+<!ELEMENT domain
+ (applications?, resources?, configs, servers, clusters?, node-agents?,
+ lb-configs?, load-balancers?, system-property*, property*)>
+
+
+<!ATTLIST domain
+ application-root CDATA #IMPLIED
+ log-root CDATA #IMPLIED
+ locale CDATA #IMPLIED>
+
+
+<!-- configs
+
+ Used in:
+ domain
+-->
+<!ELEMENT configs (config+)>
+
+
+<!-- servers
+
+ Used in:
+ domain
+-->
+<!ELEMENT servers (server*)>
+
+
+<!-- clusters
+
+ Used in:
+ domain
+-->
+<!ELEMENT clusters (cluster*)>
+
+
+<!-- node-agents
+
+ Used in:
+ domain
+-->
+<!ELEMENT node-agents (node-agent*)>
+
+
+<!-- lb-configs
+
+ Used in:
+ domain
+-->
+<!ELEMENT lb-configs (lb-config*)>
+
+
+<!-- applications
+ Various types of applications that can be deployed on Sun ONE
+ Application Server instance
+
+ Used in:
+ domain
+-->
+<!ELEMENT applications
+ ((lifecycle-module | j2ee-application | ejb-module | web-module |
+ connector-module | appclient-module | mbean)*)>
+
+
+
+<!-- lifecycle-module
+
+ attributes
+ class-name
+ fully qualified name of the startup class.
+ classpath
+ where this module is actually located, if it is not under
+ applications-root
+ enabled
+ boolean attribute. If set to "false" this module will not be
+ loaded at server start up.
+ is-failure-fatal
+ if true, aborts server start up if this module does not load
+ properly.
+ load-order
+ integer value that can be used to force the order in which
+ deployed lifecycle modules are loaded at server start up.
+ Smaller numbered modules get loaded sooner. Order is
+ unspecified if two or more lifecycle modules have the same
+ load-order value.
+ name
+ unqiue identifier for the deployed server lifecycle event
+ listener module.
+
+ Used in:
+ applications
+-->
+<!ELEMENT lifecycle-module (description?, property*)>
+
+<!ATTLIST lifecycle-module
+ name CDATA #REQUIRED
+ class-name CDATA #REQUIRED
+ classpath CDATA #IMPLIED
+ load-order CDATA #IMPLIED
+ is-failure-fatal %boolean; "false"
+ enabled %boolean; "true">
+
+
+<!-- j2ee-application
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for SFSB checkpointing (and potentially passivation). If this
+ is "false", then all SFSB checkpointing is disabled for
+ either the given j2ee app or the given ejb module. If it is
+ "true" (and providing that all the availability-enabled
+ attributes above in precedence are also "true", then the j2ee
+ app or stand-alone ejb modules may be ha enabled.
+ Finer-grained control exists at lower level inside each bean.
+ If this attribute is missing, it defaults to "false".
+ directory-deployed
+ This attribute indicates whether the application has been
+ deployed to a directory or not
+ java-web-start-enabled
+ This attribute indicates whether Java Web Start access is
+ permitted to eligible application client(s) in this module
+ libraries
+ System dependent path separator [: for Unix/Solaris/Linux and
+ ; for Windows] separated list of jar paths. These paths could
+ be either relative [relative to
+ {com.sun.aas.instanceRoot}/lib/applibs] or absolute paths.
+ These dependencies appears *after* the libraries defined in
+ classpath-prefix in the java-config and *before* the
+ application server provided over-rideable jar set. The
+ libraries would be made available to the application in the
+ order in which they were specified.
+
+ Used in:
+ applications
+-->
+<!ELEMENT j2ee-application (description?, web-service-endpoint*, property*)>
+
+<!ATTLIST j2ee-application
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true"
+ libraries CDATA #IMPLIED
+ availability-enabled %boolean; "false"
+ directory-deployed %boolean; "false"
+ java-web-start-enabled %boolean; "true">
+
+
+<!-- ejb-module
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for SFSB checkpointing (and potentially passivation). If this
+ is "false", then all SFSB checkpointing is disabled for
+ either the given j2ee app or the given ejb module. If it is
+ "true" (and providing that all the availability-enabled
+ attributes above in precedence are also "true", then the j2ee
+ app or stand-alone ejb modules may be ha enabled.
+ Finer-grained control exists at lower level inside each bean.
+ If this attribute is missing, it defaults to "false".
+ directory-deployed
+ This attribute indicates whether the application has been
+ deployed to a directory or not
+ libraries
+ System dependent path separator [: for Unix/Solaris/Linux and
+ ; for Windows] separated list of jar paths. These paths could
+ be either relative [relative to
+ {com.sun.aas.instanceRoot}/lib/applibs] or absolute paths.
+ These dependencies appears *after* the libraries defined in
+ classpath-prefix in the java-config and *before* the
+ application server provided over-rideable jar set. The
+ libraries would be made available to the application in the
+ order in which they were specified.
+
+ Used in:
+ applications
+-->
+<!ELEMENT ejb-module (description?, web-service-endpoint*, property*)>
+
+<!ATTLIST ejb-module
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true"
+ libraries CDATA #IMPLIED
+ availability-enabled %boolean; "false"
+ directory-deployed %boolean; "false">
+
+
+<!-- web-module
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for HTTP Session Persistence. If this is "false", then all
+ session persistence is disabled for the given web module. If
+ it is "true" (and providing that all the availability-enabled
+ attributes above in precedence are also "true", then the web
+ module may be ha enabled. Finer-grained control exists at
+ lower level (see sun-web.xml). If this attribute is missing,
+ it defaults to "false".
+ context-root
+ context-root must match the pattern for the hpath production
+ in RFC 1738 which can be found at:
+ http://www.w3.org/Addressing/rfc1738.txt. This is flattened
+ to the following regular expression in XML Schema's pattern
+ language:
+ ([a-zA-Z0-9$\-_.+!*'(),]|%[0-9A-Fa-f][0-9A-Fa-f]|;|:|&|=)*(/([
+ -zA-Z0-9$\-_.+!*'(),]|%[0-9A-Fa-f][0-9A-Fa-f]|;|:|&|=)*)*
+ Note that this includes the null or empty context root and
+ permits but does not require a context root to start with the
+ '/' character (including a context root which is simply the
+ '/' character).
+ directory-deployed
+ This attribute indicates whether the application has been
+ deployed to a directory or not
+ libraries
+ System dependent path separator [: for Unix/Solaris/Linux and
+ ; for Windows] separated list of jar paths. These paths could
+ be either relative [relative to
+ {com.sun.aas.instanceRoot}/lib/applibs] or absolute paths.
+ These dependencies appears *after* the libraries defined in
+ classpath-prefix in the java-config and *before* the
+ application server provided over-rideable jar set. The
+ libraries would be made available to the application in the
+ order in which they were specified.
+
+ Used in:
+ applications
+-->
+<!ELEMENT web-module (description?, web-service-endpoint*, property*)>
+
+<!ATTLIST web-module
+ name CDATA #REQUIRED
+ context-root CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true"
+ libraries CDATA #IMPLIED
+ availability-enabled %boolean; "false"
+ directory-deployed %boolean; "false">
+
+
+<!-- connector-module
+
+ Used in:
+ applications
+-->
+<!ELEMENT connector-module (description?, property*)>
+
+<!ATTLIST connector-module
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true"
+ directory-deployed %boolean; "false">
+
+
+<!-- appclient-module
+
+ attributes
+ java-web-start-enabled
+ This attribute indicates whether Java Web Start access is
+ permitted to eligible application client(s) in this module
+
+ Used in:
+ applications
+-->
+<!ELEMENT appclient-module (description?, property*)>
+
+<!ATTLIST appclient-module
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ directory-deployed %boolean; "false"
+ java-web-start-enabled %boolean; "true">
+
+
+<!-- resources
+ J2EE Applications look up resources registered with the
+ Application server, using portable JNDI names.
+
+ Used in:
+ domain
+-->
+<!ELEMENT resources
+ ((custom-resource | external-jndi-resource | jdbc-resource | mail-resource
+ | persistence-manager-factory-resource | admin-object-resource |
+ connector-resource | resource-adapter-config | jdbc-connection-pool |
+ connector-connection-pool)*)>
+
+
+
+<!-- description
+ Textual description of a configured entity
+
+ Used in:
+ admin-object-resource, appclient-module,
+ connector-connection-pool, connector-module, connector-resource,
+ custom-resource, ejb-module, event, external-jndi-resource,
+ j2ee-application, jdbc-connection-pool, jdbc-resource,
+ lifecycle-module, mail-resource, management-rule, mbean,
+ persistence-manager-factory-resource, property, system-property,
+ web-module
+-->
+<!ELEMENT description (#PCDATA)>
+
+
+<!-- custom-resource
+ custom (or generic) resource managed by a user-written factory
+ class.
+
+ attributes
+ jndi-name
+ JNDI name for generic resource, the fully qualified type of
+ the resource and whether it is enabled at runtime
+
+ Used in:
+ resources
+-->
+<!ELEMENT custom-resource (description?, property*)>
+
+<!ATTLIST custom-resource
+ jndi-name CDATA #REQUIRED
+ res-type CDATA #REQUIRED
+ factory-class CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- external-jndi-resource
+ resource residing in an external JNDI repository
+
+ Used in:
+ resources
+-->
+<!ELEMENT external-jndi-resource (description?, property*)>
+
+<!ATTLIST external-jndi-resource
+ jndi-name CDATA #REQUIRED
+ jndi-lookup-name CDATA #REQUIRED
+ res-type CDATA #REQUIRED
+ factory-class CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- jdbc-resource
+ JDBC javax.sql.(XA)DataSource resource definition
+
+ Used in:
+ resources
+-->
+<!ELEMENT jdbc-resource (description?, property*)>
+
+<!ATTLIST jdbc-resource
+ jndi-name CDATA #REQUIRED
+ pool-name CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- mail-resource
+ The mail-resource element describes a javax.mail.Session resource
+
+ attributes
+ host
+ ip V6 or V4 address or hostname.
+
+ Used in:
+ resources
+-->
+<!ELEMENT mail-resource (description?, property*)>
+
+<!ATTLIST mail-resource
+ jndi-name CDATA #REQUIRED
+ store-protocol CDATA "imap"
+ store-protocol-class CDATA "com.sun.mail.imap.IMAPStore"
+ transport-protocol CDATA "smtp"
+ transport-protocol-class CDATA "com.sun.mail.smtp.SMTPTransport"
+ host CDATA #REQUIRED
+ user CDATA #REQUIRED
+ from CDATA #REQUIRED
+ debug %boolean; "false"
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- persistence-manager-factory-resource
+ Persistence Manager runtime configuration.
+
+ attributes
+ factory-class
+ Class that creates persistence manager instance.
+ jdbc-resource-jndi-name
+ jdbc resource with which database connections are obtained.
+ jndi-name
+ JNDI name for this resource
+
+ Used in:
+ resources
+-->
+<!ELEMENT persistence-manager-factory-resource (description?, property*)>
+
+<!ATTLIST persistence-manager-factory-resource
+ jndi-name CDATA #REQUIRED
+ factory-class CDATA "com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl"
+ jdbc-resource-jndi-name CDATA #IMPLIED
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- admin-object-resource
+ The admin-object-resource element describes a administered object
+ for a inbound resource adapter.
+
+ attributes
+ jndi-name
+ JNDI name for this resource
+ res-adapter
+ Name of the inbound resource adapter.
+ res-type
+ Interface definition for the administered object
+
+ Used in:
+ resources
+-->
+<!ELEMENT admin-object-resource (description?, property*)>
+
+<!ATTLIST admin-object-resource
+ jndi-name CDATA #REQUIRED
+ res-type CDATA #REQUIRED
+ res-adapter CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- connector-resource
+
+ Used in:
+ resources
+-->
+<!ELEMENT connector-resource (description?, property*)>
+
+<!ATTLIST connector-resource
+ jndi-name CDATA #REQUIRED
+ pool-name CDATA #REQUIRED
+ object-type %object-type; "user"
+ enabled %boolean; "true">
+
+
+<!-- resource-adapter-config
+ This element is for configuring the resource adapter. These
+ values (properties) over-rides the default values present in
+ ra.xml. The name attribute has to be unique . It is optional for
+ PE. It is used mainly for EE.
+
+ Used in:
+ resources
+-->
+<!ELEMENT resource-adapter-config (property*)>
+
+<!ATTLIST resource-adapter-config
+ name CDATA #IMPLIED
+ thread-pool-ids CDATA #IMPLIED
+ object-type %object-type; "user"
+ resource-adapter-name CDATA #REQUIRED>
+
+
+<!-- config
+ The configuration defines the configuration of a server instance
+ that can be shared by other server instances. The
+ availability-service and are SE/EE only.
+
+ attributes
+ dynamic-reconfiguration-enabled
+ When set to "true" then any changes to the system (e.g.
+ applications deployed, resources created) will be
+ automatically applied to the affected servers without a
+ restart being required. When set to "false" such changes will
+ only be picked up by the affected servers when each server
+ restarts.
+
+ Used in:
+ configs
+-->
+<!ELEMENT config
+ (http-service, iiop-service, admin-service, connector-service?,
+ web-container, ejb-container, mdb-container, jms-service?, log-service,
+ security-service, transaction-service, monitoring-service,
+ diagnostic-service?, java-config, availability-service?, thread-pools,
+ alert-service?, group-management-service?, management-rules?,
+ system-property*, property*)>
+
+
+<!ATTLIST config
+ name CDATA #REQUIRED
+ dynamic-reconfiguration-enabled %boolean; "true">
+
+
+<!-- alert-service
+ The Alert service provides a mechanism for users to register for
+ and receive alerts. The alert service collects together a set of
+ alert subscriptions
+
+ Used in:
+ config
+-->
+<!ELEMENT alert-service (alert-subscription*, property*)>
+
+
+<!-- alert-subscription
+ alert subscription details a specific subscription. The
+ subscription comprises the configuration of a specific listener,
+ and a filter to be applied.
+
+ attributes
+ name
+ The unique name identifying a particular alert service.
+
+ Used in:
+ alert-service
+-->
+<!ELEMENT alert-subscription (listener-config, filter-config?)>
+
+<!ATTLIST alert-subscription
+ name CDATA #REQUIRED>
+
+
+<!-- listener-config
+ connects a specific listener class with specific managed objects
+
+ attributes
+ listener-class-name
+ The name of a class that can act as a listener for alerts.
+ Non-empty string containing a Java class name.
+ subscribe-listener-with
+ A list of managed object names that the listener should be
+ subscribed to. A non-empty, comma separated list.
+
+ Used in:
+ alert-subscription
+-->
+<!ELEMENT listener-config (property*)>
+
+<!ATTLIST listener-config
+ listener-class-name CDATA #REQUIRED
+ subscribe-listener-with CDATA #REQUIRED>
+
+
+<!-- filter-config
+ filter-config provides the means of specifying a filter to be
+ applied to alerts
+
+ attributes
+ filter-class-name
+ The name of a class that can act as a filter. Non-empty
+ string containing a Java class name.
+
+ Used in:
+ alert-subscription
+-->
+<!ELEMENT filter-config (property*)>
+
+<!ATTLIST filter-config
+ filter-class-name CDATA #REQUIRED>
+
+
+<!-- http-service
+
+ Used in:
+ config
+-->
+<!ELEMENT http-service
+ (access-log?, http-listener+, virtual-server+, request-processing?,
+ keep-alive?, connection-pool?, http-protocol?, http-file-cache?,
+ property*)>
+
+
+
+<!-- access-log
+
+ attributes
+ format
+ The global format for the access log rotation-policy The
+ policy based on which the log rotation would be done . At
+ this time only time based rotation is enabled.
+ rotation-enabled
+ The flag for enabling the access-log rotation
+ rotation-interval-in-minutes
+ The time interval in minutes between two successive rotations
+ of the access logs.
+ rotation-suffix
+ The suffix to be added to the access-log name after rotation.
+ Acceptable values include those supported by
+ java.text.SimpleDateFormat and
+ "%YYYY;%MM;%DD;-%hh;h%mm;m%ss;s".
+
+ Used in:
+ http-service
+-->
+<!ELEMENT access-log EMPTY>
+
+<!ATTLIST access-log
+ format CDATA "%client.name% %auth-user-name% %datetime% %request% %status% %response.length%"
+ rotation-policy (time) "time"
+ rotation-interval-in-minutes CDATA "1440"
+ rotation-suffix CDATA "yyyyMMdd-HH'h'mm'm'ss's'"
+ rotation-enabled %boolean; "true">
+
+
+<!-- http-listener
+
+ attributes
+ acceptor-threads
+ Number of acceptor threads for the listen socket. The
+ recommended value is the number of processors in the machine.
+ address
+ IP address of the listen socket. Can be in dotted-pair or
+ IPv6 notation. Can also be any for INADDR-ANY. Configuring a
+ listen socket to listen on any is required if more than one
+ http-listener is configured to it.
+ blocking-enabled
+ Enables blocking for the listen and external ports.
+ default-virtual-server
+ The id attribute of the default virtual server for this
+ particular connection group.
+ external-port
+ The port at which the user makes a request , typically a
+ proxy server port.
+ family
+ Specified the family of addresses either inet or ncsa
+ id
+ Unique identifier for http listener.
+ port
+ Port number to create the listen socket on. Legal values are
+ 1 - 65535. On Unix, creating sockets that listen on ports 1 -
+ 1024 requires superuser privileges. Configuring an SSL listen
+ socket to listen on port 443 is recommended.
+ redirect-port
+ if the connector is supporting non-SSL requests and a request
+ is received for which a matching security-constraint requires
+ SSL transport catalina will automatically redirect the
+ request to the port number specified here
+ security-enabled
+ Determines whether the http listener runs SSL. You can turn
+ SSL2 or SSL3 on or off and set ciphers using an ssl element.
+ The enable-ssl in the protocol element should be set to true
+ for this setting to work.
+ server-name
+ Tells the server what to put in the host name section of any
+ URLs it sends to the client. This affects URLs the server
+ automatically generates; it doesnt affect the URLs for
+ directories and files stored in the server. This name should
+ be the alias name if your server uses an alias. If you append
+ a colon and port number, that port will be used in URLs the
+ server sends to the client.
+ xpowered-by
+ The Servlet 2.4 spec defines a special X-Powered-By:
+ Servlet/2.4 header, which containers may add to
+ servlet-generated responses. This is complemented by the JSP
+ 2.0 spec, which defines a X-Powered-By: JSP/2.0 header to be
+ added (on an optional basis) to responses utilizing JSP
+ technology. The goal of these headers is to aid in gathering
+ statistical data about the use of Servlet and JSP technology.
+ If true, these headers will be added.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT http-listener (ssl?, property*)>
+
+<!ATTLIST http-listener
+ id CDATA #REQUIRED
+ address CDATA #REQUIRED
+ port CDATA #REQUIRED
+ external-port CDATA #IMPLIED
+ family (inet | ncsa) "inet"
+ blocking-enabled %boolean; "false"
+ acceptor-threads CDATA "1"
+ security-enabled %boolean; "false"
+ default-virtual-server CDATA #REQUIRED
+ server-name CDATA #REQUIRED
+ redirect-port CDATA #IMPLIED
+ xpowered-by %boolean; "true"
+ enabled %boolean; "true">
+
+
+<!-- ssl
+ Define SSL processing parameters
+
+ attributes
+ cert-nickname
+ nickname of the server certificate in the certificate
+ database or the PKCS#11 token. In the certificate, the name
+ format is tokenname:nickname. Including the tokenname: part
+ of the name in this attribute is optional.
+ client-auth-enabled
+ Determines whether SSL3 client authentication is performed on
+ every request, independent of ACL-based access control.
+ ssl2-ciphers
+ A comma-separated list of the SSL2 ciphers used, with the
+ prefix + to enable or - to disable, for example +rc4. Allowed
+ values are rc4, rc4export, rc2, rc2export, idea, des,
+ desede3. If no value is specified, all supported ciphers are
+ assumed to be enabled. NOT Used in PE
+ ssl2-enabled
+ Determines whether SSL2 is enabled. NOT Used in PE. SSL2 is
+ not supported by either iiop or web-services. When this
+ element is used as a child of the iiop-listener element then
+ the only allowed value for this attribute is "false".
+ ssl3-enabled
+ Determines whether SSL3 is enabled.
+
+ If both SSL2 and SSL3 are enabled for a virtual server, the server
+ tries SSL3 encryption first. If that fails, the server tries SSL2
+ encryption.
+
+ ssl3-tls-ciphers
+ A comma-separated list of the SSL3 ciphers used, with the
+ prefix + to enable or - to disable, for example
+ +SSL_RSA_WITH_RC4_128_MD5. Allowed SSL3/TLS values are
+ SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_3DES_EDE_CBC_SHA,
+ SSL_RSA_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5,
+ SSL_RSA_WITH_NULL_MD5, SSL_RSA_WITH_RC4_128_SHA,
+ SSL_RSA_WITH_NULL_SHA. If no value is specified, all
+ supported ciphers are assumed to be enabled.
+ tls-enabled
+ Determines whether TLS is enabled.
+ tls-rollback-enabled
+ Determines whether TLS rollback is enabled. TLS rollback
+ should be enabled for Microsoft Internet Explorer 5.0 and
+ 5.5. NOT Used in PE
+
+ Used in:
+ http-listener, iiop-listener, jmx-connector, ssl-client-config
+-->
+<!ELEMENT ssl EMPTY>
+
+<!ATTLIST ssl
+ cert-nickname CDATA #REQUIRED
+ ssl2-enabled %boolean; "false"
+ ssl2-ciphers CDATA #IMPLIED
+ ssl3-enabled %boolean; "true"
+ ssl3-tls-ciphers CDATA #IMPLIED
+ tls-enabled %boolean; "true"
+ tls-rollback-enabled %boolean; "true"
+ client-auth-enabled %boolean; "false">
+
+
+<!-- virtual-server
+ Configuration of Virtual Server
+
+ Virtualization in Application Server allows multiple URL domains to be
+ served by the same HTTP server process, which is listening on multiple
+ host addresses If an application is available at two virtual servers, they
+ still share same physical resource pools, such as JDBC connection pools.
+
+ Sun ONE Application Server allows a list of virtual servers, to be
+ specified along with web-module and j2ee-application elements. This
+ establishes an association between URL domains, represented by the virtual
+ server and the web modules (standalone web modules or web modules inside
+ the ear file)
+
+
+ attributes
+ default-web-module
+ stand alone web module associated with this virtual server by
+ default.
+ docroot
+ The location on the filesystem where the files related to the
+ content to be served by this virtual server is stored.
+ hosts
+ A comma-separated list of values allowed in the Host request
+ header to select the current virtual server. Each Virtual
+ Server that is configured to the same Connection Group must
+ have a unique hosts value for that group.
+ http-listeners
+ A comma-separated list of http-listener id(s), Required only
+ for a Virtual Server that is not the default virtual server.
+ id
+ Virtual server ID. This is a unique ID that allows lookup of
+ a specific virtual server. A virtual server ID cannot begin
+ with a number.
+ log-file
+ Specifies a log file for virtual-server-specific log
+ messages. Default value is
+ ${com.sun.aas.instanceRoot}/logs/server.log
+ state
+ Determines whether a Virtual Server is active (on) or
+ inactive (off, disable). The default is on (active). When
+ inactive, a Virtual Server does not service requests.
+ off
+ returns a 404: Status code (404) indicating that the
+ requested resource is not available
+ disabled
+ returns a 403: Status code (403) indicating the server
+ understood the request but refused to fulfill it.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT virtual-server (http-access-log?, property*)>
+
+<!ATTLIST virtual-server
+ id CDATA #REQUIRED
+ http-listeners CDATA #IMPLIED
+ default-web-module CDATA #IMPLIED
+ hosts CDATA #REQUIRED
+ state (on | off | disabled) "on"
+ docroot CDATA #IMPLIED
+ log-file CDATA "${com.sun.aas.instanceRoot}/logs/server.log">
+
+
+<!-- http-access-log
+
+ attributes
+ iponly
+ if the IP address of the user agent should be specified or a
+ DNL lookup should be done
+ log-directory
+ location of the access logs specified as a directory.This
+ defaults to the domain.log-root, which by default is
+ ${INSTANCE_ROOT}/logs. Hence the default value for this
+ attribute is ${INSTANCE_ROOT}/logs/access
+
+ Used in:
+ virtual-server
+-->
+<!ELEMENT http-access-log EMPTY>
+
+<!ATTLIST http-access-log
+ log-directory CDATA "${com.sun.aas.instanceRoot}/logs/access"
+ iponly %boolean; "true">
+
+
+<!-- request-processing
+ This element provides attributes to configure the request
+ processing subsystem in the HTTP service.
+
+ attributes
+ header-buffer-length-in-bytes
+ The size of the buffer used by the request processing threads
+ for reading the request data
+ initial-thread-count
+ The no of request processing threads when the http service is
+ initialized
+ request-timeout-in-seconds
+ Time after which the request times out
+ thread-count
+ Max no of request processing threads.
+ thread-increment
+ The increment in the no of request processing threads when
+ the no. of requests reaches the number specified by
+ request-threads-init
+
+ Used in:
+ http-service
+-->
+<!ELEMENT request-processing EMPTY>
+
+<!ATTLIST request-processing
+ thread-count CDATA "128"
+ initial-thread-count CDATA "48"
+ thread-increment CDATA "10"
+ request-timeout-in-seconds CDATA "30"
+ header-buffer-length-in-bytes CDATA "4096">
+
+
+<!-- keep-alive
+ Keep-alive subsystem configuration
+
+ attributes
+ max-connections
+ Max no of connection in the Keep Alive mode
+ thread-count
+ no of Keep Alive threads in the system
+ timeout-in-seconds
+ Keep Alive timeout , max time a connection can be deemed as
+ idle and kept in the keep-alive state
+
+ Used in:
+ http-service
+-->
+<!ELEMENT keep-alive EMPTY>
+
+<!ATTLIST keep-alive
+ thread-count CDATA "1"
+ max-connections CDATA "256"
+ timeout-in-seconds CDATA "30">
+
+
+<!-- connection-pool
+
+ attributes
+ max-pending-count
+ Max no of pending connections on the listen socket
+ queue-size-in-bytes
+ Size in bytes of the Connection queue
+ receive-buffer-size-in-bytes
+ The buffer size of the receive buffer used by sockets.
+ send-buffer-size-in-bytes
+ The buffer size of the send buffer used by sockets.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT connection-pool EMPTY>
+
+<!ATTLIST connection-pool
+ queue-size-in-bytes CDATA "4096"
+ max-pending-count CDATA "4096"
+ receive-buffer-size-in-bytes CDATA "4096"
+ send-buffer-size-in-bytes CDATA "8192">
+
+
+<!-- http-protocol
+ HTTP Protocol related settings
+
+ attributes
+ default-response-type
+ Setting the default response-type. Specified as a semi-colon
+ delimited string consisting of content-type, encoding,
+ language, charset
+ dns-lookup-enabled
+ If the DNS name for a particular ip address from which the
+ request originates needs to be looked up.
+ forced-response-type
+ The response type to be forced if the content served cannot
+ be matched by any of the MIME mappings for extensions.
+ Specified as a semi-colon delimited string consisting of
+ content-type, encoding, language, charset
+ ssl-enabled
+ Globally enables SSL across the server
+ version
+ The version of the HTTP protocol used by the HTTP Service
+
+ Used in:
+ http-service
+-->
+<!ELEMENT http-protocol EMPTY>
+
+<!ATTLIST http-protocol
+ version CDATA "HTTP/1.1"
+ dns-lookup-enabled %boolean; "false"
+ forced-response-type CDATA "text/html; charset=iso-8859-1"
+ default-response-type CDATA "text/html; charset=iso-8859-1"
+ ssl-enabled %boolean; "true">
+
+
+<!-- http-file-cache
+
+ attributes
+ file-caching-enabled
+ Enables the caching of file content if the file size is less
+ than the one specified ny med-file-size-limit
+ file-transmission-enabled
+ This is valid on Windows only. Enables the TransmitFileSystem
+ call.
+ globally-enabled
+ globally enables the file cache
+ hash-init-size
+ Initial no. of hash buckets.
+ max-age-in-seconds
+ Maximum age of a valid cache entry
+ max-files-count
+ Maximum no. of files in the file cache.
+ medium-file-size-limit-in-bytes
+ Maximum size of a cached file that can be stored as a memory
+ mapped file.
+ medium-file-space-in-bytes
+ Total size of all files that are cached as memory mapped
+ files.
+ small-file-size-limit-in-bytes
+ Maximum size of a file that can be read into memory.
+ small-file-space-in-bytes
+ Total size of the files that are read into memory.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT http-file-cache EMPTY>
+
+<!ATTLIST http-file-cache
+ globally-enabled %boolean; "true"
+ file-caching-enabled %boolean; "on"
+ max-age-in-seconds CDATA "30"
+ medium-file-size-limit-in-bytes CDATA "537600"
+ medium-file-space-in-bytes CDATA "10485760"
+ small-file-size-limit-in-bytes CDATA "2048"
+ small-file-space-in-bytes CDATA "1048576"
+ file-transmission-enabled %boolean; "false"
+ max-files-count CDATA "1024"
+ hash-init-size CDATA "0">
+
+
+<!-- iiop-service
+
+ Used in:
+ config
+-->
+<!ELEMENT iiop-service (orb, ssl-client-config?, iiop-listener*)>
+
+<!ATTLIST iiop-service
+ client-authentication-required %boolean; "false">
+
+
+<!-- orb
+ Orb Configuration properties
+
+ attributes
+ max-connections
+ maximum number of incoming connections, on all listeners
+ message-fragment-size
+ GIOPv1.2 messages larger than this will get fragmented.
+ Minimum value is 128.
+ use-thread-pool-ids
+ This would refer to the thread-pool-id(s) defined in the
+ thread-pool sub-element of thread-pool-config element in
+ server.xml. These would be the threadpool(s) used by the ORB.
+ More than one thread-pool-id(s) could be specified by using
+ commas to separate the names e.g. orb-thread-pool-1,
+ orb-thread-pool-2
+
+ Used in:
+ iiop-service
+-->
+<!ELEMENT orb (property*)>
+
+<!ATTLIST orb
+ use-thread-pool-ids CDATA #REQUIRED
+ message-fragment-size CDATA "1024"
+ max-connections CDATA "1024">
+
+
+<!-- ssl-client-config
+ ssl-client-config element specifies the SSL configuration when
+ the Application Server is making outbound IIOP/SSL connections.
+
+ Used in:
+ iiop-service
+-->
+<!ELEMENT ssl-client-config (ssl)>
+
+
+<!-- iiop-listener
+
+ children
+ ssl
+ element specifies optional SSL configuration. Note that the
+ ssl2 ciphers are not supported for iiop, and therefore must
+ be disabled.
+
+ attributes
+ address
+ ip V6 or V4 address or hostname.
+ enabled
+ if false, a configured listener, is disabled
+ id
+ unique identifier for this listener.
+ port
+ port number
+ security-enabled
+ Determines whether the iiop listener runs SSL. You can turn
+ SSL2 or SSL3 on or off and set ciphers using an ssl element
+
+ Used in:
+ iiop-service
+-->
+<!ELEMENT iiop-listener (ssl?, property*)>
+
+<!ATTLIST iiop-listener
+ id CDATA #REQUIRED
+ address CDATA #REQUIRED
+ port CDATA "1072"
+ security-enabled %boolean; "false"
+ enabled %boolean; "true">
+
+
+<!-- admin-service
+ Admin Service exists in every instance. It is the configuration
+ for either a normal server, DAS or PE instance.
+
+ attributes
+ type
+ an instance can either be of type
+ das
+ Domain Administration Server in SE/EE or the PE instance
+ das-and-server
+ same as das
+ server
+ Any non-DAS instance in SE/EE. Not valid for PE.
+
+ Used in:
+ config
+-->
+<!ELEMENT admin-service (jmx-connector*, das-config?, property*)>
+
+<!ATTLIST admin-service
+ type (das | das-and-server | server) "server"
+ system-jmx-connector-name CDATA #IMPLIED>
+
+
+<!-- connector-service
+ Configuration of the Connector Container. The attributes
+ specified in the connector container would apply to all resource
+ adapters deployed in this cluster/server-instance
+
+ attributes
+ shutdown-timeout-in-seconds
+ integer value (default 30 seconds). Represents the time-out,
+ in seconds, that would be allowed by the application server,
+ during shutdown, to call the ResourceAdapter.stop() method of
+ this connector module's instance to complete.
+
+ Resource Adapters that take longer than the specified
+ shutdown-timeout-in-seconds time interval would be ignored and the
+ application server shutdown procedure would continue.
+
+
+ Used in:
+ config
+-->
+<!ELEMENT connector-service EMPTY>
+
+<!ATTLIST connector-service
+ shutdown-timeout-in-seconds CDATA "30">
+
+
+<!-- jmx-connector
+ The jmx-connector element defines the configuration of a JSR 160
+ compliant remote JMX Connector.
+
+ attributes
+ accept-all
+ Determines whether the connection can be made on all the
+ network interfaces. A value of false implies that the
+ connections only for this specific address will be selected.
+ This attribute is ignored for SJS AS 8.1.
+ address
+ Specifies the IP address or host-name. Ignored for SJS AS 8.1.
+ auth-realm-name
+ The name of the auth-realm in this config element that
+ represents the special administrative realm. All
+ authentication (from administraive GUI and CLI) will be
+ handled by this realm.
+ enabled
+ Defines if this connector is enabled. For EE this must be
+ enabled.
+ name
+ name of jmx connector used for identification
+ port
+ Specifies the port of the jmx-connector-server. Note that
+ jmx-service-uRL is a function of protocol, port and address
+ as defined by the JSR 160 1.0 Specification.
+ protocol
+ Defines the protocol that this jmx-connector should support.
+ Supported protocols are defined by Entity rjmx-protocol. SJS
+ AS 8.1 PE/SE/EE supports "rmi_jrmp" protocol only. Other
+ protocols can be used by user applications independently. For
+ other protocols supported refer to documentation.
+ security-enabled
+ Decides whether the transport layer security be used in
+ jmx-connector. If true, configure the ssl element.
+
+ Used in:
+ admin-service, node-agent
+-->
+<!ELEMENT jmx-connector (ssl?, property*)>
+
+<!ATTLIST jmx-connector
+ name CDATA #REQUIRED
+ enabled %boolean; "true"
+ protocol %rjmx-protocol; "rmi_jrmp"
+ address CDATA #REQUIRED
+ port CDATA #REQUIRED
+ accept-all %boolean; "false"
+ auth-realm-name CDATA #REQUIRED
+ security-enabled %boolean; "true">
+
+
+<!-- das-config
+
+ attributes
+ admin-session-timeout-in-minutes
+ timeout in minutes indicating the administration gui session
+ timeout.
+ autodeploy-dir
+ The source directory (relative to instance root) from which
+ autodeploy service will pick deployable components. You can
+ also specify an absolute directory.
+ autodeploy-enabled
+ This will enable the autodeployment service. If true, the
+ service will automatically starts with the admin-server. Auto
+ Deployment is a feature that enables developers to quickly
+ deploy applications and modules to a running application
+ server withoutrequiring the developer to perform an explicit
+ application server restart or separate deployment operation.
+ autodeploy-jsp-precompilation-enabled
+ If true, JSPs will be pre compiled during deployment of the
+ war module(s).
+ autodeploy-polling-interval-in-seconds
+ The polling interval (in seconds), at the end of which
+ autodeployment service will scan the source directory
+ (specified by "autodeploy-dir" tag) for any new deployable
+ component.
+ autodeploy-verifier-enabled
+ To enable/disable verifier, during auto-deployment. If true,
+ verification will be done before any deployment activity. In
+ the event of any verifier test failure, deployment is not
+ performed.
+ deploy-xml-validation
+ specifies if descriptor validation is required or not.
+
+ full
+ xml will be validated and in case of xml validation
+ errors, deployment will fail.
+ parsing
+ xml errors will be reported but deployment process will
+ continue.
+ none
+ no xml validation will be perfomed on the standard or
+ runtime deployment descriptors.
+
+ dynamic-reload-enabled
+ when true, server checks timestamp on a .reload file at every
+ module and application directory level to trigger reload.
+ polling frequency is controlled by
+ reload-poll-interval-in-seconds
+
+ Used in:
+ admin-service
+-->
+<!ELEMENT das-config (property*)>
+
+<!ATTLIST das-config
+ dynamic-reload-enabled %boolean; "false"
+ dynamic-reload-poll-interval-in-seconds CDATA "2"
+ autodeploy-enabled %boolean; "false"
+ autodeploy-polling-interval-in-seconds CDATA "2"
+ autodeploy-dir CDATA "autodeploy"
+ autodeploy-verifier-enabled %boolean; "false"
+ autodeploy-jsp-precompilation-enabled %boolean; "false"
+ deploy-xml-validation %validation-level; "full"
+ admin-session-timeout-in-minutes CDATA "60">
+
+
+<!-- web-container
+
+ Used in:
+ config
+-->
+<!ELEMENT web-container (session-config?, property*)>
+
+
+<!-- session-config
+
+ Used in:
+ web-container
+-->
+<!ELEMENT session-config (session-manager?, session-properties?)>
+
+
+<!-- session-manager
+
+ Used in:
+ session-config
+-->
+<!ELEMENT session-manager (manager-properties?, store-properties?)>
+
+
+<!-- manager-properties
+
+ Used in:
+ session-manager
+-->
+<!ELEMENT manager-properties (property*)>
+
+<!ATTLIST manager-properties
+ session-file-name CDATA #IMPLIED
+ reap-interval-in-seconds CDATA #IMPLIED
+ max-sessions CDATA #IMPLIED
+ session-id-generator-classname CDATA #IMPLIED>
+
+
+<!-- store-properties
+
+ Used in:
+ session-manager
+-->
+<!ELEMENT store-properties (property*)>
+
+<!ATTLIST store-properties
+ directory CDATA #IMPLIED
+ reap-interval-in-seconds CDATA #IMPLIED>
+
+
+<!-- session-properties
+
+ Used in:
+ session-config
+-->
+<!ELEMENT session-properties (property*)>
+
+<!ATTLIST session-properties
+ timeout-in-seconds CDATA #IMPLIED>
+
+
+<!-- ejb-container
+ Configuration of EJB Container.
+
+ children
+ ejb-timer-service
+ The ejb-timer-service element contains the configuration for
+ the ejb timer service. There is at most one ejb timer service
+ per server instance.
+
+ attributes
+ cache-idle-timeout-in-seconds
+ (eb, sfsb) specifies the rate at which the cache cleaner
+ thread is scheduled. All idle instances are passivated at
+ once.
+ cache-resize-quantity
+ (eb,sfsb) Cache elements have identity, hence growth is in
+ unit steps and created on demand. Shrinking of cache happens
+
+ when cache-idle-timeout-in-seconds timer expires and a cleaner thread
+ passivates beans which have been idle for longer than
+ cache-idle-timeout-in-seconds. All idle instances are passivated at
+ once. cache-resize-quantity does not apply in this case.
+
+ when max cache size is reached, an asynchronous task is created to
+ bring the size back under the max-cache-size limit. This task removes
+ cache-resize-quantity elements, consulting the victim-selection-policy.
+
+ Must be greater than 1 and less than max-cache-size.
+
+ commit-option
+ (eb) Entity Beans caching is controlled by this setting.
+ Commit Option C implies that no caching is performed in the
+ container.
+ max-cache-size
+ (sfsb,eb) specifies the maximum number of instances that can
+ be cached. For entity beans, internally two caches are
+ maintained for higher concurrency: (i) Ready (R$) (ii) Active
+ in an Incomplete Transaction (TX$). The TX$ is populated with
+ instances from R$ or from the Pool directly. When an instance
+ in TX$ completes the transaction, it is placed back in the R$
+ (or in pool, in case an instance with same identity already
+ is in R$). max-cache-size only specifies the upper limit for
+ R$. The container computes an appropriate size for TX$. For
+ SFSBs, after the max-cache-size is reached, beans (as
+ determined by the victim-selection-policy) get passivated.
+ max-pool-size
+ (slsb,eb) maximum size, a pool can grow to. A value of 0
+ implies an unbounded pool. Unbounded pools eventually shrink
+ to the steady-pool-size, in steps defined by
+ pool-resize-quantity.
+ pool-idle-timeout-in-seconds
+ (slsb,eb) defines the rate at which the pool cleaning thread
+ is executed. this thread checks if current size is greater
+ than steady pool size, it removes pool-resize-quantity
+ elements. If the current size is less than steady-pool-size
+ it is increased by pool-resize-quantity, with a ceiling of
+ min (current-pool-size + pool-resize-quantity, max-pool-size)
+ Only objects that have not been accessed for more than
+ pool-idle-timeout-in-seconds are candidates for removal.
+ pool-resize-quantity
+ (slsb,eb) size of bean pool grows (shrinks) in steps
+ specified by pool-resize-quantity, subject to max-pool-size
+ (steady-pool-size) limit.
+ removal-timeout-in-seconds
+ (sfsb) Instance is removed from cache or passivation store,
+ if it is not accesed within this time. All instances that can
+ be removed, will be removed.
+ session-store
+ specifies the directory where passivated beans and persisted
+ HTTP sessions are stored on the file system. Defaults to
+ $INSTANCE-ROOT/session-store
+ steady-pool-size
+ (slsb,eb) number of bean instances normally maintained in
+ pool. When a pool is first created, it will be populated with
+ size equal to steady-pool-size. When an instance is removed
+ from the pool, it is replenished asynchronously, so that the
+ pool size is at or above the steady-pool-size. This additions
+ will be in multiples of pool-resize-quantity. When a bean is
+ disassociated from a method invocation, it is put back in the
+ pool, subject to max-pool-size limit. If the max pool size is
+ exceeded the bean id destroyed immediately. A pool cleaning
+ thread, executes at an interval defined by
+ pool-idle-timeout-in-seconds. This thread reduces the pool
+ size to steady-pool-size, in steps defined by
+ pool-resize-quantity. If the pool is empty, the required
+ object will be created and returned immediately. This
+ prevents threads from blocking till the pool is replenished
+ by the background thread. steady-pool-size must be greater
+ than 1 and at most equal to the max-pool-size.
+ victim-selection-policy
+ (sfsb) Victim selection policy when cache needs to shrink.
+ Victims are passivated. Entity Bean Victims are selected
+ always using fifo discipline. Does not apply to slsb because
+ it does not matter, which particular instances are removed.
+ fifo
+ method picks victims, oldest instance first.
+ lru
+ algorithm picks least recently accessed instances.
+ nru
+ policy tries to pick 'not recently used' instances and is
+ a pseudo-random selection process.
+
+ Used in:
+ config
+-->
+<!ELEMENT ejb-container (ejb-timer-service?, property*)>
+
+<!ATTLIST ejb-container
+ steady-pool-size CDATA "32"
+ pool-resize-quantity CDATA "16"
+ max-pool-size CDATA "64"
+ cache-resize-quantity CDATA "32"
+ max-cache-size CDATA "512"
+ pool-idle-timeout-in-seconds CDATA "600"
+ cache-idle-timeout-in-seconds CDATA "600"
+ removal-timeout-in-seconds CDATA "5400"
+ victim-selection-policy (fifo | lru | nru) "nru"
+ commit-option (B | C) "B"
+ session-store CDATA #IMPLIED>
+
+
+<!-- ejb-timer-service
+ Configuration for ejb timer service.
+
+ attributes
+ max-redeliveries
+ is the maximum number of times the ejb timer service will
+ attempt to redeliver a timer expiration due to exception or
+ rollback. The minimum value is 1, per the ejb specification.
+ minimum-delivery-interval-in-millis
+ is the minimum number of milliseconds allowed before the next
+ timer expiration for a particular timer can occur. It guards
+ against extremely small timer increments that can overload
+ the server.
+ redelivery-interval-internal-in-millis
+ is the number of milliseconds the ejb timer service will wait
+ after a failed ejbTimeout delivery before attempting a
+ redelivery.
+ timer-datasource
+ overrides the cmp-resource (jdbc/__TimerPool) specified in
+ sun-ejb-jar.xml of (__ejb_container_timer_app) of the timer
+ service system application. By default this is set to
+ jdbc/__TimerPool, but can be overridden for the cluster or
+ server instance, if they choose to.
+
+ Used in:
+ ejb-container
+-->
+<!ELEMENT ejb-timer-service (property*)>
+
+<!ATTLIST ejb-timer-service
+ minimum-delivery-interval-in-millis CDATA "7000"
+ max-redeliveries CDATA "1"
+ timer-datasource CDATA #IMPLIED
+ redelivery-interval-internal-in-millis CDATA "5000">
+
+
+<!-- mdb-container
+
+ attributes
+ idle-timeout-in-seconds
+ idle bean instance in pool becomes a candidate for deletion,
+ when this timeout expires.
+ max-pool-size
+ maximum size, pool can grow to. A non-negative integer.
+ pool-resize-quantity
+ quantum of increase/decrease, when the size of pool
+ grows/shrinks. An integer in the range [0, max-pool-size].
+ steady-pool-size
+ minimum and initial number of message driven beans in pool.
+ An integer in the range [0, max-pool-size].
+
+ Used in:
+ config
+-->
+<!ELEMENT mdb-container (property*)>
+
+<!ATTLIST mdb-container
+ steady-pool-size CDATA "10"
+ pool-resize-quantity CDATA "2"
+ max-pool-size CDATA "60"
+ idle-timeout-in-seconds CDATA "600">
+
+
+<!-- jms-service
+ The jms-service element specifies information about the
+ bundled/built-in JMS service that is managed by Application
+ Server.
+
+ attributes
+ addresslist-behavior
+ Determines broker selection from imqAddressList.
+ random
+ causes selection to be performed randomly
+ priority
+ causes selection to be performed sequentially
+ addresslist-iterations
+ Number of times reconnect logic should iterate
+ imqAddressList. This property will not be used if the
+ addresslist-behavior is "random". An integer.
+ default-jms-host
+ reference to a jms-host that to be started when type of
+ jms-service is LOCAL.
+ init-timeout-in-seconds
+ specifies the time server instance will wait at start up, for
+ its corresponding JMS service instance to respond. If there
+ is no response within the specifies timeout period,
+ application server startup is aborted. Default value of 60
+ seconds.
+ mq-scheme
+ Scheme for establishing connection with broker. For example,
+ scheme can be specified as "http" for connecting to MQ broker
+ over http. Default is "mq".
+ mq-service
+ Type of broker service. If a broker supports ssl, then the
+ type of service can be "ssljms". If nothing is specified, MQ
+ will assume 4that service is "jms".
+ reconnect-attempts
+ Total number of attempts to reconnect. An integer.
+ reconnect-enabled
+ Causes reconnect feature to be enabled (true) or disabled
+ (false). A boolean.
+ reconnect-interval-in-seconds
+ Interval between reconnect attempts, in seconds. An integer.
+ start-args
+ specifies the arguments that will be supplied to start up the
+ corresponding JMS service instance.
+ type
+ Type of JMS service.
+
+ Used in:
+ config
+-->
+<!ELEMENT jms-service (jms-host*, property*)>
+
+<!ATTLIST jms-service
+ init-timeout-in-seconds CDATA "60"
+ type (LOCAL | EMBEDDED | REMOTE) #REQUIRED
+ start-args CDATA #IMPLIED
+ default-jms-host CDATA #IMPLIED
+ reconnect-interval-in-seconds CDATA "5"
+ reconnect-attempts CDATA "3"
+ reconnect-enabled %boolean; "true"
+ addresslist-behavior (random | priority) "random"
+ addresslist-iterations CDATA "3"
+ mq-scheme CDATA #IMPLIED
+ mq-service CDATA #IMPLIED>
+
+
+<!-- jms-host
+
+ attributes
+ admin-password
+ attribute specifies the admin password.
+ admin-user-name
+ specifies the admin username.
+ host
+ ip V6 or V4 address or hostname.
+ port
+ the port number used by the JMS service.
+
+ Used in:
+ jms-service
+-->
+<!ELEMENT jms-host (property*)>
+
+<!ATTLIST jms-host
+ name CDATA #REQUIRED
+ host CDATA #IMPLIED
+ port CDATA "7676"
+ admin-user-name CDATA "admin"
+ admin-password CDATA "admin">
+
+
+<!-- log-service
+ By default, logs would be kept in $INSTANCE-ROOT/logs. The
+ following log files will be stored under the logs directory.
+
+ access.log
+ keeps default virtual server HTTP access messages.
+ server.log
+ keeps log messages from default virtual server. Messages from
+ other configured virtual servers also go here, unless
+ log-file is explicitly specified in the virtual-server
+ element.
+
+
+ attributes
+ alarms
+ if true, will turn on alarms for the logger. The SEVERE and
+ WARNING messages can be routed through the JMX framework to
+ raise SEVERE and WARNING alerts. Alarms are turned off by
+ default.
+ file
+ can be used to rename or relocate server.log using absolute
+ path.
+ log-filter
+ Can plug in a log filter to do custom filtering of log
+ records . By default there is no log filter other than the
+ log level filtering provided by JSR 047 log API.
+ log-handler
+ Can plug in a custom log handler to add it to the chain of
+ handlers to log into a different log destination than the
+ default ones given by the system (which are Console, File and
+ Syslog). It is a requirement that customers use the log
+ formatter provided by the the system to maintain uniformity
+ in log messages. The custom log handler will be added at the
+ end of the handler chain after File + Syslog Handler, Console
+ Handler and JMX Handler. User cannot replace the handler
+ provided by the system, because of loosing precious log
+ statements. The Server Initialization will take care of
+ installing the custom handler with the system formatter
+ initialized. The user need to use JSR 047 Log Handler
+ Interface to implement the custom handler.
+ log-rotation-limit-in-bytes
+ Log Files will be rotated when the file size reaches the
+ limit.
+ log-rotation-timelimit-in-minutes
+ This is a new attribute to enable time based log rotation.
+ The Log File will be rotated only if this value is non-zero
+ and the valid range is 60 minutes (1 hour) to 10*24*60
+ minutes (10 days). If the value is zero then the files will
+ be rotated based on size specified in
+ log-rotation-limit-in-bytes.
+ log-to-console
+ logs will be sent to stderr when asadmin start-domain verbose
+ is used
+ retain-error-statistics-for-hours
+ The number of hours since server start, for which error
+ statistics should be retained in memory. The default and
+ minimum value is 5 hours. The maximum value allowed is 500
+ hours. Note that larger values will incur additional memory
+ overhead.
+ use-system-logging
+ if true, will utilize Unix syslog service or Windows Event
+ Logging to produce and manage logs.
+
+ Used in:
+ config, node-agent
+-->
+<!ELEMENT log-service (module-log-levels?, property*)>
+
+<!ATTLIST log-service
+ file CDATA #IMPLIED
+ use-system-logging %boolean; "false"
+ log-handler CDATA #IMPLIED
+ log-filter CDATA #IMPLIED
+ log-to-console %boolean; "false"
+ log-rotation-limit-in-bytes CDATA "500000"
+ log-rotation-timelimit-in-minutes CDATA "0"
+ alarms %boolean; "false"
+ retain-error-statistics-for-hours CDATA "5">
+
+
+<!-- module-log-levels
+
+ Used in:
+ log-service
+-->
+<!ELEMENT module-log-levels (property*)>
+
+<!ATTLIST module-log-levels
+ root %log-level; "INFO"
+ server %log-level; "INFO"
+ ejb-container %log-level; "INFO"
+ cmp-container %log-level; "INFO"
+ mdb-container %log-level; "INFO"
+ web-container %log-level; "INFO"
+ classloader %log-level; "INFO"
+ configuration %log-level; "INFO"
+ naming %log-level; "INFO"
+ security %log-level; "INFO"
+ jts %log-level; "INFO"
+ jta %log-level; "INFO"
+ admin %log-level; "INFO"
+ deployment %log-level; "INFO"
+ verifier %log-level; "INFO"
+ jaxr %log-level; "INFO"
+ jaxrpc %log-level; "INFO"
+ saaj %log-level; "INFO"
+ corba %log-level; "INFO"
+ javamail %log-level; "INFO"
+ jms %log-level; "INFO"
+ connector %log-level; "INFO"
+ jdo %log-level; "INFO"
+ cmp %log-level; "INFO"
+ util %log-level; "INFO"
+ resource-adapter %log-level; "INFO"
+ synchronization %log-level; "INFO"
+ node-agent %log-level; "INFO"
+ self-management %log-level; "INFO"
+ group-management-service %log-level; "INFO"
+ management-event %log-level; "INFO">
+
+
+<!-- security-service
+ The security service element defines parameters and configuration
+ information needed by the core J2EE security service. Some
+ container-specific security configuration elements are in the
+ various container configuration elements and not here. SSL
+ configuration is also elsewhere. At this time the security
+ service configuration consists of a set of authentication realms.
+ A number of top-level attributes are defined as well.
+
+ children
+ message-security-config
+ Optional list of layer specific lists of configured message
+ security providers.
+
+ attributes
+ activate-default-principal-to-role-mapping
+ Causes the appserver to apply a default principal to role
+ mapping, to any application that does not have an application
+ specific mapping defined. Every role is mapped to a
+ same-named (as the role) instance of a
+ java.security.Principal implementation class (see
+ mapped-principal-class). This behavior is similar to that of
+ Tomcat servlet container. It is off by default.
+ anonymous-role
+ Used as role name for default/anonymous role.
+ audit-enabled
+ If true, additional access logging is performed to provide
+ audit information.
+ audit-modules
+ Optional list of audit provider modules which will be used by
+ the audit subsystem. The default value refers to the internal
+ log-based audit module.
+ default-principal
+ Used as the identity of default security contexts when
+ necessary and no principal is provided.
+ default-principal-password
+ Password of default principal.
+ default-realm
+ Specifies which realm (by name) is used by default when no
+ realm is specifically requested. The file realm is the common
+ default.
+ jacc
+ Specifies the name of the jacc-provider element to use for
+ setting up the JACC infrastructure. The default value
+ "default" does not need to be changed unless adding a custom
+ JACC provider.
+ mapped-principal-class
+ This attribute is used to customize the
+ java.security.Principal implementation class used in the
+ default principal to role mapping. This attribute is
+ optional. When it is not specified,
+ com.sun.enterprise.deployment.Group implementation of
+ java.security.Principal is used. The value of this attribute
+ is only relevant when the activate-default
+ principal-to-role-mapping attribute is set to true.
+
+ Used in:
+ config
+-->
+<!ELEMENT security-service
+ (auth-realm+, jacc-provider+, audit-module*, message-security-config*,
+ property*)>
+
+
+<!ATTLIST security-service
+ default-realm CDATA "file"
+ default-principal CDATA #IMPLIED
+ default-principal-password CDATA #IMPLIED
+ anonymous-role CDATA "ANYONE"
+ audit-enabled %boolean; "false"
+ jacc CDATA "default"
+ audit-modules CDATA "default"
+ activate-default-principal-to-role-mapping %boolean; "false"
+ mapped-principal-class CDATA #IMPLIED>
+
+
+<!-- audit-module
+ An audit-module specifies an optional plug-in module which
+ implements audit capabilities.
+
+ attributes
+ classname
+ defines the java class which implements this audit module
+ name
+ defines the name of this realm
+
+ Used in:
+ security-service
+-->
+<!ELEMENT audit-module (property*)>
+
+<!ATTLIST audit-module
+ name CDATA #REQUIRED
+ classname CDATA #REQUIRED>
+
+
+<!-- auth-realm
+ The auth-realm element defines and configures one authentication
+ realm. There must be at least one realm available for a server
+ instance; any number can be configured, as desired.
+
+ Authentication realms need provider-specific parameters which vary
+ depending on what a particular implementation needs; these are defined as
+ properties since they vary by provider and cannot be predicted for any
+ custom or add-on providers.
+
+ For the default file provider, the param used is: file
+
+
+ attributes
+ classname
+ defines the java class which implements this realm
+ name
+ defines the name of this realm
+
+ Used in:
+ node-agent, security-service
+-->
+<!ELEMENT auth-realm (property*)>
+
+<!ATTLIST auth-realm
+ name CDATA #REQUIRED
+ classname CDATA #REQUIRED>
+
+
+<!-- jacc-provider
+ The jacc-provider element defines the standard JACC properties
+ used for setting up the JACC provider. It also allows optional
+ properties which can be used by the provider implementation for
+ its configuration.
+
+ attributes
+ name
+ A name for this jacc-provider. Is always "default" for the
+ default provider.
+ policy-configuration-factory-provider
+ Corresponds to (and can be overridden by) the system property
+ javax.security.jacc.PolicyConfigurationFactory.provider
+ policy-provider
+ Corresponds to (and can be overridden by) the system property
+ javax.security.jacc.policy.provider
+
+ Used in:
+ security-service
+-->
+<!ELEMENT jacc-provider (property*)>
+
+<!ATTLIST jacc-provider
+ name CDATA #REQUIRED
+ policy-provider CDATA #REQUIRED
+ policy-configuration-factory-provider CDATA #REQUIRED>
+
+
+<!-- transaction-service
+ Configuration for Transaction Manager.
+
+ attributes
+ automatic-recovery
+ if true, server instance attempts recovery at restart.
+ heuristic-decision
+ During recovery, if outcome of a transaction cannot be
+ determined from the logs, then this property is used to fix
+ the outcome.
+ keypoint-interval
+ property used to specify the number of transactions between
+ keypoint operations on the log. A Keypoint operations could
+ reduce the size of the transaction log files. A larger value
+ for this property (for example, 1000) will result in larger
+ transaction log files, between log compactions, but less
+ keypoint operations, and potentially better performance. A
+ smaller value (e.g. 20) results in smaller log files but
+ slightly reduced performance due to the greater frequency of
+ keypoint operations.
+ retry-timeout-in-seconds
+ used to determine the retry time in the following scenarios.
+
+ 1 Time to wait at the transaction recovery time, when
+ resources are unreachable.
+ 2 If there are any transient
+ exceptions in the second phase of the 2 PC protocol.
+
+ A negative value indicates infinite retry. '0' indicates no
+ retry. A positive value indicates the number of seconds for
+ which retry will be attempted. Default is 10 minutes which
+ may be appropriate for a database being restarted.
+ timeout-in-seconds
+ amount of time the transaction manager waits for response
+ from a datasource participating in transaction. A value of 0
+ implies infinite timeout.
+ tx-log-dir
+ Transaction service creates a sub directory 'tx' under
+ tx-log-dir to store the transaction logs. The default value
+ of the tx-log-dir is $INSTANCE-ROOT/logs. If this attribute
+ is not explicitly specified in the <transaction-service>
+ element, 'tx' sub directory will be created under the path
+ specified in log-root attribute of <domain> element.
+
+ Used in:
+ config
+-->
+<!ELEMENT transaction-service (property*)>
+
+<!ATTLIST transaction-service
+ automatic-recovery %boolean; "false"
+ timeout-in-seconds CDATA "0"
+ tx-log-dir CDATA #IMPLIED
+ heuristic-decision (rollback | commit) "rollback"
+ retry-timeout-in-seconds CDATA "600"
+ keypoint-interval CDATA "2048">
+
+
+<!-- monitoring-service
+
+ Used in:
+ config
+-->
+<!ELEMENT monitoring-service (module-monitoring-levels?, property*)>
+
+
+<!-- module-monitoring-levels
+
+ attributes
+ connector-connection-pool
+ monitoring level for all the connector-connection-pools used
+ by the runtime.
+ ejb-container
+ various ejbs deployed to the server, ejb-pools, ejb-caches
+ and ejb-methods.
+ http-service
+ http engine and the http listeners therein.
+ jdbc-connection-pool
+ monitoring level for all the jdbc-connection-pools used by
+ the runtime.
+ orb
+ specifies the level for connection managers of the orb, which
+ apply to connections to the orb
+ thread-pool
+ all the thread-pools used by the run time.
+ transaction-service
+ transaction subsystem.
+
+ Used in:
+ monitoring-service
+-->
+<!ELEMENT module-monitoring-levels (property*)>
+
+<!ATTLIST module-monitoring-levels
+ thread-pool %monitoring-level; "OFF"
+ orb %monitoring-level; "OFF"
+ ejb-container %monitoring-level; "OFF"
+ web-container %monitoring-level; "OFF"
+ transaction-service %monitoring-level; "OFF"
+ http-service %monitoring-level; "OFF"
+ jdbc-connection-pool %monitoring-level; "OFF"
+ connector-connection-pool %monitoring-level; "OFF"
+ connector-service %monitoring-level; "OFF"
+ jms-service %monitoring-level; "OFF"
+ jvm %monitoring-level; "OFF">
+
+
+<!-- diagnostic-service
+
+ attributes
+ capture-app-dd
+ boolean attribute. If "true", application deployment
+ descriptors in plain text are captured as part of diagnostic
+ report. If Deployment descriptors contain any confidential
+ information, it's recommended to set it to false.
+ capture-hadb-info
+ boolean attribute to indicate whether HADB related
+ information is collected.
+ capture-install-log
+ boolean attribute which indicated whether the log generated
+ during installation of the application server is captured.
+ capture-system-info
+ boolean attribute which specifies whether OS level
+ information is collected as part of diagnostic report.
+ compute-checksum
+ boolean attribute. Indicates whether checksum of binaries is
+ computed.
+ max-log-entries
+ Max no. of log entries being captured as part of diagnostic
+ report. A non negative value.
+ min-log-level
+ The log levels can be changed using one of the seven levels.
+ Please refer JSR 047 to understand the Log Levels. The
+ default level is INFO, meaning that messages at that level or
+ higher (WARNING, SEVERE) are captured as part of the
+ diagnostic report.If set to OFF, log contents will not be
+ captured as part of diagnostic report.
+ verify-config
+ A boolean attribute which indicates whether output of
+ verify-config asadmin command is included in the diagnostic
+ report.
+
+ Used in:
+ config
+-->
+<!ELEMENT diagnostic-service (property*)>
+
+<!ATTLIST diagnostic-service
+ compute-checksum %boolean; "true"
+ verify-config %boolean; "true"
+ capture-install-log %boolean; "true"
+ capture-system-info %boolean; "true"
+ capture-hadb-info %boolean; "true"
+ capture-app-dd %boolean; "true"
+ min-log-level %log-level; "INFO"
+ max-log-entries CDATA "500">
+
+
+<!-- group-management-service
+ group-management-service(GMS) is an in-process service that
+ provides cluster monitoring and group communication services. GMS
+ notifies registered modules in an application server instance
+ when one or more members in the cluster fail (become
+ unreachable). GMS also provides the ability to send and receive
+ messages between a group of processes. GMS is a abstraction layer
+ that plugs-in group communication technologies which rely on a
+ configurable stack of protocols. Each of these protocols has
+ properties that can be changed for a given network and deployment
+ topology. These relevant configurable protocols are: fd-protocol
+ enables its members to periodically monitor other group members
+ to determine their availability in the group. merge-protocol is
+ used to reunite subgroups that formed as a result of a network
+ partition after such a partition has healed. ping-protocol is
+ used for discovery of the group and its members. vs-protocol
+ verifies suspect instances by adding a verification layer to mark
+ a failure suspicion as a confirmed failure.
+
+ attributes
+ fd-protocol-max-tries
+ Maximum number of attempts to try before GMS confirms that a
+ failure is suspected in the group. Must be a positive integer.
+ fd-protocol-timeout-in-millis
+ Period of time between monitoring attempts to detect failure.
+ Must be a positive integer.
+ merge-protocol-max-interval-in-millis
+ Specifies the maximum amount of time to wait to collect
+ sub-group information before performing a merge. Must be a
+ positive integer.
+ merge-protocol-min-interval-in-millis
+ specifies the minimum amount of time to wait to collect
+ sub-group information before performing a merge. Must be a
+ positive integer.
+ ping-protocol-timeout-in-millis
+ Amount of time in milliseconds that GMS waits for discovery
+ of other members in this group. Must be a positive integer.
+ vs-protocol-timeout-in-millis
+ After this timeout a suspected failure is marked as verified.
+ Must be a positive integer.
+
+ Used in:
+ config
+-->
+<!ELEMENT group-management-service (property*)>
+
+<!ATTLIST group-management-service
+ fd-protocol-max-tries CDATA "3"
+ fd-protocol-timeout-in-millis CDATA "2000"
+ merge-protocol-max-interval-in-millis CDATA "10000"
+ merge-protocol-min-interval-in-millis CDATA "5000"
+ ping-protocol-timeout-in-millis CDATA "2000"
+ vs-protocol-timeout-in-millis CDATA "1500">
+
+
+<!-- java-config
+ Java Runtime environment configuration
+
+ attributes
+ bytecode-preprocessors
+ A comma separated list of classnames, each of which must
+ implement the com.sun.appserv.BytecodePreprocessor interface.
+ Each of the specified preprocessor class will be called in
+ the order specified. At the moment the comelling use is for a
+ 3rd party Performance Profiling tool.
+ classpath-prefix
+ A java classpath string that is prefixed to server-classpath
+ classpath-suffix
+ A java classpath string that is appended to server-classpath
+ debug-enabled
+ If set to true, the server starts up in debug mode ready for
+ attaching with a JPDA based debugger.
+ debug-options
+ JPDA based debugging options string.
+ env-classpath-ignored
+ If set to false, the CLASSPATH environment variable will be
+ read and appended to the Application Server classpath, which
+ is constructed as described above. The CLASSPATH environment
+ variable will be added after the classpath-suffix, at the
+ very end.
+ javac-options
+ Options string passed to Java compiler, at application
+ deployment time.
+ java-home
+ Specifies the installation directory for Java runtime. JDK
+ 1.4 or higher is supported.
+ native-library-path-prefix
+ is prepended to the native library path, which is constructed
+ internally.
+
+ Internally, the native library path is automatically constructed to be
+ a concatenation of Application Server installation relative path for
+ its native shared libraries, standard JRE native library path, the
+ shell environment setting (LD-LIBRARY-PATH on Unix) and any path that
+ may be specified in the profile element.
+
+ native-library-path-suffix
+ is appended to the native library path, which is constructed
+ as described above.
+ rmic-options
+ Options string passed to RMI compiler, at application
+ deployment time.
+ server-classpath
+ A java classpath string that specifies the classes needed by
+ the Application server. Do not expect users to change this
+ under normal conditions. The shared application server
+ classloader forms the final classpath by concatenating
+ classpath-prefix, ${INSTALL_DIR}/lib, server-classpath, and
+ classpath-suffix.
+ system-classpath
+ This classpath string supplied to the jvm at server startup.
+ Contains appserv-launch.jar by default. Users may add to this
+ classpath.
+
+ Used in:
+ config
+-->
+<!ELEMENT java-config (profiler?, (jvm-options | property)*)>
+
+<!ATTLIST java-config
+ java-home CDATA "${com.sun.aas.javaRoot}"
+ debug-enabled %boolean; "false"
+ debug-options CDATA "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n"
+ rmic-options CDATA "-iiop -poa -alwaysgenerate -keepgenerated -g"
+ javac-options CDATA "-g"
+ classpath-prefix CDATA #IMPLIED
+ classpath-suffix CDATA #IMPLIED
+ server-classpath CDATA #IMPLIED
+ system-classpath CDATA #IMPLIED
+ native-library-path-prefix CDATA #IMPLIED
+ native-library-path-suffix CDATA #IMPLIED
+ bytecode-preprocessors CDATA #IMPLIED
+ env-classpath-ignored %boolean; "true">
+
+
+<!-- jvm-options
+ String value for options that will be passed to the JVM
+
+ Used in:
+ java-config, profiler
+-->
+<!ELEMENT jvm-options (#PCDATA)>
+
+
+<!-- profiler
+ Profilers could be one of jprobe, optimizeit, hprof, wily and so
+ on jvm-options and property elements are used to record the
+ settings needed to get a particular profiler going. A server
+ instance is tied to a particular profiler, by the profiler
+ element in java-config. Changing the profiler will require a
+ server restart.
+
+ The adminstrative graphical interfaces, could list multiple supported
+ profilers (incomplete at this point) and will populate server.xml
+ appropriately.
+
+
+ Used in:
+ java-config
+-->
+<!ELEMENT profiler ((jvm-options | property)*)>
+
+<!ATTLIST profiler
+ name CDATA #REQUIRED
+ classpath CDATA #IMPLIED
+ native-library-path CDATA #IMPLIED
+ enabled %boolean; "true">
+
+
+<!-- availability-service
+ SE/EE only: TBD Needs explanation
+
+ attributes
+ auto-manage-ha-store
+ If set to true, the lifecycle of the highly available store
+ is matched with the lifecycle of the highly available
+ cluster. The store is started or stopped with the cluster. It
+ is removed when the cluster is deleted. When set to false,
+ the store lifecycle would have to manually managed by the
+ administrator.
+ ha-agent-hosts
+ comma-delimited list of server host names or IP addresses
+ where high availability store management agents are running.
+ ha-agent-password
+ password needed to contact highly available store management
+ agents
+ ha-agent-port
+ port number where highly available store management agents
+ can be contacted
+ ha-store-healthcheck-enabled
+ Application server stops saving session state when the store
+ service does not function properly or is is not accessible
+ for any reason. When this attribute is set to true, periodic
+ checking is done to detect if the store service has become
+ available again. If healthcheck succeeds the session state
+ saving is resumed. Defaults to false.
+ ha-store-healthcheck-interval-in-seconds
+ The periodicity at which store health is checked.
+ ha-store-name
+ Name of the session store
+ store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used
+ potentially by both the Web Container and the EJB Stateful
+ Session Bean Container for use in checkpointing/passivation
+ when persistence-type = "ha". See sfsb-ha-persistence-type
+ and sfsb-persistence-type for more details. It will default
+ to "jdbc/hastore". This attribute can be over-ridden in
+ either web-container-availability (with
+ http-session-store-pool-name) and/or in
+ ejb-container-availability (with sfsb-store-pool-name). If
+ store-pool-name is not over-ridden then both containers will
+ share the same connection pool. If either container
+ over-rides then it may have its own dedicated pool. In this
+ case there must also be a new corresponding JDBC Resource and
+ JDBC Connection Pool defined for this new pool name.
+
+ Used in:
+ config
+-->
+<!ELEMENT availability-service
+ (web-container-availability?, ejb-container-availability?,
+ jms-availability?, property*)>
+
+
+<!ATTLIST availability-service
+ availability-enabled %boolean; "true"
+ ha-agent-hosts CDATA #IMPLIED
+ ha-agent-port CDATA #IMPLIED
+ ha-agent-password CDATA #IMPLIED
+ ha-store-name CDATA #IMPLIED
+ auto-manage-ha-store %boolean; "false"
+ store-pool-name CDATA #IMPLIED
+ ha-store-healthcheck-enabled %boolean; "false"
+ ha-store-healthcheck-interval-in-seconds CDATA "5">
+
+
+<!-- web-container-availability
+ web-container-availability SE/EE only:
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for HTTP session persistence. If this is "false", then
+ session persistence is disabled for all web modules in j2ee
+ apps and stand-alone web modules. If it is "true" (and
+ providing that the global availability-enabled in
+ availability-service is also "true", then j2ee apps and
+ stand-alone web modules may be ha enabled. Finer-grained
+ control exists at lower levels. If this attribute is missing,
+ it "inherits" the value of the global availability-enabled
+ under availability-service.
+ http-session-store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used by
+ the HTTP Session Persistence Framework. If missing, internal
+ code will default it to value of store-pool-name under
+ availability-service (ultimately "jdbc/hastore").
+ persistence-frequency
+ The persistence frequency used by the session persistence
+ framework, when persistence-type = "ha". Values may be
+ "time-based" or "web-event". If it is missing, then the
+ persistence-type will revert to "memory".
+ persistence-scope
+ The persistence scope used by the session persistence
+ framework, when persistence-type = "ha". Values may be
+ "session", "modified-session", "modified-attribute". If it is
+ missing, then the persistence-type will revert to "memory".
+ persistence-store-health-check-enabled
+ Deprecated. This attribute has no effect. If you wish to
+ control enabling/disabling HADB health check, refer to
+ store-healthcheck-enabled attribute in the
+ availability-service element.
+ persistence-type
+ The persistence type used by the session persistence
+ framework.
+ sso-failover-enabled
+ This controls whether Single-Sign-On state will be made
+ available for failover.
+
+ Used in:
+ availability-service
+-->
+<!ELEMENT web-container-availability (property*)>
+
+<!ATTLIST web-container-availability
+ availability-enabled %boolean; #IMPLIED
+ persistence-type %persistence-type; "memory"
+ persistence-frequency %session-save-frequency; #IMPLIED
+ persistence-scope %session-save-scope; #IMPLIED
+ persistence-store-health-check-enabled %boolean; "false"
+ sso-failover-enabled %boolean; "false"
+ http-session-store-pool-name CDATA #IMPLIED>
+
+
+<!-- ejb-container-availability
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for SFSB checkpointing (and potentially passivation). If this
+ is "false", then all SFSB checkpointing is disabled for all
+ j2ee apps and ejb modules. If it is "true" (and providing
+ that the global availability-enabled in availability-service
+ is also "true", then j2ee apps and stand-alone ejb modules
+ may be ha enabled. Finer-grained control exists at lower
+ levels. If this attribute is missing, it inherits the value
+ of the global availability-enabled under availability-service.
+ sfsb-checkpoint-enabled
+ This attribute is deprecated, replaced by
+ availability-enabled and will be ignored if present.
+ sfsb-ha-persistence-type
+ The persistence type used by the EJB Stateful Session Bean
+ Container for checkpointing and passivating
+ availability-enabled beans' state. Values may be "file" or
+ "ha". Default is "ha".
+ sfsb-quick-checkpoint-enabled
+ This attribute is deprecated and will be ignored if present.
+ sfsb-store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used by
+ the EJB Stateful Session Bean Container for use in
+ checkpointing/passivation when persistence-type = "ha". See
+ sfsb-ha-persistence-type and sfsb-persistence-type for more
+ details. It will default to value of store-pool-name under
+ availability-service (ultimately "jdbc/hastore").
+
+ Used in:
+ availability-service
+-->
+<!ELEMENT ejb-container-availability (property*)>
+
+<!ATTLIST ejb-container-availability
+ availability-enabled %boolean; #IMPLIED
+ sfsb-ha-persistence-type %sfsb-persistence-type; "ha"
+ sfsb-persistence-type %sfsb-persistence-type; "file"
+ sfsb-checkpoint-enabled %boolean; #IMPLIED
+ sfsb-quick-checkpoint-enabled %boolean; #IMPLIED
+ sfsb-store-pool-name CDATA #IMPLIED>
+
+
+<!-- jdbc-connection-pool
+ jdbc-connection-pool defines configuration used to create and
+ manage a pool physical database connections. Pool definition is
+ named, and can be referred to by multiple jdbc-resource elements
+ (See <jdbc-resource>).
+
+ Each named pool definition results in a pool instantiated at server
+ start-up. Pool is populated when accessed for the first time. If two or
+ more jdbc-resource elements point to the same jdbc-connection-pool
+ element, they are using the same pool of connections, at run time.
+
+
+ children
+ property
+ Most JDBC 2.0 drivers permit use of standard property lists,
+ to specify User, Password and other resource configuration.
+ While these are optional properties, according to the
+ specification, several of these properties may be necessary
+ for most databases. See Section 5.3 of JDBC 2.0 Standard
+ Extension API.
+
+ The following are the names and corresponding values for these
+ properties
+
+ databaseName
+ Name of the Database
+ serverName
+ Database Server name.
+ port
+ Port where a Database server is listening for requests.
+ networkProtocol
+ Communication Protocol used.
+ user
+ default name of the database user with which connections
+ will be stablished. Programmatic database authentication
+ or default-resource-principal specified in vendor
+ specific web and ejb deployment descriptors will take
+ precedence, over this default. The details and caveats
+ are described in detail in the Administrator's guide.
+ password
+ password for default database user
+ roleName
+ The initial SQL role name.
+ datasourceName
+ used to name an underlying XADataSource, or
+ ConnectionPoolDataSource when pooling of connections is
+ done
+ description
+ Textual Description
+
+ When one or more of these properties are specified, they are passed as
+ is using set<Name>(<Value>) methods to the vendors Datasource class
+ (specified in datasource-classname). User and Password properties are
+ used as default principal, if Container Managed authentication is
+ specified and a default-resource-principal is not found in application
+ deployment descriptors.
+
+
+ attributes
+ allow-non-component-callers
+ A pool with this property set to true, can be used by
+ non-J2EE components (i.e components other than EJBs or
+ Servlets). The returned connection is enlisted automatically
+ with the transaction context obtained from the transaction
+ manager. This property is to enable the pool to be used by
+ non-component callers such as ServletFilters, Lifecycle
+ modules, and 3rd party persistence managers. Standard J2EE
+ components can continue to use such pools. Connections
+ obtained by non-component callers are not automatically
+ cleaned at the end of a transaction by the container. They
+ need to be explicitly closed by the the caller.
+ connection-validation-method
+ specifies the type of validation to be performed when
+ is-connection-validation-required is true. The following
+ types of validation are supported:
+ auto-commit
+ using connection.autoCommit()
+ meta-data
+ using connection.getMetaData()
+ table
+ performing a query on a user specified table (see
+ validation-table-name).
+ datasource-classname
+ Name of the vendor supplied JDBC datasource resource manager.
+ An XA or global transactions capable datasource class will
+ implement javax.sql.XADatasource interface. Non XA or Local
+ transactions only datasources will implement
+ javax.sql.Datasource interface.
+ fail-all-connections
+ indicates if all connections in the pool must be closed
+ should a single validation check fail. The default is false.
+ One attempt will be made to re-establish failed connections.
+ idle-timeout-in-seconds
+ maximum time in seconds, that a connection can remain idle in
+ the pool. After this time, the pool implementation can close
+ this connection. Note that this does not control connection
+ timeouts enforced at the database server side. Adminsitrators
+ are advised to keep this timeout shorter than the database
+ server side timeout (if such timeouts are configured on the
+ specific vendor's database), to prevent accumulation of
+ unusable connection in Application Server.
+ is-connection-validation-required
+ if true, connections are validated (checked to find out if
+ they are usable) before giving out to the application. The
+ default is false.
+ is-isolation-level-guaranteed
+ Applicable only when a particular isolation level is
+ specified for transaction-isolation-level. The default value
+ is true. This assures that every time a connection is
+ obtained from the pool, it is guaranteed to have the
+ isolation set to the desired value. This could have some
+ performance impact on some JDBC drivers. Can be set to false
+ by that administrator when they are certain that the
+ application does not change the isolation level before
+ returning the connection.
+ max-pool-size
+ maximum number of conections that can be created
+ max-wait-time-in-millis
+ amount of time the caller will wait before getting a
+ connection timeout. The default is 60 seconds. A value of 0
+ will force caller to wait indefinitely.
+ name
+ unique name of the pool definition.
+ non-transactional-connections
+ A pool with this property set to true returns
+ non-transactional connections. This connection does not get
+ automatically enlisted with the transaction manager.
+ pool-resize-quantity
+ number of connections to be removed when
+ idle-timeout-in-seconds timer expires. Connections that have
+ idled for longer than the timeout are candidates for removal.
+ When the pool size reaches steady-pool-size, the connection
+ removal stops.
+ res-type
+ DataSource implementation class could implement one of of
+ javax.sql.DataSource, javax.sql.XADataSource or
+ javax.sql.ConnectionPoolDataSource interfaces. This optional
+ attribute must be specified to disambiguate when a Datasource
+ class implements two or more of these interfaces. An error is
+ produced when this attribute has a legal value and the
+ indicated interface is not implemented by the datasource
+ class. This attribute has no default value.
+ steady-pool-size
+ minimum and initial number of connections maintained in the
+ pool.
+ transaction-isolation-level
+ Specifies the Transaction Isolation Level on the pooled
+ database connections. Optional. Has no default. If left
+ unspecified the pool operates with default isolation level
+ provided by the JDBC Driver. A desired isolation level can be
+ set using one of the standard transaction isolation levels,
+ which see.
+
+ Applications that change the Isolation level on a pooled connection
+ programmatically, risk polluting the pool and this could lead to
+ program errors. Also see: is-isolation-level-guaranteed
+
+ validation-table-name
+ specifies the table name to be used to perform a query to
+ validate a connection. This parameter is mandatory, if
+ connection-validation-type set to table. Verification by
+ accessing a user specified table may become necessary for
+ connection validation, particularly if database driver caches
+ calls to setAutoCommit() and getMetaData().
+
+ Used in:
+ resources
+-->
+<!ELEMENT jdbc-connection-pool (description?, property*)>
+
+<!ATTLIST jdbc-connection-pool
+ name CDATA #REQUIRED
+ datasource-classname CDATA #REQUIRED
+ res-type (javax.sql.DataSource | javax.sql.XADataSource | javax.sql.ConnectionPoolDataSource) #IMPLIED
+ steady-pool-size CDATA "8"
+ max-pool-size CDATA "32"
+ max-wait-time-in-millis CDATA "60000"
+ pool-resize-quantity CDATA "2"
+ idle-timeout-in-seconds CDATA "300"
+ transaction-isolation-level %isolation; #IMPLIED
+ is-isolation-level-guaranteed %boolean; "true"
+ is-connection-validation-required %boolean; "false"
+ connection-validation-method (auto-commit | meta-data | table) "auto-commit"
+ validation-table-name CDATA #IMPLIED
+ fail-all-connections %boolean; "false"
+ non-transactional-connections %boolean; "false"
+ allow-non-component-callers %boolean; "false">
+
+
+<!-- connector-connection-pool
+ connector-connection-pool defines configuration used to create
+ and manage a pool of connections to a EIS. Pool definition is
+ named, and can be referred to by multiple connector-resource
+ elements (See connector-resource).
+
+ Each named pool definition results in a pool instantiated at server
+ start-up. Pool is populated when accessed for the first time. If two or
+ more connector-resource elements point to the same
+ connector-connection-pool element, they are using the same pool of
+ connections, at run time.
+
+ There can be more than one pool for one connection-definition in one
+ resource-adapter.
+
+
+ children
+ property
+ Properties are used to override the ManagedConnectionFactory
+ javabean configuration settings.
+
+ When one or more of these properties are specified, they are passed as
+ is using set<Name>(<Value>) methods to the Resource Adapter's
+ ManagedConnectionfactory class (specified in ra.xml).
+
+
+ attributes
+ connection-definition-name
+ unique name, identifying one connection-definition in a
+ Resource Adapter. Currently this is ConnectionFactory type.
+ fail-all-connections
+ indicates if all connections in the pool must be closed
+ should a single connection fail validation. The default is
+ false. One attempt will be made to re-establish failed
+ connections.
+ idle-timeout-in-seconds
+ maximum time in seconds, that a connection can remain idle in
+ the pool. After this time, the pool implementation can close
+ this connection. Note that this does not control connection
+ timeouts enforced at the database server side. Adminsitrators
+ are advised to keep this timeout shorter than the EIS
+ connection timeout (if such timeouts are configured on the
+ specific EIS), to prevent accumulation of unusable connection
+ in Application Server.
+ is-connection-validation-required
+ This attribute specifies if the connection that is about to
+ be returned is to be validated by the container,
+ max-pool-size
+ maximum number of conections that can be created
+ max-wait-time-in-millis
+ amount of time the caller will wait before getting a
+ connection timeout. The default is 60 seconds. A value of 0
+ will force caller to wait indefinitely.
+ name
+ unique name of the pool definition.
+ pool-resize-quantity
+ number of connections to be removed when
+ idle-timeout-in-seconds timer expires. Connections that have
+ idled for longer than the timeout are candidates for removal.
+ When the pool size reaches steady-pool-size, the connection
+ removal stops.
+ resource-adapter-name
+ This is the name of resource adapter. Name of .rar file is
+ taken as the unique name for the resource adapter.
+ steady-pool-size
+ minimum and initial number of connections maintained in the
+ pool.
+ transaction-support
+ Indicates the level of transaction support that this pool
+ will have. Possible values are "XATransaction",
+ "LocalTransaction" and "NoTransaction". This attribute will
+ override that transaction support attribute in the Resource
+ Adapter in a downward compatible way, i.e it can support a
+ lower/equal transaction level than specified in the RA, but
+ not a higher level.
+
+ Used in:
+ resources
+-->
+<!ELEMENT connector-connection-pool (description?, security-map*, property*)>
+
+<!ATTLIST connector-connection-pool
+ name CDATA #REQUIRED
+ resource-adapter-name CDATA #REQUIRED
+ connection-definition-name CDATA #REQUIRED
+ steady-pool-size CDATA "8"
+ max-pool-size CDATA "32"
+ max-wait-time-in-millis CDATA "60000"
+ pool-resize-quantity CDATA "2"
+ idle-timeout-in-seconds CDATA "300"
+ fail-all-connections %boolean; "false"
+ transaction-support (XATransaction | LocalTransaction | NoTransaction) #IMPLIED
+ is-connection-validation-required %boolean; "false">
+
+
+<!-- security-map
+ Perform mapping from principal received during Servlet/EJB
+ authentication, to credentials accepted by the EIS. This mapping
+ is optional.It is possible to map multiple (server) principal to
+ the same backend principal.
+
+ Used in:
+ connector-connection-pool
+-->
+<!ELEMENT security-map ((principal | user-group)+, backend-principal)>
+
+<!ATTLIST security-map
+ name CDATA #REQUIRED>
+
+
+<!-- principal
+ Principal of the Servlet and EJB client
+
+ Used in:
+ security-map
+-->
+<!ELEMENT principal (#PCDATA)>
+
+
+<!-- user-group
+
+ Used in:
+ security-map
+-->
+<!ELEMENT user-group (#PCDATA)>
+
+
+<!-- backend-principal
+
+ Used in:
+ security-map
+-->
+<!ELEMENT backend-principal EMPTY>
+
+<!ATTLIST backend-principal
+ user-name CDATA #REQUIRED
+ password CDATA #IMPLIED>
+
+
+<!-- thread-pools
+
+ Used in:
+ config
+-->
+<!ELEMENT thread-pools (thread-pool+)>
+
+
+<!-- thread-pool
+
+ attributes
+ idle-thread-timeout-in-seconds
+ idle threads are removed from pool, after this time
+ max-thread-pool-size
+ Maximum number of threads in the threadpool servicing
+ requests in this queue. This is the upper bound on the no. of
+ threads that exist in the threadpool.
+ min-thread-pool-size
+ Minimum number of threads in the threadpool servicing
+ requests in this queue. These are created up front when this
+ threadpool is instantiated
+ num-work-queues
+ This denotes the total number of work queues that are
+ serviced by this threadpool.
+ thread-pool-id
+ This is an id for the work-queue e.g. "thread-pool-1",
+ "thread-pool-2" etc
+
+ Used in:
+ thread-pools
+-->
+<!ELEMENT thread-pool EMPTY>
+
+<!ATTLIST thread-pool
+ thread-pool-id CDATA #REQUIRED
+ min-thread-pool-size CDATA "0"
+ max-thread-pool-size CDATA "200"
+ idle-thread-timeout-in-seconds CDATA "120"
+ num-work-queues CDATA "1">
+
+
+<!-- property
+ Syntax for supplying properties as name value pairs
+
+ Used in:
+ admin-object-resource, admin-service, alert-service,
+ appclient-module, audit-module, auth-realm, availability-service,
+ cluster, config, connector-connection-pool, connector-module,
+ connector-resource, custom-resource, das-config,
+ diagnostic-service, domain, ejb-container,
+ ejb-container-availability, ejb-module, ejb-timer-service, event,
+ external-jndi-resource, filter-config, group-management-service,
+ http-listener, http-service, iiop-listener, j2ee-application,
+ jacc-provider, java-config, jdbc-connection-pool, jdbc-resource,
+ jms-availability, jms-host, jms-service, jmx-connector,
+ lb-config, lifecycle-module, listener-config, load-balancer,
+ log-service, mail-resource, manager-properties, mbean,
+ mdb-container, module-log-levels, module-monitoring-levels,
+ monitoring-service, node-agent, orb,
+ persistence-manager-factory-resource, profiler, provider-config,
+ resource-adapter-config, security-service, server,
+ session-properties, store-properties, transaction-service,
+ virtual-server, web-container, web-container-availability,
+ web-module
+-->
+<!ELEMENT property (description?)>
+
+<!ATTLIST property
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED>
+
+
+<!-- system-property
+ Syntax for supplying system properties as name value pairs
+
+ Used in:
+ cluster, config, domain, server
+-->
+<!ELEMENT system-property (description?)>
+
+<!ATTLIST system-property
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED>
+
+
+<!-- server
+ J2EE Application Server Configuration
+
+ Each Application Server instance is a J2EEv1.4 compliant container. One
+ server instance is specially designated as the Administration Server in
+ SE/EE. User applications cannot be deployed to an Adminsitration Server
+ instance.
+
+
+ children
+ application-ref
+ References to applications deployed to the server instance
+ resource-ref
+ References to resources deployed to the server instance
+
+ attributes
+ config-ref
+ points to a named config. needed for stand-alone servers. If
+ the server instance is part of a cluster, then it must not be
+ present, and will be ignored.
+ lb-weight
+ Each server instance in a cluster has a weight, which may be
+ used to represent the relative processing capacity of that
+ instance. Default weight is 100 for every instance. Weighted
+ load balancing policies will use this weight while load
+ balancing requests within the cluster. It is the
+ responsibility of the administrator to set the relative
+ weights correctly, keeping in mind deployed hardware capacity.
+ name
+ name of the server instance.
+ node-agent-ref
+ SE/EE only. Specifies the name of the node agent where the
+ server instance is hosted.
+
+ Used in:
+ servers
+-->
+<!ELEMENT server
+ (application-ref*, resource-ref*, system-property*, property*)>
+
+
+<!ATTLIST server
+ name CDATA #REQUIRED
+ config-ref CDATA #IMPLIED
+ node-agent-ref CDATA #IMPLIED
+ lb-weight CDATA "100">
+
+
+<!-- application-ref
+
+ attributes
+ disable-timeout-in-minutes
+ The time, in minutes, that it takes this application to reach
+ a quiescent state after having been disabled
+ lb-enabled
+ A boolean flag that causes any and all load-balancers using
+ this application to consider this application unavailable to
+ them. Defaults to unavailable (false).
+
+ Used in:
+ cluster, server
+-->
+<!ELEMENT application-ref EMPTY>
+
+<!ATTLIST application-ref
+ enabled %boolean; "true"
+ virtual-servers CDATA #IMPLIED
+ lb-enabled %boolean; "false"
+ disable-timeout-in-minutes CDATA "30"
+ ref CDATA #REQUIRED>
+
+
+<!-- resource-ref
+
+ Used in:
+ cluster, server
+-->
+<!ELEMENT resource-ref EMPTY>
+
+<!ATTLIST resource-ref
+ enabled %boolean; "true"
+ ref CDATA #REQUIRED>
+
+
+<!-- cluster
+ SE/EE Cluster configuration. A cluster defines a homogenous set
+ of server instances that share the same applications, resources,
+ and configuration.
+
+ children
+ server-ref
+ list of servers in the cluster
+
+ attributes
+ config-ref
+ points to a named config. All server instances in the cluster
+ will share this config.
+ heartbeat-address
+ This is the address (only multicast supported) at which GMS
+ will listen for group events.
+ heartbeat-enabled
+ When "heartbeat-enabled" is set to "true", the GMS services
+ will be started as a lifecycle module in each the application
+ server in the cluster.When "heartbeat-enabled" is set to
+ "false", GMS will not be started and its services will be
+ unavailable. Clusters should function albeit with reduced
+ functionality.
+ heartbeat-port
+ This is the communication port GMS uses to listen for group
+ events . This should be a valid port number.
+ name
+ cluster name
+
+ Used in:
+ clusters
+-->
+<!ELEMENT cluster
+ (server-ref*, resource-ref*, application-ref*, system-property*,
+ property*)>
+
+
+<!ATTLIST cluster
+ name CDATA #REQUIRED
+ config-ref CDATA #REQUIRED
+ heartbeat-port CDATA #REQUIRED
+ heartbeat-address CDATA #REQUIRED
+ heartbeat-enabled %boolean; "true">
+
+
+<!-- server-ref
+
+ attributes
+ disable-timeout-in-minutes
+ The time, in minutes, that it takes this server to reach a
+ quiescent state after having been disabled
+ enabled
+ A boolean flag that causes the server to be enabled to serve
+ end-users, or not. Default is to be enabled (true)
+ lb-enabled
+ A boolean flag that causes any and all load-balancers using
+ this server to consider this server unavailable to them.
+ Defaults to unavailable (false)
+ ref
+ A reference to the name of a server defined elsewhere
+
+ Used in:
+ cluster, lb-config
+-->
+<!ELEMENT server-ref (health-checker?)>
+
+<!ATTLIST server-ref
+ ref CDATA #REQUIRED
+ disable-timeout-in-minutes CDATA "30"
+ lb-enabled %boolean; "false"
+ enabled %boolean; "true">
+
+
+<!-- node-agent
+ SE/EE Node Controller. The node agent is an agent that manages
+ server instances on a host machine.
+
+ attributes
+ name
+ Node Controller name
+ start-servers-in-startup
+ If true starts all managed server instances when the Node
+ Controller is started.
+ system-jmx-connector-name
+ The name of the internal jmx connector
+
+ Used in:
+ node-agents
+-->
+<!ELEMENT node-agent (jmx-connector?, auth-realm?, log-service, property*)>
+
+<!ATTLIST node-agent
+ name CDATA #REQUIRED
+ system-jmx-connector-name CDATA #IMPLIED
+ start-servers-in-startup %boolean; "true">
+
+
+<!-- lb-config
+
+ attributes
+ https-routing
+ Boolean flag indicating how load-balancer will route https
+ requests. If true then an https request to the load-balancer
+ will result in an https request to the server; if false then
+ https requests to the load-balancer result in http requests
+ to the server. Default is to use http (i.e. value of false);
+ monitoring-enabled
+ Boolean flag that determines whether monitoring is switched
+ on or not. Default is that monitoring is switched off (false)
+ name
+ Name of the load balancer configuration
+ reload-poll-interval-in-seconds
+ Maximum period, in seconds, that a change to the load
+ balancer configuration file takes before it is detected by
+ the load balancer and the file reloaded. A value of 0
+ indicates that reloading is disabled. Default period is 1
+ minute (60)
+ response-timeout-in-seconds
+ Period within which a server must return a response or
+ otherwise it will be considered unhealthy. Default value is
+ 60 seconds. Must be greater than or equal to 0. A value of 0
+ effectively turns off this check functionality, meaning the
+ server will always be considered healthy.
+ route-cookie-enabled
+ Boolean flag that determines whether a route cookie is or is
+ not enabled. Default is enabled (true).
+
+ Used in:
+ lb-configs
+-->
+<!ELEMENT lb-config ((cluster-ref* | server-ref*), property*)>
+
+<!ATTLIST lb-config
+ name CDATA #REQUIRED
+ response-timeout-in-seconds CDATA "60"
+ https-routing %boolean; "false"
+ reload-poll-interval-in-seconds CDATA "60"
+ monitoring-enabled %boolean; "false"
+ route-cookie-enabled %boolean; "true">
+
+
+<!-- health-checker
+ Each cluster would be configured for a ping based health check
+ mechanism.
+
+ attributes
+ interval-in-seconds
+ Interval, in seconds, between health checks. A value of "0"
+ means that the health check is disabled. Default is 30
+ seconds. Must be 0 or greater.
+ timeout-in-seconds
+ Maximum time, in seconds, that a server must respond to a
+ health check request to be considered healthy. Default is 10
+ seconds. Must be greater than 0.
+ url
+ URL to ping so as to determine the health state of a
+ listener. This must be a relative URL.
+
+ Used in:
+ cluster-ref, server-ref
+-->
+<!ELEMENT health-checker EMPTY>
+
+<!ATTLIST health-checker
+ url CDATA "/"
+ interval-in-seconds CDATA "30"
+ timeout-in-seconds CDATA "10">
+
+
+<!-- cluster-ref
+ Element relating a reference to a cluster to be load balanced to
+ an (optional) health-checker
+
+ attributes
+ lb-policy
+ load balancing policy to be used for this cluster. Possible
+ values are round-robin , weighted-round-robin or
+ user-defined. round-robin is the default. For
+ weighted-round-robin, the weights of the instance are
+ considered while load balancing. For user-defined, the policy
+ is implemented by a shared library which is loaded by the
+ load balancer and the instance selected is delegated to the
+ loaded module.
+ lb-policy-module
+ specifies the absolute path to the shared library
+ implementing the user-defined policy. This should be
+ specified only when the lb-policy is user-defined. The shared
+ library should exist and be readable in the machine where
+ load balancer is running.
+ ref
+ A reference to the name of a cluster defined elsewhere
+
+ Used in:
+ lb-config
+-->
+<!ELEMENT cluster-ref (health-checker?)>
+
+<!ATTLIST cluster-ref
+ ref CDATA #REQUIRED
+ lb-policy %lb-policy-type; "round-robin"
+ lb-policy-module CDATA #IMPLIED>
+
+
+<!-- message-security-config
+ The message-security-config element defines the message layer
+ specific provider configurations of the application server.
+
+ All of the providers within a message-security-config element must be able
+ to perform authentication processing at the message layer defined by the
+ value of the auth-layer attribute.
+
+
+ attributes
+ default-client-provider
+ used to identify the client provider to be invoked for any
+ application for which a specific client provider has not been
+ bound.
+ default-provider
+ used to identify the server provider to be invoked for any
+ application for which a specific server provider has not been
+ bound.
+
+ When a default provider of a type is not defined for a message layer,
+ the container will only invoke a provider of the type (at the layer)
+ for those applications for which a specific provider has been bound.
+
+
+ Used in:
+ security-service
+-->
+<!ELEMENT message-security-config (provider-config+)>
+
+<!ATTLIST message-security-config
+ auth-layer %message-layer; #REQUIRED
+ default-provider CDATA #IMPLIED
+ default-client-provider CDATA #IMPLIED>
+
+
+<!-- provider-config
+ The provider-config element defines the configuration of an
+ authentication provider.
+
+ A provider-config with no contained request-policy or response-policy
+ sub-elements, is a null provider. The container will not instantiate or
+ invoke the methods of a null provider, and as such the implementation
+ class of a null provider need not exist.
+
+
+ children
+ request-policy
+ defines the authentication policy requirements associated
+ with the request processing performed by the authentication
+ provider.
+ response-policy
+ defines the authentication policy requirements associated
+ with the response processing performed by the authentication
+ provider.
+
+ attributes
+ class-name
+ defines the java implementation class of the provider. Client
+ authentication providers must implement the
+
+ com.sun.enterprise.security.jauth.ClientAuthModule
+ interface. Server-side providers must implement the
+
+ com.sun.enterprise.security.jauth.ServerAuthModule
+ interface. A provider may implement both interfaces, but it
+ must implement the interface corresponding to its provider
+ type.
+ provider-id
+ Identifier used to uniquely identify this
+
+ provider-config
+ element
+ provider-type
+ defines whether the provider is a client authentication
+ provider or a server authentication provider.
+
+ Used in:
+ message-security-config
+-->
+<!ELEMENT provider-config (request-policy?, response-policy?, property*)>
+
+<!ATTLIST provider-config
+ provider-id CDATA #REQUIRED
+ provider-type (client | server | client-server) #REQUIRED
+ class-name CDATA #REQUIRED>
+
+
+<!-- request-policy
+ Used to define the authentication policy requirements associated
+ with the request processing performed by an authentication
+ provider (i.e. when a client provider's
+
+ ClientAuthModule.initiateRequest()
+ method is called or when a server provider's
+
+ ServerAuthModule.validateRequest()
+ method is called).
+
+ attributes
+ auth-recipient
+ defines a requirement for message layer authentication of the
+ reciever of a message to its sender (e.g. by XML encryption).
+ before-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur before any content authentication (e.g.
+ encrypt then sign) with respect to the target of the
+ containing auth-policy.
+ after-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur after any content authentication (e.g. sign
+ then encrypt) with respect to the target of the
+ containing auth-policy.
+ auth-source
+ defines a requirement for message layer sender authentication
+ (e.g. username password) or content authentication (e.g.
+ digital signature).
+
+ Used in:
+ provider-config
+-->
+<!ELEMENT request-policy EMPTY>
+
+<!ATTLIST request-policy
+ auth-source (sender | content) #IMPLIED
+ auth-recipient (before-content | after-content) #IMPLIED>
+
+
+<!-- response-policy
+ Used to define the authentication policy requirements associated
+ with the response processing performed by an authentication
+ provider (i.e. when a client provider's
+
+ ClientAuthModule.validateResponse()
+ method is called or when a server provider's
+
+ ServerAuthModule.secureResponse()
+ method is called).
+
+ attributes
+ auth-recipient
+ defines a requirement for message layer authentication of the
+ reciever of a message to its sender (e.g. by XML encryption).
+ before-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur before any content authentication (e.g.
+ encrypt then sign) with respect to the target of the
+ containing auth-policy.
+ after-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur after any content authentication (e.g. sign
+ then encrypt) with respect to the target of the
+ containing auth-policy.
+ auth-source
+ defines a requirement for message layer sender authentication
+ (e.g. username password) or content authentication (e.g.
+ digital signature).
+
+ Used in:
+ provider-config
+-->
+<!ELEMENT response-policy EMPTY>
+
+<!ATTLIST response-policy
+ auth-source (sender | content) #IMPLIED
+ auth-recipient (before-content | after-content) #IMPLIED>
+
+
+<!-- web-service-endpoint
+ This specifies configuration for a web service end point. This
+ web service end point could be JAXRPC or JSR-109 web service. It
+ contains configuration about Monitoring, Transformation rules and
+ Monitoring Log.
+
+ attributes
+ jbi-enabled
+ when false, it disables the visibility of this endoint as a
+ service in JBI
+ max-history-size
+ maximum number of monitoring records stored in history for
+ this end point
+ monitoring
+ monitoring level for this web service.
+ name
+ fully qualified web service name. Format:
+ |ModuleName|#|EndpointName|, if the web service endpoint
+ belongs to an application. (Parent of this element is
+ j2ee-application). |EndpointName|, if the web service
+ endpoint belongs to stand alone ejb-module or web-module.
+ (Parent of this element is either ejb-module or web-module).
+
+ Used in:
+ ejb-module, j2ee-application, web-module
+-->
+<!ELEMENT web-service-endpoint (registry-location*, transformation-rule*)>
+
+<!ATTLIST web-service-endpoint
+ name CDATA #REQUIRED
+ monitoring %monitoring-level; "OFF"
+ max-history-size CDATA "25"
+ jbi-enabled %boolean; "true">
+
+
+<!-- registry-location
+ Specifies the registry where web service end point artifacts are
+ published.
+
+ Used in:
+ web-service-endpoint
+-->
+<!ELEMENT registry-location EMPTY>
+
+<!ATTLIST registry-location
+ connector-resource-jndi-name CDATA #REQUIRED>
+
+
+<!-- transformation-rule
+ Specifies configuration for a XSLT transformation rule.
+
+ attributes
+ apply-to
+ - "request": transformations are applied to request in the order in
+ which they are specified.
+
+ - "response": transformation is applied to response in the order in
+ which they are specified.
+
+ - "both": transformation rule is applied to request and response. The
+ order is reversed for response.
+
+ enabled
+ if false, this transformation rule is disabled.
+ name
+ name of the transformation rule
+ rule-file-location
+ location of rule file to do the transformation. Only XSLT
+ files are allowed. Default location is:
+ ${com.sun.aas.instanceRoot}/generated/xml/*appOrModule*/*xslt-
+ ilename*/ Absolute paths can also be specified.
+
+ Used in:
+ web-service-endpoint
+-->
+<!ELEMENT transformation-rule EMPTY>
+
+<!ATTLIST transformation-rule
+ name CDATA #REQUIRED
+ enabled %boolean; "true"
+ apply-to %apply-to-type; "request"
+ rule-file-location CDATA #REQUIRED>
+
+
+<!-- load-balancers
+
+ Used in:
+ domain
+-->
+<!ELEMENT load-balancers (load-balancer*)>
+
+
+<!-- load-balancer
+ known properties:
+
+ device-host - Host name or IP address for the device
+
+ device-admin-port - Device administration port number
+
+ ssl-proxy-host - proxy host used for outbound HTTP
+
+ ssl-proxy-port - proxy port used for outbound HTTP
+
+
+ attributes
+ auto-apply-enabled
+ when true, immediately push changes to lb config to the
+ physical load balancer
+ lb-config-name
+ name of the lb-config used by this load balancer
+ name
+ name of the load balancer
+
+ Used in:
+ load-balancers
+-->
+<!ELEMENT load-balancer (property*)>
+
+<!ATTLIST load-balancer
+ name CDATA #REQUIRED
+ lb-config-name CDATA #REQUIRED
+ auto-apply-enabled %boolean; "false">
+
+
+<!-- mbean
+
+ attributes
+ enabled
+ impl-class-name
+ A String that represents fully qualified class name of MBean
+ implementation. This is read-only.
+ name
+ A String that represents the name of the MBean. It is
+ required that the name is valid to represent a "value" of a
+ property in the property-list of an MBean ObjectName. The
+ name must be specified and is a primary key for an MBean. An
+ invalid name implies failure of operation.
+ object-name
+ A String that represents a system-generated Object Name for
+ this MBean.
+ object-type
+ A String representing whether it is a user-defined MBean or a
+ System MBean.
+
+ Used in:
+ applications
+-->
+<!ELEMENT mbean (description?, property*)>
+
+<!ATTLIST mbean
+ name CDATA #REQUIRED
+ object-type %object-type; "user"
+ impl-class-name CDATA #REQUIRED
+ object-name CDATA #IMPLIED
+ enabled %boolean; "true">
+
+
+<!-- jms-availability
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether the MQ cluster associated
+ with the application server cluster is HA enabled or not. If
+ this attribute is "false", then the MQ cluster pointed to by
+ the jms-service element is considered non-HA. JMS Messages
+ are not persisted to a highly available store. If this
+ attribute is "true" the MQ cluster pointed to by the
+ jms-service element is a HA cluster and the MQ cluster uses
+ the database pointed to by mq-store-pool-name to save
+ persistent JMS messages and other broker cluster
+ configuration information. Individual applications will not
+ be able to control or override MQ cluster availability
+ levels. They inherit the availability attribute defined in
+ this element. If this attribute is missing, availability is
+ turned off by default [i.e. the MQ cluster associated with
+ the AS cluster would behave as a non-HA cluster]
+ mq-store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used by
+ the MQ broker cluster for use in saving persistent JMS
+ messages and other broker cluster configuration information.
+ It will default to value of store-pool-name under
+ availability-service (ultimately "jdbc/hastore").
+
+ Used in:
+ availability-service
+-->
+<!ELEMENT jms-availability (property*)>
+
+<!ATTLIST jms-availability
+ availability-enabled %boolean; "false"
+ mq-store-pool-name CDATA #IMPLIED>
+
+
+<!-- management-rules
+ Container for self management rules
+
+ attributes
+ enabled
+ Acts as high level switch for disabling all the defined
+ rules. If set to "false" all the configured rules would
+ disabled. If set to "true", enabled state of a particular
+ rule will be decided at that rule level.
+
+ Used in:
+ config
+-->
+<!ELEMENT management-rules (management-rule*)>
+
+<!ATTLIST management-rules
+ enabled %boolean; "true">
+
+
+<!-- management-rule
+ Defines the configured self management rule
+
+ attributes
+ enabled
+ Determines whether the rule is enabled or not. Default value
+ is false.
+ name
+ Name of the management rule
+
+ Used in:
+ management-rules
+-->
+<!ELEMENT management-rule (event, action?, description?)>
+
+<!ATTLIST management-rule
+ name CDATA #REQUIRED
+ enabled %boolean; "true">
+
+
+<!-- event
+ Defines the event associated with the configured rule. For each
+ configured rule there exists one event associated with it.
+
+ attributes
+ level
+ Specifies at what level to record the event occurance in
+ server log file. Default value is INFO
+ record-event
+ Specifies whether the occurance of the event is to be logged
+ or not. By default this would be true. If no action is
+ specified, the event would be recorded.
+ type
+ Identifies the configured event as one of the predefined
+ event types.
+
+ Used in:
+ management-rule
+-->
+<!ELEMENT event (description?, property*)>
+
+<!ATTLIST event
+ type %event-type; #REQUIRED
+ record-event %boolean; "true"
+ level %log-level; "INFO">
+
+
+<!-- action
+ Defines the action MBean associated with the event.
+
+ attributes
+ action-mbean-name
+ identifies the name of the action MBean.
+
+ Used in:
+ management-rule
+-->
+<!ELEMENT action EMPTY>
+
+<!ATTLIST action
+ action-mbean-name CDATA #REQUIRED>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/test.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/test.xml
new file mode 100755
index 0000000..21601de
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/test.xml
@@ -0,0 +1,385 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE domain PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Domain//EN" "file://test.dtd">
+<!--
+
+ Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- Generated from default-domain.xml.template -->
+<!-- Avoid manual edits of this file. Run "asadmin verify-domain-xml" otherwise.-->
+<domain application-root="${com.sun.aas.instanceRoot}/applications" log-root="${com.sun.aas.instanceRoot}/logs">
+ <applications>
+ <j2ee-application availability-enabled="false" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/__ejb_container_timer_app" name="__ejb_container_timer_app" object-type="system-all"/>
+ <j2ee-application availability-enabled="false" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/__JWSappclients" name="__JWSappclients" object-type="system-all"/>
+ <j2ee-application availability-enabled="false" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/MEjbApp" name="MEjbApp" object-type="system-all"/>
+ <web-module availability-enabled="false" context-root="/web1" directory-deployed="true" enabled="true" location="${com.sun.aas.installRoot}/lib/install/applications/adminapp/adminapp_war" name="adminapp" object-type="system-admin">
+ <!-- System Web Module - DO NOT DELETE! -->
+ </web-module>
+ <web-module availability-enabled="false" context-root="/asadmin" directory-deployed="true" enabled="true" location="${com.sun.aas.installRoot}/lib/install/applications/ee/admingui/adminGUI_war" name="admingui" object-type="system-admin">
+ <!-- System Web Module - DO NOT DELETE! -->
+ </web-module>
+ </applications>
+ <resources>
+ <jdbc-resource enabled="true" jndi-name="jdbc/__TimerPool" object-type="system-admin" pool-name="__TimerPool"/>
+ <jdbc-resource enabled="true" jndi-name="jdbc/__CallFlowPool" object-type="system-all" pool-name="__CallFlowPool"/>
+ <jdbc-resource enabled="true" jndi-name="jdbc/__default" object-type="user" pool-name="DerbyPool"/>
+ <jdbc-connection-pool allow-non-component-callers="false" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" name="__CallFlowPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.XADataSource" steady-pool-size="8">
+ <property name="connectionAttributes" value=";create=true"/>
+ <property name="databaseName" value="sun-callflow"/>
+ <property name="PortNumber" value="1527"/>
+ <property name="Password" value="App"/>
+ <property name="User" value="App"/>
+ <property name="serverName" value="kravtch-pc2.sfbay.sun.com"/>
+ </jdbc-connection-pool>
+ <jdbc-connection-pool allow-non-component-callers="false" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" name="__TimerPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.XADataSource" steady-pool-size="8">
+ <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"/>
+ </jdbc-connection-pool>
+ <jdbc-connection-pool allow-non-component-callers="false" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" max-pool-size="32" max-wait-time-in-millis="60000" name="DerbyPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" steady-pool-size="8">
+ <property name="PortNumber" value="1527"/>
+ <property name="Password" value="APP"/>
+ <property name="User" value="APP"/>
+ <property name="serverName" value="localhost"/>
+ <property name="DatabaseName" value="sun-appserv-samples"/>
+ <property name="connectionAttributes" value=";create=true"/>
+ </jdbc-connection-pool>
+ </resources>
+ <configs>
+ <config dynamic-reconfiguration-enabled="true" name="server-config">
+ <http-service>
+ <access-log format="%client.name% %auth-user-name% %datetime% %request% %status% %response.length%" rotation-enabled="true" rotation-interval-in-minutes="1440" rotation-policy="time" rotation-suffix="yyyyMMdd-HH'h'mm'm'ss's'"/>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="8080" security-enabled="false" server-name="" xpowered-by="true">
+ </http-listener>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-2" port="8181" security-enabled="true" server-name="" xpowered-by="true">
+ </http-listener>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="__asadmin" enabled="true" family="inet" id="admin-listener" port="4848" security-enabled="true" server-name="" xpowered-by="true">
+ </http-listener>
+ <virtual-server hosts="${com.sun.aas.hostName}" http-listeners="http-listener-1,http-listener-2" id="server" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
+ <http-access-log iponly="true" log-directory="${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 default-web-module="admingui" hosts="${com.sun.aas.hostName}" http-listeners="admin-listener" id="__asadmin" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
+ <http-access-log iponly="true" log-directory="${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>
+ <request-processing header-buffer-length-in-bytes="4096" initial-thread-count="2" request-timeout-in-seconds="30" thread-count="5" thread-increment="1"/>
+ <keep-alive max-connections="250" thread-count="1" timeout-in-seconds="30"/>
+ <connection-pool max-pending-count="4096" queue-size-in-bytes="4096" receive-buffer-size-in-bytes="4096" send-buffer-size-in-bytes="8192"/>
+ <http-protocol default-response-type="text/plain; charset=iso-8859-1" dns-lookup-enabled="false" forced-response-type="text/plain; charset=iso-8859-1" ssl-enabled="true" version="HTTP/1.1"/>
+ <http-file-cache file-caching-enabled="true" file-transmission-enabled="false" globally-enabled="true" hash-init-size="0" max-age-in-seconds="30" max-files-count="1024" medium-file-size-limit-in-bytes="537600" medium-file-space-in-bytes="10485760" small-file-size-limit-in-bytes="2048" small-file-space-in-bytes="1048576"/>
+ </http-service>
+ <iiop-service client-authentication-required="false">
+ <orb max-connections="1024" message-fragment-size="1024" use-thread-pool-ids="thread-pool-1"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="orb-listener-1" port="3700" security-enabled="false"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL" port="3820" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ </iiop-listener>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL_MUTUALAUTH" port="3920" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-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" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ <property name="client-hostname" value="kravtch-pc2.sfbay.sun.com"/>
+ </jmx-connector>
+ <!-- The JSR 160 "system-jmx-connector" -->
+ <das-config admin-session-timeout-in-minutes="60" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-enabled="true" autodeploy-jsp-precompilation-enabled="false" autodeploy-polling-interval-in-seconds="2" autodeploy-verifier-enabled="false" deploy-xml-validation="full" dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2"/>
+ </admin-service>
+ <web-container>
+ <session-config>
+ <session-manager>
+ <manager-properties/>
+ <store-properties/>
+ </session-manager>
+ <session-properties/>
+ </session-config>
+ </web-container>
+ <ejb-container cache-idle-timeout-in-seconds="600" cache-resize-quantity="32" commit-option="B" max-cache-size="512" max-pool-size="32" pool-idle-timeout-in-seconds="600" pool-resize-quantity="8" removal-timeout-in-seconds="5400" session-store="${com.sun.aas.instanceRoot}/session-store" steady-pool-size="0" victim-selection-policy="nru">
+ <ejb-timer-service max-redeliveries="1" minimum-delivery-interval-in-millis="7000" redelivery-interval-internal-in-millis="5000"/>
+ </ejb-container>
+ <mdb-container idle-timeout-in-seconds="600" max-pool-size="32" pool-resize-quantity="8" steady-pool-size="0"/>
+ <jms-service addresslist-behavior="random" addresslist-iterations="3" default-jms-host="default_JMS_host" init-timeout-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" reconnect-interval-in-seconds="5" type="EMBEDDED">
+ <jms-host admin-password="admin" admin-user-name="admin" host="kravtch-pc2.sfbay.sun.com" name="default_JMS_host" port="7676"/>
+ </jms-service>
+ <log-service alarms="false" file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000" log-rotation-timelimit-in-minutes="0" log-to-console="false" retain-error-statistics-for-hours="5" use-system-logging="false">
+ <module-log-levels admin="INFO" classloader="INFO" cmp="INFO" cmp-container="INFO" configuration="INFO" connector="INFO" corba="INFO" deployment="INFO" ejb-container="INFO" group-management-service="INFO" javamail="INFO" jaxr="INFO" jaxrpc="INFO" jdo="INFO" jms="INFO" jta="INFO" jts="INFO" management-event="INFO" mdb-container="INFO" naming="INFO" node-agent="INFO" resource-adapter="INFO" root="INFO" saaj="INFO" security="INFO" self-management="INFO" server="INFO" synchronization="INFO" util="INFO" verifier="INFO" web-container="INFO"/>
+ </log-service>
+ <security-service activate-default-principal-to-role-mapping="false" anonymous-role="ANYONE" audit-enabled="false" audit-modules="default" default-realm="file" jacc="default">
+ <!-- All administrative users use this realm by default. -->
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
+ <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 classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate">
+ </auth-realm>
+ <jacc-provider name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl" policy-provider="com.sun.enterprise.security.provider.PolicyWrapper">
+ <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
+ </jacc-provider>
+ <audit-module classname="com.sun.enterprise.security.Audit" name="default">
+ <property name="auditOn" value="false"/>
+ </audit-module>
+ <message-security-config auth-layer="SOAP">
+ <!-- turned off by default -->
+ <provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="XWS_ClientProvider" provider-type="client">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="dynamic.username.password" value="false"/>
+ <property name="debug" value="false"/>
+ </provider-config>
+ <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="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="dynamic.username.password" value="false"/>
+ <property name="debug" value="false"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="XWS_ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="debug" value="false"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="debug" value="false"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ </message-security-config>
+ </security-service>
+ <transaction-service automatic-recovery="false" heuristic-decision="rollback" keypoint-interval="2048" retry-timeout-in-seconds="600" timeout-in-seconds="0" tx-log-dir="./"/>
+ <monitoring-service>
+ <module-monitoring-levels connector-connection-pool="OFF" connector-service="OFF" ejb-container="OFF" http-service="OFF" jdbc-connection-pool="OFF" jms-service="OFF" jvm="OFF" orb="OFF" thread-pool="OFF" transaction-service="OFF" web-container="OFF"/>
+ </monitoring-service>
+ <diagnostic-service capture-app-dd="true" capture-hadb-info="true" capture-install-log="true" capture-system-info="true" compute-checksum="true" max-log-entries="500" min-log-level="INFO" verify-config="true"/>
+ <java-config classpath-suffix="" debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" env-classpath-ignored="true" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath="${com.sun.aas.installRoot}/lib/appserv-launch.jar">
+ <!-- various required jvm-options -->
+ <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
+ <jvm-options>-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl</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>-Djava.ext.dirs=${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext${path.separator}${com.sun.aas.derbyRoot}/lib${path.separator}${com.sun.aas.installRoot}/lib/jdbcdrivers</jvm-options>
+ <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</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>-XX:MaxPermSize=128m</jvm-options>
+ </java-config>
+ <availability-service auto-manage-ha-store="false" availability-enabled="true" ha-store-healthcheck-enabled="false" ha-store-healthcheck-interval-in-seconds="5">
+ <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-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-store-pool-name="jdbc/hastore"/>
+ <jms-availability availability-enabled="false"/>
+ </availability-service>
+ <thread-pools>
+ <thread-pool idle-thread-timeout-in-seconds="120" max-thread-pool-size="200" min-thread-pool-size="0" num-work-queues="1" thread-pool-id="thread-pool-1"/>
+ </thread-pools>
+ <management-rules enabled="true">
+ </management-rules>
+ </config>
+ <!-- config model with name "server-config" ends -->
+ <config dynamic-reconfiguration-enabled="true" name="default-config">
+ <http-service>
+ <access-log format="%client.name% %auth-user-name% %datetime% %request% %status% %response.length%" rotation-enabled="true" rotation-interval-in-minutes="1440" rotation-policy="time" rotation-suffix="yyyyMMdd-HH'h'mm'm'ss's'"/>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="${HTTP_LISTENER_PORT}" security-enabled="false" server-name="" xpowered-by="true">
+ </http-listener>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-2" port="${HTTP_SSL_LISTENER_PORT}" security-enabled="true" server-name="" xpowered-by="true">
+ </http-listener>
+ <virtual-server hosts="${com.sun.aas.hostName}" http-listeners="http-listener-1,http-listener-2" id="server" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
+ <http-access-log iponly="true" log-directory="${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"/>
+ <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"/>
+ </virtual-server>
+ <request-processing header-buffer-length-in-bytes="4096" initial-thread-count="2" request-timeout-in-seconds="30" thread-count="5" thread-increment="1"/>
+ <keep-alive max-connections="250" thread-count="1" timeout-in-seconds="30"/>
+ <connection-pool max-pending-count="4096" queue-size-in-bytes="4096" receive-buffer-size-in-bytes="4096" send-buffer-size-in-bytes="8192"/>
+ <http-protocol default-response-type="text/plain; charset=iso-8859-1" dns-lookup-enabled="false" forced-response-type="text/plain; charset=iso-8859-1" ssl-enabled="true" version="HTTP/1.1"/>
+ <http-file-cache file-caching-enabled="true" file-transmission-enabled="false" globally-enabled="true" hash-init-size="0" max-age-in-seconds="30" max-files-count="1024" medium-file-size-limit-in-bytes="537600" medium-file-space-in-bytes="10485760" small-file-size-limit-in-bytes="2048" small-file-space-in-bytes="1048576"/>
+ </http-service>
+ <iiop-service client-authentication-required="false">
+ <orb max-connections="1024" message-fragment-size="1024" use-thread-pool-ids="thread-pool-1"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="orb-listener-1" port="${IIOP_LISTENER_PORT}" security-enabled="false"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL" port="${IIOP_SSL_LISTENER_PORT}" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ </iiop-listener>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL_MUTUALAUTH" port="${IIOP_SSL_MUTUALAUTH_PORT}" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-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" enabled="true" name="system" port="${JMX_SYSTEM_CONNECTOR_PORT}" protocol="rmi_jrmp" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ </jmx-connector>
+ <!-- JSR 160 "system-jmx-connector" -->
+ <das-config admin-session-timeout-in-minutes="60" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-enabled="true" autodeploy-jsp-precompilation-enabled="false" autodeploy-polling-interval-in-seconds="2" autodeploy-verifier-enabled="false" deploy-xml-validation="full" dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2"/>
+ </admin-service>
+ <web-container>
+ <session-config>
+ <session-manager>
+ <manager-properties/>
+ <store-properties/>
+ </session-manager>
+ <session-properties/>
+ </session-config>
+ </web-container>
+ <ejb-container cache-idle-timeout-in-seconds="600" cache-resize-quantity="32" commit-option="B" max-cache-size="512" max-pool-size="32" pool-idle-timeout-in-seconds="600" pool-resize-quantity="8" removal-timeout-in-seconds="5400" session-store="${com.sun.aas.instanceRoot}/session-store" steady-pool-size="0" victim-selection-policy="nru">
+ <ejb-timer-service max-redeliveries="1" minimum-delivery-interval-in-millis="7000" redelivery-interval-internal-in-millis="5000"/>
+ </ejb-container>
+ <mdb-container idle-timeout-in-seconds="600" max-pool-size="32" pool-resize-quantity="8" steady-pool-size="0"/>
+ <jms-service addresslist-behavior="priority" addresslist-iterations="3" default-jms-host="default_JMS_host" init-timeout-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" reconnect-interval-in-seconds="5" type="LOCAL">
+ <jms-host admin-password="admin" admin-user-name="admin" host="kravtch-pc2.sfbay.sun.com" name="default_JMS_host" port="${JMS_PROVIDER_PORT}"/>
+ </jms-service>
+ <log-service alarms="false" file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000" log-rotation-timelimit-in-minutes="0" log-to-console="false" retain-error-statistics-for-hours="5" use-system-logging="false">
+ <module-log-levels admin="INFO" classloader="INFO" cmp="INFO" cmp-container="INFO" configuration="INFO" connector="INFO" corba="INFO" deployment="INFO" ejb-container="INFO" group-management-service="INFO" javamail="INFO" jaxr="INFO" jaxrpc="INFO" jdo="INFO" jms="INFO" jta="INFO" jts="INFO" management-event="INFO" mdb-container="INFO" naming="INFO" node-agent="INFO" resource-adapter="INFO" root="INFO" saaj="INFO" security="INFO" self-management="INFO" server="INFO" synchronization="INFO" util="INFO" verifier="INFO" web-container="INFO"/>
+ </log-service>
+ <security-service activate-default-principal-to-role-mapping="false" anonymous-role="ANYONE" audit-enabled="false" audit-modules="default" default-realm="file" jacc="default">
+ <!-- All administrative tasks within any server instance use this admin-realm by default. -->
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
+ <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 classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate">
+ </auth-realm>
+ <jacc-provider name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl" policy-provider="com.sun.enterprise.security.provider.PolicyWrapper">
+ <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
+ </jacc-provider>
+ <audit-module classname="com.sun.enterprise.security.Audit" name="default">
+ <property name="auditOn" value="false"/>
+ </audit-module>
+ <message-security-config auth-layer="SOAP">
+ <!-- turned off by default -->
+ <provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="XWS_ClientProvider" provider-type="client">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="dynamic.username.password" value="false"/>
+ <property name="debug" value="false"/>
+ </provider-config>
+ <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="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="dynamic.username.password" value="false"/>
+ <property name="debug" value="false"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="XWS_ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="debug" value="false"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="encryption.key.alias" value="s1as"/>
+ <property name="signature.key.alias" value="s1as"/>
+ <property name="debug" value="false"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ </message-security-config>
+ </security-service>
+ <transaction-service automatic-recovery="true" heuristic-decision="rollback" keypoint-interval="2048" retry-timeout-in-seconds="600" timeout-in-seconds="0" tx-log-dir="./"/>
+ <monitoring-service>
+ <module-monitoring-levels connector-connection-pool="OFF" connector-service="OFF" ejb-container="OFF" http-service="OFF" jdbc-connection-pool="OFF" jms-service="OFF" jvm="OFF" orb="OFF" thread-pool="OFF" transaction-service="OFF" web-container="OFF"/>
+ </monitoring-service>
+ <diagnostic-service capture-app-dd="true" capture-hadb-info="true" capture-install-log="true" capture-system-info="true" compute-checksum="true" max-log-entries="500" min-log-level="INFO" verify-config="true"/>
+ <java-config classpath-suffix="" debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" env-classpath-ignored="true" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath="${com.sun.aas.installRoot}/lib/appserv-launch.jar">
+ <!-- various required jvm-options -->
+ <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
+ <jvm-options>-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl</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>-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${path.separator}${com.sun.aas.derbyRoot}/lib${path.separator}${com.sun.aas.installRoot}/lib/jdbcdrivers</jvm-options>
+ <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</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 auto-manage-ha-store="false" availability-enabled="true" ha-store-healthcheck-enabled="false" ha-store-healthcheck-interval-in-seconds="5">
+ <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-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-store-pool-name="jdbc/hastore"/>
+ <jms-availability availability-enabled="false"/>
+ </availability-service>
+ <thread-pools>
+ <thread-pool idle-thread-timeout-in-seconds="120" max-thread-pool-size="200" min-thread-pool-size="0" num-work-queues="1" thread-pool-id="thread-pool-1"/>
+ </thread-pools>
+ <group-management-service fd-protocol-max-tries="3" fd-protocol-timeout-in-millis="2000" merge-protocol-max-interval-in-millis="10000" merge-protocol-min-interval-in-millis="5000" ping-protocol-timeout-in-millis="2000" vs-protocol-timeout-in-millis="1500"/>
+ <management-rules enabled="true"/>
+ <system-property name="HTTP_LISTENER_PORT" value="38080"/>
+ <system-property name="HTTP_SSL_LISTENER_PORT" value="38181"/>
+ <system-property name="JMS_PROVIDER_PORT" value="37676"/>
+ <system-property name="IIOP_LISTENER_PORT" value="33700"/>
+ <system-property name="IIOP_SSL_LISTENER_PORT" value="33820"/>
+ <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="33920"/>
+ <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="38686"/>
+ </config>
+ </configs>
+ <servers>
+ <server config-ref="server-config" lb-weight="100" name="server">
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="adminapp" virtual-servers="__asadmin"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="admingui" virtual-servers="__asadmin"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="__ejb_container_timer_app" virtual-servers="server"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="__JWSappclients" virtual-servers="server"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="MEjbApp" virtual-servers="server"/>
+ <resource-ref enabled="true" ref="jdbc/__TimerPool"/>
+ <resource-ref enabled="true" ref="jdbc/__CallFlowPool"/>
+ <resource-ref enabled="true" ref="jdbc/__default"/>
+ </server>
+ </servers>
+ <clusters/>
+ <node-agents/>
+ <lb-configs/>
+ <load-balancers/>
+ <property name="administrative.domain.name" value="domain1"/>
+</domain>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/testserverbeans.jar b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/testserverbeans.jar
new file mode 100644
index 0000000..7e2c22f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/testserverbeans.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testng/testng.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testng/testng.xml
new file mode 100644
index 0000000..4bcd125
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testng/testng.xml
@@ -0,0 +1,26 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<suite name="admin framework tests" >
+ <test name="admin.framework" junit="true" >
+ <classes>
+ <class name="com.sun.enterprise.admin.AdminInfraTest" />
+ </classes>
+ </test>
+</suite>
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
new file mode 100755
index 0000000..91a1c39
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminInfraTest.java
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * $Id: AdminInfraTest.java,v 1.1.1.1 2005/05/28 00:39:19 dpatil Exp $
+ */
+
+package com.sun.enterprise.admin;
+
+import java.lang.reflect.*;
+import java.util.*;
+import java.io.*;
+
+//junit imports
+import junit.framework.*;
+import junit.textui.TestRunner;
+
+//JMX
+import javax.management.DynamicMBean;
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.ObjectName;
+import javax.management.AttributeNotFoundException;
+//config imports
+import com.sun.enterprise.config.ConfigFactory;
+import com.sun.enterprise.config.ConfigContext;
+
+//config mbean imports
+import com.sun.enterprise.admin.meta.MBeanRegistry;
+import com.sun.enterprise.admin.meta.MBeanRegistryFactory;
+//import com.sun.enterprise.admin.meta.*;
+
+public class AdminInfraTest extends TestCase
+{
+ static String TEST_DIR = "publish/internal/testclasses/asadmintest";
+ static int COMPARESAMPLES_MODE = 0;
+ static int CREATESAMPLES_MODE = 1;
+ static int PRINT_MODE = 2;
+
+ private static int _mode = COMPARESAMPLES_MODE;
+ private MBeanRegistry _registry;
+ private ConfigContext _configContext;
+ private PrintWriter _printStream; //for CREATESAMPLES_MODE only
+ private LineNumberReader _compareStream; //for COMPARE_MODE only
+ private AdminTester _tester; // = new AdminTester(_mode, _registry, _configContext);
+
+
+ public AdminInfraTest(String name) throws Exception
+ {
+ super(name);
+ }
+
+ protected void setUp()
+ {
+ System.setProperty("com.sun.aas.installRoot", TEST_DIR);
+ System.setProperty("com.sun.aas.instanceRoot","/qq");
+ System.setProperty("com.sun.aas.javaRoot","/qq");
+ System.setProperty("com.sun.aas.imqLib","/qq");
+ try
+ {
+ /* URL url = AdminInfraTest.class.getResource("/testfiles/descriptors.xml"); //standard for pe
+ InputStream stream = url.openStream();
+ _registry = new MBeanRegistry();
+ _registry.loadMBeanRegistry(stream);*/
+
+ _registry = MBeanRegistryFactory.getMBeanRegistry(TEST_DIR+"/descriptors.xml", false);
+ MBeanRegistryFactory.setAdminMBeanRegistry(_registry);
+ _configContext = ConfigFactory.createConfigContext(TEST_DIR+"/test.xml");
+ _tester = new AdminTester(this, _mode, _registry, _configContext, TEST_DIR);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+
+ protected void tearDown()
+ {
+ _registry = null;
+ _configContext = null;
+ _printStream = null;
+ _compareStream = null;
+ }
+
+ public static junit.framework.Test suite()
+ {
+ TestSuite suite = new TestSuite(AdminInfraTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception
+ {
+ if(args==null || args.length<2)
+ args = new String[]{"-testpath", "publish/internal/testclasses/asadmintest", "create"};
+ int length = args.length;
+ if(length<2 ||
+ !args[0].equals("-testpath"))
+ {
+ System.out.println("usage: admininfratest -testpath <path to test directory> [print|create]");
+ System.exit(1);
+ }
+ TEST_DIR = args[1];
+ if(length>2)
+ {
+ System.out.println("MODE="+args[2]);
+ if(args[2].trim().equals("print"))
+ _mode=2;
+ else if(args[2].trim().equals("create"))
+ _mode=1;
+ }
+ final TestRunner runner= new TestRunner();
+ final TestResult result = runner.doRun(AdminInfraTest.suite(), false);
+ 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);
+ return mbean.getAttribute(attr);
+ }
+
+ //******************************************************************
+ //******************T E S T S***************************************
+ //******************************************************************
+
+ private void runTestCase(String testCaseName, String sampleName) throws Exception
+ {
+ String errStr = _tester.runTestCase(testCaseName, sampleName);
+ assertNull(errStr, errStr);
+ }
+
+ private void runTestCase(String[] testCaseNames, String sampleName) throws Exception
+ {
+ String errStr = _tester.runTestCase(testCaseNames, sampleName);
+ assertNull(errStr, errStr);
+ }
+
+ private void runTestCase(String testCaseName) throws Exception
+ {
+ runTestCase(testCaseName, testCaseName);
+ }
+
+ public void testMBeanRegistry() throws Exception
+ {
+ 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);
+ 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);
+ assertNotNull("ejb-container INSTANTIATION (ObjectName): mbean==null", mbean);
+
+ //***********************************************************************************************
+ 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");
+ }
+
+ public void testMBeansGetAttribue() throws Exception
+ {
+ //***********************************************************************************************
+ location = new String[]{"testdomain", "server-config"};
+ 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
+ {
+ mbean.getAttribute("wrong_attribute");
+ fail("wrong_attribute did not cause exception");
+ } catch (AttributeNotFoundException anfe)
+ {
+ }
+ try
+ {
+ //scase sensibility test
+ mbean.getAttribute("commit_Option");
+ fail("getAttribute():sensibility test failure");
+ } catch (AttributeNotFoundException anfe)
+ {
+ }
+
+ }
+
+/* public void testMBeansCreateChild() throws Exception
+ {
+ }*/
+ public void testGetSetCompareCases() throws Exception
+ {
+ runTestCase(new String[]{"testMBeansGettersSetters"}, "GettersSetters");
+ }
+
+ public void testMBeansSetAttribue() throws Exception
+ {
+ //***********************************************************************************************
+ location = new String[]{"testdomain", "server-config"};
+ 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"));
+ assertEquals("cache_resize_quantity not equal 36", mbean.getAttribute("cache_resize_quantity"), "36");
+ mbean.setAttribute(new Attribute("cache_idle_timeout_in_seconds", "601"));
+ assertEquals("cache_idle_timeout_in_seconds not equal 601", mbean.getAttribute("cache_idle_timeout_in_seconds"), "601");
+ mbean.setAttribute(new Attribute("commit_option", "C"));
+ assertEquals("commit_option != C", mbean.getAttribute("commit_option"), "C");
+ }
+
+ public void testChildCompareCases() throws Exception
+ {
+ runTestCase(new String[]{"testChildOperations"}, "childOperations");
+ }
+ public void testArrayAttrs() throws Exception
+ {
+ runTestCase(new String[]{"testMBeanArrayAttrs"}, "testArrayAttrs");
+ }
+ public void testProperties() throws Exception
+ {
+ runTestCase(new String[]{"testPropertiesOperations"}, "testPropertiesOperations");
+ }
+ public void testDefaultValues() throws Exception
+ {
+ runTestCase(new String[]{"testDefaultValues"}, "testDefaultValues");
+ }
+ public void testAttributeEmptyValuesDuringCreation() throws Exception
+ {
+ //***********************************************************************************************
+ location = new String[]{"testdomain", "server-config"};
+ 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"));
+ attrs.add(new Attribute("default-virtual-server","server"));
+ attrs.add(new Attribute("server-name",""));
+ attrs.add(new Attribute("id","test-listener"));
+ attrs.add(new Attribute("port","12345"));
+ attrs.add(new Attribute("enabled","false"));
+ attrs.add(new Attribute("security-enabled","false"));
+ attrs.add(new Attribute("redirect-port",""));
+ retObject = mbean.invoke("createHttpListener", new Object[]{attrs}, new String[]{attrs.getClass().getName()});
+ assertNotNull("createHttpListener: retObject==null", retObject);
+ //***********************************************************************************************
+ location = new String[]{"testdomain", "server-config", "test-listener"};
+ 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();
+ }
+
+}
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
new file mode 100755
index 0000000..5864011
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTestException.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin;
+
+public class AdminTestException extends Exception
+{
+ /**
+ 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}" );
+ }
+
+ public AdminTestException()
+ {
+ super();
+ }
+
+
+ /**
+ Constructs an <code>MBeanConfigException</code> with the specified detail message.
+ @param msg the detail message.
+ */
+ public AdminTestException(String msg)
+ {
+ super(msg);
+ }
+}
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
new file mode 100755
index 0000000..0720a1f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTester.java
@@ -0,0 +1,416 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin;
+
+import javax.management.*;
+
+import com.sun.enterprise.admin.meta.*;
+import com.sun.enterprise.config.ConfigContext;
+import com.sun.enterprise.config.ConfigFactory;
+import java.lang.reflect.*;
+import java.util.*;
+import java.io.*;
+
+//junit imports
+import junit.framework.*;
+import junit.textui.TestRunner;
+
+public class AdminTester
+{
+ 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;
+ _mode=mode;
+ _registry=registry;
+ _configContext=configContext;
+ SAMPLES_DIR = testpath+"/samples";
+ }
+ public static void println(String str) throws Exception
+ {
+ int idx = 0;
+ while((idx=str.indexOf('\n'))>=0)
+ {
+ printSplitedLine(str.substring(0,idx));
+ str = str.substring(idx+1);
+ }
+ printSplitedLine(str);
+ }
+ public static void printSplitedLine(String str) throws Exception
+ {
+ if(_mode==CREATESAMPLES_MODE)
+ _printStream.println(str);
+ else if(_mode==PRINT_MODE)
+ System.out.println(str);
+ if(_mode==COMPARESAMPLES_MODE)
+ {
+if(_compareStream==null)
+{
+// System.out.println("--- _compareStream = "+_compareStream);
+// System.out.println("---"+ str );
+ return;
+}
+
+ String compStr = _compareStream.readLine();
+ String str0 = str;
+ String compStr0 = compStr;
+ if(!str.equals(compStr))
+ throw new AdminTestException( _compareStream.getLineNumber(), str, compStr);
+ }
+ }
+ public static void title(String str) throws Exception
+ {
+ 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)
+ pref="";
+ if(obj==null)
+ println(pref+"null");
+ if(obj instanceof Object[])
+ {
+ Object[] objs = (Object[])obj;
+ if(objs.length==0)
+ println(pref+"array.length = 0");
+ for(int i=0; i<objs.length; i++)
+ {
+ printObj(pref+" ["+i+"] -> ", objs[i]);
+ }
+ }
+ else if(obj instanceof ArrayList)
+ {
+ ArrayList objs = (ArrayList)obj;
+ if(objs.size()==0)
+ println(pref+"list.size() = 0");
+ for(int i=0; i<objs.size(); i++)
+ {
+ printObj(pref/*+" ["+i+"] -> "*/, objs.get(i));
+ }
+ }
+ else if(obj instanceof Attribute)
+ {
+ println(pref+ ((Attribute)obj).getName() + "=" + ((Attribute)obj).getValue());
+ }
+ else if(obj instanceof BaseAdminMBean)
+ {
+ String str = obj.toString();
+ //cut the address
+ int idx = str.lastIndexOf('@');
+ if(idx>=0)
+ str = str.substring(0, idx);
+ println(pref+ str);
+ }
+ else
+ {
+ println(pref + obj);
+ }
+ }
+
+ public static void printAllAttributes(String title, String pref, DynamicMBean mbean) throws Exception
+ {
+ 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);
+// 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"});
+ }
+ 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"});
+ }
+
+ public String runTestCase(String testName, String sampleName) throws Exception
+ {
+ return runTestCase(new String[]{testName}, sampleName);
+ }
+ public String runTestCase(String[] testNames, String sampleName) throws Exception
+ {
+ if(_mode==CREATESAMPLES_MODE)
+ {
+ if(_printStream!=null)
+ {
+ _printStream.close();
+ _printStream=null;
+ }
+ _printStream = new PrintWriter(new FileOutputStream(SAMPLES_DIR+"/"+sampleName+".smp"));
+ }
+ else if(_mode==COMPARESAMPLES_MODE)
+ {
+ if(_compareStream!=null)
+ {
+ _compareStream.close();
+ _compareStream=null;
+ }
+ if(sampleName!=null)
+ _compareStream = new LineNumberReader(new FileReader(SAMPLES_DIR+"/"+sampleName+".smp"));
+ }
+ for(int i=0; i<testNames.length; i++)
+ {
+ Class cl = this.getClass();
+ Method method = cl.getMethod(testNames[i], (Class[])null);
+ try {
+ method.invoke(this, (Object[])null);
+ } catch (InvocationTargetException ite)
+ {
+ Throwable t = ite.getTargetException();
+ if(t instanceof AdminTestException)
+ {
+ return testNames[i]+": "+t.getMessage();
+ }
+ throw ite;
+ }
+ }
+ if(_mode==CREATESAMPLES_MODE)
+ {
+ if(_printStream!=null)
+ {
+ _printStream.close();
+ _printStream=null;
+ }
+ }
+ else if(_mode==COMPARESAMPLES_MODE)
+ {
+ if(_compareStream!=null)
+ {
+ _compareStream.close();
+ _compareStream=null;
+ }
+ }
+ return null;
+
+ }
+
+ String[] location;
+ BaseAdminMBean mbean;
+ AttributeList attrs;
+ Object retObject;
+
+ public void testMBeanRegistry() throws Exception
+ {
+ _registry.sortRegistryEntries(_registry.SORT_BY_NAME);
+ println(_registry.toString());
+ }
+
+ //***********************************************************************************************
+ //**** TestCase emulators ****
+ private void assertNull(String str, Object obj) throws Exception
+ {
+ if(_caller!=null)
+ _caller.assertNull(str, obj);
+ }
+ private void assertEquals(String str, Object obj, Object sample) throws Exception
+ {
+ if(_caller!=null)
+ _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);
+ 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);
+ 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);
+ 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);
+ println("" + ((mbean!=null)?"ok":"failed"));
+ }
+ public void testMBeansInfo() throws Exception
+ {
+ }
+ public void testMBeansGettersSetters() throws Exception
+ {
+ //***********************************************************************************************
+ title("ejb-container INSTANTIATION");
+ location = new String[]{"testdomain", "server-config"};
+ mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
+ println(""+mbean.getAttribute("cache_resize_quantity"));
+
+ //***********************************************************************************************
+ title("ejb-container set steady_pool_size to 20");
+ printAllAttributes("************BEFORE SET ******", " ", mbean);
+
+ mbean.setAttribute(new Attribute("steady_pool_size", (Object)"20"));
+ printAllAttributes("\n************AFTER SET******", " ", mbean);
+ }
+ public void testChildOperations() throws Exception
+ {
+ //***********************************************************************************************
+ title("resources Instantiate()");
+ location = new String[]{"testdomain"};
+ mbean = _registry.instantiateMBean("resources", location, null, _configContext);
+
+ //***********************************************************************************************
+ title("resources-> getCustomResource()");
+ retObject = mbean.invoke("getCustomResource", null, null); //new Object[]{}, new String[]{});
+ printObj("Returned object:", " ", retObject);
+
+ //***********************************************************************************************
+ title("resources-> createCustomResource(testJndiName2/testResType2/testFactoryClass2)");
+ attrs = new AttributeList();
+ attrs.add(new Attribute("jndi_name", "testJndiName2"));
+ 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}, 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[]{});
+ printObj("Returned object:", " ", retObject);
+
+ //***********************************************************************************************
+ title("custom-resource-> Instantiate(testJndiName2)");
+ 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);
+ 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);
+ 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);
+ 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);
+ //***********************************************************************************************
+ 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);
+
+ }
+ public void testDottedNamesProducers() throws Exception
+ {
+ }
+ public void testDefaultValues() throws Exception
+ {
+ //***********************************************************************************************
+ title("Domain MBean Instantiate()");
+ location = new String[]{"testdomain"};
+ 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");
+ retObject = mbean.invoke("getDefaultAttributeValues", new Object[]{"http-listener", null}, new String[]{"java.lang.String", (new String[0]).getClass().getName()});
+ printObj("Returned object:", " ", retObject);
+ title("getDefaultAttributeValues('ejb-container', null) test");
+ retObject = mbean.invoke("getDefaultAttributeValues", new Object[]{"ejb-container", null}, new String[]{"java.lang.String", (new String[0]).getClass().getName()});
+ printObj("Returned object:", " ", retObject);
+ */
+ }
+ public void testMBeanArrayAttrs() throws Exception
+ {
+ //***********************************************************************************************
+ title("thread-pools Instantiate()");
+ location = new String[]{"testdomain", "server-config"};
+ mbean = _registry.instantiateMBean("thread-pools", location, null, _configContext);
+ printObj("Returned object:"," ",mbean);
+ title("thread-pools-> createThreadPool");
+ attrs = new AttributeList();
+ attrs.add(new Attribute("thread_pool_id", "mytestThreadPool"));
+ attrs.add(new Attribute("min_thread_pool_size", "100"));
+ attrs.add(new Attribute("max_thread_pool_size", "200"));
+ attrs.add(new Attribute("num_work_queues", "12"));
+ attrs.add(new Attribute("idle_thread_timeout_in_seconds", "50"));
+ printObj("Input Attributes:", " ", attrs);
+ 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
new file mode 100644
index 0000000..50074c0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/build.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="ConfigViewer" default="default" basedir=".">
+ <description>Builds, tests, and runs the project ConfigViewer.</description>
+ <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:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ 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:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -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
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="ConfigViewer-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </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
+ properties which you can use, check the target you are overriding in the
+ 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
new file mode 100644
index 0000000..3331502
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/build-impl.xml
@@ -0,0 +1,559 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+-->
+<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
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" includes="@{includes}"/>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="stopclassname" default=""/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=none"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target name="-pre-pre-jar" depends="init">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert property="jar.classpath" pathsep=" ">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+ <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target name="run" depends="init,compile" description="Run a main class.">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="run-single" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee" depends="init,compile">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+ <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target name="-javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <j2seproject3:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <customize>
+ <arg line="${test.class}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target name="run-applet" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/genfiles.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/genfiles.properties
new file mode 100644
index 0000000..362f80e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/genfiles.properties
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+build.xml.data.CRC32=3f6010b2
+build.xml.script.CRC32=5254f966
+build.xml.stylesheet.CRC32=d5b6853a
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=3f6010b2
+nbproject/build-impl.xml.script.CRC32=48819e92
+nbproject/build-impl.xml.stylesheet.CRC32=99b91518
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/project.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/project.properties
new file mode 100644
index 0000000..ac25acf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/project.properties
@@ -0,0 +1,80 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+application.args=
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/ConfigViewer.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+file.reference.appserv-admin.jar=../../gfroot/publish/glassfish/lib/appserv-admin.jar
+file.reference.appserv-rt.jar=../../gfroot/publish/glassfish/lib/appserv-rt.jar
+file.reference.appserv-se.jar=../../gfroot/publish/glassfish/lib/appserv-se.jar
+jar.compress=false
+javac.classpath=\
+ ${libs.swing-layout.classpath}:\
+ ${file.reference.appserv-se.jar}:\
+ ${file.reference.appserv-rt.jar}:\
+ ${file.reference.appserv-admin.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=NodeViewFrame
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${file.reference.appserv-rt.jar}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+src.dir=src
+test.src.dir=test
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/project.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/project.xml
new file mode 100644
index 0000000..59e18f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/project.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>ConfigViewer</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ </configuration>
+</project>
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
new file mode 100644
index 0000000..9dda4a1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/DottedNameInfo.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * DottedNameInfo.java
+ *
+ * Created on April 21, 2006, 1:54 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+/**
+ *
+ * @author kravtch
+ */
+public class DottedNameInfo
+{
+ 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+"."))
+ return _name.substring(_parent.length()+1);
+ return _name;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.form b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.form
new file mode 100644
index 0000000..b3f5c5c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.form
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="locationByPlatform" type="boolean" value="true"/>
+ <Property name="modal" type="boolean" value="true"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane2" alignment="0" pref="408" max="32767" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jAddButton" linkSize="2" min="-2" pref="82" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
+ <Component id="jRemoveButton" linkSize="2" min="-2" pref="89" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
+ <Component id="jOkButton" linkSize="2" min="-2" pref="71" max="-2" attributes="0"/>
+ <EmptySpace pref="19" max="32767" attributes="1"/>
+ <Component id="jCancelButton" linkSize="2" min="-2" pref="71" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
+ <Component id="jScrollPane2" min="-2" pref="177" max="-2" attributes="2"/>
+ <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jOkButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
+ <Component id="jCancelButton" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="jRemoveButton" min="-2" pref="23" max="-2" attributes="0"/>
+ <Component id="jAddButton" min="-2" pref="23" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="jOkButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Save"/>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[51, 23]"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jOkButtonActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jCancelButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Cancel"/>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[51, 23]"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCancelButtonActionPerformed"/>
+ </Events>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane2">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="jArrayTable">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="cc" green="ff" red="ff" type="rgb"/>
+ </Property>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="4" rowCount="4">
+ <Column editable="true" title="Title 1" type="java.lang.Object"/>
+ <Column editable="true" title="Title 2" type="java.lang.Object"/>
+ <Column editable="true" title="Title 3" type="java.lang.Object"/>
+ <Column editable="true" title="Title 4" type="java.lang.Object"/>
+ </Table>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JButton" name="jAddButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Add"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jAddButtonActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jRemoveButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Remove"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRemoveButtonActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+</Form>
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
new file mode 100644
index 0000000..321de37
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.java
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import javax.swing.DefaultListModel;
+/*
+ * JSetArrayDialog.java
+ *
+ * Created on April 28, 2006, 6:34 PM
+ */
+
+/**
+ *
+ * @author kravtch
+ */
+import javax.swing.*;
+import javax.swing.table.*;
+import java.util.ArrayList;
+import java.util.Vector;
+
+public class JSetArrayDialog extends javax.swing.JDialog {
+ ArrayList _values;
+ String _attrName;
+ NameHelper _nameHelper;
+ DottedNameInfo _dottedNameInfo;
+ /** Creates new form JSetArrayDialog */
+ public JSetArrayDialog(java.awt.Frame parent, boolean modal,
+ NameHelper nameHelper, DottedNameInfo dottedNameInfo,
+ String attrName, Object[] values) {
+ super(parent, modal);
+ initComponents();
+ this.setTitle(attrName + " Editor");
+ _nameHelper = nameHelper;
+ _dottedNameInfo = dottedNameInfo;
+ _attrName = attrName;
+ _values = new ArrayList();
+ for(Object value:values)
+ {
+ _values.add(value);
+ }
+ 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
+ * always regenerated by the Form Editor.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ jOkButton = new javax.swing.JButton();
+ jCancelButton = new javax.swing.JButton();
+ jScrollPane2 = new javax.swing.JScrollPane();
+ jArrayTable = new javax.swing.JTable();
+ jAddButton = new javax.swing.JButton();
+ jRemoveButton = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setLocationByPlatform(true);
+ setModal(true);
+ jOkButton.setText("Save");
+ jOkButton.setPreferredSize(new java.awt.Dimension(51, 23));
+ jOkButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jOkButtonActionPerformed(evt);
+ }
+ });
+
+ jCancelButton.setText("Cancel");
+ jCancelButton.setPreferredSize(new java.awt.Dimension(51, 23));
+ jCancelButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jCancelButtonActionPerformed(evt);
+ }
+ });
+
+ jArrayTable.setBackground(new java.awt.Color(255, 255, 204));
+ jArrayTable.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null}
+ },
+ new String [] {
+ "Title 1", "Title 2", "Title 3", "Title 4"
+ }
+ ));
+ jScrollPane2.setViewportView(jArrayTable);
+
+ jAddButton.setText("Add");
+ jAddButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jAddButtonActionPerformed(evt);
+ }
+ });
+
+ jRemoveButton.setText("Remove");
+ jRemoveButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jRemoveButtonActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE)
+ .add(layout.createSequentialGroup()
+ .add(jAddButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(18, 18, 18)
+ .add(jRemoveButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 89, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(15, 15, 15)
+ .add(jOkButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 19, Short.MAX_VALUE)
+ .add(jCancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .addContainerGap())
+ );
+
+ layout.linkSize(new java.awt.Component[] {jAddButton, jCancelButton, jOkButton, jRemoveButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
+
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(20, 20, 20)
+ .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 177, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(20, 20, 20)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jOkButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(jCancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(jRemoveButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(jAddButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void jOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jOkButtonActionPerformed
+ if(jArrayTable.isEditing()) {
+ 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()];
+ for(int i=0; i<vectors.size(); i++)
+ {
+ strs[i] = (String)(vectors.elementAt(i).elementAt(0));
+ }
+ try {
+ _nameHelper.setValue(_dottedNameInfo,
+ (String)_attrName,
+ (Object)strs,
+ false);
+ } catch (Exception e) {
+ e.printStackTrace();
+ JOptionPane.showMessageDialog(this, "Exception:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
+// fillArrayTable();
+ }
+ }//GEN-LAST:event_jOkButtonActionPerformed
+
+ private void jCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCancelButtonActionPerformed
+ try {
+ this.dispose();
+ } catch (Throwable t)
+ {
+ }
+ }//GEN-LAST:event_jCancelButtonActionPerformed
+
+ private void jRemoveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRemoveButtonActionPerformed
+ int iSelected = jArrayTable.getSelectedRow();
+ int nSelected = jArrayTable.getSelectedRowCount();
+ for(int i=0; i<nSelected; i++)
+ {
+ ((DefaultTableModel)jArrayTable.getModel()).removeRow(iSelected);
+ }
+// fillArrayTable();
+ jArrayTable.changeSelection(iSelected, iSelected, false, false);
+// jArrayTable.getSelectionModel().setSelectionInterval(iSelected,iSelected);
+ }//GEN-LAST:event_jRemoveButtonActionPerformed
+
+ private void jAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jAddButtonActionPerformed
+ _values.add("");
+// fillArrayTable();
+ DefaultTableModel model = ((DefaultTableModel)jArrayTable.getModel());
+ int nRows = model.getRowCount();
+ model.addRow(new Object[]{""});
+//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(),
+ true,
+ null, null,
+ "test",null).setVisible(true);
+ }
+ });
+ }
+
+ private void fillArrayTable()
+ {
+ fillArrayTable(jArrayTable, _attrName, _values);
+ }
+
+ private void fillArrayTable(JTable table, String header, ArrayList lines)
+ {
+ table.removeAll();
+ DefaultTableModel model = new DefaultTableModel();
+ model.addColumn(header);
+ if(lines!=null)
+ {
+ for (Object line: lines)
+ {
+ model.addRow(new Object[]{line});
+ }
+ }
+ table.setModel(model);
+ table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
+ }
+
+
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jAddButton;
+ private javax.swing.JTable jArrayTable;
+ private javax.swing.JButton jCancelButton;
+ private javax.swing.JButton jOkButton;
+ 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
new file mode 100644
index 0000000..fbafc2d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableEditor.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * MyTableEditor.java
+ *
+ * Created on April 28, 2006, 5:44 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+import javax.swing.JTextField;
+import javax.swing.event.*;
+import javax.swing.table.*;
+import javax.swing.*;
+
+/**
+ *
+ * @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) {
+ 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
new file mode 100644
index 0000000..66eb7a5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableListener.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * MyTableListener.java
+ *
+ * Created on April 25, 2006, 1:40 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+import javax.swing.event.*;
+import javax.swing.table.*;
+/**author
+ *
+ * @author kravtch
+ */
+public class MyTableListener implements TableModelListener
+{
+ NodeViewFrame _frame;
+ boolean _bProperty;
+ /** Creates a new instance of MyTableListener */
+ public MyTableListener(NodeViewFrame frame, boolean bProperty)
+ {
+ _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
new file mode 100644
index 0000000..862c461
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NameHelper.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * NameHelper.java
+ *
+ * Created on April 21, 2006, 12:11 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+import com.sun.enterprise.admin.config.OfflineConfigMgr;
+import javax.swing.tree.DefaultMutableTreeNode;
+import java.util.ArrayList;
+import javax.management.AttributeList;
+import javax.management.Attribute;
+
+/**
+ *
+ * @author kravtch
+ */
+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)
+ throws Exception
+ {
+ fillAddNodeChildren(root, "");
+ }
+
+ void fillAddNodeChildren(DefaultMutableTreeNode parentNode,
+ String parentDottedName)
+ throws Exception
+ {
+ ArrayList childList = _mgr.getListDottedNames(parentDottedName);
+ for (int i=0; i<childList.size(); i++)
+ {
+ String childName = (String)childList.get(i);
+ DefaultMutableTreeNode childNode =
+ new DefaultMutableTreeNode(new DottedNameInfo(childName,parentDottedName));
+ fillAddNodeChildren(childNode, childName);
+ parentNode.add(childNode);
+ }
+ }
+
+
+ Object[][] getAttributesForNodeInPrintForm(DefaultMutableTreeNode node, boolean bProperties) throws Exception
+ {
+ if(_mgr==null)
+ return null;
+ if(!(node.getUserObject() instanceof DottedNameInfo))
+ return null;
+ DottedNameInfo info = (DottedNameInfo)node.getUserObject();
+ String name = info._name; //_mgr.removeNamePrefixes(info._name);
+ AttributeList list = _mgr.getAttributes(name+(bProperties?".property.*":".*"));
+ if(list==null)
+ return null;
+ Object[][] arr = new Object[list.size()][2];
+ int iOffset = name.length()+1;
+ if(bProperties)
+ iOffset += "property.".length();
+
+ for (int i=0; i<list.size(); i++)
+ {
+ Attribute attr = (Attribute)list.get(i);
+ String attrName = attr.getName();
+ arr[i][0] = attrName.substring(iOffset);
+ Object value = null;
+ try {
+ value = attr.getValue();
+ } catch (Exception e) {
+ value = e;
+ }
+ arr[i][1] = attr.getValue();
+ }
+ return arr;
+ }
+ void setValue(DefaultMutableTreeNode node, String name, Object value, boolean bProperties)
+ throws Exception
+ {
+ DottedNameInfo info = (DottedNameInfo)node.getUserObject();
+ setValue(info, name, value, bProperties);
+ }
+
+ void setValue(DottedNameInfo info, String name, Object value, boolean bProperties)
+ throws Exception
+ {
+ String dottedName = info._name; //_mgr.removeNamePrefixes(info._name);
+ name = name.replaceAll("\\.","\\\\.");
+ _mgr.setAttribute(dottedName+ (bProperties?".property.":".") + name, value);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.form b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.form
new file mode 100644
index 0000000..5a519e5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.form
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" max="-2" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Group type="103" groupAlignment="1" max="-2" attributes="0">
+ <Component id="jLabel1" alignment="0" max="32767" attributes="1"/>
+ <Component id="jLabel2" alignment="0" min="-2" pref="43" max="-2" attributes="1"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jPropValue" pref="206" max="32767" attributes="1"/>
+ <Component id="jPropName" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="57" max="-2" attributes="0"/>
+ <Component id="jOkButton" linkSize="1" min="-2" pref="45" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
+ <Component id="jCancelButton" linkSize="1" min="-2" pref="65" max="-2" attributes="0"/>
+ <EmptySpace pref="24" max="32767" attributes="1"/>
+ </Group>
+ </Group>
+ <EmptySpace pref="31" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jPropName" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jPropValue" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jOkButton" alignment="1" min="-2" max="-2" attributes="0"/>
+ <Component id="jCancelButton" alignment="1" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Name:"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Value:"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="jPropName">
+ </Component>
+ <Component class="javax.swing.JTextField" name="jPropValue">
+ </Component>
+ <Component class="javax.swing.JButton" name="jOkButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Ok"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jOkButtonActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jCancelButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Cancel"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCancelButtonActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+</Form>
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
new file mode 100644
index 0000000..5b42c07
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * NewPropDialog.java
+ *
+ * Created on May 2, 2006, 5:16 PM
+ */
+
+/**
+ *
+ * @author kravtch
+ */
+public class NewPropDialog extends javax.swing.JDialog {
+ String _name = null;
+ String _value = null;
+ public String[] getNameAndValue()
+ {
+ return new String[]{_name, _value};
+ }
+
+ /** Creates new form NewPropDialog */
+ public NewPropDialog(java.awt.Frame parent, boolean modal) {
+ super(parent, modal);
+ initComponents();
+ 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
+ * always regenerated by the Form Editor.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ jLabel1 = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
+ jPropName = new javax.swing.JTextField();
+ jPropValue = new javax.swing.JTextField();
+ jOkButton = new javax.swing.JButton();
+ jCancelButton = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ jLabel1.setText("Name:");
+
+ jLabel2.setText("Value:");
+
+ jOkButton.setText("Ok");
+ jOkButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jOkButtonActionPerformed(evt);
+ }
+ });
+
+ jCancelButton.setText("Cancel");
+ jCancelButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jCancelButtonActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(32, 32, 32)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
+ .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 43, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jPropValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)
+ .add(jPropName)))
+ .add(layout.createSequentialGroup()
+ .add(57, 57, 57)
+ .add(jOkButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(42, 42, 42)
+ .add(jCancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 24, Short.MAX_VALUE)))
+ .addContainerGap(31, Short.MAX_VALUE))
+ );
+
+ layout.linkSize(new java.awt.Component[] {jCancelButton, jOkButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
+
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(20, 20, 20)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel1)
+ .add(jPropName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(16, 16, 16)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel2)
+ .add(jPropValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(24, 24, 24)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jOkButton)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jCancelButton))
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void jCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCancelButtonActionPerformed
+ this.dispose();
+ }//GEN-LAST:event_jCancelButtonActionPerformed
+
+ private void jOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jOkButtonActionPerformed
+ _name = jPropName.getText();
+ _value = jPropValue.getText();
+ this.dispose();
+ }//GEN-LAST:event_jOkButtonActionPerformed
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ java.awt.EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ new NewPropDialog(new javax.swing.JFrame(), true).setVisible(true);
+ }
+ });
+ }
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jCancelButton;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JButton jOkButton;
+ 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.form b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.form
new file mode 100644
index 0000000..02ad286
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.form
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+ <NonVisualComponents>
+ <Component class="javax.swing.ButtonGroup" name="buttonGroup1">
+ </Component>
+ </NonVisualComponents>
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="GlassFish Configuration Viewer"/>
+ <Property name="focusable" type="boolean" value="false"/>
+ <Property name="locationByPlatform" type="boolean" value="true"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jLabel2" pref="68" max="32767" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="jTextField1" pref="403" max="32767" attributes="0"/>
+ <EmptySpace min="6" pref="6" max="-2" attributes="0"/>
+ <Component id="jButton1" min="-2" pref="18" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="jButton2" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jScrollPane2" min="-2" pref="243" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane4" alignment="0" pref="316" max="32767" attributes="2"/>
+ <Component id="jScrollPane5" alignment="0" pref="316" max="32767" attributes="2"/>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jAddPropery" min="-2" pref="125" max="-2" attributes="0"/>
+ <EmptySpace pref="66" max="32767" attributes="0"/>
+ <Component id="jDeletePropery" min="-2" pref="125" max="-2" attributes="0"/>
+ </Group>
+ <Component id="jLabel4" alignment="0" pref="316" max="32767" attributes="0"/>
+ <Component id="jLabel3" alignment="1" pref="316" max="32767" attributes="0"/>
+ <Component id="jLabel1" alignment="0" pref="316" max="32767" attributes="0"/>
+ <Component id="jDottedName" alignment="0" pref="316" max="32767" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" max="-2" attributes="0">
+ <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" pref="25" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="1" attributes="0">
+ <Group type="102" attributes="1">
+ <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
+ <Component id="jDottedName" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="10" max="32767" attributes="0"/>
+ <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jScrollPane4" min="-2" pref="222" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jScrollPane5" min="-2" pref="99" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jAddPropery" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jDeletePropery" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <Component id="jScrollPane2" min="-2" pref="460" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Config file:"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="jTextField1">
+ <Properties>
+ <Property name="horizontalAlignment" type="int" value="2"/>
+ <Property name="text" type="java.lang.String" value="c:\gfroot\glassfish\appserv-tests\devtests\admin\offlineconfig\testfiles\domain.xml "/>
+ </Properties>
+ <Events>
+ <EventHandler event="inputMethodTextChanged" listener="java.awt.event.InputMethodListener" parameters="java.awt.event.InputMethodEvent" handler="jTextField1InputMethodTextChanged"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="jButton1"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Open"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
+ </Events>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane2">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTree" name="jTree1">
+ <Properties>
+ <Property name="editable" type="boolean" value="true"/>
+ </Properties>
+ <Events>
+ <EventHandler event="valueChanged" listener="javax.swing.event.TreeSelectionListener" parameters="javax.swing.event.TreeSelectionEvent" handler="jTree1ValueChanged"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JLabel" name="jLabel3">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Tahoma" size="18" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Attributes:"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel4">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Tahoma" size="18" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Properties:"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane4">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="jAttrsTable">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="99" green="ff" red="ff" type="rgb"/>
+ </Property>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="4" rowCount="4">
+ <Column editable="true" title="Title 1" type="java.lang.Object"/>
+ <Column editable="true" title="Title 2" type="java.lang.Object"/>
+ <Column editable="true" title="Title 3" type="java.lang.Object"/>
+ <Column editable="true" title="Title 4" type="java.lang.Object"/>
+ </Table>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane5">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="jPropsTable">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="99" green="ff" red="ff" type="rgb"/>
+ </Property>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="4" rowCount="4">
+ <Column editable="true" title="Title 1" type="java.lang.Object"/>
+ <Column editable="true" title="Title 2" type="java.lang.Object"/>
+ <Column editable="true" title="Title 3" type="java.lang.Object"/>
+ <Column editable="true" title="Title 4" type="java.lang.Object"/>
+ </Table>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JButton" name="jAddPropery">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Add Property"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jAddProperyActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="jDeletePropery">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Delete Property"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jDeleteProperyActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JTextField" name="jDottedName">
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Dotted Name:"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+</Form>
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
new file mode 100644
index 0000000..ea31e42
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.java
@@ -0,0 +1,501 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import javax.swing.JOptionPane;
+import javax.swing.plaf.FileChooserUI;
+/*
+ * NodeViewFrame.java
+ *
+ * Created on April 17, 2006, 8:35 PM
+ */
+
+/**
+ *
+ * @author Alex
+ */
+import javax.swing.*;
+import javax.swing.table.*;
+import javax.swing.tree.*;
+import javax.swing.event.*;
+import java.awt.Component;
+import java.io.File;
+import java.util.Enumeration;
+import javax.management.AttributeList;
+import javax.management.Attribute;
+
+public class NodeViewFrame extends javax.swing.JFrame implements ListSelectionListener{
+ String _fileName;
+ String _current;
+ NameHelper _nameHelper;
+
+ /** Creates new form NodeViewFrame */
+ public NodeViewFrame() {
+ initComponents();
+ DefaultTreeModel model = (DefaultTreeModel)((JTree)jTree1).getModel();
+ DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot();
+ root.removeAllChildren();
+ 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
+ * always regenerated by the Form Editor.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ buttonGroup1 = new javax.swing.ButtonGroup();
+ jLabel2 = new javax.swing.JLabel();
+ jTextField1 = new javax.swing.JTextField();
+ jButton1 = new javax.swing.JButton();
+ jButton2 = new javax.swing.JButton();
+ jScrollPane2 = new javax.swing.JScrollPane();
+ jTree1 = new javax.swing.JTree();
+ jLabel3 = new javax.swing.JLabel();
+ jLabel4 = new javax.swing.JLabel();
+ jScrollPane4 = new javax.swing.JScrollPane();
+ jAttrsTable = new javax.swing.JTable();
+ jScrollPane5 = new javax.swing.JScrollPane();
+ jPropsTable = new javax.swing.JTable();
+ jAddPropery = new javax.swing.JButton();
+ jDeletePropery = new javax.swing.JButton();
+ jDottedName = new javax.swing.JTextField();
+ jLabel1 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setTitle("GlassFish Configuration Viewer");
+ setFocusable(false);
+ setLocationByPlatform(true);
+ jLabel2.setText("Config file:");
+
+ jTextField1.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ jTextField1.setText("c:\\gfroot\\glassfish\\appserv-tests\\devtests\\admin\\offlineconfig\\testfiles\\domain.xml ");
+ jTextField1.addInputMethodListener(new java.awt.event.InputMethodListener() {
+ public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
+ }
+ public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
+ jTextField1InputMethodTextChanged(evt);
+ }
+ });
+
+ jButton1.setText("jButton1");
+ jButton1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton1ActionPerformed(evt);
+ }
+ });
+
+ jButton2.setText("Open");
+ jButton2.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton2ActionPerformed(evt);
+ }
+ });
+
+ jTree1.setEditable(true);
+ jTree1.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
+ public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
+ jTree1ValueChanged(evt);
+ }
+ });
+
+ jScrollPane2.setViewportView(jTree1);
+
+ jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18));
+ jLabel3.setText("Attributes:");
+
+ jLabel4.setFont(new java.awt.Font("Tahoma", 0, 18));
+ jLabel4.setText("Properties:");
+
+ jAttrsTable.setBackground(new java.awt.Color(255, 255, 153));
+ jAttrsTable.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null}
+ },
+ new String [] {
+ "Title 1", "Title 2", "Title 3", "Title 4"
+ }
+ ));
+ jScrollPane4.setViewportView(jAttrsTable);
+
+ jPropsTable.setBackground(new java.awt.Color(255, 255, 153));
+ jPropsTable.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null}
+ },
+ new String [] {
+ "Title 1", "Title 2", "Title 3", "Title 4"
+ }
+ ));
+ jScrollPane5.setViewportView(jPropsTable);
+
+ jAddPropery.setText("Add Property");
+ jAddPropery.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jAddProperyActionPerformed(evt);
+ }
+ });
+
+ jDeletePropery.setText("Delete Property");
+ jDeletePropery.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jDeleteProperyActionPerformed(evt);
+ }
+ });
+
+ jLabel1.setText("Dotted Name:");
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)
+ .add(6, 6, 6)
+ .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jButton2)
+ .add(11, 11, 11))
+ .add(layout.createSequentialGroup()
+ .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 243, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jScrollPane4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
+ .add(jScrollPane5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
+ .add(layout.createSequentialGroup()
+ .add(jAddPropery, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 125, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 66, Short.MAX_VALUE)
+ .add(jDeletePropery, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 125, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(jLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
+ .add(jDottedName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE))
+ .addContainerGap())))
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE, false)
+ .add(jLabel2)
+ .add(jButton2)
+ .add(jButton1)
+ .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(25, 25, 25)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(layout.createSequentialGroup()
+ .add(jLabel1)
+ .add(5, 5, 5)
+ .add(jDottedName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 10, Short.MAX_VALUE)
+ .add(jLabel3)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPane4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 222, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jLabel4)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPane5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 99, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jAddPropery)
+ .add(jDeletePropery)))
+ .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 460, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap())
+ );
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void jDeleteProperyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jDeleteProperyActionPerformed
+ int iSelected = jPropsTable.getSelectedRow();
+ int nSelected = jPropsTable.getSelectedRowCount();
+ for(int i=iSelected; i<iSelected+nSelected; i++)
+ {
+ Object name = ((DefaultTableModel)jPropsTable.getModel()).getValueAt(i, 0);
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ jTree1.getLastSelectedPathComponent();
+ if(!(node.getUserObject() instanceof DottedNameInfo))
+ return;
+ try {
+ _nameHelper.setValue(node, (String)name, null, true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ JOptionPane.showMessageDialog(this, "Exception:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
+ setTablesForCurrentNode();
+ }
+
+ }
+// fillArrayTable();
+ setTablesForCurrentNode();
+ jPropsTable.changeSelection(iSelected, iSelected, false, false);
+ }//GEN-LAST:event_jDeleteProperyActionPerformed
+
+ private void jAddProperyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jAddProperyActionPerformed
+ //show add prop dialog here
+ NewPropDialog dialog = new NewPropDialog(this, true);
+ dialog.setVisible(true);
+ String[] pair = dialog.getNameAndValue();
+ if(pair[0]!=null)
+ ((DefaultTableModel)jPropsTable.getModel()).addRow(pair);
+ }//GEN-LAST:event_jAddProperyActionPerformed
+
+ private void jTextField1InputMethodTextChanged(java.awt.event.InputMethodEvent evt)//GEN-FIRST:event_jTextField1InputMethodTextChanged
+ {//GEN-HEADEREND:event_jTextField1InputMethodTextChanged
+ jButton2.setEnabled((new File(jTextField1.getText())).exists());
+ }//GEN-LAST:event_jTextField1InputMethodTextChanged
+
+ private void setTablesForCurrentNode()
+ {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ jTree1.getLastSelectedPathComponent();
+ if(!(node.getUserObject() instanceof DottedNameInfo))
+ {
+ jDottedName.setText("");
+ }
+ else
+ {
+ jDottedName.setText(((DottedNameInfo)node.getUserObject())._name);
+ }
+ Object[][] lines = null;
+ //ATTRS
+ try {
+ lines = _nameHelper.getAttributesForNodeInPrintForm(node, false);
+ } catch (Exception e) {
+ e.printStackTrace();
+ JOptionPane.showMessageDialog(this, "Could not get attributes:\nException:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
+ }
+ fillTable(jAttrsTable, new String[]{"Attribute","Value"}, lines);
+ jAttrsTable.getModel().addTableModelListener(new MyTableListener(this, false));
+ //PROPERTIES
+ try {
+ lines = _nameHelper.getAttributesForNodeInPrintForm(node, true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ JOptionPane.showMessageDialog(this, "Could not get properties:\nException:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
+ }
+ fillTable(jPropsTable, new String[]{"Property","Value"}, lines);
+ 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
+ setTablesForCurrentNode();
+ }//GEN-LAST:event_jTree1ValueChanged
+
+
+ public void tableChanged(TableModelEvent event, boolean bProperty)
+ {
+ if(event.getType()==event.DELETE)
+ return;
+ int row = event.getFirstRow();
+ int column = 1;//event.getColumn();
+ 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))
+ return;
+ if("".equals(data))
+ data = "()"; //special "empty property" value
+ try {
+ _nameHelper.setValue(node, (String)name, data, bProperty);
+ } catch (Exception e) {
+ e.printStackTrace();
+ JOptionPane.showMessageDialog(this, "Exception:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
+ setTablesForCurrentNode();
+ }
+
+ }
+
+ private void initTables()
+ {
+ fillTable(jAttrsTable, new String[]{"Attribute","Value"}, null);
+ fillTable(jPropsTable, new String[]{"Property","Value"}, null);
+ jDeletePropery.setEnabled(false);
+
+ }
+
+ private void fillTable(JTable table, String[] header, Object[][] lines)
+ {
+ String[] longValues = {header[0], header[1]};
+ table.removeAll();
+ MyTableModel model = new MyTableModel(this);
+ model.addColumn(header[0]);
+ model.addColumn(header[1]);
+ if(lines!=null)
+ {
+ for (int i=0; i<lines.length; i++)
+ {
+ model.addRow(lines[i]);
+
+ if(lines[i][0].toString().length()>longValues[0].length())
+ longValues[0] = lines[i][0].toString();
+ if(lines[i][1]!=null && lines[i][1].toString().length()>longValues[1].length())
+ longValues[1] = lines[i][1].toString();
+ }
+ }
+ table.setModel(model);
+ Object obj0 = table.getDefaultEditor(table.getColumnClass(1));
+ for (int i = 0; i < 2; i++)
+ {
+ TableColumn column = table.getColumnModel().getColumn(i);
+
+ Component comp = table.getDefaultRenderer(model.getColumnClass(i)).
+ getTableCellRendererComponent(
+ table, longValues[i],
+ false, false, 0, i);
+ 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))
+ {
+ case JFileChooser.APPROVE_OPTION:
+ jTextField1.setText(chooser.getSelectedFile().getPath());
+ break;
+ }
+ }//GEN-LAST:event_jButton1ActionPerformed
+
+ private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
+ openNewConfig(jTextField1.getText());
+ }//GEN-LAST:event_jButton2ActionPerformed
+
+ private void openNewConfig(String fileName)
+ {
+ _fileName = fileName;
+ jTextField1.setText(_fileName);
+ setCurrentDottedName("");
+ }
+ private void setCurrentDottedName(String current)
+ {
+ _current = current;
+ DefaultTreeModel model = (DefaultTreeModel)((JTree)jTree1).getModel();
+ DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot();
+ root.removeAllChildren();
+ root.setUserObject("GlassFish Configuration");
+
+ try {
+ _nameHelper = new NameHelper(_fileName);
+ _nameHelper.fillDottedNamesTree(root);
+ } catch (Exception e) {
+ 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
+ * editable.
+ */
+ JFrame parentFrame;
+ public MyTableModel(JFrame frame)
+ {
+ super();
+ parentFrame = frame;
+ }
+ public boolean isCellEditable(int row, int col) {
+ //Note that the data/cell address is constant,
+ //no matter where the cell appears onscreen.
+ Object obj = this.getValueAt(row, col);
+ if (col < 1 || obj==null)
+ return false;
+
+ if((obj instanceof Object[] )) {
+ {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ jTree1.getLastSelectedPathComponent();
+ if(!(node.getUserObject() instanceof DottedNameInfo))
+ return false;
+ //show dialog here
+ JSetArrayDialog dialog = new JSetArrayDialog(
+ parentFrame, true,
+ _nameHelper,
+ (DottedNameInfo)node.getUserObject(),
+ (String)this.getValueAt(row, col-1),
+ (Object[])obj);
+ dialog.setVisible(true);
+ return false;
+ }
+ } else {
+ return true;
+ }
+ }
+
+ }
+
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ java.awt.EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ new NodeViewFrame().setVisible(true);
+ }
+ });
+ }
+ 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;
+ private javax.swing.JTable jAttrsTable;
+ private javax.swing.JButton jButton1;
+ private javax.swing.JButton jButton2;
+ private javax.swing.JButton jDeletePropery;
+ private javax.swing.JTextField jDottedName;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JTable jPropsTable;
+ private javax.swing.JScrollPane jScrollPane2;
+ private javax.swing.JScrollPane jScrollPane4;
+ private javax.swing.JScrollPane jScrollPane5;
+ 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.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.properties
new file mode 100644
index 0000000..ccd62fb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.properties
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+###########################################################
+# Compilation Flags #
+###########################################################
+javac.debug=on
+javac.optimize=off
+javac.deprecation=off
+javac.source=1.5
+#java.obj.dir=JDK1.4_DBG.OBJ
+
+### Component Properties ###
+testsrc.dir=src
+component.publish.home=build
+appserv-rt.jar=${env.S1AS_HOME}/lib/appserv-rt.jar
+appserv-admin.jar=${env.S1AS_HOME}/lib/appserv-admin.jar
+appserv-admin-ee.jar=${env.S1AS_HOME}/lib/appserv-admin-ee.jar
+appserv-se.jar=${env.S1AS_HOME}/lib/appserv-se.jar
+appserv-deployment-client.jar=${env.S1AS_HOME}/lib/appserv-deployment-client.jar
+imqjmsra.jar=${env.S1AS_HOME}/lib/install/applications/jmsra/imqjmsra.jar
+j2ee.jar=${env.S1AS_HOME}/lib/j2ee.jar
+junit.jar=${env.APS_HOME}/lib/junit.jar
+testng.jar=${env.APS_HOME}/lib/testng.jar
+schema2beans.jar=/export/ias/publish/JDK1.4_DBG.OBJ/netbeans/modules/schema2beans.jar
+
+
+
+component.name=offline-config-devtest
+tests.publish.home=build
+
+testfiles.dir = testfiles
+component.tests.classes.dir=${tests.publish.home}/internal/testclasses
+tests.workfiles.dir = ${component.tests.classes.dir}/asadmintest
+
+
+testconfigbeans.jar=${tests.workfiles.dir}/testconfigbeans.jar
+
+
+# ----- Commons Beanutils, version 1.4 or later -----
+commons-beanutils.jar=${commons-beanutils.publish.home}/commons-beanutils.jar
+# ----- Commons Collections, version 2.0 or later -----
+commons-collections.jar=${commons-collections.publish.home}/commons-collections.jar
+# ----- Commons Digester, version 20020820 or later -----
+commons-digester.jar=${commons-digester.publish.home}/commons-digester.jar
+# ----- Commons Logging, version 1.0.1 or later -----
+commons-logging-api.jar=${commons-logging.publish.home}/commons-logging-api.jar
+commons-logging.jar=${commons-logging.publish.home}/commons-logging.jar
+# ----- Commons Modeler, version 1.0 or later -----
+commons-modeler.jar=${commons-modeler.publish.home}/commons-modeler.jar
+
+package=com.sun.enterprise.admin
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
new file mode 100644
index 0000000..eefcc52
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="OfflineConfig admin devtests" default="all" basedir=".">
+
+<!-- ========== Initialize Properties =================================== -->
+
+ <property environment="env"/>
+ <property file="./build.properties"/>
+
+ <path id="test.compile.classpath">
+ <pathelement location="${appserv-se.jar}"/>
+ <pathelement location="${appserv-rt.jar}"/>
+ <pathelement location="${appserv-admin.jar}"/>
+ <pathelement location="${appserv-admin-ee.jar}"/>
+<!--
+ <pathelement location="${appserv-deployment-client.jar}"/>
+ <pathelement location="${imqjmsra.jar}"/>
+ -->
+ <pathelement location="${j2ee.jar}"/>
+ <pathelement location="${junit.jar}"/>
+ <pathelement location="${testng.jar}"/>
+ </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"/>
+-->
+ </path>
+
+
+ <!-- init. Initialization involves creating publishing directories and
+ OS specific targets. -->
+ <target name="init-tests" description="${component.name} initialization">
+ <tstamp>
+ <format property="start.time" pattern="MM/dd/yyyy hh:mm aa"/>
+ </tstamp>
+ <echo message="Building component ${component.name}"/>
+ <mkdir dir="${component.tests.classes.dir}"/>
+ <delete dir="${tests.workfiles.dir}"/>
+ <mkdir dir="${tests.workfiles.dir}"/>
+ <copy todir="${tests.workfiles.dir}">
+ <fileset dir="${testfiles.dir}" includes="*"/>
+ </copy>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="run-tests"
+ description="Build entire component">
+ </target>
+
+ <!-- clean -->
+ <target name="clean">
+ <delete dir="${component.publish.home}"/>
+ </target>
+
+
+<target name="build" depends="init-tests">
+ <echo message="Compiling {component.name}"/>
+ <javac srcdir="${testsrc.dir}"
+ destdir="${component.tests.classes.dir}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true"
+ classpathref="test.compile.classpath">
+ <include name="**/*.java"/>
+ <!-- <include name="**/*Test.java"/>
+ <include name="**/*Tests.java"/> -->
+ </javac>
+
+</target>
+
+
+<target name="run-tests" depends="build">
+ <java fork="true" failonerror="true"
+ classname="com.sun.enterprise.admin.config.OfflineConfigTest" >
+<!-- <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"/>
+ <classpath refid="test.run.classpath"/>
+ </java>
+</target>
+
+<target name="offline-commander" depends="build">
+ <java fork="true" failonerror="true"
+ classname="com.sun.enterprise.admin.config.OfflineCommander" >
+<!-- <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"/>
+
+ <classpath refid="test.run.classpath"/>
+ </java>
+</target>
+
+ <path id="tng-run.cp">
+ <path refid="test.run.classpath"/>
+ <pathelement location="${testng.jar}"/>
+ </path>
+
+ <target name="run-tests-ng"
+ description="run examples with java"
+ depends="build" >
+ <java fork="yes"
+ classpathref="tng-run.cp"
+ classname="org.testng.TestNG" >
+ <arg value="./testng/testng.xml"/>
+ <jvmarg value="-ea"/>
+ </java>
+ </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
new file mode 100755
index 0000000..dbf1221
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/runtest.bat
@@ -0,0 +1,2 @@
+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
new file mode 100644
index 0000000..daaf8ad
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineCommander.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * $Id: OfflineConfigTest.java,v 1.1.1.1 2005/05/28 00:39:19 dpatil Exp $
+ */
+package com.sun.enterprise.admin.config;
+
+import java.lang.reflect.*;
+import java.util.*;
+import java.io.*;
+
+//junit imports
+import junit.framework.*;
+import junit.textui.TestRunner;
+
+//JMX
+import javax.management.DynamicMBean;
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.ObjectName;
+import javax.management.AttributeNotFoundException;
+
+//config imports
+import com.sun.enterprise.config.ConfigFactory;
+import com.sun.enterprise.config.ConfigContext;
+import com.sun.enterprise.admin.config.OfflineConfigMgr;
+
+public class OfflineCommander
+{
+ 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");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ public static void main(String args[]) throws Exception
+ {
+ int length = args.length;
+ if(length<2 ||
+ !args[0].equals("-testpath"))
+ {
+ System.out.println("usage: offlineconfigtest -testpath <path to test directory> [print|create]");
+ System.exit(1);
+ }
+ TEST_DIR = args[1];
+ OfflineCommander commander = new OfflineCommander();
+ System.out.print(">");
+ String cmd = "";
+ int iNext;
+ ArrayList list;
+ AttributeList attrs;
+ while ((iNext = System.in.read())>0)
+ {
+ char ch = (char)iNext;
+ if(ch==13 || ch==10)
+ {//new command
+ if(cmd.equals("q") || cmd.equals("Q"))
+ break;
+
+ try {
+ if(cmd.startsWith("list ") || cmd.equals("list"))
+ {
+ //LIST COMMAND
+ String mask = cmd.equals("list")?"":cmd.substring(4).trim();
+ list = commander._mgr.getListDottedNames(mask);
+ printList(" ", list);
+ }
+ else if(cmd.startsWith("get "))
+ {
+ //GET COMMAND
+ attrs = commander._mgr.getAttributes(cmd.substring(3).trim());
+ printAttributes(" ", attrs);
+ }
+ else if(cmd.startsWith("set "))
+ {
+ //SET COMMAND
+ int eqIdx = cmd.indexOf("=");
+ if(eqIdx<0)
+ {
+ System.out.println("ERROR!");
+ continue;
+ }
+ attrs = commander._mgr.setAttribute(
+ cmd.substring(4, eqIdx).trim(),
+ cmd.substring(eqIdx+1).trim());
+ printAttributes(" ", attrs);
+ }
+ else if(cmd.startsWith("add "))
+ {
+ //add COMMAND
+ String rest = cmd.substring(4).trim();
+ int spaceIdx = rest.indexOf(" ");
+ if(spaceIdx<0)
+ {
+ System.out.println("ERROR!");
+ continue;
+ }
+
+ attrs = commander._mgr.addSubvaluesToArrayAttribute(
+ rest.substring(0, spaceIdx).trim(),
+ rest.substring(spaceIdx).trim().split(","));
+ printAttributes(" ", attrs);
+ }
+ else if(cmd.startsWith("remove "))
+ {
+ //add COMMAND
+ String rest = cmd.substring(7).trim();
+ int spaceIdx = rest.indexOf(" ");
+ if(spaceIdx<0)
+ {
+ System.out.println("ERROR!");
+ continue;
+ }
+
+ attrs = commander._mgr.removeSubvaluesFromArrayAttribute(
+ rest.substring(0, spaceIdx).trim(),
+ rest.substring(spaceIdx).trim().split(","));
+ printAttributes(" ", attrs);
+ }
+ } catch (Exception e)
+ {
+ System.out.println("\n***Exception: "+e.getMessage());
+ }
+ System.out.print("\n>");
+ cmd="";
+ continue;
+ }
+ //System.out.print(ch);
+ cmd = cmd + ch;
+ }
+ System.out.println("\n finished");
+ }
+
+
+
+
+ //******************************************************************
+ //******************HELPERS***************************************
+ //******************************************************************
+ static private void printAttributes(String title, AttributeList attrs)
+ {
+ if(title!=null)
+ System.out.println(title);
+ for(int i=0; i<attrs.size(); i++)
+ {
+ Attribute attr = (Attribute)attrs.get(i);
+ if(attr.getValue() instanceof Object[])
+ {
+ System.out.println(" "+
+ attr.getName() + " = " );
+ Object[] sub_attrs= (Object[])attr.getValue();
+ for(int j=0; j<sub_attrs.length; j++)
+ {
+ System.out.println(" "+
+ sub_attrs[j]);
+ }
+ }
+ else
+ {
+ System.out.println(" "+
+ attr.getName() + " = " + attr.getValue());
+ }
+ }
+ }
+ static private void printList(String title, ArrayList list)
+ {
+ if(title!=null)
+ System.out.println(title);
+ for(int i=0; i<list.size(); i++)
+ {
+ System.out.println(" " + list.get(i));
+ }
+ }
+}
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
new file mode 100644
index 0000000..08f17f2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineConfigTest.java
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * $Id: OfflineConfigTest.java,v 1.1.1.1 2005/05/28 00:39:19 dpatil Exp $
+ */
+
+package com.sun.enterprise.admin.config;
+
+import java.lang.reflect.*;
+import java.util.*;
+import java.io.*;
+import org.testng.annotations.*;
+
+//junit imports
+import junit.framework.TestSuite;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.textui.TestRunner;
+
+//JMX
+import javax.management.DynamicMBean;
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.ObjectName;
+import javax.management.AttributeNotFoundException;
+
+//config imports
+import com.sun.enterprise.config.ConfigFactory;
+import com.sun.enterprise.config.ConfigContext;
+import com.sun.enterprise.admin.config.OfflineConfigMgr;
+
+public class OfflineConfigTest extends TestCase
+{
+ static String TEST_DIR = "build/internal/testclasses/asadmintest";
+
+ private OfflineConfigMgr _mgr; // = new AdminTester(_mode, _registry, _configContext);
+
+ public OfflineConfigTest(String name) throws Exception
+ {
+ super(name);
+ }
+
+ @Configuration(beforeTestClass = true)
+ protected void setUp()
+ {
+ /* System.setProperty("com.sun.aas.installRoot", TEST_DIR);
+ System.setProperty("com.sun.aas.instanceRoot","/qq");
+ System.setProperty("com.sun.aas.javaRoot","/qq");
+ System.setProperty("com.sun.aas.imqLib","/qq");
+ */
+ try
+ {
+ _mgr = new OfflineConfigMgr(TEST_DIR+"/domain.xml");
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+
+ @Configuration(afterTestClass = true)
+ protected void tearDown()
+ {
+ _mgr = null;
+ }
+
+ public static junit.framework.Test suite()
+ {
+ TestSuite suite = new TestSuite(OfflineConfigTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception
+ {
+ int length = args.length;
+ if(length<2 ||
+ !args[0].equals("-testpath"))
+ {
+ 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 );
+ final TestRunner runner= new TestRunner();
+ final TestResult result = runner.doRun(OfflineConfigTest.suite(), false);
+ System.exit(result.errorCount() + result.failureCount());
+ }
+
+
+
+
+ //******************************************************************
+ //******************HELPERS***************************************
+ //******************************************************************
+ private void printTestTitle(String title)
+ {
+ System.out.println("\n/***********************************************************/");
+ System.out.println(" TEST: "+ title);
+ System.out.println("/**********************************************************/");
+ }
+ private void printAttributes(String title, AttributeList attrs)
+ {
+ if(title!=null)
+ System.out.println(title);
+ for(int i=0; i<attrs.size(); i++)
+ {
+ Attribute attr = (Attribute)attrs.get(i);
+ System.out.println(" "+
+ attr.getName() + " = " + attr.getValue());
+ }
+ }
+ private void printList(String title, ArrayList list)
+ {
+ if(title!=null)
+ System.out.println(title);
+ for(int i=0; i<list.size(); i++)
+ {
+ System.out.println(" " + list.get(i));
+ }
+ }
+
+ //******************************************************************
+ //******************T E S T S***************************************
+ //******************************************************************
+ @Test(groups = {"OfflineConfigTests"})
+ public void testOfflineMgr() throws Exception
+ {
+ assertNotNull("_mgr==null", _mgr);
+ }
+
+ @Test(groups = {"OfflineConfigTests"})
+ public void testGetWildcardAttributes() throws Exception
+ {
+ printTestTitle("testGetWildcardAttributes");
+ AttributeList attrs = _mgr.getAttributes("domain.*");
+ printAttributes(" ====== get domain.*", attrs);
+ attrs = _mgr.getAttributes("server-config.*");
+ printAttributes(" ====== get server-config.*", attrs);
+ attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.*");
+ printAttributes(" ====== server-config.http-service.virtual-server.server.*", attrs);
+ }
+
+ @Test(groups = {"OfflineConfigTests"})
+ public void testGetAttributes() throws Exception
+ {
+ printTestTitle("testGetAttributes");
+ AttributeList attrs = _mgr.getAttributes("domain.log-root");
+ printAttributes(" ====== get domain.log-root", attrs);
+ attrs = _mgr.getAttributes("server-config.dynamic-reconfiguration-enabled");
+ printAttributes(" ====== get server-config.dynamic-reconfiguration-enabled", attrs);
+ 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
+ {
+ printTestTitle("testGetProperties");
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.accesslog");
+ printAttributes(" ====== server-config.http-service.virtual-server.server.property.accesslog", attrs);
+ 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
+ {
+ printTestTitle("testGetWildcardProperties");
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.*");
+ printAttributes(" ====== server-config.http-service.virtual-server.server.property.*", attrs);
+ }
+
+ @ExpectedExceptions({com.sun.enterprise.admin.AdminValidationException.class})
+ @Test(groups = {"OfflineConfigTests"})
+ public void testSetAttribute() throws Exception
+ {
+ printTestTitle("testSetAttribute");
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.state");
+ printAttributes(" ====== get before set ", attrs);
+ attrs = _mgr.setAttribute("server-config.http-service.virtual-server.server.state", "qq");
+ printAttributes(" ====== set server-config.http-service.virtual-server.server.state=qq", attrs);
+ attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.state");
+ printAttributes(" ====== get after set", attrs);
+ }
+
+ @Test(groups = {"OfflineConfigTests"})
+ public void testSetProperty() throws Exception
+ {
+ printTestTitle("testSetProperty");
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.accesslog");
+ printAttributes(" ====== get before set ", attrs);
+ attrs = _mgr.setAttribute("server-config.http-service.virtual-server.server.property.accesslog", "aaa");
+ printAttributes(" ====== set server-config.http-service.virtual-server.server.property.accesslog=aaa", attrs);
+ attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.accesslog");
+ printAttributes(" ====== get after set", attrs);
+ }
+
+ @ExpectedExceptions({com.sun.enterprise.admin.AdminValidationException.class})
+ @Test(groups = {"OfflineConfigTests"})
+ public void testServerTargetedConfigGetSet() throws Exception
+ {
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.id");
+ printAttributes(" ====== get by server", attrs);
+ attrs = _mgr.getAttributes("server.http-service.virtual-server.server.state");
+ printAttributes(" ====== get before set by server", attrs);
+ attrs = _mgr.setAttribute("server.http-service.virtual-server.server.state", "qq2");
+ printAttributes(" ====== set server.http-service.virtual-server.server.state=qq2", attrs);
+ attrs = _mgr.getAttributes("server.http-service.virtual-server.server.state");
+ printAttributes(" ====== get after set by server", attrs);
+ 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
+ {
+ printTestTitle("testAddProperty");
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.qwerty");
+ printAttributes(" ====== get before set ", attrs);
+ attrs = _mgr.setAttribute("server-config.http-service.virtual-server.server.property.qwerty", "zzz");
+ printAttributes(" ====== set server-config.http-service.virtual-server.server.property.qwerty=zzz", attrs);
+ 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
+ {
+ printTestTitle("testAddProperty");
+ AttributeList attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.qwerty");
+ printAttributes(" ====== get before set ", attrs);
+ attrs = _mgr.setAttribute("server-config.http-service.virtual-server.server.property.qwerty", null);
+ printAttributes(" ====== set server-config.http-service.virtual-server.server.property.qwerty=null", attrs);
+ attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.qwerty");
+ printAttributes(" ====== get after set", attrs);
+ }
+
+ @Test(groups = {"OfflineConfigTests"})
+ public void testGetListDottedNames() throws Exception
+ {
+ printTestTitle("testGetListDottedNames");
+ ArrayList list = _mgr.getListDottedNames("*");
+ printList("*", list);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/testfiles/domain.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/testfiles/domain.xml
new file mode 100644
index 0000000..5d5130e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/testfiles/domain.xml
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE domain PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Domain//EN" "http://www.sun.com/software/appserver/dtds/sun-domain_1_2.dtd">
+<!--
+
+ Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- Generated from default-domain.xml.template -->
+<!-- Avoid manual edits of this file. Run "asadmin verify-domain-xml" otherwise.-->
+<domain application-root="${com.sun.aas.instanceRoot}/applications" log-root="${com.sun.aas.instanceRoot}/logs">
+ <applications>
+ <j2ee-application availability-enabled="false" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/MEjbApp" name="MEjbApp" object-type="system-all"/>
+ <j2ee-application availability-enabled="false" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/__ejb_container_timer_app" name="__ejb_container_timer_app" object-type="system-all"/>
+ <j2ee-application availability-enabled="false" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/__JWSappclients" name="__JWSappclients" object-type="system-all"/>
+ <web-module availability-enabled="false" context-root="/web1" directory-deployed="true" enabled="true" location="${com.sun.aas.installRoot}/lib/install/applications/adminapp/adminapp_war" name="adminapp" object-type="system-admin">
+ <!-- System Web Module - DO NOT DELETE! -->
+ </web-module>
+ <web-module availability-enabled="false" context-root="/asadmin" directory-deployed="true" enabled="true" location="${com.sun.aas.installRoot}/lib/install/applications/ee/admingui/adminGUI_war" name="admingui" object-type="system-admin">
+ <!-- System Web Module - DO NOT DELETE! -->
+ </web-module>
+ <web-module availability-enabled="false" context-root="/webapps-simple" directory-deployed="false" enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-modules/mywebapps.simple" name="mywebapps.simple" object-type="user"/>
+ </applications>
+ <resources>
+ <jdbc-resource enabled="true" jndi-name="jdbc/__TimerPool" object-type="system-admin" pool-name="__TimerPool"/>
+ <jdbc-resource enabled="true" jndi-name="jdbc/__CallFlowPool" object-type="system-all" pool-name="__CallFlowPool"/>
+ <jdbc-resource enabled="true" jndi-name="jdbc/__default" object-type="user" pool-name="DerbyPool"/>
+ <jdbc-connection-pool allow-non-component-callers="false" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" name="__CallFlowPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.XADataSource" steady-pool-size="8">
+ <property name="databaseName" value="sun-callflow"/>
+ <property name="PortNumber" value="1527"/>
+ <property name="Password" value="App"/>
+ <property name="User" value="App"/>
+ <property name="serverName" value="kravtch-pc2.sfbay.sun.com"/>
+ </jdbc-connection-pool>
+ <jdbc-connection-pool allow-non-component-callers="false" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" name="__TimerPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.XADataSource" steady-pool-size="8">
+ <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"/>
+ </jdbc-connection-pool>
+ <jdbc-connection-pool allow-non-component-callers="false" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="350" is-connection-validation-required="false" is-isolation-level-guaranteed="false" max-pool-size="32" max-wait-time-in-millis="60000" name="DerbyPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" steady-pool-size="8">
+ <property name="DatabaseName" value="sun-appserv-samples"/>
+ <property name="connectionAttributes" value=";create=true"/>
+ </jdbc-connection-pool>
+ </resources>
+ <configs>
+ <config dynamic-reconfiguration-enabled="true" name="server-config">
+ <http-service>
+ <access-log format="%client.name% %auth-user-name% %datetime% %request% %status% %response.length%" rotation-enabled="true" rotation-interval-in-minutes="1440" rotation-policy="time" rotation-suffix="yyyyMMdd-HH'h'mm'm'ss's'"/>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="8080" security-enabled="false" server-name="" xpowered-by="true">
+ </http-listener>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-2" port="8181" security-enabled="true" server-name="" xpowered-by="true">
+ </http-listener>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="__asadmin" enabled="true" family="inet" id="admin-listener" port="4848" security-enabled="true" server-name="" xpowered-by="true">
+ </http-listener>
+ <virtual-server hosts="${com.sun.aas.hostName}" http-listeners="http-listener-1,http-listener-2" id="server" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
+ <http-access-log iponly="true" log-directory="${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 default-web-module="admingui" hosts="${com.sun.aas.hostName}" http-listeners="admin-listener" id="__asadmin" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
+ <http-access-log iponly="true" log-directory="${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>
+ <request-processing header-buffer-length-in-bytes="4096" initial-thread-count="2" request-timeout-in-seconds="30" thread-count="5" thread-increment="1"/>
+ <keep-alive max-connections="250" thread-count="1" timeout-in-seconds="30"/>
+ <connection-pool max-pending-count="4096" queue-size-in-bytes="4096" receive-buffer-size-in-bytes="4096" send-buffer-size-in-bytes="8192"/>
+ <http-protocol default-response-type="text/plain; charset=iso-8859-1" dns-lookup-enabled="false" forced-response-type="text/plain; charset=iso-8859-1" ssl-enabled="true" version="HTTP/1.1"/>
+ <http-file-cache file-caching-enabled="true" file-transmission-enabled="false" globally-enabled="true" hash-init-size="0" max-age-in-seconds="30" max-files-count="1024" medium-file-size-limit-in-bytes="537600" medium-file-space-in-bytes="10485760" small-file-size-limit-in-bytes="2048" small-file-space-in-bytes="1048576"/>
+ </http-service>
+ <iiop-service client-authentication-required="false">
+ <orb max-connections="1024" message-fragment-size="1024" use-thread-pool-ids="thread-pool-1"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="orb-listener-1" port="3700" security-enabled="false"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL" port="3820" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ </iiop-listener>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL_MUTUALAUTH" port="3920" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-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" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ <property name="client-hostname" value="kravtch-pc2.sfbay.sun.com"/>
+ </jmx-connector>
+ <!-- The JSR 160 "system-jmx-connector" -->
+ <das-config admin-session-timeout-in-minutes="60" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-enabled="true" autodeploy-jsp-precompilation-enabled="false" autodeploy-polling-interval-in-seconds="2" autodeploy-verifier-enabled="false" deploy-xml-validation="full" dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2"/>
+ </admin-service>
+ <web-container>
+ <session-config>
+ <session-manager>
+ <manager-properties/>
+ <store-properties/>
+ </session-manager>
+ <session-properties/>
+ </session-config>
+ </web-container>
+ <ejb-container cache-idle-timeout-in-seconds="600" cache-resize-quantity="32" commit-option="B" max-cache-size="512" max-pool-size="32" pool-idle-timeout-in-seconds="600" pool-resize-quantity="8" removal-timeout-in-seconds="5400" session-store="${com.sun.aas.instanceRoot}/session-store" steady-pool-size="0" victim-selection-policy="nru">
+ <ejb-timer-service max-redeliveries="1" minimum-delivery-interval-in-millis="7000" redelivery-interval-internal-in-millis="5000"/>
+ </ejb-container>
+ <mdb-container idle-timeout-in-seconds="600" max-pool-size="32" pool-resize-quantity="8" steady-pool-size="0"/>
+ <jms-service addresslist-behavior="random" addresslist-iterations="3" default-jms-host="default_JMS_host" init-timeout-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" reconnect-interval-in-seconds="5" type="EMBEDDED">
+ <jms-host admin-password="admin" admin-user-name="admin" host="kravtch-pc2.sfbay.sun.com" name="default_JMS_host" port="7676"/>
+ </jms-service>
+ <log-service alarms="false" file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000" log-rotation-timelimit-in-minutes="0" log-to-console="false" retain-error-statistics-for-hours="5" use-system-logging="false">
+ <module-log-levels admin="INFO" classloader="INFO" cmp="INFO" cmp-container="INFO" configuration="INFO" connector="INFO" corba="INFO" deployment="INFO" ejb-container="INFO" group-management-service="INFO" javamail="INFO" jaxr="INFO" jaxrpc="INFO" jdo="INFO" jms="INFO" jta="INFO" jts="INFO" management-event="INFO" mdb-container="INFO" naming="INFO" node-agent="INFO" resource-adapter="INFO" root="INFO" saaj="INFO" security="INFO" self-management="INFO" server="INFO" synchronization="INFO" util="INFO" verifier="INFO" web-container="INFO"/>
+ </log-service>
+ <security-service activate-default-principal-to-role-mapping="false" anonymous-role="ANYONE" audit-enabled="false" audit-modules="default" default-realm="file" jacc="default">
+ <!-- All administrative users use this realm by default. -->
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
+ <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 classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate">
+ </auth-realm>
+ <jacc-provider name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl" policy-provider="com.sun.enterprise.security.provider.PolicyWrapper">
+ <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
+ </jacc-provider>
+ <audit-module classname="com.sun.enterprise.security.Audit" name="default">
+ <property name="auditOn" value="false"/>
+ </audit-module>
+ <message-security-config auth-layer="SOAP">
+ <!-- turned off by default -->
+ <provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="XWS_ClientProvider" provider-type="client">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-2.0.xml"/>
+ </provider-config>
+ <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="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="XWS_ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-2.0.xml"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ </message-security-config>
+ </security-service>
+ <transaction-service automatic-recovery="false" heuristic-decision="rollback" keypoint-interval="2048" retry-timeout-in-seconds="600" timeout-in-seconds="0" tx-log-dir="./"/>
+ <monitoring-service>
+ <module-monitoring-levels connector-connection-pool="OFF" connector-service="OFF" ejb-container="OFF" http-service="OFF" jdbc-connection-pool="OFF" jms-service="OFF" jvm="OFF" orb="OFF" thread-pool="OFF" transaction-service="OFF" web-container="OFF"/>
+ </monitoring-service>
+ <diagnostic-service capture-app-dd="true" capture-hadb-info="true" capture-install-log="true" capture-system-info="true" compute-checksum="true" max-log-entries="500" min-log-level="INFO" verify-config="true"/>
+ <java-config debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" env-classpath-ignored="true" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath="${com.sun.aas.installRoot}/lib/appserv-launch.jar">
+ <!-- various required jvm-options -->
+ <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</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>-Xmx512mm</jvm-options>
+ <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/jre/lib/ext;${com.sun.aas.instanceRoot}/lib/ext;${com.sun.aas.derbyRoot}/lib;${com.sun.aas.installRoot}/lib/jdbcdrivers</jvm-options>
+ <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</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/>
+ </java-config>
+ <availability-service auto-manage-ha-store="false" availability-enabled="true" ha-store-healthcheck-enabled="false" ha-store-healthcheck-interval-in-seconds="5">
+ <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-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-store-pool-name="jdbc/hastore"/>
+ <jms-availability availability-enabled="false"/>
+ </availability-service>
+ <thread-pools>
+ <thread-pool idle-thread-timeout-in-seconds="120" max-thread-pool-size="200" min-thread-pool-size="0" num-work-queues="1" thread-pool-id="thread-pool-1"/>
+ </thread-pools>
+ <management-rules enabled="true">
+ </management-rules>
+ </config>
+ <!-- config model with name "server-config" ends -->
+ <config dynamic-reconfiguration-enabled="true" name="default-config">
+ <http-service>
+ <access-log format="%client.name% %auth-user-name% %datetime% %request% %status% %response.length%" rotation-enabled="true" rotation-interval-in-minutes="1440" rotation-policy="time" rotation-suffix="yyyyMMdd-HH'h'mm'm'ss's'"/>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="${HTTP_LISTENER_PORT}" security-enabled="false" server-name="" xpowered-by="true">
+ </http-listener>
+ <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-2" port="${HTTP_SSL_LISTENER_PORT}" security-enabled="true" server-name="" xpowered-by="true">
+ </http-listener>
+ <virtual-server hosts="${com.sun.aas.hostName}" http-listeners="http-listener-1,http-listener-2" id="server" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
+ <http-access-log iponly="true" log-directory="${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"/>
+ <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"/>
+ </virtual-server>
+ <request-processing header-buffer-length-in-bytes="4096" initial-thread-count="2" request-timeout-in-seconds="30" thread-count="5" thread-increment="1"/>
+ <keep-alive max-connections="250" thread-count="1" timeout-in-seconds="30"/>
+ <connection-pool max-pending-count="4096" queue-size-in-bytes="4096" receive-buffer-size-in-bytes="4096" send-buffer-size-in-bytes="8192"/>
+ <http-protocol default-response-type="text/plain; charset=iso-8859-1" dns-lookup-enabled="false" forced-response-type="text/plain; charset=iso-8859-1" ssl-enabled="true" version="HTTP/1.1"/>
+ <http-file-cache file-caching-enabled="true" file-transmission-enabled="false" globally-enabled="true" hash-init-size="0" max-age-in-seconds="30" max-files-count="1024" medium-file-size-limit-in-bytes="537600" medium-file-space-in-bytes="10485760" small-file-size-limit-in-bytes="2048" small-file-space-in-bytes="1048576"/>
+ </http-service>
+ <iiop-service client-authentication-required="false">
+ <orb max-connections="1024" message-fragment-size="1024" use-thread-pool-ids="thread-pool-1"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="orb-listener-1" port="${IIOP_LISTENER_PORT}" security-enabled="false"/>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL" port="${IIOP_SSL_LISTENER_PORT}" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ </iiop-listener>
+ <iiop-listener address="0.0.0.0" enabled="true" id="SSL_MUTUALAUTH" port="${IIOP_SSL_MUTUALAUTH_PORT}" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-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" enabled="true" name="system" port="${JMX_SYSTEM_CONNECTOR_PORT}" protocol="rmi_jrmp" security-enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
+ </jmx-connector>
+ <!-- JSR 160 "system-jmx-connector" -->
+ <das-config admin-session-timeout-in-minutes="60" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-enabled="true" autodeploy-jsp-precompilation-enabled="false" autodeploy-polling-interval-in-seconds="2" autodeploy-verifier-enabled="false" deploy-xml-validation="full" dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2"/>
+ </admin-service>
+ <web-container>
+ <session-config>
+ <session-manager>
+ <manager-properties/>
+ <store-properties/>
+ </session-manager>
+ <session-properties/>
+ </session-config>
+ </web-container>
+ <ejb-container cache-idle-timeout-in-seconds="600" cache-resize-quantity="32" commit-option="B" max-cache-size="512" max-pool-size="32" pool-idle-timeout-in-seconds="600" pool-resize-quantity="8" removal-timeout-in-seconds="5400" session-store="${com.sun.aas.instanceRoot}/session-store" steady-pool-size="0" victim-selection-policy="nru">
+ <ejb-timer-service max-redeliveries="1" minimum-delivery-interval-in-millis="7000" redelivery-interval-internal-in-millis="5000"/>
+ </ejb-container>
+ <mdb-container idle-timeout-in-seconds="600" max-pool-size="32" pool-resize-quantity="8" steady-pool-size="0"/>
+ <jms-service addresslist-behavior="priority" addresslist-iterations="3" default-jms-host="default_JMS_host" init-timeout-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" reconnect-interval-in-seconds="5" type="LOCAL">
+ <jms-host admin-password="admin" admin-user-name="admin" host="kravtch-pc2.sfbay.sun.com" name="default_JMS_host" port="${JMS_PROVIDER_PORT}"/>
+ </jms-service>
+ <log-service alarms="false" file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000" log-rotation-timelimit-in-minutes="0" log-to-console="false" retain-error-statistics-for-hours="5" use-system-logging="false">
+ <module-log-levels admin="INFO" classloader="INFO" cmp="INFO" cmp-container="INFO" configuration="INFO" connector="INFO" corba="INFO" deployment="INFO" ejb-container="INFO" group-management-service="INFO" javamail="INFO" jaxr="INFO" jaxrpc="INFO" jdo="INFO" jms="INFO" jta="INFO" jts="INFO" management-event="INFO" mdb-container="INFO" naming="INFO" node-agent="INFO" resource-adapter="INFO" root="INFO" saaj="INFO" security="INFO" self-management="INFO" server="INFO" synchronization="INFO" util="INFO" verifier="INFO" web-container="INFO"/>
+ </log-service>
+ <security-service activate-default-principal-to-role-mapping="false" anonymous-role="ANYONE" audit-enabled="false" audit-modules="default" default-realm="file" jacc="default">
+ <!-- All administrative tasks within any server instance use this admin-realm by default. -->
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
+ <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 classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate">
+ </auth-realm>
+ <jacc-provider name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl" policy-provider="com.sun.enterprise.security.provider.PolicyWrapper">
+ <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
+ </jacc-provider>
+ <audit-module classname="com.sun.enterprise.security.Audit" name="default">
+ <property name="auditOn" value="false"/>
+ </audit-module>
+ <message-security-config auth-layer="SOAP">
+ <!-- turned off by default -->
+ <provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="XWS_ClientProvider" provider-type="client">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-2.0.xml"/>
+ </provider-config>
+ <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="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="XWS_ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-2.0.xml"/>
+ </provider-config>
+ <provider-config class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-id="ServerProvider" provider-type="server">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"/>
+ </provider-config>
+ </message-security-config>
+ </security-service>
+ <transaction-service automatic-recovery="true" heuristic-decision="rollback" keypoint-interval="2048" retry-timeout-in-seconds="600" timeout-in-seconds="0" tx-log-dir="./"/>
+ <monitoring-service>
+ <module-monitoring-levels connector-connection-pool="OFF" connector-service="OFF" ejb-container="OFF" http-service="OFF" jdbc-connection-pool="OFF" jms-service="OFF" jvm="OFF" orb="OFF" thread-pool="OFF" transaction-service="OFF" web-container="OFF"/>
+ </monitoring-service>
+ <diagnostic-service capture-app-dd="true" capture-hadb-info="true" capture-install-log="true" capture-system-info="true" compute-checksum="true" max-log-entries="500" min-log-level="INFO" verify-config="true"/>
+ <java-config debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" env-classpath-ignored="true" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath="${com.sun.aas.installRoot}/lib/appserv-launch.jar">
+ <!-- various required jvm-options -->
+ <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
+ <jvm-options>-Xmx512m=swcxq -Xaa</jvm-options>
+ <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriverTEST</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.appserv.pluggable.features=cq34om.sun.enterprise.ee.server.pluggable.EEPluggableFeatureImpl</jvm-options>
+ <jvm-options>-Dcom.sun.appserv.nss.db=${com.sun.aas.instanceRoot}/config</jvm-options>
+ <jvm-options>-DAA</jvm-options>
+ <jvm-options>-DTEST</jvm-options>
+ </java-config>
+ <availability-service auto-manage-ha-store="false" availability-enabled="true" ha-store-healthcheck-enabled="false" ha-store-healthcheck-interval-in-seconds="5">
+ <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-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-store-pool-name="jdbc/hastore"/>
+ <jms-availability availability-enabled="false"/>
+ </availability-service>
+ <thread-pools>
+ <thread-pool idle-thread-timeout-in-seconds="120" max-thread-pool-size="200" min-thread-pool-size="0" num-work-queues="1" thread-pool-id="thread-pool-1"/>
+ </thread-pools>
+ <group-management-service fd-protocol-max-tries="3" fd-protocol-timeout-in-millis="2000" merge-protocol-max-interval-in-millis="10000" merge-protocol-min-interval-in-millis="5000" ping-protocol-timeout-in-millis="2000" vs-protocol-timeout-in-millis="1500"/>
+ <management-rules enabled="true"/>
+ <system-property name="HTTP_LISTENER_PORT" value="38080"/>
+ <system-property name="HTTP_SSL_LISTENER_PORT" value="38181"/>
+ <system-property name="JMS_PROVIDER_PORT" value="37676"/>
+ <system-property name="IIOP_LISTENER_PORT" value="33700"/>
+ <system-property name="IIOP_SSL_LISTENER_PORT" value="33820"/>
+ <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="33920"/>
+ <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="38686"/>
+ </config>
+ </configs>
+ <servers>
+ <server config-ref="server-config" lb-weight="100" name="server">
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="adminapp" virtual-servers="__asadmin"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="admingui" virtual-servers="__asadmin"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="MEjbApp" virtual-servers="server"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="__ejb_container_timer_app" virtual-servers="server"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="__JWSappclients" virtual-servers="server"/>
+ <application-ref disable-timeout-in-minutes="30" enabled="true" lb-enabled="false" ref="mywebapps.simple"/>
+ <resource-ref enabled="true" ref="jdbc/__TimerPool"/>
+ <resource-ref enabled="true" ref="jdbc/__CallFlowPool"/>
+ <resource-ref enabled="true" ref="jdbc/__default"/>
+ </server>
+ </servers>
+ <clusters/>
+ <node-agents/>
+ <lb-configs/>
+ <load-balancers/>
+ <property name="administrative.domain.name" value="domain1"/>
+ <property name="sqx" value="testasdf"/>
+</domain>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/testng/testng.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/testng/testng.xml
new file mode 100644
index 0000000..fcfeaa4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/testng/testng.xml
@@ -0,0 +1,32 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<suite name="OfflineConfig admin devtests" >
+ <test name="admin.OfflineConfigTests">
+ <groups>
+ <run>
+ <exclude name="brokenTests" />
+ <exclude name="interactiveTests" />
+ </run>
+ </groups>
+ <classes>
+ <class name="com.sun.enterprise.admin.config.OfflineConfigTest" />
+ </classes>
+ </test>
+</suite>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/LocalStrings.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/LocalStrings.properties
new file mode 100644
index 0000000..a4fbb4a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/LocalStrings.properties
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+###############################################################################
+####### Global Variables ############################################
+###############################################################################
+
+
+useRmi=true
+adminHost=localhost
+adminPort=8686
+adminUser=admin
+adminPassword=adminadmin
+isSecure=true
+testfile=tests.list
+
+###############################################################################
+####### DeployManyMBeans variables ##################################
+###############################################################################
+
+DeployManyMBeans.NUM_BEANS=50
+
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
new file mode 100644
index 0000000..fcd2008
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/build.xml
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY common SYSTEM "file:./../../../config/common.xml">
+<!ENTITY props SYSTEM "file:./../../../config/properties.xml">
+]>
+<project name="Admin Infrastructure Devtests" default="all" basedir=".">
+ &props;
+ &common;
+ <property name="src.dir" value="src"/>
+ <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 ############# -->
+ <target name="all" depends="deploy, makejar" />
+
+ <!-- ########## 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}"/>
+ <pathelement location="${env.APS_HOME}/lib/testng.jar"/>
+ </classpath>
+ </javac>
+ <copy todir="${classes.dir}/test" file="LocalStrings.properties"/>
+ </target>
+
+ <!-- ########## run ############# -->
+ <target name="run">
+ <antcall target="runmain"/>
+ </target>
+
+
+ <!-- ########## runmain ############# -->
+
+ <target name="runmain" depends="build">
+ <java classname="test.TestDriver"
+ 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"/>
+ <classpath>
+ <pathelement path="${s1astest.classpath}"/>
+ <pathelement path="${classes.dir}"/>
+ <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/>
+ </classpath>
+ </java>
+ </target>
+
+
+ <!-- ########## debug ############# -->
+
+ <target name="debug" depends="build">
+ <java classname="test.TestDriver"
+ dir="."
+ fork="yes">
+ <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}"/>
+ </classpath>
+ </java>
+ </target>
+
+
+ <!-- ########## clean ############# -->
+
+ <target name="clean">
+ <delete dir="${classes.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${mbean-loading-folder}/testmbeans"/>
+ </target>
+
+ <!-- ########## deploy ############# -->
+
+ <target name="deploy" depends="build">
+ <copy todir="${mbean-loading-folder}/testmbeans">
+ <fileset dir="${classes.dir}/testmbeans"/>
+ </copy>
+ </target>
+
+ <!-- ########## makejar ############# -->
+
+ <target name="makejar" depends="build">
+ <jar destfile="${dist.dir}/testmbeans.jar"
+ basedir="${classes.dir}"
+ excludes="test/**" />
+ </target>
+
+ <!-- ########## ASProbe ############# -->
+
+ <target name="ASProbe" depends="build">
+ <jar destfile="${dist.dir}/ASProbe.jar"
+ basedir="${classes.dir}"
+ includes="testmbeans/ASProbe*"/>
+ </target>
+
+ <path id="tng-run.cp">
+ <pathelement path="${s1astest.classpath}"/>
+ <pathelement path="${classes.dir}"/>
+ <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/>
+ <pathelement path="${env.S1AS_HOME}/lib/javaee.jar"/>
+ <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
+ srcdir="${src-ng.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>
+
+ <target name="run-tests-ng-params"
+ description="run examples with java"
+ depends="setup,deploy,build-ng" >
+ <delete dir="./test-output"/>
+ <java fork="yes"
+ classpathref="tng-run.cp"
+ classname="org.testng.TestNG" >
+ <arg value="./testng/testng-params.xml"/>
+ <jvmarg value="-ea"/>
+ <jvmarg value="-Djava.compiler=NONE"/>
+ </java>
+ </target>
+ <target name="run-tests-ng-separate"
+ description="run examples with java"
+ depends="setup,deploy,build-ng" >
+ <delete dir="./test-output"/>
+ <java fork="yes"
+ classpathref="tng-run.cp"
+ classname="org.testng.TestNG" >
+ <arg value="./testng/testng-separate.xml"/>
+ <jvmarg value="-ea"/>
+ <jvmarg value="-Djava.compiler=NONE"/>
+ </java>
+ </target>
+
+ <target name="run-tests-ng-dataprovider"
+ description="run examples with java"
+ depends="setup,deploy,build-ng" >
+ <delete dir="./test-output"/>
+ <java fork="yes"
+ classpathref="tng-run.cp"
+ classname="org.testng.TestNG" >
+ <arg value="./testng/testng-data-provider.xml"/>
+ <jvmarg value="-ea"/>
+ <jvmarg value="-Djava.compiler=NONE"/>
+ </java>
+ </target>
+ <target name="run-tests-ng"
+ depends="run-tests-ng-separate,run-tests-ng-params,run-tests-ng-dataprovider">
+ </target>
+
+ <target name="report-ng">
+ <mkdir dir="test-report"/>
+ <junitreport todir="test-report">
+ <fileset dir="test-output">
+ <include name="*.xml"/>
+ </fileset>
+ <report format="noframes" todir="test-report"/>
+ </junitreport>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/nbproject/project.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/nbproject/project.xml
new file mode 100644
index 0000000..d73d1f0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/nbproject/project.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.ant.freeform</type>
+ <configuration>
+ <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+ <!--Do not use Project Properties customizer when editing this file manually.-->
+ <name>Admin Infrastructure Devtests</name>
+ <properties>
+ <property-file>PATH TO YOUR GF_SOURCES/bootstrap/project.properties</property-file>
+ <property name="reporter.jar">../../../lib/reporter.jar</property>
+ </properties>
+ <folders>
+ <source-folder>
+ <label>JavaSources</label>
+ <type>java</type>
+ <location>src</location>
+ </source-folder>
+ </folders>
+ <ide-actions>
+ <action name="build">
+ <target>build</target>
+ </action>
+ <action name="clean">
+ <target>clean</target>
+ </action>
+ <action name="rebuild">
+ <target>clean</target>
+ <target>build</target>
+ </action>
+ </ide-actions>
+ <export>
+ <type>folder</type>
+ <location>classes</location>
+ <build-target>build</build-target>
+ </export>
+ <view>
+ <items>
+ <source-folder style="packages">
+ <label>JavaSources</label>
+ <location>src</location>
+ </source-folder>
+ <source-file>
+ <location>build.xml</location>
+ </source-file>
+ </items>
+ <context-menu>
+ <ide-action name="build"/>
+ <ide-action name="clean"/>
+ <ide-action name="rebuild"/>
+ </context-menu>
+ </view>
+ <subprojects/>
+ </general-data>
+ <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
+ <compilation-unit>
+ <package-root>src/java</package-root>
+ <classpath mode="compile">$appserv-ext.jar};${appserv-deployment-client.jar};../../../lib/reporter.jar;${appserv-rt.jar};${appserv-admin.jar};${j2ee.jar};../../../lib/testng.jar</classpath>
+ <built-to>classes</built-to>
+ <source-level>1.5</source-level>
+ </compilation-unit>
+ </java-data>
+ </configuration>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/readme b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/readme
new file mode 100644
index 0000000..bd36447
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/readme
@@ -0,0 +1,24 @@
+Devtests for the remote-testing of admin.
+
+These must be run by admin developers.
+
+- Don't forget that you must have APS_HOME set correctly in your environment. You will definitely get build errors if it isn't set. E.g.:
+ APS_HOME=c:/jws/glassfish/appserv-tests
+- All the tests are kept in src directory in the "test" package.
+- All config info is in LocalStrings.properties
+- A NetBeans project is created for convenience. Start NB -> Open Project -> Browse to this folder (pe) and double click on it, the project will be automatically opened.
+- tests.list contains the tests to be run. For quick-running of a test, comment out all the tests and uncomment the ones that you want to run.
+- A test is an interface RemoteAdminQuicklookTest in the src directory. It is a misnomer that it is a Quicklook test, but so be it.
+- TestDriver.java is the driver of the tests and generally does not need to be modified.
+- The tests are geared towards testing the MBeans remotely. AMX can definitely be used, but there is a separate AMX test suite. The tests are to be run after starting the domain.
+- The setup related tasks are supposed to be done in the "setup" target in build.xml.
+- The environment is available due to inclusion of some common properties files and xml's in ../../../config directory.
+- To run the code in a debugger use the "debug" ant target. The program will startup in a suspended state, listening on port 3333. I.e. do this:
+---- set breakpoint(s) in the code in NetBeans
+---- run "ant debug"
+---- attach to port 3333
+---- hit continue or single-step
+- To set the number of MBeans for DeployManyMBeans -- set this property in src/test/LocalStrings.properties (this example == 100 MBeans)
+DeployManyMBeans.NUM_BEANS=100
+$Id: readme,v 1.2 2005/08/24 22:45:20 bnevins Exp $
+$Author: bnevins $
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
new file mode 100644
index 0000000..98928db
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/rmi.properties
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+# __NAME__.properties
+#
+# Created on __DATE
+
+useRmi=false
+adminHost=localhost
+adminPort=4848
+adminUser=admin
+adminPassword=adminadmin
+isSecure=false
+testFile=tests.list
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
new file mode 100644
index 0000000..52efd81
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/smftest.properties
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+# __NAME__.properties
+#
+# Created on __DATE
+
+#SERVICE_NAME refers to the name of domain or node agent
+SERVICE_NAME=domain1
+SERVICE_LOCATION=FILL_THE_LOCATION_WHERE_DOMAIN_CONFIGURATION_RESIDES
+#SERVICE_TYPE has to be either "Domain" or "NodeAgent" and nothing else
+SERVICE_TYPE=Domain
+OS_USER=root
+AS_ADMIN_PATH=FILL_THE_ASADMIN_LOCATION
+PASSWORD_FILE_PATH=FILL_THE_PASSWORD_FILE_LOCATION
+
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
new file mode 100644
index 0000000..246267f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/AttributeSniffer.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ *
+ * @author bnevins
+ */
+package test;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import java.util.*;
+import java.io.IOException;
+import javax.management.JMException;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanInfo;
+import com.sun.enterprise.util.*;
+
+public class AttributeSniffer extends LifeCycle
+{
+ 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());
+ }
+ }
+ return ( SimpleReporterAdapter.PASS );
+ }
+
+ private static final String[] classnames = {
+ "testmbeans.OneClassDynamicMBean",
+ "testmbeans.MicrowaveOvenImpl",
+ "testmbeans.SimpleStandard",
+ "testmbeans.PrimitiveStandard",
+ };
+
+ //private int numIter = 500;
+ //private String namePrefix;
+ //private String alphabet = "abcdefghijklmnopqrstuvwxyz";
+ //private Random rnd;
+ //private boolean interactive = false;
+}
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
new file mode 100644
index 0000000..8be882c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/DeployManyMBeans.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import java.util.*;
+import java.io.IOException;
+import javax.management.JMException;
+import com.sun.enterprise.util.*;
+
+/*
+ * DeployManyMBeans.java
+ *
+ * Created on December 12, 2005, 10:22 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+/**
+ *
+ * @author bnevins
+ */
+public class DeployManyMBeans extends LifeCycle
+{
+ public DeployManyMBeans()
+ {
+ 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));
+ }
+ namePrefix = new String(chars);
+ numIter = LocalStrings.getInt("DeployManyMBeans.NUM_BEANS", numIter);
+ 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();
+ String name = namePrefix + i;
+ String classname = classnames[rnd.nextInt(4)];
+ 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): "
+ + msec + ", Memory Usage: " + getMemoryInfo());
+ }
+
+ title("Stage II -- check " + numIter + " MBeans");
+
+ List<String> list = list();
+ for(int i = 0; i < numIter; i++)
+ {
+ String name = namePrefix + i;
+ if(!list.contains(name))
+ throw new RuntimeException("Could not find " + name + " in list of deployed MBeans");
+ System.out.println("Found: " + name);
+ }
+ 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++)
+ {
+ String name = namePrefix + i;
+ if(list.contains(name))
+ throw new RuntimeException(name + " is still in the list of deployed MBeans");
+ System.out.println("Verified Deletion of " + name);
+ }
+
+ title("All Done!");
+
+ return ( SimpleReporterAdapter.PASS );
+ }
+
+ private static final String[] classnames = {
+ "testmbeans.OneClassDynamicMBean",
+ "testmbeans.MicrowaveOvenImpl",
+ "testmbeans.SimpleStandard",
+ "testmbeans.PrimitiveStandard",
+ };
+
+ private int numIter = 500;
+ private String namePrefix;
+ private String alphabet = "abcdefghijklmnopqrstuvwxyz";
+ private Random rnd;
+ private boolean interactive = false;
+}
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
new file mode 100644
index 0000000..244f6f2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/GetResourceTest.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import java.util.*;
+import java.io.IOException;
+import javax.management.JMException;
+import com.sun.enterprise.util.*;
+
+/**
+ *
+ * @author bnevins
+ */
+
+public class GetResourceTest extends LifeCycle
+{
+ public GetResourceTest()
+ {
+ }
+
+ String testInternal() throws JMException, IOException
+ {
+ long msec = System.currentTimeMillis();
+ title("GetResourceTest");
+ title("Stage I -- deploy ");
+ String name = "getResourceTest";
+ String classname = "testmbeans.AWT";
+ 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): "
+ + msec + ", Memory Usage: " + getMemoryInfo());
+
+ title("Stage II -- check ");
+ List<String> list = list();
+ if(!list.contains(name))
+ throw new RuntimeException("Could not find " + name + " in list of deployed MBeans");
+ System.out.println("Found: " + name);
+ title("All MBeans were registered OK");
+
+ if(interactive)
+ 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");
+ System.out.println("Verified Deletion of " + name);
+ title("All Done!");
+ return ( SimpleReporterAdapter.PASS );
+ }
+
+ private static final String[] classnames = {
+ "testmbeans.OneClassDynamicMBean",
+ "testmbeans.MicrowaveOvenImpl",
+ "testmbeans.SimpleStandard",
+ "testmbeans.PrimitiveStandard",
+ };
+
+ private int numIter = 500;
+ private String namePrefix;
+ private String alphabet = "abcdefghijklmnopqrstuvwxyz";
+ private Random rnd;
+ private boolean interactive = false;
+}
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
new file mode 100644
index 0000000..8d1ef7d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/JVMInformationTest.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+/*
+ * JVMInformationTest.java
+ *
+ * Created on July 22, 2005, 12:53 AM
+ */
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.admin.mbeans.jvm.JVMInformationMBean;
+import com.sun.enterprise.admin.server.core.AdminService;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectName;
+
+/**
+ */
+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 */
+ public JVMInformationTest() {
+ }
+
+ public void setMBeanServerConnection(MBeanServerConnection c) {
+ this.mbsc = c;
+ }
+
+ public String test() {
+ try {
+ start = System.currentTimeMillis();
+ dumpDASInfo();
+ System.out.println("Gets the DAS VM Information");
+ return ( SimpleReporterAdapter.PASS );
+ } catch(final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ finally {
+ end = System.currentTimeMillis();
+ }
+}
+
+ public String getName() {
+ return ( this.getClass().getName() );
+ }
+
+ public long getExecutionTime() {
+ return ( end - start );
+ }
+
+ 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);
+ return mbean.getMemoryInformation(null);
+ }
+ private void dumpDASInfo() 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);
+ System.out.println(mbean.getThreadDump(null));
+ 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
new file mode 100644
index 0000000..3b3bd1c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/LifeCycle.java
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.util.*;
+import java.io.*;
+import javax.management.MBeanServerConnection;
+import javax.management.JMException;
+import javax.management.MBeanInfo;
+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
+{
+ abstract String testInternal() throws JMException, IOException;
+
+ ////////////////////////////////////////////////////////////////////////////
+ ////////////// RemoteAdminQuicklookTest Impl Methods ////////////////////
+ ////////////////////////////////////////////////////////////////////////////
+
+ public long getExecutionTime()
+ {
+ return ( end - start ) ;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ public String getName()
+ {
+ return ( getClass().getName() );
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ public void setMBeanServerConnection(MBeanServerConnection c)
+ {
+ mbsc = c;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ public String test()
+ {
+ try
+ {
+ start = System.currentTimeMillis();
+ return (testInternal());
+ }
+ catch(final Exception e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ end = System.currentTimeMillis();
+ }
+ }
+ ////////////////////////////////////////////////////////////////////////////
+ /////////////// 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 };
+ final String[] operSign = new String[]{ String.class.getName(), Map.class.getName(), Map.class.getName() };
+ return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ List<String> list() throws JMException, IOException
+ {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "listMBeanNames";
+ final Object[] operParams = new Object[]{ null };
+ final String[] operSign = new String[]{ String.class.getName() };
+ return ( (List<String>) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ MBeanInfo getMBeanInfo(String className) throws JMException, IOException
+ {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "getMBeanInfo";
+ final Object[] operParams = new Object[]{ className };
+ final String[] operSign = new String[]{ String.class.getName() };
+ return ( MBeanInfo ) mbsc.invoke(on, oper, operParams, operSign);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ String delete(String name) throws JMException, IOException
+ {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "deleteMBean";
+ final Object[] operParams = new Object[]{ null, name };
+ final String[] operSign = new String[]{ String.class.getName(), String.class.getName() };
+ return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ MemoryUsage getMemoryInfo()
+ {
+ int heap = -1;
+ int nonHeap = -1;
+
+ try
+ {
+ JVMInformationTest jit = new JVMInformationTest();
+ jit.setMBeanServerConnection(mbsc);
+ String s = jit.getMemoryInfo();
+ BufferedReader r = new BufferedReader(new StringReader(s));
+ String line;
+
+ while((line = r.readLine()) != null)
+ {
+ if(line.equals("Heap Memory Usage:"))
+ heap = parseMemoryUsage(r);
+ if(line.equals("Non-heap Memory Usage:"))
+ {
+ nonHeap = parseMemoryUsage(r);
+ break;
+ }
+ }
+
+ }
+ catch(Exception e)
+ {
+ // ignore...
+ }
+
+ return new MemoryUsage(heap, nonHeap);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ void title(String s)
+ {
+ 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)
+ {
+ /*
+ Heap Memory Usage:
+ Memory that Java Virtual Machine initially requested to the Operating System: 0 Bytes
+ Memory that Java Virtual Machine is guaranteed to receive from the Operating System: 55,459,840 Bytes
+ Maximum Memory that Java Virtual Machine may get from the Operating System: 531,628,032 Bytes. Note that this is not guaranteed
+
+ Memory that Java Virtual Machine uses at this time: 34,602,808 Bytes
+ **/
+ String searchString = "Memory that Java Virtual Machine uses at this time: ";
+ String line;
+
+ try
+ {
+ while((line = r.readLine()) != null)
+ {
+ if(line.startsWith(searchString))
+ break;
+ }
+
+ if(line == null)
+ return -1;
+
+ String number = line.substring(searchString.length());
+ return parseNumber(number);
+ }
+ catch(Exception e)
+ {
+ 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);
+ }
+ catch(Exception e)
+ {
+ 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();
+ private static final String stars = "************************************************************";
+ private static final String BACKEND_MBEAN_ON = "com.sun.appserv:category=config,type=applications";
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ class MemoryUsage
+ {
+ MemoryUsage(int Heap, int NonHeap)
+ {
+ heap = Heap;
+ nonHeap = NonHeap;
+ }
+
+ public String toString()
+ {
+ return "Heap: " + heap + ", Non-Heap: " + nonHeap;
+ }
+ int heap;
+ int nonHeap;
+ }
+}
+/***
+
+ [java] Heap Memory Usage:
+ [java] Memory that Java Virtual Machine initially requested to the Operating System: 0 Bytes
+ [java] Memory that Java Virtual Machine is guaranteed to receive from the Operating System: 53,731,328 Bytes
+ [java] Maximum Memory that Java Virtual Machine may get from the Operating System: 531,628,032 Bytes. Note that this is not guaranteed.
+ [java] Memory that Java Virtual Machine uses at this time: 31,348,920 Bytes
+
+ [java] Non-heap Memory Usage:
+ [java] Memory that Java Virtual Machine initially requested to the Operating System: 16,941,056 Bytes
+ [java] Memory that Java Virtual Machine is guaranteed to receive from the Operating System: 54,886,400 Bytes
+ [java] Maximum Memory that Java Virtual Machine may get from the Operating System: 100,663,296 Bytes. Note that this is not guaranteed.
+ [java] Memory that Java Virtual Machine uses at this time: 54,436,552 Bytes
+
+ [java] Approximate number of objects for which finalization is pending: 0
+
+
+ [java] Class loading and unloading in the Java Virtual Machine:
+ [java] Number of classes currently loaded in the Java Virtual Machine: 9,168
+ [java] Number of classes loaded in the Java Virtual Machine since the startup: 9,168
+ [java] Number of classes unloaded from the Java Virtual Machine: 0
+ [java] Just-in-time (JIT) compilation information in the Java Virtual Machine:
+*/
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
new file mode 100644
index 0000000..dd1c5bc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/MBeanServerConnectionFactory.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import com.sun.appserv.management.client.AppserverConnectionSource;
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.TrustAnyTrustManager;
+import javax.management.MBeanServerConnection;
+import javax.net.ssl.X509TrustManager;
+
+/** 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
+ adminPassword, final String adminHost, final String adminPort, final String isSecure) throws RuntimeException {
+
+ MBeanServerConnection mbsc = null;
+ try {
+ final String protocol = AppserverConnectionSource.PROTOCOL_HTTP;
+ final int port = Integer.parseInt(adminPort);
+ final boolean sec = Boolean.parseBoolean(isSecure);
+ final TLSParams tlsp = sec ? getDummyTLSParams() : null;
+ final AppserverConnectionSource acs = new AppserverConnectionSource(protocol, adminHost, port, adminUser, adminPassword, tlsp, null);
+ mbsc = acs.getMBeanServerConnection(true);
+ return ( mbsc );
+ } catch(final Exception e) {
+ 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;
+ try {
+ final String protocol = AppserverConnectionSource.PROTOCOL_RMI;
+ final int port = Integer.parseInt(rmiPort);
+ final boolean sec = Boolean.parseBoolean(isSecure);
+ final TLSParams tlsp = sec ? getDummyTLSParams() : null;
+ final AppserverConnectionSource acs = new AppserverConnectionSource(protocol, adminHost, port, adminUser, adminPassword, tlsp, null);
+ mbsc = acs.getMBeanServerConnection(true);
+ return ( mbsc );
+ } catch(final Exception e) {
+ 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
new file mode 100644
index 0000000..9eb5781
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/ObjectNameTest.java
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+/*
+ * ObjectNameTest.java
+ *
+ * Created on July 19, 2005, 2:38 AM
+*/
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.admin.mbeans.custom.CustomMBeanConstants;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+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() {
+ }
+
+ public long getExecutionTime() {
+ return ( end - start );
+ }
+
+ public String getName() {
+ return ( ObjectNameTest.class.getName() );
+ }
+
+ public void setMBeanServerConnection(final MBeanServerConnection c) {
+ this.mbsc = c;
+ }
+
+ public String test() {
+ try {
+ start = System.currentTimeMillis();
+ testInvalidObjectNames();
+ testDuplicateObjectNames();
+ testEquivalentObjectNames();
+ System.out.println("Various ObjectName tests ...");
+ return ( SimpleReporterAdapter.PASS );
+ } catch(final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ } finally {
+ end = System.currentTimeMillis();
+ }
+ }
+ ///// Private /////
+ private void testInvalidObjectNames() 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);
+
+ //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) {
+ //exception should be thrown and should be squelched as test passes in that case.
+ System.out.println(e.getMessage());
+ }
+ //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);
+
+ final String p1 = "bar=baz" + System.currentTimeMillis();
+ 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);
+ params.put(CustomMBeanConstants.NAME_KEY, name + System.currentTimeMillis());
+ 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 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";
+ final Object[] operParams = new Object[]{ target, params, attributes };
+ final String[] operSign = new String[]{ String.class.getName(), Map.class.getName(), Map.class.getName() };
+ return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+ private List<String> invokeListRegisteredMBeansMethod(final String target) throws Exception {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "listMBeanNames";
+ final Object[] operParams = new Object[]{ target };
+ final String[] operSign = new String[]{ String.class.getName() };
+ return ( (List<String>) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+ private String invokeDeleteMBeanMethod(final String target, final String name) throws Exception {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "deleteMBean";
+ 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
new file mode 100644
index 0000000..7e3e6c2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/PrimitiveDataTypeMBeanTest.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+/*
+ * PrimitiveDataTypeMBeanTest.java
+ *
+ * Created on July 9, 2005, 11:01 PM
+ */
+
+/**
+ *
+ */
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.admin.mbeans.custom.CustomMBeanConstants;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import javax.management.MBeanServerConnection;
+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";
+ private static final String BACKEND_MBEAN_ON = "com.sun.appserv:category=config,type=applications";
+ /** Creates a new instance of PrimitiveDataTypeMBeanTest */
+ public PrimitiveDataTypeMBeanTest() {
+ }
+
+ public long getExecutionTime() {
+ return ( end - start );
+ }
+
+ public String getName() {
+ return ( PrimitiveDataTypeMBeanTest.class.getName() );
+ }
+
+ public void setMBeanServerConnection(final MBeanServerConnection c) {
+ this.mbsc = c;
+ }
+
+ public String test() {
+ try {
+ start = System.currentTimeMillis();
+ testCreatePrimitiveDataTypeMBean();
+ System.out.println("This test makes sure that an MBean ");
+ return ( SimpleReporterAdapter.PASS );
+ } catch(final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ finally {
+ end = System.currentTimeMillis();
+ }
+ }
+
+ /** This test tests the PrimitiveStandardMBean
+ */
+ private void testCreatePrimitiveDataTypeMBean() throws Exception {
+ final String target = null;
+ final Map<String, String> params = new HashMap<String, String> ();
+ params.put(CustomMBeanConstants.IMPL_CLASS_NAME_KEY, SS_CUSTOM_MBEAN_CLASS);
+ params.put(CustomMBeanConstants.NAME_KEY, "custom" + System.currentTimeMillis());
+ final Map<String, String> attributes = getAttributeMapForPrimitives();
+ final String name = invokeCustomMBeanCreationMethod(target, params, attributes);
+ System.out.println("MBean created in domain: " + name);
+ List<String> names = invokeListRegisteredMBeansMethod(target);
+ //this should contain the mbean just created
+ if (!names.contains(name)) {
+ throw new RuntimeException("MBean got created, but is not listed ..." + name);
+ }
+ else {
+ System.out.println("The list shows recently created MBean: " + name);
+ }
+ }
+ ///// 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) {
+ final Random r = new Random();
+ final int N = 26;
+ final byte b[] = new byte[N];
+ for (int i = 0; i < N; i++) {
+ int x = 0;
+ do {
+ x = r.nextInt(hi);
+ } while (x <= hi && lo >= x);
+ b[i] = (byte)x;
+ }
+ return ( new String (b) );
+ }
+ 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";
+ final Object[] operParams = new Object[]{ target, params, attributes };
+ final String[] operSign = new String[]{ String.class.getName(), Map.class.getName(), Map.class.getName() };
+ return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+ private List<String> invokeListRegisteredMBeansMethod(final String target) throws Exception {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "listMBeanNames";
+ final Object[] operParams = new Object[]{ target };
+ final String[] operSign = new String[]{ String.class.getName() };
+ return ( (List<String>) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+ private String invokeDeleteMBeanMethod(final String target, final String name) throws Exception {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "deleteMBean";
+ 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
new file mode 100644
index 0000000..2d740bd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/QueryMBeansTest.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+/*
+ * QueryMBeansTest.java
+ *
+ * Created on July 22, 2005, 12:53 AM
+ */
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.admin.mbeans.jvm.JVMInformationMBean;
+import com.sun.enterprise.admin.server.core.AdminService;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Set;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectName;
+import javax.management.QueryExp;
+
+/**
+ */
+public class QueryMBeansTest implements RemoteAdminQuicklookTest {
+
+ private MBeanServerConnection mbsc;
+
+ private long start, end;
+
+ public QueryMBeansTest() {}
+
+ public void setMBeanServerConnection(MBeanServerConnection c) {
+ this.mbsc = c;
+ }
+
+ public String test() {
+ try {
+ start = System.currentTimeMillis();
+ queryAllMBeans();
+ System.out.println("Gets all MBeans");
+ return SimpleReporterAdapter.PASS;
+ } catch(final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ } finally {
+ end = System.currentTimeMillis();
+ }
+ }
+
+ public String getName() {
+ return ( this.getClass().getName() );
+ }
+
+ public long getExecutionTime() {
+ return ( end - start );
+ }
+
+ private File getFile() {
+ String path = null; //set it to user passed arg
+ 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 {
+ pw = new PrintWriter(new FileWriter(getFile()));
+ for (String domain : domains) {
+ name = new ObjectName(domain+":*");
+ 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)
+ throws IOException {
+ pw.println("/***********************************************************/");
+ pw.println(" " + domain + " ");
+ pw.println("/***********************************************************/");
+
+ 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
new file mode 100644
index 0000000..03f26a5a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/RemoteAdminQuicklookTest.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.management.MBeanServerConnection;
+public interface RemoteAdminQuicklookTest {
+ /** Performs an arbitrary test and returns the result of the same as a String.
+ * The returned result must be something that is available as status string in
+ * 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
+ */
+ public long getExecutionTime();
+}
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
new file mode 100644
index 0000000..aa1e613
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SMFTest.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+/*
+ * SMFTest.java
+ *
+ * Created on August 22, 2005, 5:40 PM
+ */
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.admin.servermgmt.SMFService;
+import com.sun.enterprise.admin.servermgmt.SMFService.AppserverServiceType;
+import com.sun.enterprise.admin.servermgmt.SMFServiceHandler;
+import com.sun.enterprise.admin.servermgmt.ServiceHandler;
+import java.io.FileInputStream;
+import java.util.Date;
+import java.util.Properties;
+import javax.management.MBeanServerConnection;
+/**
+ */
+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();
+ start = System.currentTimeMillis();
+ }
+
+ public long getExecutionTime() {
+ return ( end - start );
+ }
+
+ public void setMBeanServerConnection(final MBeanServerConnection c) {
+ }
+
+ public String getName() {
+ return ( this.getClass().getName() );
+ }
+
+ public String test() {
+ try {
+ start = System.currentTimeMillis();
+ testPlatform();
+ createSMFService();
+ System.out.println("This test just creates the SMF service");
+ return ( SimpleReporterAdapter.PASS );
+ } catch(final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ finally {
+ end = System.currentTimeMillis();
+ }
+
+ }
+ private void setProperties() throws Exception {
+ final Properties additional = new Properties();
+ additional.load(new FileInputStream(CONFIG_FILE));
+ final Properties existing = System.getProperties();
+ existing.putAll(additional);
+ System.setProperties(existing);
+ existing.list(System.out);
+ }
+ private void testPlatform() throws Exception {
+ final String OS_NAME = "SunOS";
+ 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")) &&
+ 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();
+ ss.setDate(new Date().toString());
+ ss.setAsadminPath(System.getProperty("AS_ADMIN_PATH"));
+ ss.setName(System.getProperty("SERVICE_NAME"));
+ ss.setLocation(System.getProperty("SERVICE_LOCATION"));
+ ss.setFQSN();
+ ss.setOSUser();
+ ss.setPasswordFilePath(System.getProperty("PASSWORD_FILE_PATH"));
+ ss.setType(SMFService.AppserverServiceType.valueOf(System.getProperty("SERVICE_TYPE")));
+ System.out.println(ss.toString());
+ final boolean v = ss.isConfigValid();
+ smfsh.createService(ss.tokensAndValues());
+ }
+}
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
new file mode 100644
index 0000000..105d947
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SimpleStandardCustomMBeanTest.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.management.MBeanServerConnection;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.admin.mbeans.custom.CustomMBeanConstants;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.management.ObjectName;
+
+/*
+ * SimpleStandardCustomMBeanTest.java
+ *
+ * Created on July 2, 2005, 2:27 AM
+*/
+
+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
+ */
+ public SimpleStandardCustomMBeanTest() {
+ }
+
+ public long getExecutionTime() {
+ return ( end - start ) ;
+ }
+
+ public String getName() {
+ return ( this.getClass().getName() );
+ }
+
+ public void setMBeanServerConnection(MBeanServerConnection c) {
+ this.mbsc = c;
+ }
+
+ public String test() {
+ try {
+ start = System.currentTimeMillis();
+ testCreateDeleteListBasic();
+ System.out.println("This test makes sure that SimpleStandard, which is a standard MBean can be properly created, deleted \nWhen this test is successful, an mbean is created, made sure it is created, and then deleted");
+ return ( SimpleReporterAdapter.PASS );
+ } catch(final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ finally {
+ end = System.currentTimeMillis();
+ }
+ }
+
+ private void testCreateDeleteListBasic() throws Exception {
+ final String target = null;
+ final Map<String, String> params = new HashMap<String, String> ();
+ params.put(CustomMBeanConstants.IMPL_CLASS_NAME_KEY, SS_CUSTOM_MBEAN_CLASS);
+ final Map<String, String> attributes = new HashMap<String, String> ();
+ final String name = invokeCustomMBeanCreationMethod(target, params, attributes);
+ System.out.println("MBean created in domain: " + name);
+ List<String> names = invokeListRegisteredMBeansMethod(target);
+ //this should contain the mbean just created
+ if (!names.contains(name)) {
+ throw new RuntimeException("MBean got created, but is not listed ..." + name);
+ }
+ else {
+ System.out.println("The list shows recently created MBean: " + name);
+ }
+ final String deleted = invokeDeleteMBeanMethod(target, name);
+ System.out.println("MBean deleted from domain: " + deleted);
+ names = invokeListRegisteredMBeansMethod(target);
+ //this should NOT contain the mbean just created
+ if (names.contains(deleted)) {
+ throw new RuntimeException("The MBean is deleted, but list incorrectly shows it ..." + deleted);
+ }
+ else {
+ System.out.println("The deleted MBean is correctly removed from returned list ...." + deleted);
+ }
+ }
+ ///// 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";
+ final Object[] operParams = new Object[]{ target, params, attributes };
+ final String[] operSign = new String[]{ String.class.getName(), Map.class.getName(), Map.class.getName() };
+ return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+ private List<String> invokeListRegisteredMBeansMethod(final String target) throws Exception {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "listMBeanNames";
+ final Object[] operParams = new Object[]{ target };
+ final String[] operSign = new String[]{ String.class.getName() };
+ return ( (List<String>) mbsc.invoke(on, oper, operParams, operSign) );
+ }
+ private String invokeDeleteMBeanMethod(final String target, final String name) throws Exception {
+ final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
+ final String oper = "deleteMBean";
+ 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
new file mode 100644
index 0000000..50f30e7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/StringTest.java
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+/*
+ * StringTest.java
+ *
+ * Created on February 19, 2006
+ */
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import javax.management.MBeanServerConnection;
+import com.sun.enterprise.admin.mbeans.custom.CMBStrings;
+import java.util.*;
+
+/**
+ */
+public class StringTest implements RemoteAdminQuicklookTest
+{
+ 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
+ {
+ start = System.currentTimeMillis();
+ bundles = CMBStrings.getBundles();
+ dump();
+ return ( SimpleReporterAdapter.PASS );
+ }
+ catch(final Exception e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ end = System.currentTimeMillis();
+ }
+ }
+
+ private void dump()
+ {
+ // the first bundle has the log messages...
+ ResourceBundle bundle = bundles.get(0);
+ makeLog(bundle);
+ dumpLog();
+ }
+
+ 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);
+
+ if(key.startsWith("ADM16") || val.startsWith("ADM16"))
+ props.add(new Property(key, val));
+ }
+ catch(Exception e)
+ {
+ System.out.println("EXCEPTION getting value for " + key);
+ }
+
+ }
+
+ // now create a list of LogProperty from the props...
+ for(Property p : props)
+ {
+ if(p.cause == false)
+ loglist.add(new LogProperty(p, props));
+ }
+
+
+ }
+ private void dumpLog()
+ {
+ System.out.println("\n******************************************************");
+ System.out.println("************* DUMP LOG MESSAGES **********************");
+ System.out.println("******************************************************\n");
+ for(LogProperty p : loglist)
+ System.out.println(p);
+ }
+
+ int parseNum(String s)
+ {
+ try
+ {
+ return Integer.parseInt(s.substring(3, 7));
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ return -1;
+ }
+ }
+
+ private final static String CONFIG_FILE="stringtest.properties";
+ private long start, end;
+ 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);
+ cause = true;
+ }
+ else if(val.startsWith(CMB_PREFIX))
+ {
+ num = parseNum(val);
+ cause = false;
+ }
+ }
+ Property(Property p)
+ {
+ key = p.key;
+ val = p.val;
+ cause = p.cause;
+ num = p.num;
+ }
+ public String toString()
+ {
+ return "Key: " + key + "\nVal: " + val + "\nNum: " + num + "\n";
+ }
+ String key;
+ String val;
+ 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);
+ }
+ }
+
+ 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
new file mode 100644
index 0000000..c0eb5e1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/TestDriver.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.util.*;
+//import com.sun.enterprise.util.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import javax.management.MBeanServerConnection;
+
+public class TestDriver {
+
+ private String adminUser;
+ private String adminPassword;
+ private String adminHost;
+ private String adminPort;
+ private String isSecure;
+ private final File testFile;
+ private boolean useRmi;
+ 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";
+ /** Creates a new instance of TestDriver */
+ public TestDriver() throws Exception {
+ tests = new ArrayList<RemoteAdminQuicklookTest> ();
+ //loadProperties();
+ loadRmiProperties();
+ testFile = new File(testfileName);
+ initializeConnection();
+ initializeTestClasses();
+ }
+
+ public static void main(final String[] env) throws Exception {
+ TestDriver t = new TestDriver();
+ t.testAndReportAll();
+ }
+
+ ///// private methods /////
+ private void initializeConnection() throws Exception {
+ System.out.println("Connection Properties: " + adminUser + " " + adminPassword + " " + adminHost + " " + adminPort + " " + isSecure);
+ if (useRmi) {
+ mbsc = MBeanServerConnectionFactory.getMBeanServerConnectionRMI(adminUser, adminPassword, adminHost, adminPort, isSecure);
+ System.out.println("Using RMI: " + mbsc.toString());
+ }
+ else {
+ mbsc = MBeanServerConnectionFactory.getMBeanServerConnectionHTTPOrHTTPS(adminUser, adminPassword, adminHost, adminPort, isSecure);
+ System.out.println("Using HTTP: " + mbsc.toString());
+ }
+ }
+ private void initializeTestClasses() throws Exception {
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(testFile));
+ String line = null;
+ while ((line = br.readLine()) != null) {
+ if (line.startsWith(SCRIPT_COMMENT))
+ continue;
+ System.out.println(line);
+ final RemoteAdminQuicklookTest t = c2T(line);
+ tests.add(t);
+ }
+ } finally {
+ try {
+ br.close();
+ } catch(final Exception e) {}
+ }
+ }
+
+ private RemoteAdminQuicklookTest c2T(final String testClass) throws RuntimeException {
+ try {
+ final Class c = Class.forName(testClass);
+ final RemoteAdminQuicklookTest t = (RemoteAdminQuicklookTest) c.newInstance();
+ System.out.println("mbsc.... " + mbsc.getDefaultDomain());
+ t.setMBeanServerConnection(this.mbsc);
+ return ( t );
+ } catch (final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+ private void testAndReportAll() {
+ reporter.addDescription(DESC);
+ long total = 0;
+ for (RemoteAdminQuicklookTest t : tests) {
+ boolean failed = false;
+ try {
+ testAndReportOne(t);
+ reporter.addStatus(t.getName(), reporter.PASS);
+ } catch(final Exception e) {
+ e.printStackTrace();
+ reporter.addStatus(t.getName(), reporter.FAIL);
+ total += t.getExecutionTime();
+ reporter.printSummary(getSummaryString(total));
+ System.out.println(getSummaryString(total));
+ failed = true;
+ } finally {
+ total += t.getExecutionTime();
+ }
+ }
+ reporter.printSummary(getSummaryString(total));
+ System.out.println(getSummaryString(total));
+ }
+ private String getSummaryString(final long time) {
+ final String s = "Admin Tests: Time Taken = " + time + " milliseconds";
+ return ( s );
+ }
+ private void testAndReportOne(final RemoteAdminQuicklookTest t) {
+ final String status = t.test();
+ //reporter.addStatus(t.getName(), status);
+ }
+
+
+ private void loadRmiProperties() throws Exception {
+ final Properties rmip = new Properties();
+ final String rmipf = "rmi.properties";
+ rmip.load(new BufferedInputStream(new FileInputStream(rmipf)));
+ useRmi = Boolean.valueOf(rmip.getProperty("useRmi"));
+ adminUser = rmip.getProperty("adminUser");
+ adminPassword = rmip.getProperty("adminPassword");
+ adminHost = rmip.getProperty("adminHost");
+ adminPort = rmip.getProperty("adminPort");
+ isSecure = rmip.getProperty("isSecure");
+ testfileName = rmip.getProperty("testFile");
+ }
+/*
+ private void loadProperties()
+ {
+ LocalStringsImpl lsi = new LocalStringsImpl();
+ useRmi = lsi.getBoolean("useRmi", true);
+ adminUser = lsi.getString("adminUser", "admin");
+ adminPassword = lsi.getString("adminPassword", "adminadmin");
+ adminHost = lsi.getString("adminHost", "localhost");
+ adminPort = lsi.getString("adminPort", "4848");
+ Boolean bisSecure = lsi.getBoolean("isSecure", false);
+ 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
new file mode 100644
index 0000000..8edbb0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbe.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * ASProbe.java
+ *
+ * Created on March 29, 2006, 4:44 PM
+ */
+package testmbeans;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import java.lang.management.MemoryUsage;
+import java.lang.management.ThreadMXBean;
+import javax.management.*;
+
+/**
+ * Class ASProbe
+ * ASProbe Description
+ * @author bnevins
+ */
+public class ASProbe implements ASProbeMBean
+{
+ public ASProbe()
+ {
+ 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();
+ return webNames;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ 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];
+
+ 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);
+
+ oper = "getWebModuleNamesList";
+ webNames = (String[])mbsc.invoke(on, oper, operParams, operSign);
+ }
+ catch(Exception e)
+ {
+ numApps = -1;
+ heapUsage = -1;
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private long timestamp;
+ private int numApps;
+ private int numEJB;
+ private int numWeb;
+ private int numComponents;
+ private long heapUsage;
+ private long heapMax;
+ private int peakThreadCount;
+ private int threadCount;
+ private String[] appNames;
+ private String[] webNames;
+ private static final String BACKEND_MBEAN_ON = "com.sun.appserv:category=config,type=applications";
+}
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbeMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbeMBean.java
new file mode 100644
index 0000000..0e8735b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbeMBean.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * ASProbeMBean.java
+ *
+ * Created on March 29, 2006, 4:44 PM
+ */
+package testmbeans;
+
+/**
+ * Interface ASProbeMBean
+ * ASProbe Description
+ * @author bnevins
+ */
+public interface ASProbeMBean
+{
+ /**
+ * Get Amount of memory allocated in JVM
+ */
+ public long getHeapUsage();
+ public int getNumApps();
+ public int getNumEJBModules();
+ public int getNumWebModules();
+ public int getNumComponents();
+ public int getThreadCount();
+ public int getPeakThreadCount();
+ public String[] getAppNames();
+ public String[] getWebModuleNames();
+}
+
+
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
new file mode 100644
index 0000000..cf36716
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWT.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package testmbeans;
+
+import javax.management.*;
+import java.io.*;
+import javax.swing.JFrame;
+import java.awt.BorderLayout;
+import java.awt.Label;
+import java.net.URL;
+
+
+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";
+ public AWT()
+ {
+ trigger();
+ //throw new NullPointerException("NPE Here!!");
+ }
+ public synchronized void trigger()
+ {
+ try
+ {
+ // test the getResource in MBeanClassLoader
+ // also test this AWT code which will have a failed
+ // resource load of a log file
+
+ Class clazz = getClass();
+ URL url = clazz.getResource("/testmbeans/AWT.class");
+
+ String filename = "error";
+
+ if(url == null)
+ 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");
+ myFrame.setSize(1000, 180);
+ myFrame.setLocation(100,100);
+ //myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ myFrame.getContentPane().add(new Label(mesg,Label.CENTER), BorderLayout.CENTER);
+ myFrame.setVisible(true);
+ myFrame.show();
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWTMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWTMBean.java
new file mode 100644
index 0000000..4868026
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWTMBean.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package testmbeans;
+
+import javax.management.*;
+import java.io.*;
+import javax.swing.JFrame;
+import java.awt.BorderLayout;
+import java.awt.Label;
+
+public interface AWTMBean
+{
+ public void trigger();
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/BadCtor.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/BadCtor.java
new file mode 100644
index 0000000..a3ea294
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/BadCtor.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package testmbeans;
+
+/*
+import javax.management.*;
+import java.io.*;
+import javax.swing.JFrame;
+import java.awt.BorderLayout;
+import java.awt.Label;
+import java.net.URL;
+*/
+
+public class BadCtor implements BadCtorMBean
+{
+ public BadCtor()
+ {
+ int x = 0;
+ int y = 5 / x;
+ //throw new NullPointerException("NPE Here!!");
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/BadCtorMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/BadCtorMBean.java
new file mode 100644
index 0000000..a3cfda9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/BadCtorMBean.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package testmbeans;
+
+import javax.management.*;
+import java.io.*;
+import javax.swing.JFrame;
+import java.awt.BorderLayout;
+import java.awt.Label;
+
+public interface BadCtorMBean
+{
+}
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
new file mode 100644
index 0000000..f549984
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistration.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * ImplementsMBeanRegistration.java
+ *
+ * Created on March 17, 2006, 5:59 PM
+ */
+package testmbeans;
+import javax.management.*;
+import java.lang.reflect.Constructor;
+
+/**
+ * ImplementsMBeanRegistration Dynamic MBean
+ * ImplementsMBeanRegistration Description
+ * @author kedarm
+ */
+public class ImplementsMBeanRegistration extends ImplementsMBeanRegistrationDynamicSupport implements MBeanRegistration
+{
+ /* Creates a new instance of ImplementsMBeanRegistration */
+ public ImplementsMBeanRegistration()
+{
+ buildDynamicMBeanInfo();
+ }
+
+ /**
+ * Gets the value of the specified attribute of the DynamicMBean.
+ * @param attributeName The attribute name
+ */
+ public Object getAttribute(String attributeName)
+ throws AttributeNotFoundException,
+ MBeanException,
+ 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
+ */
+ public void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException,
+ InvalidAttributeValueException,
+ MBeanException,
+ ReflectionException {
+
+ if (attribute.getName().equals("Name")) {
+
+ //TODO set value of Name attribute
+
+ } else
+ throw new AttributeNotFoundException("Unknown Attribute "
+ + attribute.getName());
+ }
+
+ /**
+ * Allows an operation to be invoked on the DynamicMBean.
+ */
+ public Object invoke(String operationName,
+ Object params[],
+ String signature[])
+ throws MBeanException, ReflectionException {
+
+ throw new MBeanException(
+ new IllegalArgumentException("Unknown Operation " +
+ operationName));
+ }
+
+ /**
+ * Create the MBeanInfoConstructors.
+ * WARNING : if you add constructors to ImplementsMBeanRegistration class,
+ * you will have to update this method.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" MBeanInfo Support Code ">
+ 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,
+ * 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.
+ */
+ private void buildDynamicMBeanInfo() {
+ MBeanAttributeInfo[] dAttributes = new MBeanAttributeInfo[] {
+ new MBeanAttributeInfo("Name",
+ java.lang.String.class.getName(),
+ "A Name",
+ true,
+ true,
+ false)
+ };
+ MBeanConstructorInfo[] dConstructors = createConstructors();
+ MBeanOperationInfo[] dOperations = new MBeanOperationInfo[] {
+ };
+ dMBeanInfo = new MBeanInfo("ImplementsMBeanRegistration",
+ "ImplementsMBeanRegistration Description",
+ dAttributes,
+ dConstructors,
+ dOperations,
+ getNotificationInfo());
+ }
+ // </editor-fold>
+
+ public MBeanNotificationInfo[] getNotificationInfo() {
+ return new MBeanNotificationInfo[] {};
+ }
+
+ private MBeanInfo dMBeanInfo;
+
+ /**
+ * Allows the MBean to perform any operations it needs before being
+ * registered in the MBean server. If the name of the MBean is not
+ * specified, the MBean can provide a name for its registration. If
+ * any exception is raised, the MBean will not be registered in the
+ * MBean server.
+ * @param server The MBean server in which the MBean will be registered.
+ * @name name The object name of the MBean. This name is null if the
+ * name parameter to one of the createMBean or registerMBean methods in
+ * the MBeanServer interface is null. In that case, this method must
+ * return a non-null ObjectName for the new MBean.
+ * @return The name under which the MBean is to be registered. This value
+ * must not be null. If the name parameter is not null, it will usually
+ * but not necessarily be the returned value.
+ * @trow Exception This exception will be caught by the MBean server and
+ * re-thrown as an MBeanRegistrationException.
+ */
+ public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
+ myName = name;
+ return name;
+ }
+
+ /**
+ * Allows the MBean to perform any operations needed after having
+ * been registered in the MBean server or after the registration has
+ * failed.
+ * @param registrationDone Indicates wether or not the MBean has been
+ * successfully registered in the MBean server. The value false means
+ * that the registration has failed.
+ */
+ public void postRegister(Boolean registrationDone) {
+ //TODO postRegister implementation;
+ }
+
+ /**
+ * Allows the MBean to perform any operations it needs before being
+ * unregistered by the MBean server.
+ * @trow Exception This exception will be caught by the MBean server and
+ * re-thrown as an MBeanRegistrationException.
+ */
+ public void preDeregister() throws Exception {
+ //TODO preDeregister implementation;
+ }
+
+ /**
+ * Allows the MBean to perform any operations needed after having been
+ * unregistered in the MBean server.
+ */
+ 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
new file mode 100644
index 0000000..dc3c355
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistrationDynamicSupport.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+//GEN-BEGIN:generatedCode
+/**
+ * ImplementsMBeanRegistrationDynamicSupport.java
+ *
+ * @author kedarm
+ * Created on March 17, 2006, 5:59 PM
+ */
+package testmbeans;
+import javax.management.*;
+import java.lang.reflect.Constructor;
+import java.util.Iterator;
+
+/**
+ * Generic Dynamic MBean treatment.
+ * This class implements <CODE>DynamicMBean</CODE> interface.
+ * It provides a generic implementation of <CODE>getAttributes</CODE> and
+ * <CODE>setAttributes</CODE>.
+ * For each attribute present in the received list, a call to abstract
+ * methods <CODE>getAttribute</CODE> or <CODE>setAttribute</CODE> is performed.
+ * <p>
+ * Extended Classes must implement <CODE>getAttribute</CODE> and
+ * <CODE>setAttribute</CODE> methods.
+ */
+public abstract class ImplementsMBeanRegistrationDynamicSupport implements javax.management.DynamicMBean
+{
+ /* Creates a new instance of ImplementsMBeanRegistrationDynamicSupport */
+ public ImplementsMBeanRegistrationDynamicSupport() {
+ }
+
+ /**
+ * Gets the value of the specified attribute of the DynamicMBean.
+ * @param attributeName The attribute name
+ */
+ public abstract Object getAttribute(String attributeName)
+ throws AttributeNotFoundException,
+ MBeanException,
+ ReflectionException;
+
+ /**
+ * Sets the value of the specified attribute of the DynamicMBean.
+ * @param attribute The attribute to set
+ */
+ public abstract void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException,
+ InvalidAttributeValueException,
+ MBeanException,
+ ReflectionException;
+
+ /**
+ * Create the MBeanInfoConstructors.
+ */
+ public static MBeanConstructorInfo[] createConstructors(Class clzz) {
+ Constructor[] constructors = clzz.getConstructors();
+ MBeanConstructorInfo[] infos = new MBeanConstructorInfo[
+ constructors.length];
+ for (int i = 0; i < constructors.length; i++) {
+ infos[i] = new MBeanConstructorInfo("Constructs a"
+ + clzz.getName() + "object", constructors[i]);
+ }
+ return infos;
+ }
+
+ /**
+ * Enables the get values of several attributes of the Dynamic MBean.
+ * @param attributeNames Array of attribute names
+ */
+ public AttributeList getAttributes(String[] attributeNames) {
+ AttributeList resultList = new AttributeList();
+ // build the result attribute list
+ for (int i = 0 ; i < attributeNames.length ; i++) {
+ try {
+ Object value = getAttribute((String) attributeNames[i]);
+ resultList.add(new Attribute(attributeNames[i],value));
+ } catch (Exception e) {//GEN-END:generatedCode
+ //e.printStackTrace();
+ }//GEN-BEGIN:generatedCode1
+ }
+ return resultList;
+ }
+
+ /**
+ * Sets the values of several attributes of the Dynamic MBean
+ * and returns the list of attributes that have been set.
+ * @param attributes The list of attributes to set
+ * @return List of set Attributes */
+ public AttributeList setAttributes(AttributeList attributes) {
+ AttributeList resultList = new AttributeList();
+ // For each attribute, try to set it and add to the result list
+ // if succesfull
+ for (Iterator i = attributes.iterator(); i.hasNext();) {
+ Attribute attr = (Attribute) i.next();
+ try {
+ setAttribute(attr);
+ String name = attr.getName();
+ Object value = getAttribute(name);
+ resultList.add(new Attribute(name,value));
+ } catch (Exception e) {//GEN-END:generatedCode1
+ //e.printStackTrace();
+ }//GEN-BEGIN:generatedCode2
+ }
+ return resultList;
+ }
+}
+//GEN-END:generatedCode2
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOven.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOven.java
new file mode 100644
index 0000000..82f5580
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOven.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package testmbeans;
+
+/**
+ * Interface MicrowaveOven
+ * MicrowaveOven Description
+ * @author kedarm
+ */
+public interface MicrowaveOven
+{
+ /**
+ * Get Color of the oven
+ */
+ public String getColor();
+
+ /**
+ * Get Number of functions in the oven
+ */
+ public int getNoFunctions();
+
+ /**
+ * Get Make of the oven
+ */
+ public String getMake();
+
+ /**
+ * Get How long it should be heated in seconds
+ */
+ public int getTimer();
+
+ /**
+ * Set How long it should be heated in seconds
+ */
+ public void setTimer(int value);
+
+ /**
+ * Get NewAttribute4 Description
+ */
+ public boolean getState();
+
+ /**
+ * Starts the Oven
+ *
+ */
+ public void start();
+
+ /**
+ * Stops the Oven
+ *
+ */
+ public void stop();
+
+}
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
new file mode 100644
index 0000000..4f52ff7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOvenImpl.java
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * MicrowaveOven.java
+ *
+ * Created on Sat Jul 02 02:03:02 PDT 2005
+ */
+package testmbeans;
+import javax.management.*;
+
+/**
+ * Dynamic MBean based on StandardMBean
+ * Class MicrowaveOvenImpl
+ * MicrowaveOvenImpl Description
+ * Note that this is an "extended" Standard MBean in that it does not need to follow the standard MBean design patterns.
+ * This MBean implements a Standard MBean interface called MicrowaveOven.
+ */
+public class MicrowaveOvenImpl extends javax.management.StandardMBean
+ implements MicrowaveOven, NotificationEmitter {
+
+ /** Attribute : Color */
+ private String color = null;
+
+ /** Attribute : NoFunctions */
+ private int noFunctions = 0;
+
+ /** Attribute : Make */
+ private String make = null;
+
+ /** Attribute : Timer */
+ private int timer = 0;
+
+ /** Attribute : State */
+ private boolean state = false;
+
+ /* Creates a new instance of MicrowaveOvenImpl */
+ public MicrowaveOvenImpl() throws NotCompliantMBeanException {
+ super(MicrowaveOven.class);
+ color = "BLACK";
+ noFunctions = 5;
+ make = "GE";
+ }
+
+ /**
+ * Get Color of the oven
+ */
+ public String getColor()
+ {
+ return color;
+ }
+
+ /**
+ * Get Number of functions in the oven
+ */
+ public int getNoFunctions()
+ {
+ return noFunctions;
+ }
+
+ /**
+ * Get Make of the oven
+ */
+ public String getMake()
+ {
+ return make;
+ }
+
+ /**
+ * Get How long it should be heated in seconds
+ */
+ public int getTimer()
+ {
+ return timer;
+ }
+
+ /**
+ * Set How long it should be heated in seconds
+ */
+ public void setTimer(int value)
+ {
+ timer = value;
+ }
+
+ /**
+ * Get NewAttribute4 Description
+ */
+ public boolean getState()
+ {
+ return state;
+ }
+
+ /**
+ * Starts the Oven
+ */
+ public void start()
+ {
+ //TODO Add the operation implementation
+ }
+
+ /**
+ * Stops the Oven
+ */
+ public void stop()
+ {
+ //TODO Add the operation implementation
+ }
+
+ /*
+ * Next are the methods to compute MBeanInfo.
+ * You shouldn't update these methods
+ */
+ protected String getDescription(MBeanInfo info) {
+ return "MicrowaveOven Description";
+ }
+
+ protected String getDescription(MBeanAttributeInfo info) {
+ String description = null;
+ if (info.getName().equals("Color")) {
+ description = "Color of the oven";
+ } else if (info.getName().equals("NoFunctions")) {
+ description = "Number of functions in the oven";
+ } else if (info.getName().equals("Make")) {
+ description = "Make of the oven";
+ } else if (info.getName().equals("Timer")) {
+ description = "How long it should be heated, in seconds";
+ } else if (info.getName().equals("State")) {
+ description = "The state of microwave oven";
+ }
+ return description;
+ }
+
+ protected String getDescription(MBeanOperationInfo op,
+ MBeanParameterInfo param,
+ int sequence) {
+ if (op.getName().equals("start")) {
+ switch (sequence) {
+ default : return null;
+ }
+ } else if (op.getName().equals("stop")) {
+ switch (sequence) {
+ default : return null;
+ }
+ }
+ return null;
+ }
+
+ protected String getParameterName(MBeanOperationInfo op,
+ MBeanParameterInfo param,
+ int sequence) {
+ if (op.getName().equals("start")) {
+ switch (sequence) {
+ default : return null;
+ }
+ } else if (op.getName().equals("stop")) {
+ switch (sequence) {
+ default : return null;
+ }
+ }
+ return null;
+ }
+
+ protected String getDescription(MBeanOperationInfo info) {
+ String description = null;
+ if (info.getName().equals("start")) {
+ description = "Starts the Oven";
+ } else if (info.getName().equals("stop")) {
+ description = "Stops the Oven";
+ }
+ return description;
+ }
+
+ public MBeanInfo getMBeanInfo() {
+ MBeanInfo mbinfo = super.getMBeanInfo();
+ return new MBeanInfo(mbinfo.getClassName(),
+ mbinfo.getDescription(),
+ mbinfo.getAttributes(),
+ mbinfo.getConstructors(),
+ mbinfo.getOperations(),
+ getNotificationInfo());
+ }
+
+ /**
+ * MBean Notification support
+ * You shouldn't update these methods
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
+ public void addNotificationListener(NotificationListener listener,
+ NotificationFilter filter, Object handback)
+ throws IllegalArgumentException {
+ broadcaster.addNotificationListener(listener, filter, handback);
+ }
+
+ public MBeanNotificationInfo[] getNotificationInfo() {
+ return new MBeanNotificationInfo[] {
+ new MBeanNotificationInfo(new String[] {
+ AttributeChangeNotification.ATTRIBUTE_CHANGE},
+ javax.management.AttributeChangeNotification.class.getName(),
+ "State changes")
+ };
+ }
+
+ public void removeNotificationListener(NotificationListener listener)
+ throws ListenerNotFoundException {
+ broadcaster.removeNotificationListener(listener);
+ }
+
+ public void removeNotificationListener(NotificationListener listener,
+ NotificationFilter filter, Object handback)
+ throws ListenerNotFoundException {
+ broadcaster.removeNotificationListener(listener, filter, handback);
+ }
+ // </editor-fold>
+
+ private synchronized long getNextSeqNumber() {
+ return seqNumber++;
+ }
+
+ 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
new file mode 100644
index 0000000..edf469e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProvider.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * ObjectNameSelfProvider.java
+ *
+ * Created on Sat Jul 02 02:07:27 PDT 2005
+ */
+package testmbeans;
+import javax.management.*;
+import java.util.*;
+import java.lang.reflect.Constructor;
+
+/**
+ * ObjectNameSelfProvider Dynamic MBean
+ * ObjectNameSelfProvider Description
+ * @author kedarm
+ */
+public class ObjectNameSelfProvider extends ObjectNameSelfProviderDynamicSupport implements MBeanRegistration
+{
+ private final ObjectName myON;
+ /* Creates a new instance of ObjectNameSelfProvider */
+ public ObjectNameSelfProvider() throws Exception
+ {
+ buildDynamicMBeanInfo();
+ myON = new ObjectName("user:type=myself");
+ }
+
+ /**
+ * Gets the value of the specified attribute of the DynamicMBean.
+ * @param attributeName The attribute name
+ */
+ public Object getAttribute(String attributeName)
+ throws AttributeNotFoundException,
+ MBeanException,
+ ReflectionException {
+
+ throw new AttributeNotFoundException("Unknown Attribute "
+ + attributeName);
+ }
+
+ /**
+ * Sets the value of the specified attribute of the DynamicMBean.
+ * @param attribute The attribute to set
+ */
+ public void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException,
+ InvalidAttributeValueException,
+ MBeanException,
+ ReflectionException {
+
+ throw new AttributeNotFoundException("Unknown Attribute "
+ + attribute.getName());
+ }
+
+ /**
+ * Allows an operation to be invoked on the DynamicMBean.
+ */
+ public Object invoke(String operationName,
+ Object params[],
+ String signature[])
+ throws MBeanException, ReflectionException {
+ throw new MBeanException(
+ new IllegalArgumentException("UnKnown Operation " +
+ operationName));
+ }
+
+ /**
+ * Create the MBeanInfoConstructors.
+ * WARNING : if you add constructors to ObjectNameSelfProvider class,
+ * you will have to update this method.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" MBeanInfo Support Code ">
+ 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,
+ * 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.
+ */
+ private void buildDynamicMBeanInfo() {
+ MBeanAttributeInfo[] dAttributes = new MBeanAttributeInfo[] {
+ };
+ MBeanConstructorInfo[] dConstructors = createConstructors();
+ MBeanOperationInfo[] dOperations = new MBeanOperationInfo[] {
+ };
+ dNotifications = new MBeanNotificationInfo[] {
+ };
+ dMBeanInfo = new MBeanInfo("testmbeans.ObjectNameSelfProvider",
+ "ObjectNameSelfProvider Description",
+ dAttributes,
+ dConstructors,
+ dOperations,
+ dNotifications);
+ }
+ // </editor-fold>
+
+
+ private MBeanNotificationInfo[] dNotifications;
+ private MBeanInfo dMBeanInfo;
+
+ public void postDeregister() {
+ System.out.println("Post Registration on: " + this.getClass().getName());
+ }
+
+ public void postRegister(Boolean booleanParam) {
+ }
+
+ public void preDeregister() throws Exception {
+ }
+
+ public ObjectName preRegister(MBeanServer mBeanServer, ObjectName objectName) throws Exception {
+ return (myON);
+ }
+}
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
new file mode 100644
index 0000000..ec41a63
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProviderDynamicSupport.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+//GEN-BEGIN:generatedCode
+/**
+ * ObjectNameSelfProviderDynamicSupport.java
+ *
+ * @author kedarm
+ * Created on Sat Jul 02 02:07:27 PDT 2005
+ */
+package testmbeans;
+import javax.management.*;
+import java.lang.reflect.Constructor;
+import java.util.Iterator;
+
+/**
+ * Generic Dynamic MBean treatment.
+ * This class implements <CODE>DynamicMBean</CODE> interface.
+ * It provides a generic implementation of <CODE>getAttributes</CODE> and
+ * <CODE>setAttributes</CODE>.
+ * For each attribute present in the received list, a call to abstract
+ * methods <CODE>getAttribute</CODE> or <CODE>setAttribute</CODE> is performed.
+ * <p>
+ * Extended Classes must implement <CODE>getAttribute</CODE> and
+ * <CODE>setAttribute</CODE> methods.
+ */
+public abstract class ObjectNameSelfProviderDynamicSupport implements javax.management.DynamicMBean
+{
+ /* Creates a new instance of ObjectNameSelfProviderDynamicSupport */
+ public ObjectNameSelfProviderDynamicSupport() {
+ }
+
+ /**
+ * Gets the value of the specified attribute of the DynamicMBean.
+ * @param attributeName The attribute name
+ */
+ public abstract Object getAttribute(String attributeName)
+ throws AttributeNotFoundException,
+ MBeanException,
+ ReflectionException;
+
+ /**
+ * Sets the value of the specified attribute of the DynamicMBean.
+ * @param attribute The attribute to set
+ */
+ public abstract void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException,
+ InvalidAttributeValueException,
+ MBeanException,
+ ReflectionException;
+
+ /**
+ * Create the MBeanInfoConstructors.
+ */
+ public static MBeanConstructorInfo[] createConstructors(Class clzz) {
+ Constructor[] constructors = clzz.getConstructors();
+ MBeanConstructorInfo[] infos = new MBeanConstructorInfo[
+ constructors.length];
+ for (int i = 0; i < constructors.length; i++) {
+ infos[i] = new MBeanConstructorInfo("Constructs a"
+ + clzz.getName() + "object", constructors[i]);
+ }
+ return infos;
+ }
+
+ /**
+ * Enables the get values of several attributes of the Dynamic MBean.
+ * @param attributeNames Array of attribute names
+ */
+ public AttributeList getAttributes(String[] attributeNames) {
+ AttributeList resultList = new AttributeList();
+ // build the result attribute list
+ for (int i = 0 ; i < attributeNames.length ; i++) {
+ try {
+ Object value = getAttribute((String) attributeNames[i]);
+ resultList.add(new Attribute(attributeNames[i],value));
+ } catch (Exception e) {
+ //e.printStackTrace();
+ }
+ }
+ return resultList;
+ }
+
+ /**
+ * Sets the values of several attributes of the Dynamic MBean
+ * and returns the list of attributes that have been set.
+ * @param attributes The list of attributes to set
+ * @return List of set Attributes */
+ public AttributeList setAttributes(AttributeList attributes) {
+ AttributeList resultList = new AttributeList();
+ // For each attribute, try to set it and add to the result list
+ // if succesfull
+ for (Iterator i = attributes.iterator(); i.hasNext();) {
+ Attribute attr = (Attribute) i.next();
+ try {
+ setAttribute(attr);
+ String name = attr.getName();
+ Object value = getAttribute(name);
+ resultList.add(new Attribute(name,value));
+ } catch (Exception e) {
+ //e.printStackTrace();
+ }
+ }
+ return resultList;
+ }
+} //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
new file mode 100644
index 0000000..918f664
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/OneClassDynamicMBean.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * OneClassDynamicMBean.java
+ *
+ * Created on Mon Aug 08 00:27:27 PDT 2005
+ */
+package testmbeans;
+import java.lang.reflect.Constructor;
+import javax.management.*;
+import java.util.*;
+
+
+/**
+ * OneClassDynamicMBean Dynamic MBean
+ * OneClassDynamicMBean Description
+ * @author kedarm
+ */
+public class OneClassDynamicMBean implements DynamicMBean
+{
+ /* Creates a new instance of OneClassDynamicMBean */
+ public OneClassDynamicMBean()
+ {
+ buildDynamicMBeanInfo();
+ }
+
+ /**
+ * Gets the value of the specified attribute of the DynamicMBean.
+ * @param attributeName The attribute name
+ */
+ public Object getAttribute(String attributeName)
+ throws AttributeNotFoundException,
+ MBeanException,
+ ReflectionException {
+
+ if (attributeName.equals("A1")) {
+
+ //TODO return value of A1 attribute
+
+ return null;
+ }
+
+ if (attributeName.equals("A2")) {
+
+ //TODO return value of A2 attribute
+
+ return null;
+ }
+
+ if (attributeName.equals("A3")) {
+
+ //TODO return value of A3 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
+ */
+ public void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException,
+ InvalidAttributeValueException,
+ MBeanException,
+ ReflectionException {
+
+ if (attribute.getName().equals("A1")) {
+
+ //TODO set value of A1 attribute
+
+ } else if (attribute.getName().equals("A2")) {
+
+ //TODO set value of A2 attribute
+
+ } else if (attribute.getName().equals("A3")) {
+
+ //TODO set value of A3 attribute
+
+ } else
+ throw new AttributeNotFoundException("Unknown Attribute "
+ + attribute.getName());
+ }
+
+ /**
+ * Allows an operation to be invoked on the DynamicMBean.
+ */
+ public Object invoke(String operationName,
+ Object params[],
+ String signature[])
+ throws MBeanException, ReflectionException {
+ String[] methodSignature;
+
+ methodSignature = new String[] {
+ };
+ if (operationName.equals("sayHi") && Arrays.equals(signature, methodSignature)) {
+
+ //TODO add your code here
+
+ return null;
+ }
+
+ throw new MBeanException(
+ new IllegalArgumentException("Unknown Operation " +
+ operationName));
+ }
+
+ /**
+ * Create the MBeanInfoConstructors.
+ * WARNING : if you add constructors to OneClassDynamicMBean class,
+ * you will have to update this method.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" MBeanInfo Support Code ">
+ private MBeanConstructorInfo[] createConstructors() {
+ final Class clzz = this.getClass();
+ Constructor[] constructors = clzz.getConstructors();
+ MBeanConstructorInfo[] infos = new MBeanConstructorInfo[
+ constructors.length];
+ for (int i = 0; i < constructors.length; i++) {
+ infos[i] = new MBeanConstructorInfo("Constructs a"
+ + clzz.getName() + "object", constructors[i]);
+ }
+ return infos;
+ }
+
+ /**
+ * 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,
+ * 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.
+ */
+ private void buildDynamicMBeanInfo() {
+ MBeanAttributeInfo[] dAttributes = new MBeanAttributeInfo[] {
+ new MBeanAttributeInfo("A1",
+ java.lang.String.class.getName(),
+ "A1",
+ true,
+ true,
+ false),
+ new MBeanAttributeInfo("A2",
+ java.lang.Boolean.TYPE.getName(),
+ "A2",
+ true,
+ true,
+ true),
+ new MBeanAttributeInfo("A3",
+ javax.management.ObjectName.class.getName(),
+ "ObjectName A3",
+ true,
+ true,
+ false)
+ };
+ MBeanConstructorInfo[] dConstructors = createConstructors();
+ MBeanParameterInfo[] sayHiParams = new MBeanParameterInfo[] {
+ };
+ MBeanOperationInfo[] dOperations = new MBeanOperationInfo[] {
+ new MBeanOperationInfo("sayHi",
+ "Greet",
+ sayHiParams,
+ java.lang.Void.TYPE.getName(),
+ MBeanOperationInfo.ACTION)
+ };
+ dNotifications = new MBeanNotificationInfo[] {
+ };
+ dMBeanInfo = new MBeanInfo("OneClassDynamicMBean",
+ "OneClassDynamicMBean Description",
+ dAttributes,
+ dConstructors,
+ dOperations,
+ dNotifications);
+ }
+ // </editor-fold>
+
+
+ private MBeanNotificationInfo[] dNotifications;
+ private MBeanInfo dMBeanInfo;
+
+ public AttributeList getAttributes(String[] str) {
+ return ( new AttributeList() );
+ }
+
+ public AttributeList setAttributes(AttributeList attributeList) {
+ return ( new AttributeList() );
+ }
+}
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
new file mode 100644
index 0000000..4129e12
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandard.java
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * PrimitiveStandard.java
+ *
+ * Created on Fri Jul 08 20:26:16 PDT 2005
+ */
+package testmbeans;
+import java.util.Date;
+import javax.management.*;
+
+/**
+ * Class PrimitiveStandard
+ * A Standard Test MBean with various attributes that are primitive data types.
+ * It is now extended to add more such types.
+ */
+public class PrimitiveStandard implements PrimitiveStandardMBean
+{
+ /** Attribute : State */
+ private boolean state = false;
+
+ /** Attribute : Rank */
+ private int rank = 0;
+
+ /** Attribute : Time */
+ private long time = 0;
+
+ /** Attribute : Length */
+ private byte length = (byte)0;
+
+ /** Attribute : ColorCode */
+ private char colorCode = (char)0;
+
+ /** Attribute : Characters */
+ private short characters = 0;
+
+ /** Attribute : AnnualPercentRate */
+ private float annualPercentRate = 0.0f;
+
+ /** 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()
+ {
+ }
+
+ /**
+ * Get A boolean State Attribute
+ */
+ public boolean getState()
+ {
+ return state;
+ }
+
+ /**
+ * Set A boolean State Attribute
+ */
+ public void setState(boolean value)
+ {
+ state = value;
+ }
+
+ /**
+ * Get An integer Rank
+ */
+ public int getRank()
+ {
+ return rank;
+ }
+
+ /**
+ * Set An integer Rank
+ */
+ public void setRank(int value)
+ {
+ rank = value;
+ }
+
+ /**
+ * Get Time in milliseconds
+ */
+ public long getTime()
+ {
+ return time;
+ }
+
+ /**
+ * Set Time in milliseconds
+ */
+ public void setTime(long value)
+ {
+ time = value;
+ }
+
+ /**
+ * Get Length in bytes
+ */
+ public byte getLength()
+ {
+ return length;
+ }
+
+ /**
+ * Set Length in bytes
+ */
+ public void setLength(byte value)
+ {
+ length = value;
+ }
+
+ /**
+ * Get A Color Code as a char
+ */
+ public char getColorCode()
+ {
+ return colorCode;
+ }
+
+ /**
+ * Set A Color Code as a char
+ */
+ public void setColorCode(char value)
+ {
+ colorCode = value;
+ }
+
+ /**
+ * Get Number of characters
+ */
+ public short getCharacters()
+ {
+ return characters;
+ }
+
+ /**
+ * Set Number of characters
+ */
+ public void setCharacters(short value)
+ {
+ characters = value;
+ }
+
+ /**
+ * Get The Annual Percent Rate as a float
+ */
+ public float getAnnualPercentRate()
+ {
+ return annualPercentRate;
+ }
+
+ /**
+ * Set The Annual Percent Rate as a float
+ */
+ public void setAnnualPercentRate(float value)
+ {
+ annualPercentRate = value;
+ }
+
+ /**
+ * Get Temperature in degrees
+ */
+ public double getTemperature()
+ {
+ return temperature;
+ }
+
+ /**
+ * Set Temperature in degrees
+ */
+ public void setTemperature(double value)
+ {
+ temperature = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setStartDate(Date date) {
+ this.sd = date;
+ }
+
+ public void setResourceObjectName(ObjectName on) {
+ this.ron = on;
+ }
+
+ public Date getStartDate() {
+ return ( sd );
+ }
+
+ public ObjectName getResourceObjectName() {
+ return ( ron );
+ }
+}
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
new file mode 100644
index 0000000..8356353
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandardMBean.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * PrimitiveStandardMBean.java
+ *
+ * Created on Fri Jul 08 20:26:16 PDT 2005
+ */
+package testmbeans;
+
+import java.util.Date;
+import javax.management.ObjectName;
+
+/**
+ * Interface PrimitiveStandardMBean
+ * A Standard Test MBean with various attributes that are primitive data types
+ */
+public interface PrimitiveStandardMBean
+{
+ /**
+ * Get A boolean State Attribute
+ */
+ public boolean getState();
+
+ /**
+ * Set A boolean State Attribute
+ */
+ public void setState(boolean value);
+
+ /**
+ * Get An integer Rank
+ */
+ public int getRank();
+
+ /**
+ * Set An integer Rank
+ */
+ public void setRank(int value);
+
+ /**
+ * Get Time in milliseconds
+ */
+ public long getTime();
+
+ /**
+ * Set Time in milliseconds
+ */
+ public void setTime(long value);
+
+ /**
+ * Get Length in bytes
+ */
+ public byte getLength();
+
+ /**
+ * Set Length in bytes
+ */
+ public void setLength(byte value);
+
+ /**
+ * Get A Color Code as a char
+ */
+ public char getColorCode();
+
+ /**
+ * Set A Color Code as a char
+ */
+ public void setColorCode(char value);
+
+ /**
+ * Get Number of characters
+ */
+ public short getCharacters();
+
+ /**
+ * Set Number of characters
+ */
+ public void setCharacters(short value);
+
+ /**
+ * Get The Annual Percent Rate as a float
+ */
+ public float getAnnualPercentRate();
+
+ /**
+ * Set The Annual Percent Rate as a float
+ */
+ public void setAnnualPercentRate(float value);
+
+ /**
+ * Get Temperature in degrees
+ */
+ public double getTemperature();
+
+ /**
+ * Set Temperature in degrees
+ */
+ public void setTemperature(double value);
+
+ /**
+ * Get Name as the String
+ */
+ public String getName();
+ /**
+ * 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
+ */
+ public void setResourceObjectName(ObjectName on);
+}
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
new file mode 100644
index 0000000..767dea6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/Reg.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * ImplementsMBeanRegistration.java
+ *
+ * Created on March 17, 2006, 5:59 PM
+ */
+package testmbeans;
+import javax.management.*;
+import java.lang.reflect.Constructor;
+
+public class Reg extends ImplementsMBeanRegistrationDynamicSupport implements MBeanRegistration
+{
+ /* Creates a new instance of ImplementsMBeanRegistration */
+ public Reg()
+{
+ buildDynamicMBeanInfo();
+ }
+
+ /**
+ * Gets the value of the specified attribute of the DynamicMBean.
+ * @param attributeName The attribute name
+ */
+ public Object getAttribute(String attributeName)
+ throws AttributeNotFoundException,
+ MBeanException,
+ 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
+ */
+ public void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException,
+ InvalidAttributeValueException,
+ MBeanException,
+ ReflectionException {
+
+ if (attribute.getName().equals("Name")) {
+
+ //TODO set value of Name attribute
+
+ } else
+ throw new AttributeNotFoundException("Unknown Attribute "
+ + attribute.getName());
+ }
+
+ /**
+ * Allows an operation to be invoked on the DynamicMBean.
+ */
+ public Object invoke(String operationName,
+ Object params[],
+ String signature[])
+ throws MBeanException, ReflectionException {
+
+ throw new MBeanException(
+ new IllegalArgumentException("Unknown Operation " +
+ operationName));
+ }
+
+ /**
+ * Create the MBeanInfoConstructors.
+ * WARNING : if you add constructors to ImplementsMBeanRegistration class,
+ * you will have to update this method.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" MBeanInfo Support Code ">
+ 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,
+ * 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.
+ */
+ private void buildDynamicMBeanInfo() {
+ MBeanAttributeInfo[] dAttributes = new MBeanAttributeInfo[] {
+ new MBeanAttributeInfo("Name",
+ java.lang.String.class.getName(),
+ "A Name",
+ true,
+ true,
+ false)
+ };
+ MBeanConstructorInfo[] dConstructors = createConstructors();
+ MBeanOperationInfo[] dOperations = new MBeanOperationInfo[] {
+ };
+ dMBeanInfo = new MBeanInfo("ImplementsMBeanRegistration",
+ "ImplementsMBeanRegistration Description",
+ dAttributes,
+ dConstructors,
+ dOperations,
+ getNotificationInfo());
+ }
+ // </editor-fold>
+
+ public MBeanNotificationInfo[] getNotificationInfo() {
+ return new MBeanNotificationInfo[] {};
+ }
+
+ private MBeanInfo dMBeanInfo;
+
+ /**
+ * Allows the MBean to perform any operations it needs before being
+ * registered in the MBean server. If the name of the MBean is not
+ * specified, the MBean can provide a name for its registration. If
+ * any exception is raised, the MBean will not be registered in the
+ * MBean server.
+ * @param server The MBean server in which the MBean will be registered.
+ * @name name The object name of the MBean. This name is null if the
+ * name parameter to one of the createMBean or registerMBean methods in
+ * the MBeanServer interface is null. In that case, this method must
+ * return a non-null ObjectName for the new MBean.
+ * @return The name under which the MBean is to be registered. This value
+ * must not be null. If the name parameter is not null, it will usually
+ * but not necessarily be the returned value.
+ * @trow Exception This exception will be caught by the MBean server and
+ * re-thrown as an MBeanRegistrationException.
+ */
+ public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
+ return new ObjectName("user", "foo", "xyz");
+ }
+
+ /**
+ * Allows the MBean to perform any operations needed after having
+ * been registered in the MBean server or after the registration has
+ * failed.
+ * @param registrationDone Indicates wether or not the MBean has been
+ * successfully registered in the MBean server. The value false means
+ * that the registration has failed.
+ */
+ public void postRegister(Boolean registrationDone) {
+ //TODO postRegister implementation;
+ }
+
+ /**
+ * Allows the MBean to perform any operations it needs before being
+ * unregistered by the MBean server.
+ * @trow Exception This exception will be caught by the MBean server and
+ * re-thrown as an MBeanRegistrationException.
+ */
+ public void preDeregister() throws Exception {
+ //TODO preDeregister implementation;
+ }
+
+ /**
+ * Allows the MBean to perform any operations needed after having been
+ * unregistered in the MBean server.
+ */
+ 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
new file mode 100644
index 0000000..81fd33c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandard.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * SimpleStandard.java
+ *
+ * Created on Sat Jul 02 01:54:54 PDT 2005
+ */
+package testmbeans;
+import javax.management.*;
+
+/**
+ * Class SimpleStandard
+ * SimpleStandard Description
+ */
+public class SimpleStandard implements SimpleStandardMBean, NotificationEmitter
+{
+ /** Attribute : Color */
+ private String color = null;
+
+ /** Attribute : State */
+ private boolean state = false;
+
+ /* Creates a new instance of SimpleStandard */
+ public SimpleStandard()
+ {
+ }
+
+ /**
+ * Get This is the Color Attribute.
+ */
+ public String getColor()
+ {
+ return color;
+ }
+
+ /**
+ * Set This is the Color Attribute.
+ */
+ public void setColor(String value)
+ {
+ color = value;
+ }
+
+ /**
+ * Get This is the State Attribute
+ */
+ public boolean getState()
+ {
+ return state;
+ }
+
+ /**
+ * Set This is the State Attribute
+ */
+ public void setState(boolean value)
+ {
+ state = value;
+ }
+
+ /**
+ * Greets someone
+ * @param name <code>String</code> The person to greet
+ */
+ public void greet(String name)
+ {
+ System.out.println("Hello, " + name);
+ }
+
+ /**
+ * MBean Notification support
+ * You shouldn't update these methods
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
+ public void addNotificationListener(NotificationListener listener,
+ NotificationFilter filter, Object handback)
+ throws IllegalArgumentException {
+ broadcaster.addNotificationListener(listener, filter, handback);
+ }
+
+ public MBeanNotificationInfo[] getNotificationInfo() {
+ return new MBeanNotificationInfo[] {
+ new MBeanNotificationInfo(new String[] {
+ AttributeChangeNotification.ATTRIBUTE_CHANGE},
+ javax.management.AttributeChangeNotification.class.getName(),
+ "Usual Attribute Change Notification")
+ };
+ }
+
+ public void removeNotificationListener(NotificationListener listener)
+ throws ListenerNotFoundException {
+ broadcaster.removeNotificationListener(listener);
+ }
+
+ public void removeNotificationListener(NotificationListener listener,
+ NotificationFilter filter, Object handback)
+ throws ListenerNotFoundException {
+ broadcaster.removeNotificationListener(listener, filter, handback);
+ }
+ // </editor-fold>
+
+ private synchronized long getNextSeqNumber() {
+ return seqNumber++;
+ }
+
+ private long seqNumber;
+ private final NotificationBroadcasterSupport broadcaster =
+ new NotificationBroadcasterSupport();
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandardMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandardMBean.java
new file mode 100644
index 0000000..a339465
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandardMBean.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * SimpleStandardMBean.java
+ *
+ * Created on Sat Jul 02 01:54:54 PDT 2005
+ */
+package testmbeans;
+
+/**
+ * Interface SimpleStandardMBean
+ * SimpleStandard Description
+ * @author kedarm
+ */
+public interface SimpleStandardMBean
+{
+ /**
+ * Get This is the Color Attribute.
+ */
+ public String getColor();
+
+ /**
+ * Set This is the Color Attribute.
+ */
+ public void setColor(String value);
+
+ /**
+ * Get This is the State Attribute
+ */
+ public boolean getState();
+
+ /**
+ * Set This is the State Attribute
+ */
+ public void setState(boolean value);
+
+ /**
+ * Greets someone
+ *
+ * @param name <code>String</code> The person to greet
+ */
+ public void greet(String name);
+
+}
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
new file mode 100644
index 0000000..445abc5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/TestNGDriver.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.enterprise.util.*;
+//import com.sun.enterprise.util.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import javax.management.MBeanServerConnection;
+import org.testng.annotations.*;
+import test.*;
+
+public class TestNGDriver {
+
+ private String adminUser;
+ private String adminPassword;
+ private String adminHost;
+ private String adminPort;
+ private String isSecure;
+ 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)
+ public void setUp() throws Exception {
+ loadProperties();
+ initializeConnection();
+ }
+
+
+ ///// private methods /////
+ private void initializeConnection() throws Exception {
+ System.out.println("Connection Properties: " + adminUser + " " + adminPassword + " " + adminHost + " " + adminPort + " " + isSecure);
+ if (useRmi) {
+ mbsc = MBeanServerConnectionFactory.getMBeanServerConnectionRMI(adminUser, adminPassword, adminHost, adminPort, isSecure);
+ System.out.println("Using RMI: " + mbsc.toString());
+ }
+ else {
+ mbsc = MBeanServerConnectionFactory.getMBeanServerConnectionHTTPOrHTTPS(adminUser, adminPassword, adminHost, adminPort, isSecure);
+ System.out.println("Using HTTP: " + mbsc.toString());
+ }
+ }
+
+ private RemoteAdminQuicklookTest c2T(final String testClass) throws RuntimeException {
+ try {
+ final Class c = Class.forName(testClass);
+ final RemoteAdminQuicklookTest t = (RemoteAdminQuicklookTest) c.newInstance();
+ System.out.println("mbsc.... " + mbsc.getDefaultDomain());
+ t.setMBeanServerConnection(this.mbsc);
+ return ( t );
+ } catch (final Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+ private void runRemoteAdminTest(String testClass) {
+ RemoteAdminQuicklookTest t = c2T(testClass);
+ t.test();
+ }
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runSimpleStandardCustomMBeanTest()
+ {
+ runRemoteAdminTest("test.SimpleStandardCustomMBeanTest");
+ }
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runPrimitiveDataTypeMBeanTest()
+ {
+ runRemoteAdminTest("test.PrimitiveDataTypeMBeanTest");
+ }
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runObjectNameTest()
+ {
+ runRemoteAdminTest("test.ObjectNameTest");
+ }
+
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runJVMInformationTest()
+ {
+ runRemoteAdminTest("test.JVMInformationTest");
+ }
+
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runAttributeSniffer()
+ {
+ runRemoteAdminTest("test.AttributeSniffer");
+ }
+
+
+ @Test(groups = {"RemoteAdminTests", "brokenTests"})
+ public void runSMFTest()
+ {
+ runRemoteAdminTest("test.SMFTest");
+ }
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runDeployManyMBeans()
+ {
+ runRemoteAdminTest("test.DeployManyMBeans");
+ }
+
+ @Test(groups = {"RemoteAdminTests"})
+ public void runStringTest()
+ {
+ runRemoteAdminTest("test.StringTest");
+ }
+
+ @Test(groups = {"RemoteAdminTests", "interactiveTests"})
+ public void runGetResourceTest()
+ {
+ runRemoteAdminTest("test.GetResourceTest");
+ }
+
+
+
+ /***
+ * private void loadRmiProperties() throws Exception {
+ rmip = new Properties();
+ rmip.load(new BufferedInputStream(new FileInputStream(rmipf)));
+ useRmi = Boolean.valueOf(rmip.getProperty("useRmi"));
+ adminUser = rmip.getProperty("adminUser");
+ adminPassword = rmip.getProperty("adminPassword");
+ adminHost = rmip.getProperty("adminHost");
+ adminPort = rmip.getProperty("adminPort");
+ isSecure = rmip.getProperty("isSecure");
+ }
+*/
+ private void loadProperties()
+ {
+ LocalStringsImpl lsi = new LocalStringsImpl();
+ useRmi = lsi.getBoolean("useRmi", true);
+ adminUser = lsi.getString("adminUser", "admin");
+ adminPassword = lsi.getString("adminPassword", "adminadmin");
+ adminHost = lsi.getString("adminHost", "localhost");
+ adminPort = lsi.getString("adminPort", "4849");
+ Boolean bisSecure = lsi.getBoolean("isSecure", true);
+ testfileName = lsi.getString("testfile", "tests.list");
+ isSecure = bisSecure.toString();
+ }
+
+ ///// private methods /////
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/testng.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/testng.xml
new file mode 100644
index 0000000..478b3d1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/testng.xml
@@ -0,0 +1,32 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<suite name="admin infrastructure tests" >
+ <test name="admin.remote-admin">
+ <groups>
+ <run>
+ <exclude name="brokenTests" />
+ <exclude name="interactiveTests" />
+ </run>
+ </groups>
+ <classes>
+ <class name="test.TestNGDriver" />
+ </classes>
+ </test>
+</suite>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/tests.list b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/tests.list
new file mode 100644
index 0000000..68966d6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/tests.list
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+# File Containing the list of Java Classes that implement AdminQuicklookTest
+test.SimpleStandardCustomMBeanTest
+test.PrimitiveDataTypeMBeanTest
+test.ObjectNameTest
+test.JVMInformationTest
+test.AttributeSniffer
+#test.SMFTest
+test.DeployManyMBeans
+test.StringTest
+test.GetResourceTest
+#test.BadCtorTest
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/README b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/README
new file mode 100644
index 0000000..a9359c7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/README
@@ -0,0 +1 @@
+unit tests for appclient
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml
new file mode 100644
index 0000000..02cbeea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+]>
+<!--
+
+ 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
+ build
+ 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
+ deploy.client
+ undeploy.ear
+ undeploy.client
+ test.standalone.client
+ test.embedded.client
+
+
+-->
+<project name="importedAppclient" default=".">
+ <target name="all" depends="clean,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="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common">
+ <antcall target="build.client"/>
+ <antcall target="build.ear"/>
+<!--
+ <antcall target="build.ejb"/>
+-->
+ </target>
+
+ <target name="build.ear">
+ <antcall target="ear-common"/>
+ </target>
+
+<!--
+ <target name="build.ejb">
+ <antcall target="ejb-common"/>
+ </target>
+-->
+
+<!--
+ The following implementation borrows heavily from the same target in
+ common.xml, but includes reporter.jar in the client jar so the client can report its
+ results.
+-->
+ <target name="build.client" depends="compile">
+ <delete file="${appclient.jar}"/>
+ <mkdir dir="${assemble.dir}"/>
+ <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"
+ level="verbose"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <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}">
+ <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>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy.ear"/>
+ <antcall target="deploy.client"/>
+ </target>
+
+ <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>
+
+ <target name="undeploy.client" depends="init-common">
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+ <target name="run">
+ <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}"/>
+ </antcall>
+ </target>
+
+ <target name="test.embedded.client" depends="init-common">
+ <antcall target="test.client">
+ <param name="generated.appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+ <param name="urlpath" value="/${appname}App/${clientname}"/>
+ </antcall>
+ </target>
+
+ <target name="test.undeployed.client" depends="init-common">
+ <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+ <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"/>
+ <echo>appclient -client ${generated.appclient.jar} ${appclient.application.args}</echo>
+ <exec executable="${APPCLIENT}" failonerror="false" logError="true">
+ <arg line="-client ${generated.appclient.jar}"/>
+ <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
new file mode 100644
index 0000000..fabce0d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.properties
@@ -0,0 +1,32 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="appcpath"/>
+<property name="appname" value="${module}"/>
+<property name="clientname" value="${appname}-client"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="ear/application.xml"/>
+<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="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
new file mode 100644
index 0000000..9a0b944
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<!--
+ 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
+ bundled with the app client. The test does not deploy the app client but
+ simply invokes the app client jar directly.
+
+-->
+<project name="appcpath" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <import file="../appclient.xml"/>
+
+ <target name="init" depends="init-common">
+ <property name="lib.jar.file" value="${assemble.dir}/appcpathlib.jar"/>
+ </target>
+
+ <!--
+ 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"/>
+
+ <target name="clean" depends="init">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="lib"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+
+ <antcall target="compile-common">
+ <param name="src" value="${env.APS_HOME}/util/reporter"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <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.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"
+ />
+ </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 name="run" depends="init">
+ <echo>Testing stand-alone client...</echo>
+ <!--
+ Run the client with a nonsense setting for the APPCPATH env. var.
+ 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>
+ </condition>
+ <echo>Test result: ${result}</echo>
+ </target>
+
+ <!--
+ The following macro executes the client with the APPCPATH set according
+ to the macro argument appcpath-setting.
+ -->
+ <macrodef name="runclient">
+ <attribute name="appcpath-setting"/>
+ <attribute name="resultproperty"/>
+ <attribute name="expectedOutcome" default="pass"/> <!-- either "pass" or "fail" -->
+ <sequential>
+ <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+ <property name="generated.appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+ <echo>With APPCPATH set to @{appcpath-setting} invoking...</echo>
+ <echo>appclient -client ${generated.appclient.jar} ${appclient.application.args}</echo>
+ <exec executable="${APPCLIENT}" failonerror="false" resultproperty="@{resultProperty}">
+ <arg line="-client ${generated.appclient.jar}"/>
+ <arg value="@{expectedOutcome}"/>
+ <env key="APPCPATH" value="@{appcpath-setting}"/>
+ </exec>
+ </sequential>
+ </macrodef>
+
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/MANIFEST.MF
new file mode 100644
index 0000000..7f5a8d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.appclient.appcpath.client.TestAPPCPATH
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
new file mode 100644
index 0000000..109df66
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/TestAPPCPATH.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.appclient.appcpath.client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import com.sun.s1asdev.appclient.appcpath.lib.LibUtil;
+import java.net.URL;
+import javax.sound.midi.SysexMessage;
+
+/**
+ *
+ * @author tjquinn
+ */
+public class TestAPPCPATH {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ /**
+ * Creates a new instance of TestAPPCPATH
+ */
+ public TestAPPCPATH() {
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ System.err.println(TestAPPCPATH.class.getClassLoader().getClass().getName());
+ int status = 1;
+ try {
+ stat.addDescription("Testing APPCPATH");
+ new TestAPPCPATH().run(args);
+ status = 0;
+ } catch (Throwable thr) {
+ System.err.println("Client detected the following error:");
+ thr.printStackTrace();
+ } finally {
+ 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.
+ *should point to this jar file as the client is run.
+ */
+ System.err.println("Attempting to instantiate LibUtil...");
+ boolean passExpected = (args[0].equalsIgnoreCase("pass"));
+ /*
+ *args[0] will be either PASS or FAIL, depending on the expected outcome.
+ */
+ try {
+ LibUtil lu = new LibUtil();
+ stat.addStatus("APPCPATH test", passExpected ? stat.PASS : stat.FAIL);
+ } catch (Throwable thr) {
+ stat.addStatus("APPCPATH test", passExpected ? stat.FAIL : stat.PASS);
+ throw thr;
+ }
+}
+
+}
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
new file mode 100644
index 0000000..d5948a6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/application-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application-client.xml
+ Created on : August 24, 2005, 3:58 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<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">
+
+ <display-name>Your App Client Here</display-name>
+
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/sun-application-client.xml
new file mode 100644
index 0000000..3027379
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <java-web-start-access>
+ <context-root>/TestAPPCPATH</context-root>
+ <vendor>Tests</vendor>
+ </java-web-start-access>
+</sun-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
new file mode 100644
index 0000000..02bbf7c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/lib/LibUtil.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.appclient.appcpath.lib;
+
+/**
+ *
+ * @author tjquinn
+ */
+public class LibUtil {
+
+ /** Creates a new instance of LibUtil */
+ public LibUtil() {
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/help/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/help/build.xml
new file mode 100644
index 0000000..a9a081b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/help/build.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+]>
+
+<project name="appclientHelp" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+
+ <condition property="isWin">
+ <os family="windows"/>
+ </condition>
+
+ <target name="all" depends="execAndCheck"/>
+
+ <target name="execAndCheck" depends="testHelp,testUsage"/>
+
+ <target name="testHelp">
+ <antcall target="exec">
+ <param name="keyword" value="-help"/>
+ </antcall>
+ <antcall target="checkResult">
+ <param name="keyword" value="-help"/>
+ <param name="expectedFragment" value="SYNOPSIS"/>
+ </antcall>
+ </target>
+
+ <target name="testUsage">
+ <antcall target="exec">
+ <param name="keyword" value="-usage"/>
+ </antcall>
+ <antcall target="checkResult">
+ <param name="keyword" value="-usage"/>
+ <param name="expectedFragment" value="Usage"/>
+ </antcall>
+ </target>
+
+ <target name="exec" depends="execWin,execNonwin">
+ </target>
+
+ <target name="execWin" if="isWin">
+ <exec executable="cmd" outputproperty="cmdOutput">
+ <arg value="/c"/>
+ <arg value="appclient.bat"/>
+ <arg value="${keyword}"/>
+ </exec>
+ </target>
+
+ <target name="execNonwin" unless="isWin">
+ <exec executable="appclient" outputproperty="cmdOutput">
+ <arg value="${keyword}"/>
+ </exec>
+ </target>
+
+ <target name="checkResult" depends="exec">
+ <condition property="checkOK">
+ <contains string="${cmdOutput}" substring="${expectedFragment}"/>
+ </condition>
+ <echo level="verbose">Result is ${checkOK} of checking for ${expectedFragment} in ${cmdOutput}</echo>
+ <fail unless="checkOK" message="appclient ${keyword} output did not contain expected fragment ${expectedFragment}."/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..7e8c3a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/build.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./../../report.xml">
+]>
+
+<project name="jws" default="usage" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <antcall target="showArgs"/>
+ <antcall target="showArgsWithLib"/>
+ <antcall target="showArgsWithSignedLib"/>
+ </target>
+
+ <target name="runsubtest">
+ <record name="${subtest.name}.output" action="start"/>
+ <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"/>
+ </antcall>
+ </target>
+
+ <target name="showArgsWithLib">
+ <antcall target="runsubtest">
+ <param name="subtest.name" value="showArgsWithLib"/>
+ </antcall>
+ </target>
+
+ <target name="showArgsWithSignedLib">
+ <antcall target="runsubtest">
+ <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>
+ </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
new file mode 100644
index 0000000..cee1461
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.properties
@@ -0,0 +1,31 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="forceFailure"/>
+<property name="appname" value="${module}"/>
+<property name="clientname" value="${appname}-client"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<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="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
new file mode 100644
index 0000000..a6f6c42
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY jwsSetup SYSTEM "file:./../jwsSetup.xml">
+]>
+
+<project name="jws-forceFailure" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &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"/>
+ </antcall>
+ </target>
+
+ <target name="build">
+ <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"
+ depends="init-common">
+ <antcall target="deploy.client"/>
+ </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.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"/>
+ </target>
+
+ <target name="test.standalone.client">
+ <antcall target="test.client">
+ <param name="urlpath" value="/${clientname}"/>
+ </antcall>
+ </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.
+ -->
+
+ <run-jws
+ urlpath="${urlpath}"
+ resultproperty="result"
+ />
+
+ <echo>Result property is ${result}</echo>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/MANIFEST.MF
new file mode 100644
index 0000000..31a0656
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.deployment.appclient.jws.forcefailure.client.ShowArgsClientForcedFailure
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
new file mode 100644
index 0000000..48f3472
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/ShowArgsClientForcedFailure.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.deployment.appclient.jws.forcefailure.client;
+
+import java.io.FileNotFoundException;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+/**
+ *
+ * @author tjquinn
+ */
+public class ShowArgsClientForcedFailure {
+
+
+ /** Creates a new instance of ShowArgsClient */
+ public ShowArgsClientForcedFailure() {
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ throw new RuntimeException("Forced error to test exit status from JWS");
+ }
+}
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
new file mode 100644
index 0000000..b69bdb9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/application-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application-client.xml
+ Created on : August 24, 2005, 3:58 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<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">
+
+ <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
new file mode 100644
index 0000000..91e8eee
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/jwsSetup.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ <!--
+ Set up properties for which javaws image to execute and for the
+ javaws wait option. (This option is currently broken in javaws on
+ Windows so we do not want to use it on that platform.)
+ -->
+ <condition property="os.isWindows" value="true">
+ <os family="windows"/>
+ </condition>
+
+ <condition property="javaws.cmd" value="${java.home}/bin/javaws.exe">
+ <os family="windows"/>
+ </condition>
+ <condition property="javaws.cmd" value="${java.home}/bin/javaws">
+ <not>
+ <os family="windows"/>
+ </not>
+ </condition>
+
+ <condition property="javaws.waitOption" value="-wait">
+ <not>
+ <os family="windows"/>
+ </not>
+ </condition>
+
+ <condition property="javaws.waitOption" value="-wait">
+ <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.
+
+ 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
+
+ ${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
+ ${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">
+ <attribute name="urlpath"/>
+ <attribute name="sunaccdir" default="${env.S1AS_HOME}/domains/${admin.domain}/config"/>
+ <attribute name="sunaccname" default="glassfish-acc.xml"/>
+ <attribute name="args" default=""/>
+ <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
+ each of the caller's arguments - which is what the Java Web Start
+ feature code expects. The result is in a property that is
+ used in the one of the <exec> <arg> elements.
+ -->
+ <tempfile destdir="${build.classes.dir}" prefix="args" suffix=".tmp" property="argstemp.tmp"/>
+ <echo file="${argstemp.tmp}">@{args}</echo>
+ <replace file="${argstemp.tmp}" token="@{argdelimiter}" value="&arg="/>
+ <loadfile property="user.args.part.of.url" srcfile="${argstemp.tmp}"/>
+
+ <condition property="user.args.introducer" value="">
+ <equals arg1="" arg2="@{args}" trim="true"/>
+ </condition>
+ <condition property="user.args.introducer" value="&arg=">
+ <not>
+ <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"
+ 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>
+
+ <condition property="discard.temp.files">
+ <isfalse value="@{keeptempfiles}"/>
+ </condition>
+ <antcall target="delete.runjws.temp.files"/>
+
+ </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"/>
+ <attribute name="id" default="junk.id"/>
+ <sequential>
+ <pathconvert targetos="unix" property="@{property}">
+ <path id="@{id}">
+ <fileset file="@{file}"/>
+ </path>
+ </pathconvert>
+ </sequential>
+ </macrodef>
+
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
new file mode 100644
index 0000000..c22af17
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.properties
@@ -0,0 +1,31 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="showArgs"/>
+<property name="appname" value="${module}"/>
+<property name="clientname" value="${appname}-client"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<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="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
new file mode 100644
index 0000000..5642397
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.xml
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY jwsSetup SYSTEM "file:./../jwsSetup.xml">
+]>
+
+<project name="jws-showArgs" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jwsSetup;
+
+
+ <!--
+ This test is intended for Java Web Start launching only. In fact,
+ the main test will fail if launched using the appclient script because
+ the customized JNLP adds a JAR that is neither in the EAR's library
+ directory nor in a JAR's manifest Class-Path.
+ -->
+
+ <property name="summaryFilePath" value="testSummary.txt"/>
+
+ <target name="all" depends="init-report,build,deploy,run,undeploy,report"/>
+
+ <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"/>
+ </antcall>
+ </target>
+
+ <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">
+<!--
+ <param name="application.xml" value="ear/application-with-client-at-top-level.xml"/>
+-->
+ <param name="application.xml" value="ear/application-with-client-2-at-subdir.xml"/>
+ </antcall>
+ </target>
+
+ <!--
+ other.jar contains a class used from the client. We package it
+ separately so we can refer to it from the custom JNLP document. This
+ makes sure that the custom JNLP is being processed correctly and,
+ therefore, other.jar is being downloaded correctly.
+ -->
+ <target name="build.other.jar" depends="compile">
+ <antcall target="package-other-jar">
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="other.classes" value="**/other/**/*.class" />
+ </antcall>
+ </target>
+
+ <target name="build.clients" depends="build.client,build.client2"/>
+
+ <target name="build.client" depends="compile">
+ <antcall target="spc-package-appclientjar-common">
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="other.classes" value="**/other/**/*.class"/>
+ <param name="application-client.xml" value="client/application-client.xml"/>
+ <param name="sun-application-client.xml" value="client/sun-application-client.xml"/>
+ <param name="appclientjar.classes" value="**/client/*.class" />
+ <param name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+ </target>
+
+ <target name="build.client2" depends="compile">
+
+<!--
+ Add client 2 to a subdirectory of the EAR directory.
+-->
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${assemble.dir}/client2"/>
+
+ <antcall target="spc-package-appclientjar-common">
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="application-client.xml" value="client2/application-client.xml"/>
+ <param name="sun-application-client.xml" value="client2/sun-application-client.xml"/>
+ <param name="appclientjar.classes" value="**/client2/*.class" />
+ <param name="appclient.jar" value="${assemble.dir}/client2/${appname}-client2.jar"/>
+ <param name="appclient.manifest" value="./client2/MANIFEST.MF"/>
+ </antcall>
+ </target>
+
+<target name="spc-ear-common">
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
+ <ear earfile="${assemble.dir}/${appname}App.ear"
+ appxml="${application.xml}">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="client2/*.jar"/>
+ <include name="*.war"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}">
+ <include name="META-INF/sun-application.xml"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+</target>
+
+
+<!--
+ Build the client JAR to include the custom JNLP.
+-->
+<target name="spc-package-appclientjar-common">
+ <mkdir dir="${assemble.dir}"/>
+ <property name="appclient.manifest" value="./client/MANIFEST.MF"/>
+ <delete file="${appclient.jar}"/>
+ <echo message="common.xml: Generating appclient-jar inside build directory"
+ level="verbose"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="./client/myLaunch.jnlp" toDir="${build.classes.dir}" failonerror="true" verbose="true"/>
+ <copy file="./client/myExt.jnlp" toDir="${build.classes.dir}" failonerror="true" verbose="true"/>
+ <copy file="${application-client.xml}"
+ tofile="${build.classes.dir}/META-INF/application-client.xml"
+ failonerror="false"/>
+ <delete file="${build.classes.dir}/META-INF/sun-application-client.xml"/>
+ <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} **/*.jnlp" excludes="${other.classes}"
+ manifest="${appclient.manifest}">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ </jar>
+</target>
+
+<target name="package-other-jar">
+ <mkdir dir="${assemble.dir}"/>
+ <jar jarfile="${assemble.dir}/other.jar" basedir="${appclientjar.files}"
+ includes="${other.classes}"/>
+</target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy.ear"/>
+<!-- <antcall target="deploy.client"/>
+ <antcall target="deploy.client2"/>-->
+ </target>
+
+ <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="deploy.client2" depends="build.client2">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--upload=true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${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>
+
+ <target name="undeploy.client" depends="init-common">
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+ <target name="undeploy.client2" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${appname}-client2"/>
+ </exec>
+ </target>
+
+ <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">
+ <antcall target="test.client">
+ <param name="urlpath" value="/${clientname}"/>
+ </antcall>
+ </target>
+
+ <target name="test.embedded.clients">
+ <antcall target="run-jws-client">
+ <param name="clientname" value="showArgs-client"/>
+ <param name="appclient.application.args" value="clientWithOther"/>
+ <param name="expectedFragment" value="From other.Other"/>
+ <param name="testName" value="JavaWSWithOther"/>
+ </antcall>
+
+ <antcall target="run-jws-client">
+ <param name="clientname" value="client2/showArgs-client2"/>
+ <param name="appclient.application.args" value="thisWillShowItWorked"/>
+ <param name="expectedFragment" value="${appclient.application.args}"/>
+ <param name="testName" value="JavaWS-client2"/>
+ </antcall>
+ </target>
+
+ <target name="run-jws-client">
+ <property name="use.javaws" value="true"/>
+ <tempfile property="clientOutputFile" prefix="appclient" suffix=".txt"/>
+ <antcall target="launch-appclient-javaws">
+ <param name="javaws.lib.jar" value="${env.APS_HOME}/lib/AntExtras.jar"/>
+ <param name="clientOutputFile" value="${clientOutputFile}"/>
+ <param name="clientname" value="${clientname}"/>
+ <param name="appclient.application.args" value="${appclient.application.args}"/>
+ </antcall>
+ <loadresource property="runclientCommonOutput">
+ <file file="${clientOutputFile}"/>
+ </loadresource>
+ <echo>${runclientCommonOutput}</echo>
+
+ <antcall target="jws-check-runclient-output">
+ <param name="expectedFragment" value="${expectedFragment}"/>
+ <param name="testName" value="${testName}"/>
+ </antcall>
+ <delete file="${clientOutputFile}"/>
+ </target>
+
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+ <target name="jws-check-runclient-output" depends="init-common" >
+ <echo message="checking runclient output..."/>
+ <condition property="isClientOutputDirty">
+ <or>
+ <not>
+ <contains string="${runclientCommonOutput}" substring="${expectedFragment}" casesensitive="yes"/>
+ </not>
+ <contains string="${runclientCommonOutput}" substring="exception" casesensitive="no"/>
+ </or>
+ </condition>
+ <antcall target="jws-check-runclient-clean" inheritAll="true">
+ <param name="testName" value="${testName}"/>
+ </antcall>
+ <antcall target="jws-check-runclient-dirty" inheritAll="true">
+ <param name="testName" value="${testName}"/>
+ </antcall>
+ </target>
+
+ <target name="jws-check-runclient-clean" unless="isClientOutputDirty">
+ <echo file="${summaryFilePath}" append="true" >
+[PASS] ${testName}</echo>
+ </target>
+
+ <target name="jws-check-runclient-dirty" if="isClientOutputDirty">
+ <echo file="${summaryFilePath}" append="true" >
+[FAIL] ${testName}</echo>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/MANIFEST.MF
new file mode 100644
index 0000000..06a4615
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.deployment.appclient.jws.showArgs.client.ShowArgsClient
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
new file mode 100644
index 0000000..e7f3787
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/Other.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.deployment.appclient.jws.showArgs.other;
+
+
+
+
+/**
+ *
+ * @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
new file mode 100644
index 0000000..0d206c0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.deployment.appclient.jws.showArgs.client;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+import com.sun.s1asdev.deployment.appclient.jws.showArgs.other.Other;
+
+
+/**
+ *
+ * @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
+ */
+ public static void main(String[] args) {
+ int status = 1;
+ try {
+ new ShowArgsClient().run(args);
+ status = 0;
+ } catch (Throwable thr) {
+ status = 1;
+ throw new RuntimeException("Client detected the following error", thr);
+ } finally {
+ if (statusFileSpec != null) {
+ File statusFile = null;
+ try {
+ statusFile = new File(statusFileSpec);
+ System.out.println("Status file is " + statusFile.getAbsolutePath());
+ PrintWriter writer = new PrintWriter(new FileOutputStream(statusFile));
+ writer.println("client.status=" + status);
+ writer.close();
+ } catch (Throwable thr) {
+ System.err.println("Error writing final status to file " + statusFileSpec);
+ thr.printStackTrace(System.err);
+ }
+ }
+ }
+
+ }
+
+ 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:");
+ for (String arg : args) {
+ System.out.println(arg);
+ }
+ System.out.println();
+ prepareArguments(args);
+
+ /*
+ *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();
+ }
+
+ private void checkActualArgsVsExpected() throws FileNotFoundException, IOException {
+ File expectedArgsFile = new File(expectedArgsFileSpec);
+ outStream.println("expected args file is " + expectedArgsFile.getAbsolutePath());
+ BufferedReader rdr = new BufferedReader(new FileReader(expectedArgsFile));
+ String delimiter = rdr.readLine();
+ String expectedArgValues = rdr.readLine();
+ rdr.close();
+
+ StringBuilder otherArgsAsLine = new StringBuilder();
+ for (String s : otherArgs) {
+ if (otherArgsAsLine.length() > 0) {
+ otherArgsAsLine.append(delimiter);
+ }
+ 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) == '-') {
+ optionValues.put(args[i].substring(1), args[++i]);
+ } else {
+ otherArgs.add(args[i]);
+ }
+ }
+
+ outFileSpec = optionValues.get("out");
+ File outFile = null;
+ if (outFileSpec != null) {
+ outFile = new File(outFileSpec);
+ outStream = new PrintStream(outFile);
+ }
+// 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());
+ }
+// System.out.println("statusFile = " + statusFileSpec);
+// 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
new file mode 100644
index 0000000..0fad96e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient2.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.deployment.appclient.jws.showArgs.client2;
+
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+
+
+/**
+ *
+ * @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
+ */
+ public static void main(String[] args) {
+ int status = 1;
+ System.out.println("Just entered client2.main");
+ try {
+ new ShowArgsClient2().run(args);
+ status = 0;
+ } catch (Throwable thr) {
+ 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) {
+ System.out.println(arg);
+ }
+ System.out.println();
+ prepareArguments(args);
+
+ /*
+ *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);
+ }
+ 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();
+ }
+
+ private void checkActualArgsVsExpected() throws FileNotFoundException, IOException {
+ File expectedArgsFile = new File(expectedArgsFileSpec);
+ outStream.println("expected args file is " + expectedArgsFile.getAbsolutePath());
+ BufferedReader rdr = new BufferedReader(new FileReader(expectedArgsFile));
+ String delimiter = rdr.readLine();
+ String expectedArgValues = rdr.readLine();
+ rdr.close();
+
+ StringBuilder otherArgsAsLine = new StringBuilder();
+ for (String s : otherArgs) {
+ if (otherArgsAsLine.length() > 0) {
+ otherArgsAsLine.append(delimiter);
+ }
+ 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) == '-') {
+ optionValues.put(args[i].substring(1), args[++i]);
+ } else {
+ otherArgs.add(args[i]);
+ }
+ }
+
+ outFileSpec = optionValues.get("out");
+ File outFile = null;
+ if (outFileSpec != null) {
+ outFile = new File(outFileSpec);
+ outStream = new PrintStream(outFile);
+ }
+// 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());
+ }
+// System.err.println("statusFile = " + statusFileSpec);
+// 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
new file mode 100644
index 0000000..ae84a57
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/application-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application-client.xml
+ Created on : August 24, 2005, 3:58 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<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">
+
+ <display-name>Show Arguments</display-name>
+
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/myExt.jnlp b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/myExt.jnlp
new file mode 100644
index 0000000..3ccbc28
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/myExt.jnlp
@@ -0,0 +1,29 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<jnlp>
+ <information>
+ <title>Custom Title - myExt</title>
+ <vendor>Acme Software</vendor>
+ <description>This is my customized information for the developer-provided extension</description>
+ </information>
+ <resources>
+ <jar href="other.jar"/>
+ </resources>
+ <component-desc/>
+</jnlp>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/myLaunch.jnlp b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/myLaunch.jnlp
new file mode 100644
index 0000000..6ab9cd3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/myLaunch.jnlp
@@ -0,0 +1,36 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<jnlp codebase="should-be-ignored" href="should-be-ignored-also">
+ <information>
+ <title>Custom Title</title>
+ <vendor>Acme Software</vendor>
+ <description>This is my customized information</description>
+ </information>
+ <security> <!-- should be ignored -->
+ <j2ee-application-client-permissions/>
+ </security>
+ <resources>
+ <jar href="reporter.jar"/>
+ <property name="myExtra.prop" value="some value"/>
+ <extension href="myExt.jnlp"/>
+ </resources>
+ <application-desc main-class="my.Main">
+ <argument>excluded</argument>
+ </application-desc>
+</jnlp>
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
new file mode 100644
index 0000000..e6ccff2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD GlassFish Application Server 2.0 Application Client 5.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_5_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <java-web-start-access>
+ <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
new file mode 100644
index 0000000..6ecb115
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/ear/application-with-client-at-top-level.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application.xml
+ Created on : August 24, 2005, 4:47 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<application 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_5.xsd'
+ version="5">
+
+ <!--
+ With the following element commented out, deployment throws an
+ exception.
+ -->
+
+ <display-name>show-args</display-name>
+
+ <module>
+ <java>showArgs-client.jar</java>
+ </module>
+ <module>
+ <java>showArgs-client2.jar</java>
+ </module>
+</application>
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
new file mode 100644
index 0000000..a64a6e9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.properties
@@ -0,0 +1,31 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="showWithLib"/>
+<property name="appname" value="${module}"/>
+<property name="clientname" value="${appname}-client"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<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="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
new file mode 100755
index 0000000..df1d448
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="showWithLib" default="usage" basedir=".">
+
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <property name="src" value="."/>
+
+ <import file="../../appclient.xml"/>
+
+ <!-- Props that allow reuse from showWithSignedLib -->
+ <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"
+ signedjar="${assemble.dir}/lib/signedlib.jar"/>
+ </target>
+
+ <target name="build.ear" depends="build.lib,build.client">
+ <delete file="${assemble.dir}/${appname}App.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <!-- <copy file="${src}/sun-application.xml" tofile="${build.classes.dir}"/> -->
+ <copy file="ear/application.xml" tofile="${build.classes.dir}"/>
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="lib/${lib.jar.path}"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}">
+ <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/application.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="build.lib" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${assemble.dir}/lib"/>
+ <jar jarfile="${assemble.dir}/lib/lib.jar">
+ <fileset dir="${build.classes.dir}">
+ <include name="**/lib/*.class"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="."/>
+ </antcall>
+ </target>
+
+ <target name="build.client" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="application-client.xml" value="client/application-client.xml"/>
+ <param name="sun-application-client.xml" value="client/sun-application-client.xml"/>
+ <param name="appclientjar.classes" value="**/client/*.class" />
+ <param name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="deploy.ear"/>
+
+ <target name="undeploy" depends="undeploy.ear"/>
+
+<!-- <target name="undeploy.ear">
+ <antcall target="undeploy-common"/>
+ </target>
+-->
+
+ <target name="run" depends="init-common,test.embedded.client"/>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
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
new file mode 100644
index 0000000..4b23d02
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/Client.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+import lib.LibClass;
+
+import java.net.URLClassLoader;
+import java.net.URL;
+
+
+
+/**
+ *
+ * @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
+ */
+ public static void main(String[] args) {
+ int status = 1;
+ try {
+ new Client().run(args);
+ status = 0;
+ } catch (Throwable thr) {
+ 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();
+ while (cl != null) {
+ System.err.println("CL " + cl.toString());
+ if (cl instanceof URLClassLoader) {
+ System.err.println(" URLs for this loader:");
+ for (URL url : ((URLClassLoader)cl).getURLs()) {
+ System.err.println(" " + url.toString());
+ }
+ }
+ cl = cl.getParent();
+ }
+ final LibClass lc = new LibClass();
+ System.out.println("Command line arguments:");
+ for (String arg : args) {
+ System.out.println(arg);
+ }
+ 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) == '-') {
+ optionValues.put(args[i].substring(1), args[++i]);
+ } else {
+ otherArgs.add(args[i]);
+ }
+ }
+
+ System.out.println("Other arguments: " + otherArgs);
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/MANIFEST.MF
new file mode 100644
index 0000000..84d2523
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: client.Client
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
new file mode 100644
index 0000000..03a6c40
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/ear/application.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application.xml
+ Created on : August 24, 2005, 4:47 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<application 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_5.xsd'
+ version="5">
+
+ <!--
+ With the following element commented out, deployment throws an
+ exception.
+ -->
+
+ <display-name>show-args</display-name>
+
+ <module>
+ <java>showWithLib-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/lib/LibClass.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/lib/LibClass.java
new file mode 100644
index 0000000..d459916
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/lib/LibClass.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package lib;
+
+public class LibClass {}
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
new file mode 100644
index 0000000..a53ab6a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.properties
@@ -0,0 +1,31 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="showWithSignedLib"/>
+<property name="appname" value="${module}"/>
+<property name="clientname" value="${appname}-client"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<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="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
new file mode 100755
index 0000000..452259a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+]>
+
+<project name="showWithSignedLib" default="usage" basedir=".">
+
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <property name="src" value="."/>
+
+ <import file="../../appclient.xml"/>
+
+ <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"
+ signedjar="${assemble.dir}/lib/${lib.jar.path}"/>
+ </target>
+
+ <target name="build.ear" depends="sign.jar,build.client">
+ <delete file="${assemble.dir}/${appname}App.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <!-- <copy file="${src}/sun-application.xml" tofile="${build.classes.dir}"/> -->
+ <copy file="ear/application.xml" tofile="${build.classes.dir}"/>
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="lib/${lib.jar.path}"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}">
+ <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/application.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="build.lib" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${assemble.dir}/lib"/>
+ <jar jarfile="${assemble.dir}/lib/lib.jar">
+ <fileset dir="${build.classes.dir}">
+ <include name="**/lib/*.class"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="."/>
+ </antcall>
+ </target>
+
+ <target name="build.client" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="application-client.xml" value="client/application-client.xml"/>
+ <param name="sun-application-client.xml" value="client/sun-application-client.xml"/>
+ <param name="appclientjar.classes" value="**/client/*.class" />
+ <param name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common,deploy.ear"/>
+
+ <target name="undeploy" depends="init-common,undeploy.ear"/>
+
+<!-- <target name="undeploy.ear">
+ <antcall target="undeploy-common"/>
+ </target>
+-->
+
+ <target name="run" depends="init-common,test.embedded.client"/>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
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
new file mode 100644
index 0000000..4b23d02
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/Client.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+import lib.LibClass;
+
+import java.net.URLClassLoader;
+import java.net.URL;
+
+
+
+/**
+ *
+ * @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
+ */
+ public static void main(String[] args) {
+ int status = 1;
+ try {
+ new Client().run(args);
+ status = 0;
+ } catch (Throwable thr) {
+ 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();
+ while (cl != null) {
+ System.err.println("CL " + cl.toString());
+ if (cl instanceof URLClassLoader) {
+ System.err.println(" URLs for this loader:");
+ for (URL url : ((URLClassLoader)cl).getURLs()) {
+ System.err.println(" " + url.toString());
+ }
+ }
+ cl = cl.getParent();
+ }
+ final LibClass lc = new LibClass();
+ System.out.println("Command line arguments:");
+ for (String arg : args) {
+ System.out.println(arg);
+ }
+ 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) == '-') {
+ optionValues.put(args[i].substring(1), args[++i]);
+ } else {
+ otherArgs.add(args[i]);
+ }
+ }
+
+ System.out.println("Other arguments: " + otherArgs);
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/MANIFEST.MF
new file mode 100644
index 0000000..84d2523
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: client.Client
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
new file mode 100644
index 0000000..03a6c40
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/ear/application.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application.xml
+ Created on : August 24, 2005, 4:47 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<application 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_5.xsd'
+ version="5">
+
+ <!--
+ With the following element commented out, deployment throws an
+ exception.
+ -->
+
+ <display-name>show-args</display-name>
+
+ <module>
+ <java>showWithLib-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/lib/LibClass.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/lib/LibClass.java
new file mode 100644
index 0000000..d459916
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/lib/LibClass.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package lib;
+
+public class LibClass {}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/README b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/README
new file mode 100644
index 0000000..77536d2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/README
@@ -0,0 +1,10 @@
+This test does the following:
+run an app with a single appclient jar :
+while running, the appclient script takes -mainclass option.
+-mainclass/-name options are not mandatory options for single appclient jar EARs.
+run an app with multiple appclient jars :
+-mainclass/-name option is mandatory for this case. This case covers :
+1> no -mainclass/-name specified
+2> -mainclass specified
+
+
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
new file mode 100644
index 0000000..b6af915
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="bmp" default="usage" basedir=".">
+
+ <property name="bmp-target" value="all"/>
+
+ <target name="all">
+ <antcall target="enroller">
+ <param name="bmp-target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="enroller">
+ <param name="bmp-target" value="clean"/>
+ </antcall>
+ </target>
+
+ <target name="build">
+ <antcall target="enroller">
+ <param name="bmp-target" value="build-single-appclientjar"/>
+ </antcall>
+ </target>
+
+ <target name="setup">
+ <antcall target="enroller">
+ <param name="bmp-target" value="setup"/>
+ </antcall>
+ </target>
+
+ <target name="deploy">
+ <antcall target="enroller">
+ <param name="bmp-target" value="deploy"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy">
+ <antcall target="enroller">
+ <param name="bmp-target" value="undeploy"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup">
+ <antcall target="enroller">
+ <param name="bmp-target" value="unsetup"/>
+ </antcall>
+ </target>
+
+ <target name="run">
+ <antcall target="enroller">
+ <param name="bmp-target" value="run"/>
+ </antcall>
+ </target>
+
+ <target name="enroller">
+ <record name="enroller.output" action="start" />
+ <ant dir="enroller" target="${bmp-target}"/>
+ <record name="enroller.output" action="stop" />
+ </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>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/MANIFEST.MF
new file mode 100755
index 0000000..56d7080
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: com.sun.s1peqe.ejb.bmp.enroller.client.EnrollerClientwithManifest
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/RepRunConf.txt b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/RepRunConf.txt
new file mode 100644
index 0000000..c604c61
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/RepRunConf.txt
@@ -0,0 +1 @@
+Test has been reported
\ No newline at end of file
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/application.xml
new file mode 100755
index 0000000..e1c1ba1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/application.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>Application description</description>
+ <display-name>EnrollerApp</display-name>
+ <module>
+ <ejb>ejb-bmp-enroller-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>ejb-bmp-enroller-client.jar</java>
+ </module>
+<module>
+ <java>ejb-bmp-enroller-client1.jar</java>
+ </module>
+</application>
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
new file mode 100755
index 0000000..97bd94c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.properties
@@ -0,0 +1,34 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-bmp"/>
+<property name="appname" value="${module}-enroller"/>
+<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="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
+<property name="default-instance" value="${env.S1AS_HOME}/domains/domain1"/>
+<property name="deployed-apps" value="${default-instance}/applications/j2ee-apps"/>
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
new file mode 100755
index 0000000..2a8ff57
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY run SYSTEM "file:./../../../../config/run.xml">
+]>
+
+<project name="enroller" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &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="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="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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build-single-appclientjar" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/*Student*.class,**/*Enroller*.class,**/*Course*.class" />
+ <param name="appclientjar.classes"
+ value="**/Course.class,**/Enroller.class,**/Student.class,**/*Home*.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="build-multi-appclientjar" depends="compile">
+ <antcall target="package-appclientjar">
+ <param name="appclientjar.files"
+ value="${build.classes.dir}"/>
+ <param name="appclient.jar"
+ value="${assemble.dir}/${appname}-client1.jar"/>
+ </antcall>
+
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/*Student*.class,**/*Enroller*.class,**/*Course*.class" />
+ <param name="appclientjar.classes"
+ value="**/Course.class,**/Enroller.class,**/Student.class,**/*Home*.class,**/*Client*.class" />
+<param name="application.xml"
+value="./application.xml"/>
+ </antcall>
+ </target>
+
+<target name="package-appclientjar" depends="init-common">
+ <delete file="${appclient.jar}"/>
+ <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">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ </jar>
+</target>
+
+
+
+ <target name="setup" depends="init-common">
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/create_pointbase.sql"/>
+ </antcall>
+ <antcall target="deploy-jdbc-common">
+ <param name="jdbc.conpool.name" value="bmpEnrollerPool"/>
+ <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/>
+ </antcall>
+ <antcall target="reconfig-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <echo message="Deploying via asadmin..."/>
+ <antcall target="deploy-common"/>
+ </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"/>
+ <exec executable="${APPCLIENT}" failonerror="true">
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+ <!--
+ Clean the database after the run since it prohibits re-running
+ -->
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/drop_pointbase.sql"/>
+ </antcall>
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/create_pointbase.sql"/>
+ </antcall>
+ </target>
+
+ <target name="run-multi-appclient-jar2" depends="init-common">
+ <echo message="Running app client with no -mainclass option for app with multiple app client jars"/>
+ <exec executable="${APPCLIENT}" failonerror="true">
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+ <!--
+ Clean the database after the run since it prohibits re-running
+ -->
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/drop_pointbase.sql"/>
+ </antcall>
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/create_pointbase.sql"/>
+ </antcall>
+ </target>
+
+ <target name="run-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">
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-mainclass com.sun.s1peqe.ejb.bmp.enroller.client.EnrollerClient"/>
+ <!--arg line="-name ${appname}Client"/-->
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+ <!--
+ Clean the database after the run since it prohibits re-running
+ -->
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/drop_pointbase.sql"/>
+ </antcall>
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/create_pointbase.sql"/>
+ </antcall>
+ </target>
+
+ <target name="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 name="unsetup" depends="init-common">
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/drop_pointbase.sql"/>
+ </antcall>
+ <antcall target="undeploy-jdbc-common">
+ <param name="jdbc.conpool.name" value="bmpEnrollerPool"/>
+ <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+
+ <target name="retrieve-client-jar" depends="init-common">
+ <copy todir="${assemble.dir}">
+ <fileset dir="${deployed-apps}/${appname}App_1/">
+ <include name="${appname}AppClient.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <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"/>
+ <copy file="${assemble.dir}/${appname}App.ear"
+ todir="${autodeploy.dir}"/>
+ </target>
+
+ <target name="autodeploy" depends="autodeploy-ear, sleep-till-autodeploy, retrieve-client-jar"/>
+
+ <target name="sleep-till-autodeploy">
+ <echo message="Waiting for autodeploy of app to complete..."/>
+ <sleep minutes="2"/>
+ </target>
+
+ <target name="restart">
+ <antcall target="restart-server-instance-common"/>
+ </target>
+
+</project>
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
new file mode 100755
index 0000000..9266484
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClient.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.client;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import java.util.*;
+import com.sun.s1peqe.ejb.bmp.enroller.ejb.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ * A simple java client will:
+ * <ul>
+ * <li>Locates the home interface of the enterprise bean
+ * <li>Gets a reference to the remote interface
+ * <li>Invokes business methods
+ * </ul>
+ */
+public class EnrollerClient {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ EnrollerClient client = new EnrollerClient();
+
+ // run the tests
+ client.runTestClient();
+ }
+
+ public void runTestClient() {
+ try{
+ stat.addDescription("Testing bmp enroller app.");
+ test01();
+ stat.printSummary("enrollerAppID");
+ } catch (Exception ex) {
+ System.out.println("Exception in runTestClient: " + ex.toString());
+ ex.printStackTrace();
+ }
+ }
+
+
+ private void test01() {
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleStudent");
+ 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.class);
+
+ Course power = cHome.create("220", "Power J2EE Programming");
+
+ objref = initial.lookup("java:comp/env/ejb/SimpleEnroller");
+ EnrollerHome eHome =
+ (EnrollerHome) PortableRemoteObject.narrow(objref,
+ EnrollerHome.class);
+
+ Enroller enroller = eHome.create();
+ enroller.enroll("823", "220");
+ enroller.enroll("823", "333");
+ enroller.enroll("823", "777");
+ enroller.enroll("456", "777");
+ enroller.enroll("388", "777");
+
+ System.out.println(denise.getName() + ":");
+ ArrayList courses = denise.getCourseIds();
+ Iterator i = courses.iterator();
+ while (i.hasNext()) {
+ String courseId = (String)i.next();
+ Course course = cHome.findByPrimaryKey(courseId);
+ System.out.println(courseId + " " + course.getName());
+ }
+ System.out.println();
+
+ Course intro = cHome.findByPrimaryKey("777");
+ System.out.println(intro.getName() + ":");
+ courses = intro.getStudentIds();
+ i = courses.iterator();
+ while (i.hasNext()) {
+ String studentId = (String)i.next();
+ 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
new file mode 100755
index 0000000..9552e91
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClientwithManifest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.client;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import java.util.*;
+import com.sun.s1peqe.ejb.bmp.enroller.ejb.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+//java client to test if -mainclass option overrides the Manifest.MF MainClass entry.
+
+public class EnrollerClientwithManifest {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ EnrollerClientwithManifest client = new EnrollerClientwithManifest();
+
+ // run the tests
+ client.runTestClient();
+ }
+
+ public void runTestClient() {
+ try{
+ stat.addDescription("java client to test if -mainclass option overrides the Manifest.MF MainClass entry.");
+ test01();
+ stat.printSummary("enrollerAppID");
+ } catch (Exception ex) {
+ System.out.println("Exception in runTestClient: " + ex.toString());
+ ex.printStackTrace();
+ }
+ }
+
+
+ private void test01() {
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleStudent");
+ 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.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.class);
+
+ Enroller enroller = eHome.create();
+ enroller.enroll("823", "220");
+ enroller.enroll("823", "333");
+ enroller.enroll("823", "777");
+ enroller.enroll("456", "777");
+ enroller.enroll("388", "777");
+
+ System.out.println(denise.getName() + ":");
+ ArrayList courses = denise.getCourseIds();
+ Iterator i = courses.iterator();
+ while (i.hasNext()) {
+ String courseId = (String)i.next();
+ Course course = cHome.findByPrimaryKey(courseId);
+ System.out.println(courseId + " " + course.getName());
+ }
+ System.out.println();
+
+ Course intro = cHome.findByPrimaryKey("777");
+ System.out.println(intro.getName() + ":");
+ courses = intro.getStudentIds();
+ i = courses.iterator();
+ while (i.hasNext()) {
+ String studentId = (String)i.next();
+ 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/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/MANIFEST.MF
new file mode 100644
index 0000000..5f349b8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: com.sun.s1peqe.ejb.bmp.enroller.client.EnrollerClient
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/application-client.xml
new file mode 100755
index 0000000..2f6b043
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/application-client.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>ejb-bmp-enrollerClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleEnroller</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.EnrollerHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Enroller</remote>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleCourse</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.CourseHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Course</remote>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleStudent</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.StudentHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Student</remote>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/application.xml
new file mode 100755
index 0000000..1ac1a22
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>Application description</description>
+ <display-name>EnrollerApp</display-name>
+ <module>
+ <ejb>ejb-bmp-enroller-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>ejb-bmp-enroller-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/ejb-jar.xml
new file mode 100755
index 0000000..1281ecf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/ejb-jar.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar version="2.1" 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/ejb-jar_2_1.xsd">
+ <display-name>CourseJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <ejb-name>StudentBean</ejb-name>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.StudentHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Student</remote>
+ <ejb-class>com.sun.s1peqe.ejb.bmp.enroller.ejb.StudentBean</ejb-class>
+ <persistence-type>Bean</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Enroller</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.EnrollerHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Enroller</remote>
+ </ejb-ref>
+ <resource-ref>
+ <res-ref-name>jdbc/bmp-enrollerDB</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </entity>
+ <session>
+ <ejb-name>EnrollerBean</ejb-name>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.EnrollerHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Enroller</remote>
+ <ejb-class>com.sun.s1peqe.ejb.bmp.enroller.ejb.EnrollerBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Bean</transaction-type>
+ <resource-ref>
+ <res-ref-name>jdbc/bmp-enrollerDB</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ <entity>
+ <ejb-name>CourseBean</ejb-name>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.CourseHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Course</remote>
+ <ejb-class>com.sun.s1peqe.ejb.bmp.enroller.ejb.CourseBean</ejb-class>
+ <persistence-type>Bean</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Enroller</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.bmp.enroller.ejb.EnrollerHome</home>
+ <remote>com.sun.s1peqe.ejb.bmp.enroller.ejb.Enroller</remote>
+ </ejb-ref>
+ <resource-ref>
+ <res-ref-name>jdbc/bmp-enrollerDB</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </entity>
+ </enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/sun-application-client.xml
new file mode 100755
index 0000000..52ab001
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleCourse</ejb-ref-name>
+ <jndi-name>ejb/MyCourse</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleStudent</ejb-ref-name>
+ <jndi-name>ejb/MyStudent</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleEnroller</ejb-ref-name>
+ <jndi-name>ejb/MyEnroller</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/sun-ejb-jar.xml
new file mode 100755
index 0000000..d33d572
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ejb-bmp-enroller-ejb.jar</name>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>EnrollerBean</ejb-name>
+ <jndi-name>ejb/MyEnroller</jndi-name>
+ <resource-ref>
+ <res-ref-name>jdbc/bmp-enrollerDB</res-ref-name>
+ <jndi-name>jdbc/bmp-enrollerDB</jndi-name>
+ </resource-ref>
+ </ejb>
+ <ejb>
+ <ejb-name>CourseBean</ejb-name>
+ <jndi-name>ejb/MyCourse</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Enroller</ejb-ref-name>
+ <jndi-name>ejb/MyEnroller</jndi-name>
+ </ejb-ref>
+ <resource-ref>
+ <res-ref-name>jdbc/bmp-enrollerDB</res-ref-name>
+ <jndi-name>jdbc/bmp-enrollerDB</jndi-name>
+ </resource-ref>
+ </ejb>
+ <ejb>
+ <ejb-name>StudentBean</ejb-name>
+ <jndi-name>ejb/MyStudent</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Enroller</ejb-ref-name>
+ <jndi-name>ejb/MyEnroller</jndi-name>
+ </ejb-ref>
+ <resource-ref>
+ <res-ref-name>jdbc/bmp-enrollerDB</res-ref-name>
+ <jndi-name>jdbc/bmp-enrollerDB</jndi-name>
+ </resource-ref>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..8c8d171
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Course.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+
+public interface Course extends EJBObject {
+
+ /**
+ * Returns an arraylist of StudentIds taking the course.
+ * @exception RemoteException
+ */
+ public ArrayList getStudentIds() throws RemoteException;
+
+ /**
+ * Returns the name of the course.
+ * @exception RemoteException
+ *
+ */
+ public String getName() throws RemoteException;
+
+ /**
+ * Sets the name of the course.
+ * @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
new file mode 100755
index 0000000..e91eea7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseBean.java
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.sql.*;
+import javax.sql.*;
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+public class CourseBean implements EntityBean {
+
+ private String courseId;
+ private String name;
+ private ArrayList studentIds;
+ private EntityContext context;
+ private EnrollerHome enrollerHome;
+ private DataSource dataSource;
+
+ /**
+ * Returns an arraylist of StudentIds taking the course.
+ * @exception RemoteException
+ */
+ public ArrayList getStudentIds() {
+ return studentIds;
+ }
+
+ /**
+ * Returns the name of the course.
+ * @exception RemoteException
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the name of the course.
+ * @exception RemoteException
+ *
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String ejbCreate(String courseId, String name) throws CreateException {
+ try {
+ insertCourse(courseId, name);
+ } catch (Exception ex) {
+ throw new EJBException("ejbCreate: " + ex.getMessage());
+ }
+
+ this.courseId = courseId;
+ this.name = name;
+ return courseId;
+ }
+
+ public String ejbFindByPrimaryKey(String primaryKey) throws FinderException {
+ boolean result;
+
+ try {
+ result = selectByPrimaryKey(primaryKey);
+ } catch (Exception ex) {
+ throw new EJBException("ejbFindByPrimaryKey: " +
+ ex.getMessage());
+ }
+
+ if (result) {
+ return primaryKey;
+ } else {
+ throw new ObjectNotFoundException
+ ("Row for id " + primaryKey + " not found.");
+ }
+ }
+
+ public void ejbRemove() {
+ try {
+ deleteCourse(courseId);
+ } catch (Exception ex) {
+ throw new EJBException("ejbRemove: " + ex.getMessage());
+ }
+ }
+
+ public void setEntityContext(EntityContext context) {
+ this.context = context;
+ studentIds = new ArrayList();
+ try {
+ InitialContext ic = new InitialContext();
+ dataSource =
+ (DataSource) ic.lookup("java:comp/env/jdbc/bmp-enrollerDB");
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/Enroller");
+ enrollerHome =
+ (EnrollerHome) PortableRemoteObject.narrow(objref,
+ EnrollerHome.class);
+ } catch (Exception ex) {
+ throw new EJBException("Unable to connect to database. " +
+ ex.getMessage());
+ }
+ }
+
+ public void unsetEntityContext() {
+ this.context = null;
+ }
+
+ public void ejbActivate() {
+ courseId = (String)context.getPrimaryKey();
+ }
+
+ public void ejbPassivate() {
+ courseId = null;
+ }
+
+ public void ejbLoad() {
+ try {
+ loadCourse();
+ loadStudentIds();
+ } catch (Exception ex) {
+ throw new EJBException("ejbLoad: " + ex.getMessage());
+ }
+ }
+
+ private void loadStudentIds() {
+ studentIds.clear();
+
+ try {
+ Enroller enroller = enrollerHome.create();
+ ArrayList a = enroller.getStudentIds(courseId);
+ studentIds.addAll(a);
+ } catch (Exception ex) {
+ throw new EJBException("loadStudentIds: " + ex.getMessage());
+ }
+ }
+
+ public void ejbStore() {
+ try {
+ storeCourse();
+ } catch (Exception ex) {
+ throw new EJBException("ejbStore: " + ex.getMessage());
+ }
+ }
+
+ public void ejbPostCreate(String courseId, String name) { }
+
+ /*********************** Database Routines *************************/
+
+ private void insertCourse (String courseId, String name)
+ throws SQLException {
+ Connection con = dataSource.getConnection();
+ String insertStatement =
+ "insert into course values ( ? , ? )";
+ PreparedStatement prepStmt =
+ con.prepareStatement(insertStatement);
+
+ prepStmt.setString(1, courseId);
+ prepStmt.setString(2, name);
+
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ con.close();
+ }
+
+ private boolean selectByPrimaryKey(String primaryKey)
+ throws SQLException {
+
+ Connection con = dataSource.getConnection();
+ String selectStatement =
+ "select courseid " +
+ "from course where courseid = ? ";
+ PreparedStatement prepStmt =
+ con.prepareStatement(selectStatement);
+ prepStmt.setString(1, primaryKey);
+
+ ResultSet rs = prepStmt.executeQuery();
+ boolean result = rs.next();
+ prepStmt.close();
+ con.close();
+ return result;
+ }
+
+ private void deleteCourse(String courseId) throws SQLException {
+ Connection con = dataSource.getConnection();
+ String deleteStatement =
+ "delete from course " +
+ "where courseid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(deleteStatement);
+
+ prepStmt.setString(1, courseId);
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ con.close();
+ }
+
+ private void loadCourse() throws SQLException {
+ Connection con = dataSource.getConnection();
+ String selectStatement =
+ "select name " +
+ "from course where courseid = ? ";
+ PreparedStatement prepStmt =
+ con.prepareStatement(selectStatement);
+
+ prepStmt.setString(1, courseId);
+
+ ResultSet rs = prepStmt.executeQuery();
+
+ if (rs.next()) {
+ name = rs.getString(1);
+ prepStmt.close();
+ } else {
+ prepStmt.close();
+ throw new NoSuchEntityException("Row for courseId " + courseId +
+ " not found in database.");
+ }
+ con.close();
+ }
+
+ private void storeCourse() throws SQLException {
+ Connection con = dataSource.getConnection();
+ String updateStatement =
+ "update course set name = ? " +
+ "where courseid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(updateStatement);
+
+ prepStmt.setString(1, name);
+ prepStmt.setString(2, courseId);
+ int rowCount = prepStmt.executeUpdate();
+ prepStmt.close();
+
+ if (rowCount == 0) {
+ throw new EJBException("Storing row for courseId " +
+ courseId + " failed.");
+ }
+ con.close();
+ }
+}
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
new file mode 100755
index 0000000..11b68d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseHome.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import javax.ejb.EJBHome;
+import java.rmi.RemoteException;
+import javax.ejb.FinderException;
+import javax.ejb.CreateException;
+
+public interface CourseHome extends EJBHome {
+
+ /**
+ * Gets a reference to the remote interface to the CourseBean bean.
+ * @exception throws CreateException and RemoteException.
+ *
+ */
+ 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)
+ 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
new file mode 100755
index 0000000..3d3aec8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Enroller.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+public interface Enroller extends EJBObject {
+
+ /**
+ * Enrolls a Student in a course
+ * @param studentId primary key of the student object
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+ public void enroll(String studentId, String courseId)
+ throws RemoteException;
+ /**
+ * Un-Enrolls a Student in a course
+ * @param studentId primary key of the student object
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+
+ public void unEnroll(String studentId, String courseId)
+ throws RemoteException;
+ /**
+ * Deletes a Student
+ * @param studentId primary key of the student object
+ * @exception RemoteException
+ */
+
+ public void deleteStudent(String studentId)
+ throws RemoteException;
+
+ /**
+ * Deletes a Course
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+ public void deleteCourse(String courseId)
+ throws RemoteException;
+ /**
+ * Returns an Arraylist of StudentsIds enrolled in a course
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+
+ public ArrayList getStudentIds(String courseId)
+ throws RemoteException;
+ /**
+ * Return an ArrayList of CourseIds that student is enroller in
+ * @param studentId primary key of the student object
+ * @exception RemoteException
+ */
+
+ public ArrayList getCourseIds(String studentId)
+ throws 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
new file mode 100755
index 0000000..053d361
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerBean.java
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.rmi.RemoteException;
+import javax.ejb.*;
+import java.sql.*;
+import javax.sql.*;
+import java.util.*;
+import javax.naming.*;
+
+public class EnrollerBean implements SessionBean {
+
+ private Connection con;
+ private String dbName = "java:comp/env/jdbc/bmp-enrollerDB";
+ private SessionContext context;
+
+ /**
+ * Enrolls a Student in a course
+ * @param studentId primary key of the student object
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+
+ public void enroll(String studentId, String courseId) {
+ try {
+ insertEntry(studentId, courseId);
+ } catch (Exception ex) {
+ throw new EJBException("enroll: " + ex.getMessage());
+ }
+ }
+
+ /**
+ * Un-Enrolls a Student in a course
+ * @param studentId primary key of the student object
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+ public void unEnroll(String studentId, String courseId) {
+ try {
+ deleteEntry(studentId, courseId);
+ } catch (Exception ex) {
+ throw new EJBException("unEnroll: " + ex.getMessage());
+ }
+ }
+
+ /**
+ * Deletes a Student
+ * @param studentId primary key of the student object
+ * @exception RemoteException
+ */
+ public void deleteStudent(String studentId) {
+ try {
+ deleteStudentEntries(studentId);
+ } catch (Exception ex) {
+ throw new EJBException("deleteStudent: " + ex.getMessage());
+ }
+ }
+
+ /**
+ * Deletes a Course
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+ public void deleteCourse(String courseId) {
+ try {
+ deleteCourseEntries(courseId);
+ } catch (Exception ex) {
+ throw new EJBException("deleteCourse: " + ex.getMessage());
+ }
+ }
+
+ /**
+ * Returns an Arraylist of StudentsIds enrolled in a course
+ * @param courseId primary key of the course object
+ * @exception RemoteException
+ */
+ public ArrayList getStudentIds(String courseId) {
+ try {
+ return selectStudent(courseId);
+ } catch (Exception ex) {
+ throw new EJBException("getStudentIds: " + ex.getMessage());
+ }
+ }
+
+ /**
+ * Return an ArrayList of CourseIds that student is enroller in
+ * @param studentId primary key of the student object
+ * @exception RemoteException
+ */
+ public ArrayList getCourseIds(String studentId) {
+ try {
+ return selectCourse(studentId);
+ } catch (Exception ex) {
+ throw new EJBException("getCourseIds: " + ex.getMessage());
+ }
+ }
+
+ public void ejbCreate() {
+ try {
+ makeConnection();
+ } catch (Exception ex) {
+ throw new EJBException("Unable to connect to database. " +
+ ex.getMessage());
+ }
+ }
+
+ public void ejbRemove() {
+ try {
+ con.close();
+ } catch (SQLException ex) {
+ throw new EJBException("ejbRemove: " + ex.getMessage());
+ }
+ }
+
+ public void ejbActivate() {
+ try {
+ makeConnection();
+ } catch (Exception ex) {
+ throw new EJBException("ejbActivate Exception: " + ex.getMessage());
+ }
+ }
+
+ public void ejbPassivate() {
+ try {
+ con.close();
+ } catch (SQLException ex) {
+ throw new EJBException("ejbPassivate Exception: " + ex.getMessage());
+ }
+ }
+
+ public void setSessionContext(SessionContext context) {
+ this.context = context;
+ }
+
+ public EnrollerBean() {}
+
+ /*********************** Database Routines *************************/
+
+ private void makeConnection() throws NamingException, SQLException {
+ InitialContext ic = new InitialContext();
+ DataSource ds = (DataSource) ic.lookup(dbName);
+ con = ds.getConnection();
+ }
+
+ private void insertEntry(String studentId, String courseId)
+ throws SQLException {
+
+ String insertStatement =
+ "insert into enrollment values ( ? , ? )";
+ PreparedStatement prepStmt =
+ con.prepareStatement(insertStatement);
+
+ prepStmt.setString(1, studentId);
+ prepStmt.setString(2, courseId);
+
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ }
+
+ private void deleteEntry(String studentId, String courseId)
+ throws SQLException {
+
+ String deleteStatement =
+ "delete from enrollment " +
+ "where studentid = ? and courseid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(deleteStatement);
+
+ prepStmt.setString(1, studentId);
+ prepStmt.setString(2, courseId);
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ }
+
+ private void deleteStudentEntries(String studentId)
+ throws SQLException {
+
+ String deleteStatement =
+ "delete from enrollment " +
+ "where studentid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(deleteStatement);
+
+ prepStmt.setString(1, studentId);
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ }
+
+ private void deleteCourseEntries(String courseId)
+ throws SQLException {
+
+ String deleteStatement =
+ "delete from enrollment " +
+ "where courseid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(deleteStatement);
+
+ prepStmt.setString(1, courseId);
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ }
+
+ private ArrayList selectStudent(String courseId)
+ throws SQLException {
+
+ String selectStatement =
+ "select studentid " +
+ "from enrollment where courseid = ? ";
+ PreparedStatement prepStmt =
+ con.prepareStatement(selectStatement);
+
+ prepStmt.setString(1, courseId);
+ ResultSet rs = prepStmt.executeQuery();
+ ArrayList a = new ArrayList();
+
+ while (rs.next()) {
+ String id = rs.getString(1);
+ a.add(id);
+ }
+
+ prepStmt.close();
+ return a;
+ }
+
+ private ArrayList selectCourse(String studentId)
+ throws SQLException {
+
+ String selectStatement =
+ "select courseid " +
+ "from enrollment where studentid = ? ";
+ PreparedStatement prepStmt =
+ con.prepareStatement(selectStatement);
+
+ prepStmt.setString(1, studentId);
+ ResultSet rs = prepStmt.executeQuery();
+ ArrayList a = new ArrayList();
+
+ while (rs.next()) {
+ String id = rs.getString(1);
+ a.add(id);
+ }
+
+ prepStmt.close();
+ return a;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerHome.java
new file mode 100755
index 0000000..45ce224
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerHome.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+public interface EnrollerHome extends EJBHome {
+
+ /**
+ * Gets a reference to the remote interface to the EnrollerBean bean.
+ * @exception throws CreateException and RemoteException.
+ *
+ */
+ Enroller create() throws RemoteException, CreateException;
+}
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
new file mode 100755
index 0000000..890c3de
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Student.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+
+public interface Student extends EJBObject {
+
+ /**
+ * 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
+ */
+ public ArrayList getCourseIds() throws RemoteException;
+
+ /**
+ * Returns the Name of a student.
+ * exception RemoteException
+ */
+ public String getName() throws RemoteException;
+
+
+ /**
+ * Sets the Name of a student.
+ * exception RemoteException
+ */
+ public void setName(String name) throws 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
new file mode 100755
index 0000000..e4ac139
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentBean.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import java.sql.*;
+import javax.sql.*;
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+public class StudentBean implements EntityBean {
+
+ private String studentId;
+ private String name;
+ private ArrayList courseIds;
+ private EntityContext context;
+ private EnrollerHome enrollerHome;
+ private DataSource dataSource;
+
+ /**
+ * 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
+ */
+ public ArrayList getCourseIds() {
+ return courseIds;
+ }
+
+ /**
+ * Returns the Name of a student.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the Name of a student.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String ejbCreate(String studentId, String name) throws CreateException {
+ try {
+ insertStudent(studentId, name);
+ } catch (Exception ex) {
+ throw new EJBException("ejbCreate: " + ex.getMessage());
+ }
+
+ this.studentId = studentId;
+ this.name = name;
+ return studentId;
+ }
+
+ public String ejbFindByPrimaryKey(String primaryKey) throws FinderException {
+ boolean result;
+
+ try {
+ result = selectByPrimaryKey(primaryKey);
+ } catch (Exception ex) {
+ throw new EJBException("ejbFindByPrimaryKey: " + ex.getMessage());
+ }
+
+ if (result) {
+ return primaryKey;
+ } else {
+ throw new ObjectNotFoundException
+ ("Row for id " + primaryKey + " not found.");
+ }
+ }
+
+ public void ejbRemove() {
+ try {
+ deleteStudent(studentId);
+ } catch (Exception ex) {
+ throw new EJBException("ejbRemove: " + ex.getMessage());
+ }
+ }
+
+ public void setEntityContext(EntityContext context) {
+ this.context = context;
+ courseIds = new ArrayList();
+ try {
+ InitialContext ic = new InitialContext();
+ dataSource =
+ (DataSource) ic.lookup("java:comp/env/jdbc/bmp-enrollerDB");
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/Enroller");
+ enrollerHome =
+ (EnrollerHome) PortableRemoteObject.narrow(objref,
+ EnrollerHome.class);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new EJBException("setEntityContext: " + ex.getMessage());
+ }
+ }
+
+ public void unsetEntityContext() {
+ this.context = null;
+ }
+
+ public void ejbActivate() {
+ studentId = (String)context.getPrimaryKey();
+ }
+
+ public void ejbPassivate() {
+ studentId = null;
+ }
+
+ public void ejbLoad() {
+ try {
+ loadStudent();
+ loadCourseIds();
+ } catch (Exception ex) {
+ throw new EJBException("ejbLoad: " + ex.getMessage());
+ }
+ }
+
+ private void loadCourseIds() {
+ courseIds.clear();
+ try {
+ Enroller enroller = enrollerHome.create();
+ ArrayList a = enroller.getCourseIds(studentId);
+ courseIds.addAll(a);
+ } catch (Exception ex) {
+ throw new EJBException("Exception in loadCourseIds: " +
+ ex.getMessage());
+ }
+ }
+
+ public void ejbStore() {
+ try {
+ storeStudent();
+ } catch (Exception ex) {
+ throw new EJBException("ejbStore: " + ex.getMessage());
+ }
+ }
+
+ public void ejbPostCreate(String studentId, String name) { }
+
+ /*********************** Database Routines *************************/
+
+ private void insertStudent (String studentId, String name)
+ throws SQLException {
+
+ Connection con = dataSource.getConnection();
+ String insertStatement =
+ "insert into student values ( ? , ? )";
+ PreparedStatement prepStmt =
+ con.prepareStatement(insertStatement);
+
+ prepStmt.setString(1, studentId);
+ prepStmt.setString(2, name);
+
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ con.close();
+ }
+
+ private boolean selectByPrimaryKey(String primaryKey)
+ throws SQLException {
+ Connection con = dataSource.getConnection();
+ String selectStatement =
+ "select studentid " +
+ "from student where studentid = ? ";
+ PreparedStatement prepStmt =
+ con.prepareStatement(selectStatement);
+ prepStmt.setString(1, primaryKey);
+
+ ResultSet rs = prepStmt.executeQuery();
+ boolean result = rs.next();
+ prepStmt.close();
+ con.close();
+ return result;
+ }
+
+ private void deleteStudent(String studentId) throws SQLException {
+ Connection con = dataSource.getConnection();
+ String deleteStatement =
+ "delete from student " +
+ "where studentid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(deleteStatement);
+
+ prepStmt.setString(1, studentId);
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ con.close();
+ }
+
+ private void loadStudent() throws SQLException {
+ Connection con = dataSource.getConnection();
+ String selectStatement =
+ "select name " +
+ "from student where studentid = ? ";
+ PreparedStatement prepStmt =
+ con.prepareStatement(selectStatement);
+
+ prepStmt.setString(1, studentId);
+
+ ResultSet rs = prepStmt.executeQuery();
+
+ if (rs.next()) {
+ name = rs.getString(1);
+ prepStmt.close();
+ }
+ else {
+ prepStmt.close();
+ throw new NoSuchEntityException("Row for studentId " + studentId +
+ " not found in database.");
+ }
+ con.close();
+ }
+
+ private void storeStudent() throws SQLException {
+ Connection con = dataSource.getConnection();
+ String updateStatement =
+ "update student set name = ? " +
+ "where studentid = ?";
+ PreparedStatement prepStmt =
+ con.prepareStatement(updateStatement);
+
+ prepStmt.setString(1, name);
+ prepStmt.setString(2, studentId);
+ int rowCount = prepStmt.executeUpdate();
+ prepStmt.close();
+
+ if (rowCount == 0) {
+ throw new EJBException("Storing row for studentId " +
+ studentId + " failed.");
+ }
+ con.close();
+ }
+}
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
new file mode 100755
index 0000000..c9897b5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentHome.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.bmp.enroller.ejb;
+
+import javax.ejb.EJBHome;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface StudentHome extends EJBHome {
+
+ /**
+ * Gets a reference to the remote interface to the StudentBean bean.
+ * @exception throws CreateException and RemoteException.
+ *
+ */
+ public Student create(String studentId, String name)
+ throws RemoteException, CreateException;
+
+ /**
+ * Gets a reference to the remote interface to the StudentBean object by Primary Key.
+ * @exception throws FinderException and RemoteException.
+ *
+ */
+
+ 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
new file mode 100755
index 0000000..205d60f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/create_pointbase.sql
@@ -0,0 +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));
+
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
new file mode 100755
index 0000000..2d0ed15
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/drop_pointbase.sql
@@ -0,0 +1,3 @@
+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
new file mode 100755
index 0000000..ad6e55e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.properties
@@ -0,0 +1,31 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="showArgsGUI"/>
+<property name="appname" value="${module}"/>
+<property name="clientname" value="${appname}-client"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<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="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
new file mode 100755
index 0000000..a50ca08
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="showArgsGUI" default="usage" basedir=".">
+
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <import file="../appclient.xml"/>
+
+ <target name="build.ear">
+ <echo>There is no EAR in this test.</echo>
+ </target>
+
+ <target name="deploy.ear"/>
+ <target name="undeploy.ear"/>
+
+ <target name="build" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+
+ <property name="appclient.jar.path" value="${assemble.dir}/${clientname}.jar"/>
+
+ <!-- Build the app client. -->
+ <antcall target="package-appclientjar-common">
+ <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="."
+ update="true" includes="**/*.jpg **/*.gif **/*.jnlp"/>
+
+ <!-- Build the library jar. -->
+<!--
+ <jar jarfile="${lib.jar.file}"
+ basedir="${build.classes.dir}"
+ update="true" includes ="**/lib/*.class"
+ />
+-->
+ </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>
+
+</project>
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
new file mode 100755
index 0000000..9b508dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/buildWithImages.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="showArgsGUI" default="usage" basedir=".">
+
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <import file="../appclient.xml"/>
+
+ <target name="build.ear">
+ <echo>There is no EAR in this test.</echo>
+ </target>
+
+ <target name="deploy.ear"/>
+ <target name="undeploy.ear"/>
+
+ <target name="build" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+
+ <property name="appclient.jar.path" value="${assemble.dir}/${clientname}.jar"/>
+
+ <!-- Build the app client. -->
+ <antcall target="package-appclientjar-common">
+ <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="."
+ update="true" includes="**/*.jpg **/*.gif"/>
+
+ <!-- Build the library jar. -->
+ <jar jarfile="${lib.jar.file}"
+ basedir="${build.classes.dir}"
+ update="true" includes ="**/lib/*.class"
+ />
+ </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>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/MANIFEST.MF
new file mode 100755
index 0000000..012d3de
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.appserv.test.client.SampleClient
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.form b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.form
new file mode 100755
index 0000000..d5c474d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.form
@@ -0,0 +1,106 @@
+<?xml version="1.1" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="3"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel1">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
+ <EtchetBorder/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTextArea" name="jTextArea1">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="d8" green="e9" id="Panel.background" palette="3" red="ec" type="palette"/>
+ </Property>
+ <Property name="editable" type="boolean" value="false"/>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Arial" size="13" style="0"/>
+ </Property>
+ <Property name="lineWrap" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Below are the command line arguments received during launch"/>
+ <Property name="wrapStyleWord" type="boolean" value="true"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="North"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JList" name="argValueList">
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Arial" size="18" style="0"/>
+ </Property>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ <Property name="text" type="java.lang.String" value="Sample Application Client U/I"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="North"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+</Form>
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
new file mode 100755
index 0000000..58182dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * SampleClient.java
+ *
+ * Created on November 1, 2005, 2:02 PM
+ */
+
+package com.sun.appserv.test.client;
+
+import java.awt.Color;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+
+/**
+ *
+ * @author tjquinn
+ */
+public class SampleClient extends javax.swing.JFrame {
+
+
+ /** Creates new form SampleClient */
+ 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
+ * always regenerated by the Form Editor.
+ */
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jPanel1 = new javax.swing.JPanel();
+ jTextArea1 = new javax.swing.JTextArea();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ argValueList = new javax.swing.JList();
+ jLabel1 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+
+ jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
+ jPanel1.setLayout(new java.awt.BorderLayout());
+
+ jTextArea1.setBackground(javax.swing.UIManager.getDefaults().getColor("Panel.background"));
+ jTextArea1.setEditable(false);
+ jTextArea1.setFont(new java.awt.Font("Arial", 0, 13));
+ jTextArea1.setLineWrap(true);
+ jTextArea1.setText("Below are the command line arguments received during launch");
+ jTextArea1.setWrapStyleWord(true);
+ jPanel1.add(jTextArea1, java.awt.BorderLayout.NORTH);
+
+ jScrollPane1.setViewportView(argValueList);
+
+ jPanel1.add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+ getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
+
+ jLabel1.setFont(new java.awt.Font("Arial", 0, 18));
+ jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+ jLabel1.setText("Sample Application Client U/I");
+ getContentPane().add(jLabel1, java.awt.BorderLayout.NORTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ java.awt.EventQueue.invokeLater(new Runnable() {
+ private SampleClient client;
+ public void run() {
+ System.out.println("About to set visible to TRUE");
+ client.setVisible(true);
+ System.out.println("Just set visible to TRUE");
+ }
+
+ public Runnable init(String args[]) {
+ client = new SampleClient();
+ client.initArgs(args);
+ String overridingColorName = System.getProperty("color");
+ if (overridingColorName != null) {
+ final Color overridingColor = toColor(overridingColorName);
+ if (overridingColor != null) {
+ client.argValueList.setBackground(overridingColor);
+ }
+ }
+ System.out.println("Just finished initArgs call with arguments = " + Arrays.toString(args));
+ return this;
+ }
+ }.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;
+ private javax.swing.JPanel jPanel1;
+ 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);
+ }
+
+ private static Color toColor(final String colorName) {
+ try {
+ final Field colorField = Color.class.getField(colorName);
+ return (Color) (colorField.get(null));
+ } catch (NoSuchFieldException ex) {
+ return null;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
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
new file mode 100755
index 0000000..ae84a57
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/application-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ Document : application-client.xml
+ Created on : August 24, 2005, 3:58 PM
+ Author : tjquinn
+ Description:
+ Purpose of the document follows.
+-->
+
+<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">
+
+ <display-name>Show Arguments</display-name>
+
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/custom.jnlp b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/custom.jnlp
new file mode 100644
index 0000000..c2a30b5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/custom.jnlp
@@ -0,0 +1,28 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<jnlp>
+ <resources>
+ <property name="color" value="pink"/>
+ </resources>
+
+ <application-desc main-class="does.not.Exist">
+ <argument>ignored</argument>
+ </application-desc>
+
+</jnlp>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/icon.jpg b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/icon.jpg
new file mode 100755
index 0000000..d61258e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/icon.jpg
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/splash.jpg b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/splash.jpg
new file mode 100755
index 0000000..c57af71
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/splash.jpg
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.with-context-root.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.with-context-root.xml
new file mode 100755
index 0000000..a2c492e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.with-context-root.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <java-web-start-access>
+ <vendor>client/icon.jpg::client/splash.jpg::Sun Microsystems, Inc.</vendor>
+ </java-web-start-access>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.with-no-context-root.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.with-no-context-root.xml
new file mode 100755
index 0000000..a2c492e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.with-no-context-root.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <java-web-start-access>
+ <vendor>client/icon.jpg::client/splash.jpg::Sun Microsystems, Inc.</vendor>
+ </java-web-start-access>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.xml
new file mode 100755
index 0000000..9de1ab5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <java-web-start-access>
+ <context-root>/tim</context-root>
+<!-- <vendor>client/icon.jpg::client/splash.jpg::Sun Microsystems, Inc.</vendor> -->
+ <jnlp-doc>client/custom.jnlp</jnlp-doc>
+ </java-web-start-access>
+</sun-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
new file mode 100644
index 0000000..07d694d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/build.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project basedir="." default="ConfigBeanTest" name="devtest">
+ <path id="global_cp">
+ <pathelement location="./build"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/admin/validator/lib/validator.jar"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/appserv-commons/lib/appserv-commons.jar"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/appserv-core/lib/appserv-core.jar"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/admin-core/config-api/lib/config-api.jar"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/junit/junit.jar"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/netbeans/modules/schema2beans.jar"/>
+ <pathelement location="../../../publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar"/>
+ </path>
+
+<!-- <target name="runtests"> -->
+<!-- <antcall target="unit.test"> -->
+<!-- <param name="class.under.test" value=" -->
+<!-- </antcall> -->
+<!-- </target> -->
+
+
+ <target name="compile">
+ <mkdir dir="build"/>
+ <javac classpathref="global_cp" destdir="./build" srcdir="."/>
+ </target>
+
+ <target depends="compile" name="AdminObjectResourceDeleteTest">
+ <antcall target="unit.test">
+ <param name="class.under.test" value="com.sun.enterprise.config.AdminObjectResourceDeleteTest"/>
+ </antcall>
+ </target>
+
+ <target depends="compile" name="ConfigBeanTest">
+ <antcall target="unit.test">
+ <param name="class.under.test" value="com.sun.enterprise.config.ConfigBeanTest"/>
+ </antcall>
+ </target>
+
+ <target name="unit.test">
+ <java classname="${class.under.test}"
+ classpathref="global_cp"
+ dir="com/sun/enterprise/config" fork="true"/>
+ </target>
+
+ <!-- Only works if either junit.jar is in $ANT_HOME/lib, or the junit tasks and junit.jar are on the CLASSPATH and NOT in $ANT_HOME/lib -->
+ <target name="unit">
+ <junit>
+ <classpath refid="global_cp"/>
+ <test name="com.sun.enterprise.config.serverbeans.validation.tests.SystemNamespaceTest">
+ <formatter type="plain"/>
+ </test>
+ </junit>
+ </target>
+</project>
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
new file mode 100644
index 0000000..0e1ad46
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/AdminObjectResourceDeleteTest.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.config;
+
+import com.sun.enterprise.config.serverbeans.AdminObjectResource;
+import com.sun.enterprise.config.serverbeans.AdminService;
+import com.sun.enterprise.config.serverbeans.Domain;
+import com.sun.enterprise.config.serverbeans.JmxConnector;
+import com.sun.enterprise.config.serverbeans.NodeAgent;
+import com.sun.enterprise.config.serverbeans.NodeAgents;
+import com.sun.enterprise.config.serverbeans.Resources;
+import com.sun.enterprise.config.serverbeans.ServerBeansFactory;
+import java.io.File;
+import java.io.FileReader;
+import junit.framework.*;
+import org.netbeans.modules.schema2beans.BaseProperty;
+import org.netbeans.modules.schema2beans.BeanProp;
+import org.netbeans.modules.schema2beans.Common;
+import org.xml.sax.InputSource;
+
+/**
+ *
+ * @author <a href="mailto:toby.h.ferguson@sun.com">Toby H Ferguson</a>
+ * @version $Revision: 1.2 $
+ */
+
+public class AdminObjectResourceDeleteTest extends TestCase {
+ public void testWithClonedContext() throws Exception {
+ // Set up the domain.xml file - adding an admin object resource to it
+ AdminObjectResource aor = new AdminObjectResource();
+ aor.setJndiName("toby/aor");
+ aor.setObjectType("user");
+ 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();
+ 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();
+ assertEquals("/domain/resources/admin-object-resource[@jndi-name='toby/aor']", 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();
+ 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();
+ 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();
+ assertNotNull("Unexpected null Resources object", r2);
+ assertNull("Unexpected AdminObjectResource from configCtx", r2.getAdminObjectResourceByJndiName("toby/aor"));
+ }
+
+ public AdminObjectResourceDeleteTest(String name){
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ Runtime.getRuntime().exec("rm -f domain.xml").waitFor();
+ Runtime.getRuntime().exec("cp domain.orig.xml domain.xml").waitFor();
+ }
+
+ protected void tearDown() throws Exception {
+ //Runtime.getRuntime().exec("rm -f domain.xml").waitFor();
+ }
+
+ private void nyi(){
+ fail("Not Yet Implemented");
+ }
+
+ public static void main(String args[]){
+ if (args.length == 0){
+ junit.textui.TestRunner.run(AdminObjectResourceDeleteTest.class);
+ } else {
+ junit.textui.TestRunner.run(makeSuite(args));
+ }
+ }
+ private static TestSuite makeSuite(String args[]){
+ final TestSuite ts = new TestSuite();
+ for (int i = 0; i < args.length; i++){
+ ts.addTest(new AdminObjectResourceDeleteTest(args[i]));
+ }
+ return ts;
+ }
+
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanFactoryTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanFactoryTest.java
new file mode 100644
index 0000000..4238576
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanFactoryTest.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.config;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ *
+ * @author <a href="mailto:toby.h.ferguson@sun.com">Toby H Ferguson</a>
+ * @version $Revision: 1.2 $
+ */
+
+public class ConfigBeanFactoryTest extends TestCase {
+
+ public ConfigBeanFactoryTest(String name){
+ super(name);
+ }
+ protected void setUp() throws Exception {
+ Runtime.getRuntime().exec("cp domain.orig.xml. domain.xml");
+ }
+
+ protected void tearDown() throws Exception {
+ Runtime.getRuntime().exec("rm -f domain.xml");
+ }
+
+ private void nyi(){
+ fail("Not Yet Implemented");
+ }
+
+ public static void main(String args[]){
+ if (args.length == 0){
+ TestRunner.run(ConfigBeanFactoryTest.class);
+ } else {
+ TestRunner.run(makeSuite(args));
+ }
+ }
+ private static TestSuite makeSuite(String args[]){
+ final TestSuite ts = new TestSuite();
+ for (int i = 0; i < args.length; i++){
+ ts.addTest(new ConfigBeanFactoryTest(args[i]));
+ }
+ 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
new file mode 100644
index 0000000..b58403b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanTest.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.config;
+
+import junit.framework.*;
+import org.xml.sax.InputSource;
+import java.io.FileReader;
+import java.io.File;
+import com.sun.enterprise.config.serverbeans.NodeAgent;
+import com.sun.enterprise.config.serverbeans.JmxConnector;
+import com.sun.enterprise.config.serverbeans.AdminService;
+import com.sun.enterprise.config.serverbeans.NodeAgents;
+import com.sun.enterprise.config.serverbeans.Domain;
+import org.netbeans.modules.schema2beans.BeanProp;
+import org.netbeans.modules.schema2beans.BaseProperty;
+import org.netbeans.modules.schema2beans.Common;
+
+/**
+ *
+ * @author <a href="mailto:toby.h.ferguson@sun.com">Toby H Ferguson</a>
+ * @version $Revision: 1.2 $
+ */
+
+public class ConfigBeanTest extends TestCase {
+ public void testBaseBean() throws Exception {
+ JmxConnector jc = new JmxConnector();
+ assertEquals("", ""+jc);
+ }
+
+ // IN this test we're trying to find out how to determine if
+ // we should return an xpath with a predicate. It would appear
+ // that if an element has a bean property, and taht property
+ // says its indexed, then the xpath should have a predicate.
+ public void testBeanProperty() throws Exception {
+ ConfigContext configCtx =ConfigFactory.createConfigContext("domain.xml", new MyHandler());
+ configCtx.refresh();
+ NodeAgents nas = (NodeAgents) configCtx.exactLookup("/domain/node-agents");
+ assertNotNull("Null Node Agents by exactLookup(\"/domain/node-agents\")", nas);
+ NodeAgent na = nas.getNodeAgentByName("na1");
+ assertNotNull("Null Node Agent!", na);
+ assertEquals("NodeAgent", na.name());
+ assertEquals("node-agent", na.dtdName());
+ BaseProperty bp = na.getProperty("jmx-connector");
+ assertNotNull("bean property fetch returned null", bp);
+ assertEquals("unexpected bean type", Common.TYPE_0_1, bp.getInstanceType());
+ BeanProp na_bp = na.beanProp();
+ assertNotNull("bean property is null", na_bp);
+ assertTrue("Not indexed", na_bp.isIndexed());
+ JmxConnector jc = new JmxConnector();
+ jc.setName("jc1");
+ na.setJmxConnector(jc);
+ assertNotNull(jc.beanProp());
+ assertTrue(!jc.beanProp().isIndexed());
+ AdminService as = (AdminService) configCtx.exactLookup("/domain/configs/config[@name='server-config']/admin-service");
+ jc = new JmxConnector();
+ jc.setName("jc1");
+ 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 {
+ ConfigContext configCtx =ConfigFactory.createConfigContext("domain.xml", new MyHandler());
+ configCtx.refresh();
+ NodeAgents nas = (NodeAgents) configCtx.exactLookup("/domain/node-agents");
+ assertNotNull("Null Node Agents by exactLookup(\"/domain/node-agents\")", nas);
+ NodeAgent na = nas.getNodeAgentByName("na1");
+ assertNotNull("Null Node Agent!", na);
+ JmxConnector jc = new JmxConnector();
+ jc.setName("jc1");
+ na.setJmxConnector(jc);
+ assertEquals("/domain/node-agents/node-agent[@name='na1']/jmx-connector", na.getJmxConnector().getXPath());
+ assertEquals(jc, configCtx.exactLookup(na.getJmxConnector().getXPath()));
+ AdminService as = (AdminService) configCtx.exactLookup("/domain/configs/config[@name='server-config']/admin-service");
+ jc = new JmxConnector();
+ jc.setName("jc1");
+ as.addJmxConnector(jc);
+ assertEquals("/domain/configs/config[@name='server-config']/admin-service/jmx-connector[@name='jc1']", as.getJmxConnectorByName("jc1").getXPath());
+
+
+ }
+
+ public ConfigBeanTest(String name){
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ Runtime.getRuntime().exec("rm -f domain.xml").waitFor();
+ Runtime.getRuntime().exec("cp domain.orig.xml domain.xml").waitFor();
+ }
+
+ protected void tearDown() throws Exception {
+ Runtime.getRuntime().exec("rm -f domain.xml").waitFor();
+ }
+
+ private void nyi(){
+ fail("Not Yet Implemented");
+ }
+
+ public static void main(String args[]){
+ if (args.length == 0){
+ junit.textui.TestRunner.run(ConfigBeanTest.class);
+ } else {
+ junit.textui.TestRunner.run(makeSuite(args));
+ }
+ }
+ private static TestSuite makeSuite(String args[]){
+ final TestSuite ts = new TestSuite();
+ for (int i = 0; i < args.length; i++){
+ ts.addTest(new ConfigBeanTest(args[i]));
+ }
+ 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
new file mode 100644
index 0000000..57c3cb4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/MyHandler.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.config;
+
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.InputSource;
+import java.io.FileReader;
+import java.io.File;
+
+public class MyHandler extends DefaultHandler
+{
+ public InputSource resolveEntity (String publicId, String systemId) {
+ try {
+ return new InputSource(new FileReader (new File("domain.dtd")));
+ }
+ catch (Exception e){
+ return null;
+ }
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.dtd b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.dtd
new file mode 100644
index 0000000..297c509
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.dtd
@@ -0,0 +1,3064 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- ENTITIES -->
+<!-- boolean
+
+ Used in:
+ access-log, admin-object-resource, appclient-module,
+ application-ref, availability-service, config,
+ connector-connection-pool, connector-module, connector-resource,
+ custom-resource, das-config, ejb-container-availability,
+ ejb-module, external-jndi-resource, http-access-log,
+ http-file-cache, http-listener, http-protocol, iiop-listener,
+ iiop-service, j2ee-application, java-config,
+ jdbc-connection-pool, jdbc-resource, jms-service, jmx-connector,
+ lb-config, lifecycle-module, log-service, mail-resource,
+ node-agent, persistence-manager-factory-resource, profiler,
+ resource-ref, security-service, server-ref, ssl,
+ transaction-service, web-container-availability, web-module
+-->
+<!ENTITY % boolean "yes | no | on | off | 1 | 0 | true | false">
+
+<!-- isolation
+
+ Used in:
+ jdbc-connection-pool
+-->
+<!ENTITY % isolation
+ "read-uncommitted | read-committed | repeatable-read | serializable">
+
+
+<!-- validation-level
+
+ Used in:
+ das-config
+-->
+<!ENTITY % validation-level "full | parsing | none">
+
+<!-- object-type
+ defines the type of the resource. It can be:
+ system-all
+ These are system resources for all instances and DAS
+ system-admin
+ These are system resources only in DAS
+ system-instance
+ These are system resources only in instances (and not DAS)
+ user
+ User resources (This is the default for all elements)
+
+ Used in:
+ admin-object-resource, connector-module, connector-resource,
+ custom-resource, ejb-module, external-jndi-resource,
+ j2ee-application, jdbc-resource, mail-resource,
+ persistence-manager-factory-resource, resource-adapter-config,
+ web-module
+-->
+<!ENTITY % object-type "system-all | system-admin | system-instance | user">
+
+<!-- rjmx-protocol
+ SE/EE related ENTITIES: This will define the available JSR 160
+ connector transport protocols.
+
+ Used in:
+ jmx-connector
+-->
+<!ENTITY % rjmx-protocol "rmi_jrmp | rmi_iiop | jmxmp">
+
+<!-- monitoring-level
+ monitoring-level controls the amount of monitoring data collected
+ and exposed to clients
+ OFF
+ no monitoring/statistical data is exposed to the clients.
+ LOW
+ SE/EE only
+ HIGH
+ maximum data is gathered and released.
+
+ Used in:
+ module-monitoring-levels
+-->
+<!ENTITY % monitoring-level "OFF | LOW | HIGH">
+
+<!-- persistence-type
+ SE/EE related ENTITIES
+
+ Used in:
+ web-container-availability
+-->
+<!ENTITY % persistence-type
+ "memory | file | ha | jdbc-oracle | jdbc-pointbase | custom">
+
+
+<!-- session-save-frequency
+
+ Used in:
+ web-container-availability
+-->
+<!ENTITY % session-save-frequency "web-method | time-based | on-demand">
+
+<!-- session-save-scope
+
+ Used in:
+ web-container-availability
+-->
+<!ENTITY % session-save-scope
+ "session | modified-session | modified-attribute">
+
+
+<!-- sfsb-persistence-type
+
+ Used in:
+ ejb-container-availability
+-->
+<!ENTITY % sfsb-persistence-type "file | ha">
+
+<!-- message-layer
+
+ Used in:
+ message-security-config
+-->
+<!ENTITY % message-layer "SOAP">
+
+<!-- log-level
+ Configure the Log Levels for Various Loggers in the SUN ONE
+ Modules. The Default level is set to INFO, The log levels can be
+ changed using one of the seven levels. Please refer JSR 047 to
+ understand the Log Levels.
+
+ The Logs can be completely turned off by using 'OFF' value. The names of
+ the module loggers are self-explanatory
+
+
+ Used in:
+ module-log-levels
+-->
+<!ENTITY % log-level
+ "FINEST | FINER | FINE | CONFIG | INFO | WARNING | SEVERE | OFF">
+
+
+<!-- ELEMENTS -->
+
+<!-- domain
+ Top level Domain Element that includes applications, resources,
+ configs, servers, clusters and node-agents, load balancer
+ configurations and load balancers. node-agents and load balancers
+ are SE/EE related entities only.
+
+ attributes
+ application-root
+ for PE this defines the location where applications are
+ deployed
+ locale
+ If present, overrides OS locale setting.
+ log-root
+ specifies where the server instance's log files are kept,
+ including HTTP access logs, server logs, and transaction
+ logs. Default is $INSTANCE-ROOT/logs
+-->
+<!ELEMENT domain
+ (applications?, resources?, configs, servers, clusters?, node-agents?,
+ lb-configs?, system-property*, property*)>
+
+
+<!ATTLIST domain
+ application-root CDATA #IMPLIED
+ log-root CDATA #IMPLIED
+ locale CDATA #IMPLIED>
+
+
+<!-- configs
+
+ Used in:
+ domain
+-->
+<!ELEMENT configs (config+)>
+
+
+<!-- servers
+
+ Used in:
+ domain
+-->
+<!ELEMENT servers (server*)>
+
+
+<!-- clusters
+
+ Used in:
+ domain
+-->
+<!ELEMENT clusters (cluster*)>
+
+
+<!-- node-agents
+
+ Used in:
+ domain
+-->
+<!ELEMENT node-agents (node-agent*)>
+
+
+<!-- lb-configs
+
+ Used in:
+ domain
+-->
+<!ELEMENT lb-configs (lb-config*)>
+
+
+<!-- applications
+ Various types of applications that can be deployed on Sun ONE
+ Application Server instance
+
+ Used in:
+ domain
+-->
+<!ELEMENT applications
+ ((lifecycle-module | j2ee-application | ejb-module | web-module |
+ connector-module | appclient-module)*)>
+
+
+
+<!-- lifecycle-module
+
+ attributes
+ class-name
+ fully qualified name of the startup class.
+ classpath
+ where this module is actually located, if it is not under
+ applications-root
+ enabled
+ boolean attribute. If set to "false" this module will not be
+ loaded at server start up.
+ is-failure-fatal
+ if true, aborts server start up if this module does not load
+ properly.
+ load-order
+ integer value that can be used to force the order in which
+ deployed lifecycle modules are loaded at server start up.
+ Smaller numbered modules get loaded sooner. Order is
+ unspecified if two or more lifecycle modules have the same
+ load-order value.
+ name
+ unqiue identifier for the deployed server lifecycle event
+ listener module.
+
+ Used in:
+ applications
+-->
+<!ELEMENT lifecycle-module (description?, property*)>
+
+<!ATTLIST lifecycle-module
+ name CDATA #REQUIRED
+ class-name CDATA #REQUIRED
+ classpath CDATA #IMPLIED
+ load-order CDATA #IMPLIED
+ is-failure-fatal (%boolean;) "false"
+ enabled (%boolean;) "true">
+
+
+<!-- j2ee-application
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for SFSB checkpointing (and potentially passivation). If this
+ is "false", then all SFSB checkpointing is disabled for
+ either the given j2ee app or the given ejb module. If it is
+ "true" (and providing that all the availability-enabled
+ attributes above in precedence are also "true", then the j2ee
+ app or stand-alone ejb modules may be ha enabled.
+ Finer-grained control exists at lower level inside each bean.
+ If this attribute is missing, it defaults to "false".
+ directory-deployed
+ This attribute indicates whether the application has been
+ deployed to a directory or not
+
+ Used in:
+ applications
+-->
+<!ELEMENT j2ee-application (description?)>
+
+<!ATTLIST j2ee-application
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true"
+ availability-enabled (%boolean;) "false"
+ directory-deployed (%boolean;) "false">
+
+
+<!-- ejb-module
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for SFSB checkpointing (and potentially passivation). If this
+ is "false", then all SFSB checkpointing is disabled for
+ either the given j2ee app or the given ejb module. If it is
+ "true" (and providing that all the availability-enabled
+ attributes above in precedence are also "true", then the j2ee
+ app or stand-alone ejb modules may be ha enabled.
+ Finer-grained control exists at lower level inside each bean.
+ If this attribute is missing, it defaults to "false".
+ directory-deployed
+ This attribute indicates whether the application has been
+ deployed to a directory or not
+
+ Used in:
+ applications
+-->
+<!ELEMENT ejb-module (description?)>
+
+<!ATTLIST ejb-module
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true"
+ availability-enabled (%boolean;) "false"
+ directory-deployed (%boolean;) "false">
+
+
+<!-- web-module
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for HTTP Session Persistence. If this is "false", then all
+ session persistence is disabled for the given web module. If
+ it is "true" (and providing that all the availability-enabled
+ attributes above in precedence are also "true", then the web
+ module may be ha enabled. Finer-grained control exists at
+ lower level (see sun-web.xml). If this attribute is missing,
+ it defaults to "false".
+ directory-deployed
+ This attribute indicates whether the application has been
+ deployed to a directory or not
+
+ Used in:
+ applications
+-->
+<!ELEMENT web-module (description?)>
+
+<!ATTLIST web-module
+ name CDATA #REQUIRED
+ context-root CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true"
+ availability-enabled (%boolean;) "false"
+ directory-deployed (%boolean;) "false">
+
+
+<!-- connector-module
+
+ Used in:
+ applications
+-->
+<!ELEMENT connector-module (description?)>
+
+<!ATTLIST connector-module
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true"
+ directory-deployed (%boolean;) "false">
+
+
+<!-- appclient-module
+
+ Used in:
+ applications
+-->
+<!ELEMENT appclient-module (description?)>
+
+<!ATTLIST appclient-module
+ name CDATA #REQUIRED
+ location CDATA #REQUIRED
+ directory-deployed (%boolean;) "false">
+
+
+<!-- resources
+ J2EE Applications look up resources registered with the
+ Application server, using portable JNDI names.
+
+ Used in:
+ domain
+-->
+<!ELEMENT resources
+ ((custom-resource | external-jndi-resource | jdbc-resource | mail-resource
+ | persistence-manager-factory-resource | admin-object-resource |
+ connector-resource | resource-adapter-config | jdbc-connection-pool |
+ connector-connection-pool)*)>
+
+
+
+<!-- description
+ Textual description of a configured entity
+
+ Used in:
+ admin-object-resource, appclient-module,
+ connector-connection-pool, connector-module, connector-resource,
+ custom-resource, ejb-module, external-jndi-resource,
+ j2ee-application, jdbc-connection-pool, jdbc-resource,
+ lifecycle-module, mail-resource,
+ persistence-manager-factory-resource, property, system-property,
+ web-module
+-->
+<!ELEMENT description (#PCDATA)>
+
+
+<!-- custom-resource
+ custom (or generic) resource managed by a user-written factory
+ class.
+
+ attributes
+ jndi-name
+ JNDI name for generic resource, the fully qualified type of
+ the resource and whether it is enabled at runtime
+
+ Used in:
+ resources
+-->
+<!ELEMENT custom-resource (description?, property*)>
+
+<!ATTLIST custom-resource
+ jndi-name CDATA #REQUIRED
+ res-type CDATA #REQUIRED
+ factory-class CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- external-jndi-resource
+ resource residing in an external JNDI repository
+
+ Used in:
+ resources
+-->
+<!ELEMENT external-jndi-resource (description?, property*)>
+
+<!ATTLIST external-jndi-resource
+ jndi-name CDATA #REQUIRED
+ jndi-lookup-name CDATA #REQUIRED
+ res-type CDATA #REQUIRED
+ factory-class CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- jdbc-resource
+ JDBC javax.sql.(XA)DataSource resource definition
+
+ Used in:
+ resources
+-->
+<!ELEMENT jdbc-resource (description?, property*)>
+
+<!ATTLIST jdbc-resource
+ jndi-name CDATA #REQUIRED
+ pool-name CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- mail-resource
+ The mail-resource element describes a javax.mail.Session resource
+
+ Used in:
+ resources
+-->
+<!ELEMENT mail-resource (description?, property*)>
+
+<!ATTLIST mail-resource
+ jndi-name CDATA #REQUIRED
+ store-protocol CDATA "imap"
+ store-protocol-class CDATA "com.sun.mail.imap.IMAPStore"
+ transport-protocol CDATA "smtp"
+ transport-protocol-class CDATA "com.sun.mail.smtp.SMTPTransport"
+ host CDATA #REQUIRED
+ user CDATA #REQUIRED
+ from CDATA #REQUIRED
+ debug (%boolean;) "false"
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- persistence-manager-factory-resource
+ Persistence Manager runtime configuration.
+
+ attributes
+ factory-class
+ Class that creates persistence manager instance.
+ jdbc-resource-jndi-name
+ jdbc resource with which database connections are obtained.
+ jndi-name
+ JNDI name for this resource
+
+ Used in:
+ resources
+-->
+<!ELEMENT persistence-manager-factory-resource (description?, property*)>
+
+<!ATTLIST persistence-manager-factory-resource
+ jndi-name CDATA #REQUIRED
+ factory-class CDATA "com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl"
+ jdbc-resource-jndi-name CDATA #IMPLIED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- admin-object-resource
+ The admin-object-resource element describes a administered object
+ for a inbound resource adapter.
+
+ attributes
+ jndi-name
+ JNDI name for this resource
+ res-adapter
+ Name of the inbound resource adapter.
+ res-type
+ Interface definition for the administered object
+
+ Used in:
+ resources
+-->
+<!ELEMENT admin-object-resource (description?, property*)>
+
+<!ATTLIST admin-object-resource
+ jndi-name CDATA #REQUIRED
+ res-type CDATA #REQUIRED
+ res-adapter CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- connector-resource
+
+ Used in:
+ resources
+-->
+<!ELEMENT connector-resource (description?, property*)>
+
+<!ATTLIST connector-resource
+ jndi-name CDATA #REQUIRED
+ pool-name CDATA #REQUIRED
+ object-type (%object-type;) "user"
+ enabled (%boolean;) "true">
+
+
+<!-- resource-adapter-config
+ This element is for configuring the resource adapter. These
+ values (properties) over-rides the default values present in
+ ra.xml. The name attribute has to be unique . It is optional for
+ PE. It is used mainly for EE.
+
+ Used in:
+ resources
+-->
+<!ELEMENT resource-adapter-config (property*)>
+
+<!ATTLIST resource-adapter-config
+ name CDATA #IMPLIED
+ thread-pool-ids CDATA #IMPLIED
+ object-type (%object-type;) "user"
+ resource-adapter-name CDATA #REQUIRED>
+
+
+<!-- config
+ The configuration defines the configuration of a server instance
+ that can be shared by other server instances. The
+ availability-service and are SE/EE only.
+
+ attributes
+ dynamic-reconfiguration-enabled
+ When set to "true" then any changes to the system (e.g.
+ applications deployed, resources created) will be
+ automatically applied to the affected servers without a
+ restart being required. When set to "false" such changes will
+ only be picked up by the affected servers when each server
+ restarts.
+
+ Used in:
+ configs
+-->
+<!ELEMENT config
+ (http-service, iiop-service, admin-service, connector-service?,
+ web-container, ejb-container, mdb-container, jms-service?, log-service,
+ security-service, transaction-service, monitoring-service, java-config,
+ availability-service?, thread-pools, alert-service?, system-property*,
+ property*)>
+
+
+<!ATTLIST config
+ name CDATA #REQUIRED
+ dynamic-reconfiguration-enabled (%boolean;) "true">
+
+
+<!-- alert-service
+ The Alert service provides a mechanism for users to register for
+ and receive alerts. The alert service collects together a set of
+ alert subscriptions
+
+ Used in:
+ config
+-->
+<!ELEMENT alert-service (alert-subscription*, property*)>
+
+
+<!-- alert-subscription
+ alert subscription details a specific subscription. The
+ subscription comprises the configuration of a specific listener,
+ and a filter to be applied.
+
+ attributes
+ name
+ The unique name identifying a particular alert service.
+
+ Used in:
+ alert-service
+-->
+<!ELEMENT alert-subscription (listener-config, filter-config?)>
+
+<!ATTLIST alert-subscription
+ name CDATA #REQUIRED>
+
+
+<!-- listener-config
+ connects a specific listener class with specific managed objects
+
+ attributes
+ listener-class-name
+ The name of a class that can act as a listener for alerts.
+ Non-empty string containing a Java class name.
+ subscribe-listener-with
+ A list of managed object names that the listener should be
+ subscribed to. A non-empty, comma separated list.
+
+ Used in:
+ alert-subscription
+-->
+<!ELEMENT listener-config (property*)>
+
+<!ATTLIST listener-config
+ listener-class-name CDATA #REQUIRED
+ subscribe-listener-with CDATA #REQUIRED>
+
+
+<!-- filter-config
+ filter-config provides the means of specifying a filter to be
+ applied to alerts
+
+ attributes
+ filter-class-name
+ The name of a class that can act as a filter. Non-empty
+ string containing a Java class name.
+
+ Used in:
+ alert-subscription
+-->
+<!ELEMENT filter-config (property*)>
+
+<!ATTLIST filter-config
+ filter-class-name CDATA #REQUIRED>
+
+
+<!-- http-service
+
+ Used in:
+ config
+-->
+<!ELEMENT http-service
+ (access-log?, http-listener+, virtual-server+, request-processing?,
+ keep-alive?, connection-pool?, http-protocol?, http-file-cache?,
+ property*)>
+
+
+
+<!-- access-log
+
+ attributes
+ format
+ The global format for the access log rotation-policy The
+ policy based on which the log rotation would be done . At
+ this time only time based rotation is enabled.
+ rotation-enabled
+ The flag for enabling the access-log rotation
+ rotation-interval-in-minutes
+ The time interval in minutes between two successive rotations
+ of the access logs.
+ rotation-suffix
+ The suffix to be added to the access-log name after rotation.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT access-log EMPTY>
+
+<!ATTLIST access-log
+ format CDATA "%client.dns;%auth-user-name;%system.date;%request;%status;%response.length;"
+ rotation-policy (time) "time"
+ rotation-interval-in-minutes CDATA "1440"
+ rotation-suffix CDATA "%YYYY;%MM;%DD;-%hh;h%mm;m%ss;s"
+ rotation-enabled (%boolean;) "true">
+
+
+<!-- http-listener
+
+ attributes
+ acceptor-threads
+ Number of acceptor threads for the listen socket. The
+ recommended value is the number of processors in the machine.
+ address
+ IP address of the listen socket. Can be in dotted-pair or
+ IPv6 notation. Can also be any for INADDR-ANY. Configuring a
+ listen socket to listen on any is required if more than one
+ http-listener is configured to it.
+ blocking-enabled
+ Enables blocking for the listen and external ports.
+ default-virtual-server
+ The id attribute of the default virtual server for this
+ particular connection group.
+ external-port
+ The port at which the user makes a request , typically a
+ proxy server port.
+ family
+ Specified the family of addresses either inet or ncsa
+ id
+ Unique identifier for http listener.
+ port
+ Port number to create the listen socket on. Legal values are
+ 1 - 65535. On Unix, creating sockets that listen on ports 1 -
+ 1024 requires superuser privileges. Configuring an SSL listen
+ socket to listen on port 443 is recommended.
+ redirect-port
+ if the connector is supporting non-SSL requests and a request
+ is received for which a matching security-constraint requires
+ SSL transport catalina will automatically redirect the
+ request to the port number specified here
+ security-enabled
+ Determines whether the http listener runs SSL. You can turn
+ SSL2 or SSL3 on or off and set ciphers using an ssl element.
+ The enable-ssl in the protocol element should be set to true
+ for this setting to work.
+ server-name
+ Tells the server what to put in the host name section of any
+ URLs it sends to the client. This affects URLs the server
+ automatically generates; it doesnt affect the URLs for
+ directories and files stored in the server. This name should
+ be the alias name if your server uses an alias. If you append
+ a colon and port number, that port will be used in URLs the
+ server sends to the client.
+ xpowered-by
+ The Servlet 2.4 spec defines a special X-Powered-By:
+ Servlet/2.4 header, which containers may add to
+ servlet-generated responses. This is complemented by the JSP
+ 2.0 spec, which defines a X-Powered-By: JSP/2.0 header to be
+ added (on an optional basis) to responses utilizing JSP
+ technology. The goal of these headers is to aid in gathering
+ statistical data about the use of Servlet and JSP technology.
+ If true, these headers will be added.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT http-listener (ssl?, property*)>
+
+<!ATTLIST http-listener
+ id CDATA #REQUIRED
+ address CDATA #REQUIRED
+ port CDATA #REQUIRED
+ external-port CDATA #IMPLIED
+ family (inet | ncsa) "inet"
+ blocking-enabled (%boolean;) "false"
+ acceptor-threads CDATA "1"
+ security-enabled (%boolean;) "false"
+ default-virtual-server CDATA #REQUIRED
+ server-name CDATA #REQUIRED
+ redirect-port CDATA #IMPLIED
+ xpowered-by (%boolean;) "true"
+ enabled (%boolean;) "true">
+
+
+<!-- ssl
+ Define SSL processing parameters
+
+ attributes
+ cert-nickname
+ nickname of the server certificate in the certificate
+ database or the PKCS#11 token. In the certificate, the name
+ format is tokenname:nickname. Including the tokenname: part
+ of the name in this attribute is optional.
+ client-auth-enabled
+ Determines whether SSL3 client authentication is performed on
+ every request, independent of ACL-based access control.
+ ssl2-ciphers
+ A comma-separated list of the SSL2 ciphers used, with the
+ prefix + to enable or - to disable, for example +rc4. Allowed
+ values are rc4, rc4export, rc2, rc2export, idea, des,
+ desede3. If no value is specified, all supported ciphers are
+ assumed to be enabled. NOT Used in PE
+ ssl2-enabled
+ Determines whether SSL2 is enabled. NOT Used in PE
+ ssl3-enabled
+ Determines whether SSL3 is enabled.
+
+ If both SSL2 and SSL3 are enabled for a virtual server, the server
+ tries SSL3 encryption first. If that fails, the server tries SSL2
+ encryption.
+
+ ssl3-tls-ciphers
+ A comma-separated list of the SSL3 ciphers used, with the
+ prefix + to enable or - to disable, for example +rsa-des-sha.
+ Allowed SSL3 values are rsa-rc4-128-md5, rsa3des-sha,
+ rsa-des-sha, rsa-rc4-40-md5, rsa-rc2-40-md5, rsa-null-md5.
+ Allowed TLS values are rsa-des-56-sha, rsa-rc4-56-sha. If no
+ value is specified, all supported ciphers are assumed to be
+ enabled.
+ tls-enabled
+ Determines whether TLS is enabled.
+ tls-rollback-enabled
+ Determines whether TLS rollback is enabled. TLS rollback
+ should be enabled for Microsoft Internet Explorer 5.0 and
+ 5.5. NOT Used in PE
+
+ Used in:
+ http-listener, iiop-listener, jmx-connector, ssl-client-config
+-->
+<!ELEMENT ssl EMPTY>
+
+<!ATTLIST ssl
+ cert-nickname CDATA #REQUIRED
+ ssl2-enabled (%boolean;) "false"
+ ssl2-ciphers CDATA #IMPLIED
+ ssl3-enabled (%boolean;) "true"
+ ssl3-tls-ciphers CDATA #IMPLIED
+ tls-enabled (%boolean;) "true"
+ tls-rollback-enabled (%boolean;) "true"
+ client-auth-enabled (%boolean;) "false">
+
+
+<!-- virtual-server
+ Configuration of Virtual Server
+
+ Virtualization in Application Server allows multiple URL domains to be
+ served by the same HTTP server process, which is listening on multiple
+ host addresses If an application is available at two virtual servers, they
+ still share same physical resource pools, such as JDBC connection pools.
+
+ Sun ONE Application Server allows a list of virtual servers, to be
+ specified along with web-module and j2ee-application elements. This
+ establishes an association between URL domains, represented by the virtual
+ server and the web modules (standalone web modules or web modules inside
+ the ear file)
+
+
+ attributes
+ default-web-module
+ stand alone web module associated with this virtual server by
+ default.
+ docroot
+ The location on the filesystem where the files related to the
+ content to be served by this virtual server is stored.
+ hosts
+ A comma-separated list of values allowed in the Host request
+ header to select the current virtual server. Each Virtual
+ Server that is configured to the same Connection Group must
+ have a unique hosts value for that group.
+ http-listeners
+ A comma-separated list of http-listener id(s), Required only
+ for a Virtual Server that is not the default virtual server.
+ id
+ Virtual server ID. This is a unique ID that allows lookup of
+ a specific virtual server. A virtual server ID cannot begin
+ with a number.
+ log-file
+ Specifies a log file for virtual-server-specific log
+ messages. If this is not specified, log messages go to
+ $LOG-ROOT/server.log
+ state
+ Determines whether a Virtual Server is active (on) or
+ inactive (off, disable). The default is on (active). When
+ inactive, a Virtual Server does not service requests.
+ off
+ returns a 404: Status code (404) indicating that the
+ requested resource is not available
+ disabled
+ returns a 403: Status code (403) indicating the server
+ understood the request but refused to fulfill it.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT virtual-server (http-access-log?, property*)>
+
+<!ATTLIST virtual-server
+ id CDATA #REQUIRED
+ http-listeners CDATA #IMPLIED
+ default-web-module CDATA #IMPLIED
+ hosts CDATA #REQUIRED
+ state (on | off | disabled) "on"
+ docroot CDATA #IMPLIED
+ log-file CDATA #IMPLIED>
+
+
+<!-- http-access-log
+
+ attributes
+ iponly
+ if the IP address of the user agent should be specified or a
+ DNL lookup should be done
+ log-directory
+ location of the access logs specified as a directory.This
+ defaults to the domain.log-root, which by default is
+ ${INSTANCE_ROOT}/logs. Hence the default value for this
+ attribute is ${INSTANCE_ROOT}/logs/access
+
+ Used in:
+ virtual-server
+-->
+<!ELEMENT http-access-log EMPTY>
+
+<!ATTLIST http-access-log
+ log-directory CDATA "${com.sun.aas.instanceRoot}/logs/access"
+ iponly (%boolean;) "true">
+
+
+<!-- request-processing
+ This element provides attributes to configure the request
+ processing subsystem in the HTTP service.
+
+ attributes
+ header-buffer-length-in-bytes
+ The size of the buffer used by the request processing threads
+ for reading the request data
+ initial-thread-count
+ The no of request processing threads when the http service is
+ initialized
+ request-timeout-in-seconds
+ Time after which the request times out
+ thread-count
+ Max no of request processing threads.
+ thread-increment
+ The increment in the no of request processing threads when
+ the no. of requests reaches the number specified by
+ request-threads-init
+
+ Used in:
+ http-service
+-->
+<!ELEMENT request-processing EMPTY>
+
+<!ATTLIST request-processing
+ thread-count CDATA "128"
+ initial-thread-count CDATA "48"
+ thread-increment CDATA "10"
+ request-timeout-in-seconds CDATA "30"
+ header-buffer-length-in-bytes CDATA "4096">
+
+
+<!-- keep-alive
+ Keep-alive subsystem configuration
+
+ attributes
+ max-connections
+ Max no of connection in the Keep Alive mode
+ thread-count
+ no of Keep Alive threads in the system
+ timeout-in-seconds
+ Keep Alive timeout , max time a connection can be deemed as
+ idle and kept in the keep-alive state
+
+ Used in:
+ http-service
+-->
+<!ELEMENT keep-alive EMPTY>
+
+<!ATTLIST keep-alive
+ thread-count CDATA "1"
+ max-connections CDATA "256"
+ timeout-in-seconds CDATA "30">
+
+
+<!-- connection-pool
+
+ attributes
+ max-pending-count
+ Max no of pending connections on the listen socket
+ queue-size-in-bytes
+ Size in bytes of the Connection queue
+ receive-buffer-size-in-bytes
+ The buffer size of the receive buffer used by sockets.
+ send-buffer-size-in-bytes
+ The buffer size of the send buffer used by sockets.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT connection-pool EMPTY>
+
+<!ATTLIST connection-pool
+ queue-size-in-bytes CDATA "4096"
+ max-pending-count CDATA "4096"
+ receive-buffer-size-in-bytes CDATA "4096"
+ send-buffer-size-in-bytes CDATA "8092">
+
+
+<!-- http-protocol
+ HTTP Protocol related settings
+
+ attributes
+ default-response-type
+ Setting the default response-type. Specified as a semi-colon
+ delimited string consisting of content-type, encoding,
+ language, charset
+ dns-lookup-enabled
+ If the DNS name for a particular ip address from which the
+ request originates needs to be looked up.
+ forced-response-type
+ The response type to be forced if the content served cannot
+ be matched by any of the MIME mappings for extensions.
+ Specified as a semi-colon delimited string consisting of
+ content-type, encoding, language, charset
+ ssl-enabled
+ Globally enables SSL across the server
+ version
+ The version of the HTTP protocol used by the HTTP Service
+
+ Used in:
+ http-service
+-->
+<!ELEMENT http-protocol EMPTY>
+
+<!ATTLIST http-protocol
+ version CDATA "HTTP/1.1"
+ dns-lookup-enabled (%boolean;) "true"
+ forced-response-type CDATA "ISO-8859-1;en;ISO-8859-1"
+ default-response-type CDATA "text/html;ISO-8859-1;en;ISO-8859-1"
+ ssl-enabled (%boolean;) "true">
+
+
+<!-- http-file-cache
+
+ attributes
+ file-caching-enabled
+ Enables the caching of file content if the file size is less
+ than the one specified ny med-file-size-limit
+ file-transmission-enabled
+ This is valid on Windows only. Enables the TransmitFileSystem
+ call.
+ globally-enabled
+ globally enables the file cache
+ hash-init-size
+ Initial no. of hash buckets.
+ max-age-in-seconds
+ Maximum age of a valid cache entry
+ max-files-count
+ Maximum no. of files in the file cache.
+ medium-file-size-limit-in-bytes
+ Maximum size of a cached file that can be stored as a memory
+ mapped file.
+ medium-file-space-in-bytes
+ Total size of all files that are cached as memory mapped
+ files.
+ small-file-size-limit-in-bytes
+ Maximum size of a file that can be read into memory.
+ small-file-space-in-bytes
+ Total size of the files that are read into memory.
+
+ Used in:
+ http-service
+-->
+<!ELEMENT http-file-cache EMPTY>
+
+<!ATTLIST http-file-cache
+ globally-enabled (%boolean;) "true"
+ file-caching-enabled (%boolean;) "on"
+ max-age-in-seconds CDATA "30"
+ medium-file-size-limit-in-bytes CDATA "537600"
+ medium-file-space-in-bytes CDATA "10485760"
+ small-file-size-limit-in-bytes CDATA "2048"
+ small-file-space-in-bytes CDATA "1048576"
+ file-transmission-enabled (%boolean;) "false"
+ max-files-count CDATA "1024"
+ hash-init-size CDATA "0">
+
+
+<!-- iiop-service
+
+ Used in:
+ config
+-->
+<!ELEMENT iiop-service (orb, ssl-client-config?, iiop-listener*)>
+
+<!ATTLIST iiop-service
+ client-authentication-required (%boolean;) "false">
+
+
+<!-- orb
+ Orb Configuration properties
+
+ attributes
+ max-connections
+ maximum number of incoming connections, on all listeners
+ message-fragment-size
+ GIOPv1.2 messages larger than this will get fragmented.
+ use-thread-pool-ids
+ This would refer to the thread-pool-id(s) defined in the
+ thread-pool sub-element of thread-pool-config element in
+ server.xml. These would be the threadpool(s) used by the ORB.
+ More than one thread-pool-id(s) could be specified by using
+ commas to separate the names e.g. orb-thread-pool-1,
+ orb-thread-pool-2
+
+ Used in:
+ iiop-service
+-->
+<!ELEMENT orb (property*)>
+
+<!ATTLIST orb
+ use-thread-pool-ids CDATA #REQUIRED
+ message-fragment-size CDATA "1024"
+ max-connections CDATA "1024">
+
+
+<!-- ssl-client-config
+ ssl-client-config element specifies the SSL configuration when
+ the Application Server is making outbound IIOP/SSL connections.
+
+ Used in:
+ iiop-service
+-->
+<!ELEMENT ssl-client-config (ssl)>
+
+
+<!-- iiop-listener
+
+ children
+ ssl
+ element specifies optional SSL configuration
+
+ attributes
+ address
+ ip address or hostname (resolvable by DNS)
+ enabled
+ if false, a configured listener, is disabled
+ id
+ unique identifier for this listener.
+ port
+ port number
+ security-enabled
+ Determines whether the iiop listener runs SSL. You can turn
+ SSL2 or SSL3 on or off and set ciphers using an ssl element
+
+ Used in:
+ iiop-service
+-->
+<!ELEMENT iiop-listener (ssl?, property*)>
+
+<!ATTLIST iiop-listener
+ id CDATA #REQUIRED
+ address CDATA #REQUIRED
+ port CDATA "1072"
+ security-enabled (%boolean;) "false"
+ enabled (%boolean;) "true">
+
+
+<!-- admin-service
+ Admin Service exists in every instance. It is the configuration
+ for either a normal server, DAS or PE instance.
+
+ attributes
+ type
+ an instance can either be of type
+ das
+ Domain Administration Server in SE/EE or the PE instance
+ das-and-server
+ same as das
+ server
+ Any non-DAS instance in SE/EE. Not valid for PE.
+
+ Used in:
+ config
+-->
+<!ELEMENT admin-service (jmx-connector*, das-config?, property*)>
+
+<!ATTLIST admin-service
+ type (das | das-and-server | server) "server"
+ system-jmx-connector-name CDATA #IMPLIED>
+
+
+<!-- connector-service
+ Configuration of the Connector Container. The attributes
+ specified in the connector container would apply to all resource
+ adapters deployed in this cluster/server-instance
+
+ attributes
+ shutdown-timeout-in-seconds
+ integer value (default 30 seconds). Represents the time-out,
+ in seconds, that would be allowed by the application server,
+ during shutdown, to call the ResourceAdapter.stop() method of
+ this connector module's instance to complete.
+
+ Resource Adapters that take longer than the specified
+ shutdown-timeout-in-seconds time interval would be ignored and the
+ application server shutdown procedure would continue.
+
+
+ Used in:
+ config
+-->
+<!ELEMENT connector-service EMPTY>
+
+<!ATTLIST connector-service
+ shutdown-timeout-in-seconds CDATA "30">
+
+
+<!-- jmx-connector
+ The jmx-connector element defines the configuration of a JSR 160
+ compliant remote JMX Connector.
+
+ attributes
+ accept-all
+ Determines whether the connection can be made on all the
+ network interfaces. A value of false implies that the
+ connections only for this specific address will be selected.
+ This attribute is ignored for SJS AS 8.1.
+ address
+ Specifies the IP address or host-name. Ignored for SJS AS 8.1.
+ auth-realm-name
+ The name of the auth-realm in this config element that
+ represents the special administrative realm. All
+ authentication (from administraive GUI and CLI) will be
+ handled by this realm.
+ enabled
+ Defines if this connector is enabled. For EE this must be
+ enabled.
+ name
+ name of jmx connector used for identification
+ port
+ Specifies the port of the jmx-connector-server. Note that
+ jmx-service-uRL is a function of protocol, port and address
+ as defined by the JSR 160 1.0 Specification.
+ protocol
+ Defines the protocol that this jmx-connector should support.
+ Supported protocols are defined by Entity rjmx-protocol. SJS
+ AS 8.1 PE/SE/EE supports "rmi_jrmp" protocol only. Other
+ protocols can be used by user applications independently. For
+ other protocols supported refer to documentation.
+ security-enabled
+ Decides whether the transport layer security be used in
+ jmx-connector. If true, configure the ssl element.
+
+ Used in:
+ admin-service, node-agent
+-->
+<!ELEMENT jmx-connector (ssl?, property*)>
+
+<!ATTLIST jmx-connector
+ name CDATA #REQUIRED
+ enabled (%boolean;) "true"
+ protocol (%rjmx-protocol;) "rmi_jrmp"
+ address CDATA #REQUIRED
+ port CDATA #REQUIRED
+ accept-all (%boolean;) "false"
+ auth-realm-name CDATA #REQUIRED
+ security-enabled (%boolean;) "true">
+
+
+<!-- das-config
+
+ attributes
+ admin-session-timeout-in-minutes
+ timeout in minutes indicating the administration gui session
+ timeout.
+ autodeploy-dir
+ The source directory (relative to instance root) from which
+ autodeploy service will pick deployable components. You can
+ also specify an absolute directory.
+ autodeploy-enabled
+ This will enable the autodeployment service. If true, the
+ service will automatically starts with the admin-server. Auto
+ Deployment is a feature that enables developers to quickly
+ deploy applications and modules to a running application
+ server withoutrequiring the developer to perform an explicit
+ application server restart or separate deployment operation.
+ autodeploy-jsp-precompilation-enabled
+ If true, JSPs will be pre compiled during deployment of the
+ war module(s).
+ autodeploy-polling-interval-in-seconds
+ The polling interval (in seconds), at the end of which
+ autodeployment service will scan the source directory
+ (specified by "autodeploy-dir" tag) for any new deployable
+ component.
+ autodeploy-verifier-enabled
+ To enable/disable verifier, during auto-deployment. If true,
+ verification will be done before any deployment activity. In
+ the event of any verifier test failure, deployment is not
+ performed.
+ deploy-xml-validation
+ specifies if descriptor validation is required or not.
+
+ full
+ xml will be validated and in case of xml validation
+ errors, deployment will fail.
+ parsing
+ xml errors will be reported but deployment process will
+ continue.
+ none
+ no xml validation will be perfomed on the standard or
+ runtime deployment descriptors.
+
+ dynamic-reload-enabled
+ when true, server checks timestamp on a .reload file at every
+ module and application directory level to trigger reload.
+ polling frequency is controlled by
+ reload-poll-interval-in-seconds
+
+ Used in:
+ admin-service
+-->
+<!ELEMENT das-config (property*)>
+
+<!ATTLIST das-config
+ dynamic-reload-enabled (%boolean;) "false"
+ dynamic-reload-poll-interval-in-seconds CDATA "2"
+ autodeploy-enabled (%boolean;) "false"
+ autodeploy-polling-interval-in-seconds CDATA "2"
+ autodeploy-dir CDATA "autodeploy"
+ autodeploy-verifier-enabled (%boolean;) "false"
+ autodeploy-jsp-precompilation-enabled (%boolean;) "false"
+ deploy-xml-validation (%validation-level;) "full"
+ admin-session-timeout-in-minutes CDATA #IMPLIED>
+
+
+<!-- web-container
+
+ Used in:
+ config
+-->
+<!ELEMENT web-container (session-config?, property*)>
+
+
+<!-- session-config
+
+ Used in:
+ web-container
+-->
+<!ELEMENT session-config (session-manager?, session-properties?)>
+
+
+<!-- session-manager
+
+ Used in:
+ session-config
+-->
+<!ELEMENT session-manager (manager-properties?, store-properties?)>
+
+
+<!-- manager-properties
+
+ Used in:
+ session-manager
+-->
+<!ELEMENT manager-properties (property*)>
+
+<!ATTLIST manager-properties
+ session-file-name CDATA #IMPLIED
+ reap-interval-in-seconds CDATA #IMPLIED
+ max-sessions CDATA #IMPLIED
+ session-id-generator-classname CDATA #IMPLIED>
+
+
+<!-- store-properties
+
+ Used in:
+ session-manager
+-->
+<!ELEMENT store-properties (property*)>
+
+<!ATTLIST store-properties
+ directory CDATA #IMPLIED
+ reap-interval-in-seconds CDATA #IMPLIED>
+
+
+<!-- session-properties
+
+ Used in:
+ session-config
+-->
+<!ELEMENT session-properties (property*)>
+
+<!ATTLIST session-properties
+ timeout-in-seconds CDATA #IMPLIED>
+
+
+<!-- ejb-container
+ Configuration of EJB Container.
+
+ children
+ ejb-timer-service
+ The ejb-timer-service element contains the configuration for
+ the ejb timer service. There is at most one ejb timer service
+ per server instance.
+
+ attributes
+ cache-idle-timeout-in-seconds
+ (eb) specifies the rate at which the cache cleaner thread is
+ scheduled. All idle instances are passivated at once.
+ cache-resize-quantity
+ (eb,sfsb) Cache elements have identity, hence growth is in
+ unit steps and created on demand. Shrinking of cache happens
+
+ when cache-idle-timeout-in-seconds timer expires and a cleaner thread
+ passivates beans which have been idle for longer than
+ cache-idle-timeout-in-seconds. All idle instances are passivated at
+ once. cache-resize-quantity does not apply in this case.
+
+ when max cache size is reached, an asynchronous task is created to
+ bring the size back under the max-cache-size limit. This task removes
+ cache-resize-quantity elements, consulting the victim-selection-policy.
+
+ Must be greater than 1 and less than max-cache-size.
+
+ commit-option
+ (eb) Entity Beans caching is controlled by this setting.
+ Commit Option C implies that no caching is performed in the
+ container.
+ max-cache-size
+ (sfsb,eb) specifies the maximum number of instances that can
+ be cached. For entity beans, internally two caches are
+ maintained for higher concurrency: (i) Ready (R$) (ii) Active
+ in an Incomplete Transaction (TX$). The TX$ is populated with
+ instances from R$ or from the Pool directly. When an instance
+ in TX$ completes the transaction, it is placed back in the R$
+ (or in pool, in case an instance with same identity already
+ is in R$). max-cache-size only specifies the upper limit for
+ R$. The container computes an appropriate size for TX$.
+ max-pool-size
+ (slsb,eb) maximum size, a pool can grow to. A value of 0
+ implies an unbounded pool. Unbounded pools eventually shrink
+ to the steady-pool-size, in steps defined by
+ pool-resize-quantity.
+ pool-idle-timeout-in-seconds
+ (slsb,eb) defines the rate at which the pool cleaning thread
+ is executed. this thread checks if current size is greater
+ than steady pool size, it removes pool-resize-quantity
+ elements. If the current size is less than steady-pool-size
+ it is increased by pool-resize-quantity, with a ceiling of
+ min (current-pool-size+pool + resize-quantity, max-pool-size)
+ Only objects that have not been accessed for more than
+ pool-idle-timeout-in-seconds are candidates for removal.
+ pool-resize-quantity
+ (slsb,eb) size of bean pool grows (shrinks) in steps
+ specified by pool-resize-quantity, subject to max-pool-size
+ (steady-pool-size) limit.
+ removal-timeout-in-seconds
+ (sfsb) Instance is removed from cache or passivation store,
+ if it is not accesed within this time. All instances that can
+ be removed, will be removed.
+ session-store
+ specifies the directory where passivated beans and persisted
+ HTTP sessions are stored on the file system. Defaults to
+ $INSTANCE-ROOT/session-store
+ steady-pool-size
+ (slsb,eb) number of bean instances normally maintained in
+ pool. When a pool is first created, it will be populated with
+ size equal to steady-pool-size. When an instance is removed
+ from the pool, it is replenished asynchronously, so that the
+ pool size is at or above the steady-pool-size. This additions
+ will be in multiples of pool-resize-quantity. When a bean is
+ disassociated from a method invocation, it is put back in the
+ pool, subject to max-pool-size limit. If the max pool size is
+ exceeded the bean id destroyed immediately. A pool cleaning
+ thread, executes at an interval defined by
+ pool-idle-timeout-in-seconds. This thread reduces the pool
+ size to steady-pool-size, in steps defined by
+ pool-resize-quantity. If the pool is empty, the required
+ object will be created and returned immediately. This
+ prevents threads from blocking till the pool is replenished
+ by the background thread. steady-pool-size must be greater
+ than 1 and at most equal to the max-pool-size.
+ victim-selection-policy
+ (sfsb) Victim selection policy when cache needs to shrink.
+ Victims are passivated. Entity Bean Victims are selected
+ always using fifo discipline. Does not apply to slsb because
+ it does not matter, which particular instances are removed.
+ fifo
+ method picks victims, oldest instance first.
+ lru
+ algorithm picks least recently accessed instances.
+ nru
+ policy tries to pick 'not recently used' instances and is
+ a pseudo-random selection process.
+
+ Used in:
+ config
+-->
+<!ELEMENT ejb-container (ejb-timer-service?, property*)>
+
+<!ATTLIST ejb-container
+ steady-pool-size CDATA "32"
+ pool-resize-quantity CDATA "16"
+ max-pool-size CDATA "64"
+ cache-resize-quantity CDATA "32"
+ max-cache-size CDATA "512"
+ pool-idle-timeout-in-seconds CDATA "600"
+ cache-idle-timeout-in-seconds CDATA "600"
+ removal-timeout-in-seconds CDATA "5400"
+ victim-selection-policy (fifo | lru | nru) "nru"
+ commit-option (B | C) "B"
+ session-store CDATA #IMPLIED>
+
+
+<!-- ejb-timer-service
+ Configuration for ejb timer service.
+
+ attributes
+ max-redeliveries
+ is the maximum number of times the ejb timer service will
+ attempt to redeliver a timer expiration due to exception or
+ rollback. The minimum value is 1, per the ejb specification.
+ minimum-delivery-interval-in-millis
+ is the minimum number of milliseconds allowed before the next
+ timer expiration for a particular timer can occur. It guards
+ against extremely small timer increments that can overload
+ the server.
+ redelivery-interval-internal-in-millis
+ is the number of milliseconds the ejb timer service will wait
+ after a failed ejbTimeout delivery before attempting a
+ redelivery.
+ timer-datasource
+ overrides the cmp-resource (jdbc/__TimerPool) specified in
+ sun-ejb-jar.xml of (__ejb_container_timer_app) of the timer
+ service system application. By default this is set to
+ jdbc/__TimerPool, but can be overridden for the cluster or
+ server instance, if they choose to.
+
+ Used in:
+ ejb-container
+-->
+<!ELEMENT ejb-timer-service (property*)>
+
+<!ATTLIST ejb-timer-service
+ minimum-delivery-interval-in-millis CDATA "7000"
+ max-redeliveries CDATA "1"
+ timer-datasource CDATA #IMPLIED
+ redelivery-interval-internal-in-millis CDATA "5000">
+
+
+<!-- mdb-container
+
+ attributes
+ idle-timeout-in-seconds
+ idle bean instance in pool becomes a candidate for deletion,
+ when this timeout expires.
+ max-pool-size
+ maximum size, pool can grow to.
+ pool-resize-quantity
+ quantum of increase/decrease, when the size of pool
+ grows/shrinks.
+ steady-pool-size
+ minimum and initial number of message driven beans in pool.
+
+ Used in:
+ config
+-->
+<!ELEMENT mdb-container (property*)>
+
+<!ATTLIST mdb-container
+ steady-pool-size CDATA "10"
+ pool-resize-quantity CDATA "2"
+ max-pool-size CDATA "60"
+ idle-timeout-in-seconds CDATA "600">
+
+
+<!-- jms-service
+ The jms-service element specifies information about the
+ bundled/built-in JMS service that is managed by Application
+ Server.
+
+ attributes
+ addresslist-behavior
+ Determines broker selection from imqAddressList.
+ random
+ causes selection to be performed randomly
+ priority
+ causes selection to be performed sequentially
+ addresslist-iterations
+ Number of times reconnect logic should iterate
+ imqAddressList. This property will not be used if the
+ addresslist-behavior is "random". An integer.
+ default-jms-host
+ reference to a jms-host that to be started when type of
+ jms-service is LOCAL.
+ init-timeout-in-seconds
+ specifies the time server instance will wait at start up, for
+ its corresponding JMS service instance to respond. If there
+ is no response within the specifies timeout period,
+ application server startup is aborted. Default value of 60
+ seconds.
+ mq-scheme
+ Scheme for establishing connection with broker. For example,
+ scheme can be specified as "http" for connecting to MQ broker
+ over http. Default is "mq".
+ mq-service
+ Type of broker service. If a broker supports ssl, then the
+ type of service can be "ssljms". If nothing is specified, MQ
+ will assume 4that service is "jms".
+ reconnect-attempts
+ Total number of attempts to reconnect. An integer.
+ reconnect-enabled
+ Causes reconnect feature to be enabled (true) or disabled
+ (false). A boolean.
+ reconnect-interval-in-seconds
+ Interval between reconnect attempts, in seconds. An integer.
+ start-args
+ specifies the arguments that will be supplied to start up the
+ corresponding JMS service instance.
+ type
+ Type of JMS service.
+
+ Used in:
+ config
+-->
+<!ELEMENT jms-service (jms-host*, property*)>
+
+<!ATTLIST jms-service
+ init-timeout-in-seconds CDATA "60"
+ type (LOCAL | REMOTE) "LOCAL"
+ start-args CDATA #IMPLIED
+ default-jms-host CDATA #IMPLIED
+ reconnect-interval-in-seconds CDATA "60"
+ reconnect-attempts CDATA "3"
+ reconnect-enabled (%boolean;) "true"
+ addresslist-behavior (random | priority) "random"
+ addresslist-iterations CDATA "3"
+ mq-scheme CDATA #IMPLIED
+ mq-service CDATA #IMPLIED>
+
+
+<!-- jms-host
+
+ attributes
+ admin-password
+ attribute specifies the admin password.
+ admin-user-name
+ specifies the admin username.
+ port
+ the port number used by the JMS service.
+
+ Used in:
+ jms-service
+-->
+<!ELEMENT jms-host (property*)>
+
+<!ATTLIST jms-host
+ name CDATA #REQUIRED
+ host CDATA #IMPLIED
+ port CDATA "7676"
+ admin-user-name CDATA "admin"
+ admin-password CDATA "admin">
+
+
+<!-- log-service
+ By default, logs would be kept in $INSTANCE-ROOT/logs. The
+ following log files will be stored under the logs directory.
+
+ access.log
+ keeps default virtual server HTTP access messages.
+ server.log
+ keeps log messages from default virtual server. Messages from
+ other configured virtual servers also go here, unless
+ log-file is explicitly specified in the virtual-server
+ element.
+
+
+ attributes
+ alarms
+ if true, will turn on alarms for the logger. The SEVERE and
+ WARNING messages can be routed through the JMX framework to
+ raise SEVERE and WARNING alerts. Alarms are turned off by
+ default.
+ file
+ can be used to rename or relocate server.log using absolute
+ path.
+ log-filter
+ Can plug in a log filter to do custom filtering of log
+ records . By default there is no log filter other than the
+ log level filtering provided by JSR 047 log API.
+ log-handler
+ Can plug in a custom log handler to add it to the chain of
+ handlers to log into a different log destination than the
+ default ones given by the system (which are Console, File and
+ Syslog). It is a requirement that customers use the log
+ formatter provided by the the system to maintain uniformity
+ in log messages. The custom log handler will be added at the
+ end of the handler chain after File + Syslog Handler, Console
+ Handler and JMX Handler. User cannot replace the handler
+ provided by the system, because of loosing precious log
+ statements. The Server Initialization will take care of
+ installing the custom handler with the system formatter
+ initialized. The user need to use JSR 047 Log Handler
+ Interface to implement the custom handler.
+ log-rotation-limit-in-bytes
+ Log Files will be rotated when the file size reaches the
+ limit.
+ log-rotation-timelimit-in-minutes
+ This is a new attribute to enable time based log rotation.
+ The Log File will be rotated only if this value is non-zero
+ and the valid range is 60 minutes (1 hour) to 10*24*60
+ minutes (10 days). If the value is zero then the files will
+ be rotated based on size specified in
+ log-rotation-limit-in-bytes.
+ log-to-console
+ logs will be sent to stderr when asadmin start-domain verbose
+ is used
+ use-system-logging
+ if true, will utilize Unix syslog service or Windows Event
+ Logging to produce and manage logs.
+
+ Used in:
+ config, node-agent
+-->
+<!ELEMENT log-service (module-log-levels?, property*)>
+
+<!ATTLIST log-service
+ file CDATA #IMPLIED
+ use-system-logging (%boolean;) "false"
+ log-handler CDATA #IMPLIED
+ log-filter CDATA #IMPLIED
+ log-to-console (%boolean;) "false"
+ log-rotation-limit-in-bytes CDATA "500000"
+ log-rotation-timelimit-in-minutes CDATA "0"
+ alarms (%boolean;) "false">
+
+
+<!-- module-log-levels
+
+ Used in:
+ log-service
+-->
+<!ELEMENT module-log-levels (property*)>
+
+<!ATTLIST module-log-levels
+ root (%log-level;) "INFO"
+ server (%log-level;) "INFO"
+ ejb-container (%log-level;) "INFO"
+ cmp-container (%log-level;) "INFO"
+ mdb-container (%log-level;) "INFO"
+ web-container (%log-level;) "INFO"
+ classloader (%log-level;) "INFO"
+ configuration (%log-level;) "INFO"
+ naming (%log-level;) "INFO"
+ security (%log-level;) "INFO"
+ jts (%log-level;) "INFO"
+ jta (%log-level;) "INFO"
+ admin (%log-level;) "INFO"
+ deployment (%log-level;) "INFO"
+ verifier (%log-level;) "INFO"
+ jaxr (%log-level;) "INFO"
+ jaxrpc (%log-level;) "INFO"
+ saaj (%log-level;) "INFO"
+ corba (%log-level;) "INFO"
+ javamail (%log-level;) "INFO"
+ jms (%log-level;) "INFO"
+ connector (%log-level;) "INFO"
+ jdo (%log-level;) "INFO"
+ cmp (%log-level;) "INFO"
+ util (%log-level;) "INFO"
+ resource-adapter (%log-level;) "INFO"
+ synchronization (%log-level;) "INFO"
+ node-agent (%log-level;) "INFO">
+
+
+<!-- security-service
+ The security service element defines parameters and configuration
+ information needed by the core J2EE security service. Some
+ container-specific security configuration elements are in the
+ various container configuration elements and not here. SSL
+ configuration is also elsewhere. At this time the security
+ service configuration consists of a set of authentication realms.
+ A number of top-level attributes are defined as well.
+
+ children
+ message-security-config
+ Optional list of layer specific lists of configured message
+ security providers.
+
+ attributes
+ anonymous-role
+ Used as role name for default/anonymous role.
+ audit-enabled
+ If true, additional access logging is performed to provide
+ audit information.
+ audit-modules
+ Optional list of audit provider modules which will be used by
+ the audit subsystem. The default value refers to the internal
+ log-based audit module.
+ default-principal
+ Used as the identity of default security contexts when
+ necessary and no principal is provided.
+ default-principal-password
+ Password of default principal.
+ default-realm
+ Specifies which realm (by name) is used by default when no
+ realm is specifically requested. The file realm is the common
+ default.
+ jacc
+ Specifies the name of the jacc-provider element to use for
+ setting up the JACC infrastructure. The default value
+ "default" does not need to be changed unless adding a custom
+ JACC provider.
+
+ Used in:
+ config
+-->
+<!ELEMENT security-service
+ (auth-realm+, jacc-provider+, audit-module*, message-security-config*,
+ property*)>
+
+
+<!ATTLIST security-service
+ default-realm CDATA "file"
+ default-principal CDATA #IMPLIED
+ default-principal-password CDATA #IMPLIED
+ anonymous-role CDATA "ANYONE"
+ audit-enabled (%boolean;) "false"
+ jacc CDATA "default"
+ audit-modules CDATA "default">
+
+
+<!-- audit-module
+ An audit-module specifies an optional plug-in module which
+ implements audit capabilities.
+
+ attributes
+ classname
+ defines the java class which implements this audit module
+ name
+ defines the name of this realm
+
+ Used in:
+ security-service
+-->
+<!ELEMENT audit-module (property*)>
+
+<!ATTLIST audit-module
+ name CDATA #REQUIRED
+ classname CDATA #REQUIRED>
+
+
+<!-- auth-realm
+ The auth-realm element defines and configures one authentication
+ realm. There must be at least one realm available for a server
+ instance; any number can be configured, as desired.
+
+ Authentication realms need provider-specific parameters which vary
+ depending on what a particular implementation needs; these are defined as
+ properties since they vary by provider and cannot be predicted for any
+ custom or add-on providers.
+
+ For the default file provider, the param used is: file
+
+
+ attributes
+ classname
+ defines the java class which implements this realm
+ name
+ defines the name of this realm
+
+ Used in:
+ node-agent, security-service
+-->
+<!ELEMENT auth-realm (property*)>
+
+<!ATTLIST auth-realm
+ name CDATA #REQUIRED
+ classname CDATA #REQUIRED>
+
+
+<!-- jacc-provider
+ The jacc-provider element defines the standard JACC properties
+ used for setting up the JACC provider. It also allows optional
+ properties which can be used by the provider implementation for
+ its configuration.
+
+ attributes
+ name
+ A name for this jacc-provider. Is always "default" for the
+ default provider.
+ policy-configuration-factory-provider
+ Corresponds to (and can be overridden by) the system property
+ javax.security.jacc.PolicyConfigurationFactory.provider
+ policy-provider
+ Corresponds to (and can be overridden by) the system property
+ javax.security.jacc.policy.provider
+
+ Used in:
+ security-service
+-->
+<!ELEMENT jacc-provider (property*)>
+
+<!ATTLIST jacc-provider
+ name CDATA #REQUIRED
+ policy-provider CDATA #REQUIRED
+ policy-configuration-factory-provider CDATA #REQUIRED>
+
+
+<!-- transaction-service
+ Configuration for Transaction Manager.
+
+ attributes
+ automatic-recovery
+ if true, server instance attempts recovery at restart.
+ heuristic-decision
+ During recovery, if outcome of a transaction cannot be
+ determined from the logs, then this property is used to fix
+ the outcome.
+ keypoint-interval
+ property used to specify the number of transactions between
+ keypoint operations on the log. A Keypoint operations could
+ reduce the size of the transaction log files. A larger value
+ for this property (for example, 1000) will result in larger
+ transaction log files, between log compactions, but less
+ keypoint operations, and potentially better performance. A
+ smaller value (e.g. 20) results in smaller log files but
+ slightly reduced performance due to the greater frequency of
+ keypoint operations.
+ retry-timeout-in-seconds
+ used to determine the retry time in the following scenarios.
+
+ 1 Time to wait at the transaction recovery time, when
+ resources are unreachable.
+ 2 If there are any transient
+ exceptions in the second phase of the 2 PC protocol.
+
+ A negative value indicates infinite retry. '0' indicates no
+ retry. A positive value indicates the number of seconds for
+ which retry will be attempted. Default is 10 minutes which
+ may be appropriate for a database being restarted.
+ timeout-in-seconds
+ amount of time the transaction manager waits for response
+ from a datasource participating in transaction. A value of 0
+ implies infinite timeout.
+ tx-log-dir
+ Transaction service creates a sub directory 'tx' under
+ tx-log-dir to store the transaction logs. The default value
+ of the tx-log-dir is $INSTANCE-ROOT/logs. If this attribute
+ is not explicitly specified in the <transaction-service>
+ element, 'tx' sub directory will be created under the path
+ specified in log-root attribute of <domain> element.
+
+ Used in:
+ config
+-->
+<!ELEMENT transaction-service (property*)>
+
+<!ATTLIST transaction-service
+ automatic-recovery (%boolean;) "false"
+ timeout-in-seconds CDATA "0"
+ tx-log-dir CDATA #IMPLIED
+ heuristic-decision (rollback | commit) "rollback"
+ retry-timeout-in-seconds CDATA "600"
+ keypoint-interval CDATA "2048">
+
+
+<!-- monitoring-service
+
+ Used in:
+ config
+-->
+<!ELEMENT monitoring-service (module-monitoring-levels?, property*)>
+
+
+<!-- module-monitoring-levels
+
+ attributes
+ connector-connection-pool
+ monitoring level for all the connector-connection-pools used
+ by the runtime.
+ ejb-container
+ various ejbs deployed to the server, ejb-pools, ejb-caches
+ and ejb-methods.
+ http-service
+ http engine and the http listeners therein.
+ jdbc-connection-pool
+ monitoring level for all the jdbc-connection-pools used by
+ the runtime.
+ orb
+ specifies the level for connection managers of the orb, which
+ apply to connections to the orb
+ thread-pool
+ all the thread-pools used by the run time.
+ transaction-service
+ transaction subsystem.
+
+ Used in:
+ monitoring-service
+-->
+<!ELEMENT module-monitoring-levels (property*)>
+
+<!ATTLIST module-monitoring-levels
+ thread-pool (%monitoring-level;) "OFF"
+ orb (%monitoring-level;) "OFF"
+ ejb-container (%monitoring-level;) "OFF"
+ web-container (%monitoring-level;) "OFF"
+ transaction-service (%monitoring-level;) "OFF"
+ http-service (%monitoring-level;) "OFF"
+ jdbc-connection-pool (%monitoring-level;) "OFF"
+ connector-connection-pool (%monitoring-level;) "OFF"
+ connector-service (%monitoring-level;) "OFF"
+ jms-service (%monitoring-level;) "OFF"
+ jvm (%monitoring-level;) "OFF">
+
+
+<!-- java-config
+ Java Runtime environment configuration
+
+ attributes
+ bytecode-preprocessors
+ A comma separated list of classnames, each of which must
+ implement the com.sun.appserv.BytecodePreprocessor interface.
+ Each of the specified preprocessor class will be called in
+ the order specified. At the moment the comelling use is for a
+ 3rd party Performance Profiling tool.
+ classpath-prefix
+ A java classpath string that is prefixed to server-classpath
+ classpath-suffix
+ A java classpath string that is appended to server-classpath
+ debug-enabled
+ If set to true, the server starts up in debug mode ready for
+ attaching with a JPDA based debugger.
+ debug-options
+ JPDA based debugging options string.
+ env-classpath-ignored
+ If set to false, the CLASSPATH environment variable will be
+ read and appended to the Application Server classpath, which
+ is constructed as described above. The CLASSPATH environment
+ variable will be added after the classpath-suffix, at the
+ very end.
+ javac-options
+ Options string passed to Java compiler, at application
+ deployment time.
+ java-home
+ Specifies the installation directory for Java runtime. JDK
+ 1.4 or higher is supported.
+ native-library-path-prefix
+ is prepended to the native library path, which is constructed
+ internally.
+
+ Internally, the native library path is automatically constructed to be
+ a concatenation of Application Server installation relative path for
+ its native shared libraries, standard JRE native library path, the
+ shell environment setting (LD-LIBRARY-PATH on Unix) and any path that
+ may be specified in the profile element.
+
+ native-library-path-suffix
+ is appended to the native library path, which is constructed
+ as described above.
+ rmic-options
+ Options string passed to RMI compiler, at application
+ deployment time.
+ server-classpath
+ A java classpath string that specifies the classes needed by
+ the Application server. Do not expect users to change this
+ under normal conditions.
+
+ Used in:
+ config
+-->
+<!ELEMENT java-config (profiler?, (jvm-options | property)*)>
+
+<!ATTLIST java-config
+ java-home CDATA #REQUIRED
+ debug-enabled (%boolean;) "false"
+ debug-options CDATA "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n"
+ rmic-options CDATA "-iiop -poa -alwaysgenerate -keepgenerated -g"
+ javac-options CDATA "-g"
+ classpath-prefix CDATA #IMPLIED
+ classpath-suffix CDATA #IMPLIED
+ server-classpath CDATA #IMPLIED
+ native-library-path-prefix CDATA #IMPLIED
+ native-library-path-suffix CDATA #IMPLIED
+ bytecode-preprocessors CDATA #IMPLIED
+ env-classpath-ignored (%boolean;) "true">
+
+
+<!-- jvm-options
+ String value for options that will be passed to the JVM
+
+ Used in:
+ java-config, profiler
+-->
+<!ELEMENT jvm-options (#PCDATA)>
+
+
+<!-- profiler
+ Profilers could be one of jprobe, optimizeit, hprof, wily and so
+ on jvm-options and property elements are used to record the
+ settings needed to get a particular profiler going. A server
+ instance is tied to a particular profiler, by the profiler
+ element in java-config. Changing the profiler will require a
+ server restart.
+
+ The adminstrative graphical interfaces, could list multiple supported
+ profilers (incomplete at this point) and will populate server.xml
+ appropriately.
+
+
+ Used in:
+ java-config
+-->
+<!ELEMENT profiler ((jvm-options | property)*)>
+
+<!ATTLIST profiler
+ name CDATA #REQUIRED
+ classpath CDATA #IMPLIED
+ native-library-path CDATA #IMPLIED
+ enabled (%boolean;) "true">
+
+
+<!-- availability-service
+ SE/EE only: TBD Needs explanation
+
+ attributes
+ store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used
+ potentially by both the Web Container and the EJB Stateful
+ Session Bean Container for use in checkpointing/passivation
+ when persistence-type = "ha". See sfsb-ha-persistence-type
+ and sfsb-persistence-type for more details. It will default
+ to "jdbc/hastore". This attribute can be over-ridden in
+ either web-container-availability (with
+ http-session-store-pool-name) and/or in
+ ejb-container-availability (with sfsb-store-pool-name). If
+ store-pool-name is not over-ridden then both containers will
+ share the same connection pool. If either container
+ over-rides then it may have its own dedicated pool. In this
+ case there must also be a new corresponding JDBC Resource and
+ JDBC Connection Pool defined for this new pool name.
+
+ Used in:
+ config
+-->
+<!ELEMENT availability-service
+ (web-container-availability?, ejb-container-availability?, property*)>
+
+
+<!ATTLIST availability-service
+ availability-enabled (%boolean;) "true"
+ store-pool-name CDATA #IMPLIED>
+
+
+<!-- web-container-availability
+ web-container-availability SE/EE only:
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for HTTP session persistence. If this is "false", then
+ session persistence is disabled for all web modules in j2ee
+ apps and stand-alone web modules. If it is "true" (and
+ providing that the global availability-enabled in
+ availability-service is also "true", then j2ee apps and
+ stand-alone web modules may be ha enabled. Finer-grained
+ control exists at lower levels. If this attribute is missing,
+ it "inherits" the value of the global availability-enabled
+ under availability-service.
+ http-session-store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used by
+ the HTTP Session Persistence Framework. If missing, internal
+ code will default it to value of store-pool-name under
+ availability-service (ultimately "jdbc/hastore").
+ persistence-frequency
+ The persistence frequency used by the session persistence
+ framework, when persistence-type = "ha". Values may be
+ "time-based" or "web-event". If it is missing, then the
+ persistence-type will revert to "memory".
+ persistence-scope
+ The persistence scope used by the session persistence
+ framework, when persistence-type = "ha". Values may be
+ "session", "modified-session", "modified-attribute". If it is
+ missing, then the persistence-type will revert to "memory".
+ persistence-store-health-check-enabled
+ Reserved for future use.
+ persistence-type
+ The persistence type used by the session persistence
+ framework.
+ sso-failover-enabled
+ This controls whether Single-Sign-On state will be made
+ available for failover.
+
+ Used in:
+ availability-service
+-->
+<!ELEMENT web-container-availability (property*)>
+
+<!ATTLIST web-container-availability
+ availability-enabled (%boolean;) #IMPLIED
+ persistence-type (%persistence-type;) "memory"
+ persistence-frequency (%session-save-frequency;) #IMPLIED
+ persistence-scope (%session-save-scope;) #IMPLIED
+ persistence-store-health-check-enabled (%boolean;) "false"
+ sso-failover-enabled (%boolean;) "false"
+ http-session-store-pool-name CDATA #IMPLIED>
+
+
+<!-- ejb-container-availability
+
+ attributes
+ availability-enabled
+ This boolean flag controls whether availability is enabled
+ for SFSB checkpointing (and potentially passivation). If this
+ is "false", then all SFSB checkpointing is disabled for all
+ j2ee apps and ejb modules. If it is "true" (and providing
+ that the global availability-enabled in availability-service
+ is also "true", then j2ee apps and stand-alone ejb modules
+ may be ha enabled. Finer-grained control exists at lower
+ levels. If this attribute is missing, it inherits the value
+ of the global availability-enabled under availability-service.
+ sfsb-checkpoint-enabled
+ This attribute is deprecated, replaced by
+ availability-enabled and will be ignored if present.
+ sfsb-ha-persistence-type
+ The persistence type used by the EJB Stateful Session Bean
+ Container for checkpointing and passivating
+ availability-enabled beans' state. Values may be "file" or
+ "ha". Default is "ha".
+ sfsb-quick-checkpoint-enabled
+ This attribute is deprecated and will be ignored if present.
+ sfsb-store-pool-name
+ This is the jndi-name for the JDBC Connection Pool used by
+ the EJB Stateful Session Bean Container for use in
+ checkpointing/passivation when persistence-type = "ha". See
+ sfsb-ha-persistence-type and sfsb-persistence-type for more
+ details. It will default to value of store-pool-name under
+ availability-service (ultimately "jdbc/hastore").
+
+ Used in:
+ availability-service
+-->
+<!ELEMENT ejb-container-availability (property*)>
+
+<!ATTLIST ejb-container-availability
+ availability-enabled (%boolean;) #IMPLIED
+ sfsb-ha-persistence-type (%sfsb-persistence-type;) "ha"
+ sfsb-persistence-type (%sfsb-persistence-type;) "file"
+ sfsb-checkpoint-enabled (%boolean;) #IMPLIED
+ sfsb-quick-checkpoint-enabled (%boolean;) #IMPLIED
+ sfsb-store-pool-name CDATA #IMPLIED>
+
+
+<!-- jdbc-connection-pool
+ jdbc-connection-pool defines configuration used to create and
+ manage a pool physical database connections. Pool definition is
+ named, and can be referred to by multiple jdbc-resource elements
+ (See <jdbc-resource>).
+
+ Each named pool definition results in a pool instantiated at server
+ start-up. Pool is populated when accessed for the first time. If two or
+ more jdbc-resource elements point to the same jdbc-connection-pool
+ element, they are using the same pool of connections, at run time.
+
+
+ children
+ property
+ Most JDBC 2.0 drivers permit use of standard property lists,
+ to specify User, Password and other resource configuration.
+ While these are optional properties, according to the
+ specification, several of these properties may be necessary
+ for most databases. See Section 5.3 of JDBC 2.0 Standard
+ Extension API.
+
+ The following are the names and corresponding values for these
+ properties
+
+ databaseName
+ Name of the Database
+ serverName
+ Database Server name.
+ port
+ Port where a Database server is listening for requests.
+ networkProtocol
+ Communication Protocol used.
+ user
+ default name of the database user with which connections
+ will be stablished. Programmatic database authentication
+ or default-resource-principal specified in vendor
+ specific web and ejb deployment descriptors will take
+ precedence, over this default. The details and caveats
+ are described in detail in the Administrator's guide.
+ password
+ password for default database user
+ roleName
+ The initial SQL role name.
+ datasourceName
+ used to name an underlying XADataSource, or
+ ConnectionPoolDataSource when pooling of connections is
+ done
+ description
+ Textual Description
+
+ When one or more of these properties are specified, they are passed as
+ is using set<Name>(<Value>) methods to the vendors Datasource class
+ (specified in datasource-classname). User and Password properties are
+ used as default principal, if Container Managed authentication is
+ specified and a default-resource-principal is not found in application
+ deployment descriptors.
+
+
+ attributes
+ connection-validation-method
+ specifies the type of validation to be performed when
+ is-connection-validation-required is true. The following
+ types of validation are supported:
+ auto-commit
+ using connection.autoCommit()
+ meta-data
+ using connection.getMetaData()
+ table
+ performing a query on a user specified table (see
+ validation-table-name).
+ datasource-classname
+ Name of the vendor supplied JDBC datasource resource manager.
+ An XA or global transactions capable datasource class will
+ implement javax.sql.XADatasource interface. Non XA or Local
+ transactions only datasources will implement
+ javax.sql.Datasource interface.
+ fail-all-connections
+ indicates if all connections in the pool must be closed
+ should a single validation check fail. The default is false.
+ One attempt will be made to re-establish failed connections.
+ idle-timeout-in-seconds
+ maximum time in seconds, that a connection can remain idle in
+ the pool. After this time, the pool implementation can close
+ this connection. Note that this does not control connection
+ timeouts enforced at the database server side. Adminsitrators
+ are advised to keep this timeout shorter than the database
+ server side timeout (if such timeouts are configured on the
+ specific vendor's database), to prevent accumulation of
+ unusable connection in Application Server.
+ is-connection-validation-required
+ if true, connections are validated (checked to find out if
+ they are usable) before giving out to the application. The
+ default is false.
+ is-isolation-level-guaranteed
+ Applicable only when a particular isolation level is
+ specified for transaction-isolation-level. The default value
+ is true. This assures that every time a connection is
+ obtained from the pool, it is guaranteed to have the
+ isolation set to the desired value. This could have some
+ performance impact on some JDBC drivers. Can be set to false
+ by that administrator when they are certain that the
+ application does not change the isolation level before
+ returning the connection.
+ max-pool-size
+ maximum number of conections that can be created
+ max-wait-time-in-millis
+ amount of time the caller will wait before getting a
+ connection timeout. The default is 60 seconds. A value of 0
+ will force caller to wait indefinitely.
+ name
+ unique name of the pool definition.
+ pool-resize-quantity
+ number of connections to be removed when
+ idle-timeout-in-seconds timer expires. Connections that have
+ idled for longer than the timeout are candidates for removal.
+ When the pool size reaches steady-pool-size, the connection
+ removal stops.
+ res-type
+ DataSource implementation class could implement one or both
+ of javax.sql.DataSource, javax.sql.XADataSource interfaces.
+ This optional attribute must be specified to disambiguate
+ when a Datasource class implements both interfaces. An error
+ is produced when this attribute has a legal value and the
+ indicated interface is not implemented by the datasource
+ class. This attribute has no default value.
+ steady-pool-size
+ minimum and initial number of connections maintained in the
+ pool.
+ transaction-isolation-level
+ Specifies the Transaction Isolation Level on the pooled
+ database connections. Optional. Has no default. If left
+ unspecified the pool operates with default isolation level
+ provided by the JDBC Driver. A desired isolation level can be
+ set using one of the standard transaction isolation levels,
+ which see.
+
+ Applications that change the Isolation level on a pooled connection
+ programmatically, risk polluting the pool and this could lead to
+ program errors. Also see: is-isolation-level-guaranteed
+
+ validation-table-name
+ specifies the table name to be used to perform a query to
+ validate a connection. This parameter is mandatory, if
+ connection-validation-type set to table. Verification by
+ accessing a user specified table may become necessary for
+ connection validation, particularly if database driver caches
+ calls to setAutoCommit() and getMetaData().
+
+ Used in:
+ resources
+-->
+<!ELEMENT jdbc-connection-pool (description?, property*)>
+
+<!ATTLIST jdbc-connection-pool
+ name CDATA #REQUIRED
+ datasource-classname CDATA #REQUIRED
+ res-type CDATA #IMPLIED
+ steady-pool-size CDATA "8"
+ max-pool-size CDATA "32"
+ max-wait-time-in-millis CDATA "60000"
+ pool-resize-quantity CDATA "2"
+ idle-timeout-in-seconds CDATA "300"
+ transaction-isolation-level (%isolation;) #IMPLIED
+ is-isolation-level-guaranteed (%boolean;) "true"
+ is-connection-validation-required (%boolean;) "false"
+ connection-validation-method (auto-commit | meta-data | table) "auto-commit"
+ validation-table-name CDATA #IMPLIED
+ fail-all-connections (%boolean;) "false">
+
+
+<!-- connector-connection-pool
+ connector-connection-pool defines configuration used to create
+ and manage a pool of connections to a EIS. Pool definition is
+ named, and can be referred to by multiple connector-resource
+ elements (See connector-resource).
+
+ Each named pool definition results in a pool instantiated at server
+ start-up. Pool is populated when accessed for the first time. If two or
+ more connector-resource elements point to the same
+ connector-connection-pool element, they are using the same pool of
+ connections, at run time.
+
+ There can be more than one pool for one connection-definition in one
+ resource-adapter.
+
+
+ children
+ property
+ Properties are used to override the ManagedConnectionFactory
+ javabean configuration settings.
+
+ When one or more of these properties are specified, they are passed as
+ is using set<Name>(<Value>) methods to the Resource Adapter's
+ ManagedConnectionfactory class (specified in ra.xml).
+
+
+ attributes
+ connection-definition-name
+ unique name, identifying one connection-definition in a
+ Resource Adapter. Currently this is ConnectionFactory type.
+ fail-all-connections
+ indicates if all connections in the pool must be closed
+ should a single connection fail validation. The default is
+ false. One attempt will be made to re-establish failed
+ connections.
+ idle-timeout-in-seconds
+ maximum time in seconds, that a connection can remain idle in
+ the pool. After this time, the pool implementation can close
+ this connection. Note that this does not control connection
+ timeouts enforced at the database server side. Adminsitrators
+ are advised to keep this timeout shorter than the EIS
+ connection timeout (if such timeouts are configured on the
+ specific EIS), to prevent accumulation of unusable connection
+ in Application Server.
+ max-pool-size
+ maximum number of conections that can be created
+ max-wait-time-in-millis
+ amount of time the caller will wait before getting a
+ connection timeout. The default is 60 seconds. A value of 0
+ will force caller to wait indefinitely.
+ name
+ unique name of the pool definition.
+ pool-resize-quantity
+ number of connections to be removed when
+ idle-timeout-in-seconds timer expires. Connections that have
+ idled for longer than the timeout are candidates for removal.
+ When the pool size reaches steady-pool-size, the connection
+ removal stops.
+ resource-adapter-name
+ This is the name of resource adapter. Name of .rar file is
+ taken as the unique name for the resource adapter.
+ steady-pool-size
+ minimum and initial number of connections maintained in the
+ pool.
+ transaction-support
+ Indicates the level of transaction support that this pool
+ will have. Possible values are "XATransaction",
+ "LocalTransaction" and "NoTransaction". This attribute will
+ override that transaction support attribute in the Resource
+ Adapter in a downward compatible way, i.e it can support a
+ lower/equal transaction level than specified in the RA, but
+ not a higher level.
+
+ Used in:
+ resources
+-->
+<!ELEMENT connector-connection-pool (description?, security-map*, property*)>
+
+<!ATTLIST connector-connection-pool
+ name CDATA #REQUIRED
+ resource-adapter-name CDATA #REQUIRED
+ connection-definition-name CDATA #REQUIRED
+ steady-pool-size CDATA "8"
+ max-pool-size CDATA "32"
+ max-wait-time-in-millis CDATA "60000"
+ pool-resize-quantity CDATA "2"
+ idle-timeout-in-seconds CDATA "300"
+ fail-all-connections (%boolean;) "false"
+ transaction-support (XATransaction | LocalTransaction | NoTransaction) #IMPLIED>
+
+
+<!-- security-map
+ Perform mapping from principal received during Servlet/EJB
+ authentication, to credentials accepted by the EIS. This mapping
+ is optional.It is possible to map multiple (server) principal to
+ the same backend principal.
+
+ Used in:
+ connector-connection-pool
+-->
+<!ELEMENT security-map ((principal | user-group)+, backend-principal)>
+
+<!ATTLIST security-map
+ name CDATA #REQUIRED>
+
+
+<!-- principal
+ Principal of the Servlet and EJB client
+
+ Used in:
+ security-map
+-->
+<!ELEMENT principal (#PCDATA)>
+
+
+<!-- user-group
+
+ Used in:
+ security-map
+-->
+<!ELEMENT user-group (#PCDATA)>
+
+
+<!-- backend-principal
+
+ Used in:
+ security-map
+-->
+<!ELEMENT backend-principal EMPTY>
+
+<!ATTLIST backend-principal
+ user-name CDATA #REQUIRED
+ password CDATA #IMPLIED>
+
+
+<!-- thread-pools
+
+ Used in:
+ config
+-->
+<!ELEMENT thread-pools (thread-pool+)>
+
+
+<!-- thread-pool
+
+ attributes
+ idle-thread-timeout-in-seconds
+ idle threads are removed from pool, after this time
+ max-thread-pool-size
+ Maximum number of threads in the threadpool servicing
+ requests in this queue. This is the upper bound on the no. of
+ threads that exist in the threadpool.
+ min-thread-pool-size
+ Minimum number of threads in the threadpool servicing
+ requests in this queue. These are created up front when this
+ threadpool is instantiated
+ num-work-queues
+ This denotes the total number of work queues that are
+ serviced by this threadpool.
+ thread-pool-id
+ This is an id for the work-queue e.g. "thread-pool-1",
+ "thread-pool-2" etc
+
+ Used in:
+ thread-pools
+-->
+<!ELEMENT thread-pool EMPTY>
+
+<!ATTLIST thread-pool
+ thread-pool-id CDATA #REQUIRED
+ min-thread-pool-size CDATA "0"
+ max-thread-pool-size CDATA "200"
+ idle-thread-timeout-in-seconds CDATA "120"
+ num-work-queues CDATA "1">
+
+
+<!-- property
+ Syntax for supplying properties as name value pairs
+
+ Used in:
+ admin-object-resource, admin-service, alert-service,
+ audit-module, auth-realm, availability-service, cluster, config,
+ connector-connection-pool, connector-resource, custom-resource,
+ das-config, domain, ejb-container, ejb-container-availability,
+ ejb-timer-service, external-jndi-resource, filter-config,
+ http-listener, http-service, iiop-listener, jacc-provider,
+ java-config, jdbc-connection-pool, jdbc-resource, jms-host,
+ jms-service, jmx-connector, lb-config, lifecycle-module,
+ listener-config, log-service, mail-resource, manager-properties,
+ mdb-container, module-log-levels, module-monitoring-levels,
+ monitoring-service, node-agent, orb,
+ persistence-manager-factory-resource, profiler, provider-config,
+ resource-adapter-config, security-service, server,
+ session-properties, store-properties, transaction-service,
+ virtual-server, web-container, web-container-availability
+-->
+<!ELEMENT property (description?)>
+
+<!ATTLIST property
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED>
+
+
+<!-- system-property
+ Syntax for supplying system properties as name value pairs
+
+ Used in:
+ cluster, config, domain, server
+-->
+<!ELEMENT system-property (description?)>
+
+<!ATTLIST system-property
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED>
+
+
+<!-- server
+ J2EE Application Server Configuration
+
+ Each Application Server instance is a J2EEv1.4 compliant container. One
+ server instance is specially designated as the Administration Server in
+ SE/EE. User applications cannot be deployed to an Adminsitration Server
+ instance.
+
+
+ children
+ application-ref
+ References to applications deployed to the server instance
+ resource-ref
+ References to resources deployed to the server instance
+
+ attributes
+ config-ref
+ points to a named config. needed for stand-alone servers. If
+ the server instance is part of a cluster, then it must not be
+ present, and will be ignored.
+ name
+ name of the server instance.
+ node-agent-ref
+ SE/EE only. Specifies the name of the node agent where the
+ server instance is hosted.
+
+ Used in:
+ servers
+-->
+<!ELEMENT server
+ (application-ref*, resource-ref*, system-property*, property*)>
+
+
+<!ATTLIST server
+ name CDATA #REQUIRED
+ config-ref CDATA #IMPLIED
+ node-agent-ref CDATA #IMPLIED>
+
+
+<!-- application-ref
+
+ attributes
+ disable-timeout-in-minutes
+ The time, in minutes, that it takes this application to reach
+ a quiescent state after having been disabled
+ lb-enabled
+ A boolean flag that causes any and all load-balancers using
+ this application to consider this application unavailable to
+ them. Defaults to unavailable (false).
+
+ Used in:
+ cluster, server
+-->
+<!ELEMENT application-ref EMPTY>
+
+<!ATTLIST application-ref
+ enabled (%boolean;) "true"
+ virtual-servers CDATA #IMPLIED
+ lb-enabled (%boolean;) "false"
+ disable-timeout-in-minutes CDATA "30"
+ ref CDATA #REQUIRED>
+
+
+<!-- resource-ref
+
+ Used in:
+ cluster, server
+-->
+<!ELEMENT resource-ref EMPTY>
+
+<!ATTLIST resource-ref
+ enabled (%boolean;) "true"
+ ref CDATA #REQUIRED>
+
+
+<!-- cluster
+ SE/EE Cluster configuration. A cluster defines a homogenous set
+ of server instances that share the same applications, resources,
+ and configuration.
+
+ children
+ server-ref
+ list of servers in the cluster
+
+ attributes
+ config-ref
+ points to a named config. All server instances in the cluster
+ will share this config.
+ name
+ cluster name
+
+ Used in:
+ clusters
+-->
+<!ELEMENT cluster
+ (server-ref*, resource-ref*, application-ref*, system-property*,
+ property*)>
+
+
+<!ATTLIST cluster
+ name CDATA #REQUIRED
+ config-ref CDATA #REQUIRED>
+
+
+<!-- server-ref
+
+ attributes
+ disable-timeout-in-minutes
+ The time, in minutes, that it takes this server to reach a
+ quiescent state after having been disabled
+ enabled
+ A boolean flag that causes the server to be enabled to serve
+ end-users, or not. Default is to be enabled (true)
+ lb-enabled
+ A boolean flag that causes any and all load-balancers using
+ this server to consider this server unavailable to them.
+ Defaults to unavailable (false)
+ ref
+ A reference to the name of a server defined elsewhere
+
+ Used in:
+ cluster, lb-config
+-->
+<!ELEMENT server-ref (health-checker?)>
+
+<!ATTLIST server-ref
+ ref CDATA #REQUIRED
+ disable-timeout-in-minutes CDATA "30"
+ lb-enabled (%boolean;) "false"
+ enabled (%boolean;) "true">
+
+
+<!-- node-agent
+ SE/EE Node Controller. The node agent is an agent that manages
+ server instances on a host machine.
+
+ attributes
+ name
+ Node Controller name
+ start-servers-in-startup
+ If true starts all managed server instances when the Node
+ Controller is started.
+ system-jmx-connector-name
+ The name of the internal jmx connector
+
+ Used in:
+ node-agents
+-->
+<!ELEMENT node-agent (jmx-connector?, auth-realm?, log-service, property*)>
+
+<!ATTLIST node-agent
+ name CDATA #REQUIRED
+ system-jmx-connector-name CDATA #IMPLIED
+ start-servers-in-startup (%boolean;) "true">
+
+
+<!-- lb-config
+
+ attributes
+ https-routing
+ Boolean flag indicating how load-balancer will route https
+ requests. If true then an https request to the load-balancer
+ will result in an https request to the server; if false then
+ https requests to the load-balancer result in http requests
+ to the server. Default is to use http (i.e. value of false);
+ monitoring-enabled
+ Boolean flag that determines whether monitoring is switched
+ on or not. Default is that monitoring is switched off (false)
+ name
+ Name of the load balancer configuration
+ reload-poll-interval-in-seconds
+ Maximum period, in seconds, that a change to the load
+ balancer configuration file takes before it is detected by
+ the load balancer and the file reloaded. A value of 0
+ indicates that reloading is disabled. Default period is 1
+ minute (60)
+ response-timeout-in-seconds
+ Period within which a server must return a response or
+ otherwise it will be considered unhealthy. Default value is
+ 60 seconds.
+ route-cookie-enabled
+ Boolean flag that determines whether a route cookie is or is
+ not enabled. Default is enabled (true).
+
+ Used in:
+ lb-configs
+-->
+<!ELEMENT lb-config ((cluster-ref* | server-ref*), property*)>
+
+<!ATTLIST lb-config
+ name CDATA #REQUIRED
+ response-timeout-in-seconds CDATA "60"
+ https-routing (%boolean;) "false"
+ reload-poll-interval-in-seconds CDATA "60"
+ monitoring-enabled (%boolean;) "false"
+ route-cookie-enabled (%boolean;) "true">
+
+
+<!-- health-checker
+ Each cluster would be configured for a ping based health check
+ mechanism.
+
+ attributes
+ interval-in-seconds
+ Interval, in seconds, between health checks. A value of "0"
+ means that the health check is disabled. Default is 30
+ seconds.
+ timeout-in-seconds
+ Maximum time, in seconds, that a server must respond to a
+ health check request to be considered healthy. Default is 10
+ seconds.
+ url
+ URL to ping so as to determine the health state of a
+ listener. This must be a relative URL.
+
+ Used in:
+ cluster-ref, server-ref
+-->
+<!ELEMENT health-checker EMPTY>
+
+<!ATTLIST health-checker
+ url CDATA "/"
+ interval-in-seconds CDATA "30"
+ timeout-in-seconds CDATA "10">
+
+
+<!-- cluster-ref
+ Element relating a reference to a cluster to be load balanced to
+ an (optional) health-checker
+
+ attributes
+ ref
+ A reference to the name of a cluster defined elsewhere
+
+ Used in:
+ lb-config
+-->
+<!ELEMENT cluster-ref (health-checker?)>
+
+<!ATTLIST cluster-ref
+ ref CDATA #REQUIRED>
+
+
+<!-- message-security-config
+ The message-security-config element defines the message layer
+ specific provider configurations of the application server.
+
+ All of the providers within a message-security-config element must be able
+ to perform authentication processing at the message layer defined by the
+ value of the auth-layer attribute.
+
+
+ attributes
+ default-client-provider
+ used to identify the client provider to be invoked for any
+ application for which a specific client provider has not been
+ bound.
+ default-provider
+ used to identify the server provider to be invoked for any
+ application for which a specific server provider has not been
+ bound.
+
+ When a default provider of a type is not defined for a message layer,
+ the container will only invoke a provider of the type (at the layer)
+ for those applications for which a specific provider has been bound.
+
+
+ Used in:
+ security-service
+-->
+<!ELEMENT message-security-config (provider-config+)>
+
+<!ATTLIST message-security-config
+ auth-layer CDATA #REQUIRED
+ default-provider CDATA #IMPLIED
+ default-client-provider CDATA #IMPLIED>
+
+
+<!-- provider-config
+ The provider-config element defines the configuration of an
+ authentication provider.
+
+ A provider-config with no contained request-policy or response-policy
+ sub-elements, is a null provider. The container will not instantiate or
+ invoke the methods of a null provider, and as such the implementation
+ class of a null provider need not exist.
+
+
+ children
+ request-policy
+ defines the authentication policy requirements associated
+ with the request processing performed by the authentication
+ provider.
+ response-policy
+ defines the authentication policy requirements associated
+ with the response processing performed by the authentication
+ provider.
+
+ attributes
+ class-name
+ defines the java implementation class of the provider. Client
+ authentication providers must implement the
+
+ com.sun.enterprise.security.jauth.ClientAuthModule
+ interface. Server-side providers must implement the
+
+ com.sun.enterprise.security.jauth.ServerAuthModule
+ interface. A provider may implement both interfaces, but it
+ must implement the interface corresponding to its provider
+ type.
+ provider-id
+ Identifier used to uniquely identify this
+
+ provider-config
+ element
+ provider-type
+ defines whether the provider is a client authentication
+ provider or a server authentication provider.
+
+ Used in:
+ message-security-config
+-->
+<!ELEMENT provider-config (request-policy?, response-policy?, property*)>
+
+<!ATTLIST provider-config
+ provider-id CDATA #REQUIRED
+ provider-type CDATA #REQUIRED
+ class-name CDATA #REQUIRED>
+
+
+<!-- request-policy
+ Used to define the authentication policy requirements associated
+ with the request processing performed by an authentication
+ provider (i.e. when a client provider's
+
+ ClientAuthModule.initiateRequest()
+ method is called or when a server provider's
+
+ ServerAuthModule.validateRequest()
+ method is called).
+
+ attributes
+ auth-recipient
+ defines a requirement for message layer authentication of the
+ reciever of a message to its sender (e.g. by XML encryption).
+ before-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur before any content authentication (e.g.
+ encrypt then sign) with respect to the target of the
+ containing auth-policy.
+ after-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur after any content authentication (e.g. sign
+ then encrypt) with respect to the target of the
+ containing auth-policy.
+ auth-source
+ defines a requirement for message layer sender authentication
+ (e.g. username password) or content authentication (e.g.
+ digital signature).
+
+ Used in:
+ provider-config
+-->
+<!ELEMENT request-policy EMPTY>
+
+<!ATTLIST request-policy
+ auth-source (sender | content) #IMPLIED
+ auth-recipient (before-content | after-content) #IMPLIED>
+
+
+<!-- response-policy
+ Used to define the authentication policy requirements associated
+ with the response processing performed by an authentication
+ provider (i.e. when a client provider's
+
+ ClientAuthModule.validateResponse()
+ method is called or when a server provider's
+
+ ServerAuthModule.secureResponse()
+ method is called).
+
+ attributes
+ auth-recipient
+ defines a requirement for message layer authentication of the
+ reciever of a message to its sender (e.g. by XML encryption).
+ before-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur before any content authentication (e.g.
+ encrypt then sign) with respect to the target of the
+ containing auth-policy.
+ after-content
+ indicates that recipient authentication (e.g. encryption)
+ is to occur after any content authentication (e.g. sign
+ then encrypt) with respect to the target of the
+ containing auth-policy.
+ auth-source
+ defines a requirement for message layer sender authentication
+ (e.g. username password) or content authentication (e.g.
+ digital signature).
+
+ Used in:
+ provider-config
+-->
+<!ELEMENT response-policy EMPTY>
+
+<!ATTLIST response-policy
+ auth-source (sender | content) #IMPLIED
+ auth-recipient (before-content | after-content) #IMPLIED>
+
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
new file mode 100755
index 0000000..b054a51
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.orig.xml
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--><!-- 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">
+ <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! -->
+ </web-module>
+ <web-module name="admingui" context-root="/asadmin" location="${com.sun.aas.installRoot}/lib/install/applications/ee/admingui/adminGUI_war" object-type="system-admin" enabled="true" directory-deployed="true" availability-enabled="false">
+ <!-- System Web Module - DO NOT DELETE! -->
+ </web-module>
+ <web-module name="com_sun_web_ui" context-root="/com_sun_web_ui" location="${com.sun.aas.installRoot}/lib/install/applications/com_sun_web_ui" object-type="system-admin" enabled="true" directory-deployed="true" availability-enabled="false">
+ <!-- System Web Module - DO NOT DELETE! -->
+ </web-module>
+ </applications>
+ <resources>
+ <jdbc-resource jndi-name="jdbc/__TimerPool" pool-name="__TimerPool" object-type="system-all" enabled="true"/>
+ <jdbc-resource jndi-name="jdbc/PointBase" pool-name="PointBasePool" object-type="user" enabled="true"/>
+ <jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="com.pointbase.xa.xaDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" res-type="javax.sql.XADataSource" name="__TimerPool" pool-resize-quantity="2" steady-pool-size="8">
+ <property name="DatabaseName" value="jdbc:pointbase:embedded:ejbtimer,database.home=${com.sun.aas.instanceRoot}/lib/databases"/>
+ <property name="User" value="pbPublic"/>
+ <property name="Password" value="pbPublic"/>
+ </jdbc-connection-pool>
+ <jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="com.pointbase.xa.xaDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" res-type="javax.sql.XADataSource" name="PointBasePool" pool-resize-quantity="2" steady-pool-size="8">
+ <property name="DatabaseName" value="jdbc:pointbase:server://localhost:9092/sun-appserv-samples"/>
+ <property name="Password" value="pbPublic"/>
+ <property name="User" value="pbPublic"/>
+ </jdbc-connection-pool>
+ </resources>
+ <configs>
+ <config name="server-config" dynamic-reconfiguration-enabled="true">
+ <http-service> <http-listener id="http-listener-1" address="0.0.0.0" port="8080" acceptor-threads="100" security-enabled="false" default-virtual-server="server" server-name="" xpowered-by="true" enabled="true" blocking-enabled="false" family="inet">
+ </http-listener>
+ <http-listener id="http-listener-2" address="0.0.0.0" port="1043" acceptor-threads="100" security-enabled="true" default-virtual-server="server" server-name="" xpowered-by="true" enabled="true" blocking-enabled="false" family="inet">
+ </http-listener>
+ <http-listener id="admin-listener" address="0.0.0.0" port="4848" acceptor-threads="100" security-enabled="true" default-virtual-server="__asadmin" server-name="" xpowered-by="true" enabled="true" blocking-enabled="false" family="inet">
+ </http-listener>
+ <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"/>
+ </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"/>
+ </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"/>
+ </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"/>
+
+ <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"/>
+ </admin-service>
+ <web-container>
+ <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>
+ <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-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"/>
+ </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.provider.PolicyWrapper" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
+ <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"/>
+ </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.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</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>
+ </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"/>
+ </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-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-service>
+ <iiop-service client-authentication-required="false">
+ <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-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"/>
+ </admin-service>
+ <web-container><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/>
+ </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-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"/>
+ </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.provider.PolicyWrapper" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
+ <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"/>
+ </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.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</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"/>
+ </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-pools>
+ <system-property name="http-listener-1-port" value="8079"/>
+ <system-property name="http-listener-2-port" value="1042"/>
+ <system-property name="orb-listener-1-port" value="3699"/>
+ <system-property name="SSL-port" value="1059"/>
+ <system-property name="SSL_MUTUALAUTH-port" value="1058"/>
+ <system-property name="JMX_SYSTEM_CONNECTOR-port" value="8687"/>
+ </config>
+ </configs>
+ <servers>
+ <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"/>
+ <resource-ref enabled="true" ref="jdbc/__TimerPool"/>
+ <resource-ref enabled="true" ref="jdbc/PointBase"/>
+ </server>
+ </servers>
+ <clusters/>
+ <node-agents>
+ <node-agent name="na1">
+ <log-service/>
+ </node-agent>
+ </node-agents>
+</domain>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/prj.el b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/prj.el
new file mode 100644
index 0000000..ca49530
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/prj.el
@@ -0,0 +1,12 @@
+(jde-project-file-version "1.0")
+;; For SOlaris
+; '(jde-jdk-registry (quote (("1.4.2" . "/net/koori.sfbay/onestop/jdk/1.4.2_05/promoted/latest/binaries/linux-i586"))))
+(jde-set-variables
+ '(jde-jdk-registry (quote (("1.4.2_04" . "c:/j2sdk1.4.2_04"))))
+ '(jde-global-classpath (quote ("./build" "../../../publish/JDK1.4_DBG.OBJ/junit/junit.jar" "../../../publish/JDK1.4_DBG.OBJ/admin-core/config-api/lib/config-api.jar" "../../../publish/JDK1.4_DBG.OBJ/appserv-commons/lib/appserv-commons.jar" "../../../publish/JDK1.4_DBG.OBJ/netbeans/modules/schema2beans.jar" "../../../publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar")))
+ '(jde-compiler (quote ("jikes" "")))
+ '(jde-compile-option-directory "./build")
+ '(jde-compile-option-source (quote ("1.4")))
+ '(jde-ant-program "../../../publish/JDK1.4_DBG.OBJ/ant/bin/ant")
+ '(jde-sourcepath (quote ("./com/sun/enterprise/config" "../../../appserv-commons/src/java/com/sun/enterprise/config/" "../../../appserv-commons/src/java/com/sun/enterprise/config/impl")))
+ '(jde-compile-option-debug (quote ("all" (t nil nil)))))
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/build.xml
new file mode 100644
index 0000000..acd0f4c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/build.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../config/common.xml">
+<!ENTITY reporting SYSTEM "report.xml">
+<!ENTITY run SYSTEM "../config/run.xml">
+]>
+
+<project name="devtests" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+ &run;
+
+ <target name="orb_integration">
+ <delete>
+ <fileset dir="${env.APS_HOME}" includes="test_results*"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="orb_integration.output" action="start" />
+ <ant dir="ejb" target="orb_integration"/>
+ <record name="orb_integration.output" action="stop" />
+ <antcall target="report">
+ <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>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/README b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/README
new file mode 100644
index 0000000..e57e345
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/README
@@ -0,0 +1,4 @@
+dbreader: utility servlet that displays the count of rows in each of the database tables. It cleans out the data from the database before the next test run generates fresh data.
+
+simpleServlet: The actual web test.
+simpleJsp : Simple JSP Test. (This test is sensitive to timing issues. Incase it fails, increase the sleep time in the build.xml and it should work fine.)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml
new file mode 100644
index 0000000..30b0d46
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./report.xml">
+]>
+
+<project name="callflow" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+ <target name="all">
+ <delete>
+ <fileset dir="${env.APS_HOME}" includes="test_results*"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="callflow.output" action="start" />
+ <antcall target="setup"/>
+ <ant dir="simpleServlet" target="all"/>
+ <ant dir="simpleJsp" target="all"/>
+ <antcall target="report"/>
+ <antcall target="unsetup"/>
+ </target>
+
+ <target name="simpleServlet">
+ <record name="callflow-simple-servlet.output" action="start" />
+ <ant dir="simpleServlet" target="all"/>
+ <record name="callflow-simple-servlet.output" action="stop" />
+ </target>
+
+ <target name="simpleJSP">
+ <record name="callflow-simple-jsp.output" action="start" />
+ <ant dir="simpleJsp" target="all"/>
+ <record name="callflow-simple-jsp.output" action="stop" />
+ </target>
+
+ <target name="setup">
+ <record name="callflow-setup-dbreader.output" action="start" />
+ <ant dir="dbreader" target="build"/>
+ <ant dir="dbreader" target="deploy"/>
+ <record name="callflow-setup-dbreader.output" action="stop" />
+ </target>
+ <target name="unsetup">
+ <ant dir="simpleJsp" target="clean-db" />
+ <ant dir="dbreader" target="undeploy"/>
+ </target>
+
+ <target name="usage">
+ <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
new file mode 100644
index 0000000..cdc4e53
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/WebTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import java.lang.*;
+import java.io.*;
+import java.net.*;
+
+import com.sun.ejte.ccl.reporter.*;
+
+public class WebTest {
+
+ private static final String TEST_NAME = "callflow-dbreader-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 {
+ webTest.doTest();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ public void doTest() throws Exception {
+
+ URL url = new URL("http://" + host + ":" + port
+ + contextRoot + "/dbReader");
+ 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);
+ } else {
+ 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());
+ }
+ }
+}
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
new file mode 100644
index 0000000..08bf660
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="callflow-dbreader"/>
+<property name="appname" value="${module}-servlet"/>
+<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
new file mode 100644
index 0000000..2983c58
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="callflow-helper" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="build-publish-war" depends="build, publish-war-common" />
+
+ <target name="re-deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="run" depends="init-common">
+
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="${contextroot}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/descriptor/web.xml
new file mode 100644
index 0000000..171b491
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/descriptor/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app version="2.5" 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/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>dbReader</servlet-name>
+ <servlet-class>com.sun.enterprise.admin.monitor.callflow.dbReader</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>dbReader</servlet-name>
+ <url-pattern>/dbReader</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+</web-app>
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
new file mode 100644
index 0000000..70be50c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/servlet/dbReader.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * dbReader.java
+ *
+ * Created on May 10, 2006, 10:31 AM
+ */
+
+package com.sun.enterprise.admin.monitor.callflow;
+
+import java.io.*;
+import java.net.*;
+import java.sql.*;
+import javax.annotation.Resource;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.sql.DataSource;
+import com.sun.enterprise.admin.monitor.callflow.Agent;
+import com.sun.enterprise.Switch;
+
+/**
+ *
+ * DB Reader Utility Servlet. Returns the Rows in each callflow table.
+ * @author Harpreet Singh
+ * @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
+ */
+ @Resource (name="jdbc/__CallFlowPool", mappedName="jdbc/__CallFlowPool")
+ private DataSource callflowDS;
+ private static final String __COUNT = " select count(*) from ";
+ private static final String __SELECT = " select count(*) from ";
+ private static final String __WHERE = " where ";
+ 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");
+ PrintWriter out = response.getWriter();
+ Connection con = null;
+ con = getConnection();
+ String cleandb = request.getParameter ("cleandb");
+ if (cleandb != null){
+ deleteRows (con);
+ out.println ("Cleaned rows from all tables in db");
+ return;
+ }
+ 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);
+ }
+// out.println (" Looking up information for "+ servletName);
+// out.println();
+ String sql = __COUNT + MS + COMMA + ME + COMMA + RS + COMMA + RE +
+ __WHERE + MS +".MODULE_NAME = " + "'" + "/"+ servletName + "'" + AND +
+ MS + RID + EQUAL + ME + RID + AND +
+ MS + RID + EQUAL + RS + RID + AND +
+ MS + RID + EQUAL + RE + RID;
+// out.println (" \nSQL : "+sql);
+ int val = getCountCallFlowRows (con, sql);
+ String sql2 = __COUNT + MS + COMMA + ET +
+ __WHERE + MS +".MODULE_NAME = " + "'" + "/" +servletName + "'" + AND +
+ MS + RID + EQUAL + ET + RID;
+ int et = getCountCallFlowRows (con, sql2);
+ String sql3 = __COUNT + MS + COMMA + ST +
+ __WHERE + MS +".MODULE_NAME = " + "'" + "/"+ servletName + "'" + AND +
+ MS + RID + EQUAL + ST + RID;
+
+ int st = getCountCallFlowRows (con, sql3);
+ out.println ("RS=RE=MS=ME="+ val +" ST="+st+" ET="+et);
+// out.println (" Cleaning up Database");
+//// deleteRows (con);
+ out.close();
+ try {
+ con.close();
+ } catch (SQLException ex) {
+ 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 {
+ String result = null;
+ try {
+ Statement stmt = con.createStatement();
+ stmt.executeQuery (sql);
+ ResultSet set = stmt.getResultSet();
+ set.next();
+ result = set.getString(1);
+ } catch (SQLException ex) {
+ throw new ServletException (ex);
+ }
+ return result;
+ }
+ private int getCountCallFlowRows (Connection con, String sql) throws ServletException{
+ int count = -1;
+ try {
+ Statement stmt = con.createStatement();
+ stmt.executeQuery (sql);
+ ResultSet set = stmt.getResultSet();
+ set.next();
+ count = set.getInt(1);
+ } catch (SQLException ex) {
+ 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_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
+ * @param response servlet response
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ processRequest(request, response);
+ }
+
+ /** Returns a short description of the servlet.
+ */
+ public String getServletInfo() {
+ return "Short description";
+ }
+ // </editor-fold>
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/report.xml
new file mode 100644
index 0000000..1ec2184
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/report.xml
@@ -0,0 +1,37 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+</target>
+
+<target name="report-sh">
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ </exec>
+</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/resultCount.sh b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/resultCount.sh
new file mode 100644
index 0000000..0854da1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/resultCount.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=2
+PASSED=`grep "pass" $FILE | wc -l`
+FAILED=`grep "fail" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/callflow/count.txt;
+date>>$APS_HOME/devtests/callflow/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/callflow/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/callflow/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/callflow/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/callflow/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/callflow/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/callflow/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/callflow/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/callflow/count.txt;
+echo "************************">>$APS_HOME/devtests/callflow/count.txt;
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
new file mode 100644
index 0000000..490d079
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/WebTest.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import java.lang.*;
+import java.io.*;
+import java.net.*;
+
+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 {
+ if (args.length == 5){
+ if (args[3].equalsIgnoreCase("report")){
+ stat.addDescription("Callflow Simple JSP Test");
+ webTest.analyseResult(args[4]);
+ stat.printSummary(TEST_NAME);
+
+ }
+ }else if (args.length == 4){
+ if (args[3].equalsIgnoreCase ("clean-db")){
+ webTest.cleandb ();
+ }
+ }else
+ webTest.doTest();
+ } catch (Exception ex) {
+ stat.addStatus(TEST_NAME, stat.FAIL);
+ 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);
+ } else {
+ InputStream is = conn.getInputStream();
+ BufferedReader input = new BufferedReader(new InputStreamReader(is));
+ String line = input.readLine();
+ }
+ 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);
+ } else {
+ InputStream is = conn.getInputStream();
+ BufferedReader input = new BufferedReader(new InputStreamReader(is));
+ String line = input.readLine();
+ 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);
+
+ }
+ 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 ();
+ }
+}
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
new file mode 100644
index 0000000..2549883
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="callflow"/>
+<property name="appname" value="${module}-simple-jsp"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="contextroot" value="/${appname}"/>
+<property name="expectedresult" value="RS=RE=MS=ME=1 ST=5 ET=5"/>
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
new file mode 100644
index 0000000..61402ca
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="callflow-simple-servlet" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="build,deploy, just-run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="build-publish-war" depends="build, publish-war-common" />
+
+ <target name="re-deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="${contextroot}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </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>
+
+ <target name="run-report" depends="init-common">
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+ <sleep seconds ="10"/>
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="/dbReader"/>
+ <arg value="report"/>
+ <arg value="${expectedresult}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean-db" depends="init-common">
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+ <sleep seconds ="4"/>
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="/dbReader"/>
+ <arg value="clean-db"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </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>
+
+ <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>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/descriptor/web.xml
new file mode 100644
index 0000000..bd3c339
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/descriptor/web.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app 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/web-app_2_4.xsd"
+ version="2.4">
+</web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/docroot/including.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/docroot/including.jsp
new file mode 100644
index 0000000..db22b94
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/docroot/including.jsp
@@ -0,0 +1,19 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+Hello World!!
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
new file mode 100644
index 0000000..59e0577
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/WebTest.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import java.lang.*;
+import java.io.*;
+import java.net.*;
+
+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 {
+ if (args.length == 5){
+ if (args[3].equalsIgnoreCase("report")){
+ stat.addDescription("Callflow Simple Servlet Test");
+ webTest.analyseResult(args[4]);
+ stat.printSummary(TEST_NAME);
+
+ }
+ }else if (args.length == 4){
+ if (args[3].equalsIgnoreCase ("clean-db")){
+ webTest.cleandb ();
+ }
+ }else
+ webTest.doTest();
+ } catch (Exception ex) {
+ stat.addStatus(TEST_NAME, stat.FAIL);
+ 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);
+ } else {
+ InputStream is = conn.getInputStream();
+ BufferedReader input = new BufferedReader(new InputStreamReader(is));
+ String line = input.readLine();
+ }
+ 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);
+ } else {
+ InputStream is = conn.getInputStream();
+ BufferedReader input = new BufferedReader(new InputStreamReader(is));
+ String line = input.readLine();
+ 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);
+
+ }
+ 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 ();
+ }
+}
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
new file mode 100644
index 0000000..0c43a95
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="callflow"/>
+<property name="appname" value="${module}-simple-servlet"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="contextroot" value="/${appname}"/>
+<property name="expectedresult" value="RS=RE=MS=ME=1 ST=5 ET=5"/>
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
new file mode 100644
index 0000000..40e9bf6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="callflow-simple-servlet" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="build,deploy, just-run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="build-publish-war" depends="build, publish-war-common" />
+
+ <target name="re-deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="${contextroot}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </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>
+
+ <target name="run-report" depends="init-common">
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+ <sleep seconds ="4"/>
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="/dbReader"/>
+ <arg value="report"/>
+ <arg value="${expectedresult}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean-db" depends="init-common">
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+ <sleep seconds ="4"/>
+ <java classname="WebTest">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="/dbReader"/>
+ <arg value="clean-db"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </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>
+
+ <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>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..9525b8b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/descriptor/web.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app 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/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>SimpleServlet</servlet-name>
+ <servlet-class>SimpleServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SimpleServlet</servlet-name>
+ <url-pattern>/SimpleServlet</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
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
new file mode 100644
index 0000000..64fc68c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/servlet/SimpleServlet.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import java.io.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+public class SimpleServlet extends HttpServlet {
+
+ public void doGet(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.getWriter().print(req.getServerPort());
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/README.txt b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/README.txt
new file mode 100644
index 0000000..1df0ad2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/README.txt
@@ -0,0 +1,9 @@
+ClassLoader specific Developer tests
+
+- To run all tests
+ $ cd $APS_HOME
+ $ $S1AS_HOME/bin/asadmin start-domain domain1
+ $ ant startDerby
+ $ cd $APS_HOME/devtests/classloader
+ $ ant all
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml
new file mode 100644
index 0000000..526938b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../config/run.xml">
+]>
+<project name="classloader-devtests" default="usage" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+
+ <target name="all" depends="init-common">
+ <echo message="copying ${env.APS_HOME}/lib/xercesImpl.jar to ${admin.domain.dir}/${admin.domain}/lib/applibs"/>
+ <copy file="${env.APS_HOME}/lib/xercesImpl.jar" todir="${admin.domain.dir}/${admin.domain}/lib/applibs"/>
+
+ <ant dir="servlet" target="all"/>
+ <ant dir="stateless" target="all"/>
+ <echo message="deleting ${admin.domain.dir}/${admin.domain}/lib/applibs/xercesImpl.jar"/>
+ <delete file="${admin.domain.dir}/${admin.domain}/lib/applibs/xercesImpl.jar"/>
+ </target>
+
+
+ <target name="usage">
+ <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
new file mode 100644
index 0000000..2dc60cf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.properties
@@ -0,0 +1,30 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="web"/>
+<property name="appname" value="${module}-bookstore"/>
+<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="web.xml" value="descriptor/web.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="contextroot" value="bookstore3"/>
+<property name="tlds" value="descriptor/tld"/>
+<property name="tagfiles" value="docroot/tags"/>
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
new file mode 100644
index 0000000..7264d05
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../config/run.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jstl-servletApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &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"/>
+ </antcall>
+ <antcall target="deploy-jdbc-common">
+ <param name="jdbc.conpool.name" value="web-bookstore-pool"/>
+ <param name="jdbc.resource.name" value="jdbc/BookDB"/>
+ </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 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">
+ <param name="sql.file" value="sql/drop_${db.type}.sql"/>
+ </antcall>
+
+ <antcall target="undeploy-jdbc-common">
+ <param name="jdbc.conpool.name" value="web-bookstore-pool"/>
+ <param name="jdbc.resource.name" value="jdbc/BookDB"/>
+ </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>
+ </target>
+
+ <target name="build" depends="compile">
+ <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>
+
+ <!-- <antcall target="ear-common"/>-->
+
+ </target>
+
+ <target name="deploy-ear" depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="deploy-war" depends="init-common">
+ <property name="precompilejsp" value="true"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--contextroot ${contextroot}"/>
+ <arg line="--precompilejsp=${precompilejsp}"/>
+ <arg line="--upload=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--libraries foolib.jar"/>
+ <arg line="${assemble.dir}/${appname}-web.war"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-ear" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="undeploy-war" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="run-war" depends="init-common">
+ <antcall target="runwebclient-common">
+ <param name="testsuite.id" value="jstl-servlet (stand-alone war based)"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/sun-web.xml
new file mode 100644
index 0000000..12218d7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <context-root>/bookstore3</context-root>
+ <resource-ref>
+ <res-ref-name>jdbc/BookDB</res-ref-name>
+ <jndi-name>jdbc/BookDB</jndi-name>
+ </resource-ref>
+</sun-web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/tld/tutorial-template.tld b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/tld/tutorial-template.tld
new file mode 100644
index 0000000..e7eb276
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/tld/tutorial-template.tld
@@ -0,0 +1,87 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<taglib 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 web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+ <description>A tag library exercising SimpleTag handlers.</description>
+ <tlib-version>1.0</tlib-version>
+ <short-name>SimpleTagLibrary</short-name>
+ <uri>/SimpleTagLibrary</uri>
+ <tag>
+ <name>definition</name>
+ <tag-class>template.DefinitionTag</tag-class>
+ <body-content>scriptless</body-content>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>screen</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>screen</name>
+ <tag-class>template.ScreenTag</tag-class>
+ <body-content>scriptless</body-content>
+ <attribute>
+ <name>screenId</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>parameter</name>
+ <tag-class>template.ParameterTag</tag-class>
+ <body-content>scriptless</body-content>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>direct</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>insert</name>
+ <tag-class>template.InsertTag</tag-class>
+ <body-content>scriptless</body-content>
+ <attribute>
+ <name>definition</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>parameter</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+</taglib>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/web.xml
new file mode 100644
index 0000000..a59b0a7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/descriptor/web.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" 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/web-app_2_4.xsd">
+ <display-name>bookstore3</display-name>
+ <context-param>
+ <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
+ <param-value>messages.BookstoreMessages</param-value>
+ </context-param>
+ <listener>
+ <listener-class>listeners.ContextListener</listener-class>
+ </listener>
+ <servlet>
+ <display-name>Dispatcher</display-name>
+ <servlet-name>Dispatcher</servlet-name>
+ <servlet-class>dispatcher.Dispatcher</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Dispatcher</servlet-name>
+ <url-pattern>/bookstore</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Dispatcher</servlet-name>
+ <url-pattern>/bookdetails</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Dispatcher</servlet-name>
+ <url-pattern>/bookcatalog</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Dispatcher</servlet-name>
+ <url-pattern>/bookshowcart</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Dispatcher</servlet-name>
+ <url-pattern>/bookcashier</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Dispatcher</servlet-name>
+ <url-pattern>/bookreceipt</url-pattern>
+ </servlet-mapping>
+ <jsp-config>
+ <jsp-property-group>
+ <display-name>bookstore3</display-name>
+ <url-pattern>*.jsp</url-pattern>
+ <el-ignored>false</el-ignored>
+ <scripting-invalid>false</scripting-invalid>
+ <is-xml>false</is-xml>
+ <include-prelude>/template/prelude.jspf</include-prelude>
+ </jsp-property-group>
+ </jsp-config>
+ <resource-ref>
+ <res-ref-name>jdbc/BookDB</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+</web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookcashier.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookcashier.jsp
new file mode 100644
index 0000000..704516d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookcashier.jsp
@@ -0,0 +1,55 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<p><fmt:message key="Amount"/>
+<strong><fmt:formatNumber value="${sessionScope.cart.total}" type="currency"/></strong>
+</strong>
+<p><fmt:message key="Purchase"/>
+<c:url var="url" value="/bookreceipt" />
+<form action="${url}" method="post">
+<table summary="layout">
+<tr>
+<td><strong><fmt:message key="Name"/></strong></td>
+<td><input type="text" name="cardname" value="Gwen Canigetit" size="20"></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td><strong><fmt:message key="CCNumber"/></strong></td>
+<td><input type="text" name="cardnum" value="xxxx xxxx xxxx xxxx" size="20"></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td> </td><td> </td><td> </td><td> </td>
+<tr>
+<td><strong><fmt:message key="Shipping"/></strong></td>
+<td><select name="shipping"/>
+ <option value="QuickShip"><fmt:message key="QuickShip"/>
+ <option value="NormalShip" selected><fmt:message key="NormalShip"/>
+ <option value="SaverShip"><fmt:message key="SaverShip"/>
+ </select>
+<td> </td>
+<td> </td></tr>
+<tr>
+<td><input type="submit" value="<fmt:message key="Submit"/>"></td>
+<td> </td>
+<td> </td> <td> </td>
+</tr>
+</table>
+</form>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookcatalog.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookcatalog.jsp
new file mode 100644
index 0000000..420c770
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookcatalog.jsp
@@ -0,0 +1,59 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ taglib prefix="sc" tagdir="/WEB-INF/tags" %>
+
+<jsp:useBean id="bookDB" class="database.BookDB" scope="page" >
+ <jsp:setProperty name="bookDB" property="database" value="${bookDBAO}" />
+</jsp:useBean>
+
+
+<c:if test="${!empty param.Add}">
+ <c:set var="bid" value="${param.Add}"/>
+ <jsp:setProperty name="bookDB" property="bookId" value="${bid}" />
+ <c:set var="addedBook" value="${bookDB.bookDetails}" />
+ <p><h3><font color="red" size="+2">
+ <fmt:message key="CartAdded1"/> <em>${addedBook.title}</em> <fmt:message key="CartAdded2"/></font></h3>
+</c:if>
+
+<c:if test="${sessionScope.cart.numberOfItems > 0}">
+ <c:url var="url" value="/bookshowcart" >
+ <c:param name="Clear" value="0" />
+ <c:param name="Remove" value="0" />
+ </c:url>
+<p><strong><a href="${url}"><fmt:message key="CartCheck"/></a>
+ <c:url var="url" value="/bookcashier" />
+ <a href="${url}"><fmt:message key="Buy"/></a></p></strong>
+</c:if>
+
+<br>
+<br>
+<h3><fmt:message key="Choose"/></h3>
+
+
+
+<sc:catalog bookDB ="${bookDB}" color="#cccccc">
+ <jsp:attribute name="normalPrice">
+ <fmt:formatNumber value="${price}" type="currency"/>
+ </jsp:attribute>
+ <jsp:attribute name="onSale">
+ <strike><fmt:formatNumber value="${price}" type="currency"/></strike><br/>
+ <font color="red"><fmt:formatNumber value="${salePrice}" type="currency"/></font>
+ </jsp:attribute>
+</sc:catalog>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookdetails.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookdetails.jsp
new file mode 100644
index 0000000..16cb6b1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookdetails.jsp
@@ -0,0 +1,53 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<jsp:useBean id="bookDB" class="database.BookDB" scope="page" >
+ <jsp:setProperty name="bookDB" property="database" value="${bookDBAO}" />
+</jsp:useBean>
+
+<c:if test="${!empty param.bookId}">
+ <c:set var="bid" value="${param.bookId}"/>
+ <jsp:setProperty name="bookDB" property="bookId" value="${bid}" />
+ <c:set var="book" value="${bookDB.bookDetails}" />
+ <h2>${book.title}</h2>
+ <fmt:message key="By"/> <em>${book.firstName} ${book.surname}</em>
+ (${book.year})<br> <br>
+ <h4><fmt:message key="Critics"/></h4>
+ <blockquote>${book.description}</blockquote>
+ <c:set var="price" value="${book.price}" />
+ <c:if test="${book.onSale}" >
+ <c:set var="price" value="${book.price * .85}" />
+ </c:if>
+ <h4><fmt:message key="ItemPrice"/>: <fmt:formatNumber value="${price}" type="currency"/></h4>
+ <c:url var="url" value="/bookcatalog" >
+ <c:param name="Add" value="${bid}" />
+ </c:url>
+ <p><strong><a href="${url}"><fmt:message key="CartAdd"/></a>
+</c:if>
+
+
+<c:url var="url" value="/bookcatalog" >
+ <c:param name="Add" value="" />
+</c:url>
+<a href="${url}"><fmt:message key="ContinueShopping"/></a></p></strong>
+
+
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookordererror.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookordererror.jsp
new file mode 100644
index 0000000..9d961b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookordererror.jsp
@@ -0,0 +1,44 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ page errorPage="/template/errorpage.jsp" %>
+<html>
+<head>
+<title>Order Error</title>
+</head>
+<body bgcolor="#FFFFFF">
+<center>
+<hr>
+<br>
+<h1>
+<font size="+3" color="#CC0066">Duke's </font>
+<img src="template/duke.books.gif">
+<font size="+3" color="black">Bookstore</font>
+</h1>
+<br>
+<hr>
+</center>
+<h3><fmt:message key="OrderError"/></h3><br>
+
+
+<c:remove var="cart" scope="session" />
+<c:url var="url" value="/bookstore" />
+<strong><a href="${url}"><fmt:message key="ContinueShopping"/></a> </strong>
+
+</body>
+</html>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookreceipt.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookreceipt.jsp
new file mode 100644
index 0000000..6a87380
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookreceipt.jsp
@@ -0,0 +1,32 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ taglib prefix="sc" tagdir="/WEB-INF/tags" %>
+<h3><fmt:message key="ThankYou"/> ${param.cardname}.</h3><br>
+
+<fmt:message key="With"/>
+<em><fmt:message key="${param.shipping}"/></em>,
+<fmt:message key="ShipDateLC"/>
+<sc:shipDate shipping="${param.shipping}" />
+
+<c:remove var="cart" scope="session" />
+<c:url var="url" value="/bookstore" />
+<strong><a href="${url}"><fmt:message key="ContinueShopping"/></a> </strong>
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookshowcart.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookshowcart.jsp
new file mode 100644
index 0000000..9ae7edc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookshowcart.jsp
@@ -0,0 +1,125 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<jsp:useBean id="bookDB" class="database.BookDB" scope="page" >
+ <jsp:setProperty name="bookDB" property="database" value="${bookDBAO}" />
+</jsp:useBean>
+
+
+<c:if test="${param.Clear == 'clear'}">
+ <font color="red" size="+2"><strong>
+ <fmt:message key="CartCleared"/>
+ </strong><br> <br></font>
+</c:if>
+
+
+<c:if test="${param.Remove != '0'}">
+ <c:set var="bid" value="${param.Remove}"/>
+ <jsp:setProperty name="bookDB" property="bookId" value="${bid}" />
+ <c:set var="removedBook" value="${bookDB.bookDetails}" />
+ <font color="red" size="+2"><fmt:message key="CartRemoved"/><em>${removedBook.title}</em>.
+
+ <br> <br>
+ </font>
+</c:if>
+
+<c:if test="${sessionScope.cart.numberOfItems > 0}">
+ <font size="+2"><fmt:message key="CartContents"/>
+ ${sessionScope.cart.numberOfItems}
+ <c:if test="${sessionScope.cart.numberOfItems == 1}">
+ <fmt:message key="CartItem"/>.
+ </c:if>
+ <c:if test="${sessionScope.cart.numberOfItems > 1}">
+ <fmt:message key="CartItems"/>.
+ </c:if>
+ </font><br>
+
+ <table summary="layout">
+ <tr>
+ <th align=left><fmt:message key="ItemQuantity"/></TH>
+ <th align=left><fmt:message key="ItemTitle"/></TH>
+ <th align=left><fmt:message key="ItemPrice"/></TH>
+
+ </tr>
+
+ <c:forEach var="item" items="${sessionScope.cart.items}">
+ <c:set var="book" value="${item.item}" />
+
+ <tr>
+ <td align="right" bgcolor="#ffffff">
+ ${item.quantity}
+ </td>
+
+ <td bgcolor="#ffffaa">
+ <c:url var="url" value="/bookdetails" >
+ <c:param name="bookId" value="${book.bookId}" />
+ <c:param name="Clear" value="0" />
+ </c:url>
+ <strong><a href="${url}">${book.title}</a></strong>
+ </td>
+
+ <td bgcolor="#ffffaa" align="right">
+ <fmt:formatNumber value="${book.price}" type="currency"/> </td>
+ </td>
+
+ <td bgcolor="#ffffaa">
+ <c:url var="url" value="/bookshowcart" >
+ <c:param name="Remove" value="${book.bookId}" />
+ </c:url>
+ <strong><a href="${url}"><fmt:message key="RemoveItem"/></a></strong>
+ </td></tr>
+
+ </c:forEach>
+
+ <tr><td colspan="5" bgcolor="#ffffff">
+ <br></td></tr>
+
+ <tr>
+ <td colspan="2" align="right" bgcolor="#ffffff">
+ <fmt:message key="Subtotal"/></td>
+ <td bgcolor="#ffffaa" align="right">
+ <fmt:formatNumber value="${sessionScope.cart.total}" type="currency"/> </td>
+ <td><br></td>
+ </tr></table>
+
+ <p> <p>
+ <c:url var="url" value="/bookcatalog" >
+ <c:param name="Add" value="" />
+ </c:url>
+ <strong><a href="${url}"><fmt:message key="ContinueShopping"/></a>
+ <c:url var="url" value="/bookcashier" />
+ <a href="${url}"><fmt:message key="Checkout"/></a>
+ <c:url var="url" value="/bookshowcart" >
+ <c:param name="Clear" value="clear" />
+ <c:param name="Remove" value="0" />
+ </c:url>
+ <a href="${url}"><fmt:message key="ClearCart"/></a></strong>
+</c:if>
+
+<c:if test="${sessionScope.cart.numberOfItems <= 0}">
+ <font size="+2"><fmt:message key="CartEmpty"/></font>
+ <br> <br>
+ <c:url var="url" value="/bookcatalog" >
+ <c:param name="Add" value="" />
+ </c:url>
+ <strong><a href="${url}"><fmt:message key="Catalog"/></a></strong>
+</c:if>
+
+</body>
+</html>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookstore.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookstore.jsp
new file mode 100644
index 0000000..acf2afd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/bookstore.jsp
@@ -0,0 +1,34 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<p><b><fmt:message key="What"/></b></p>
+
+<jsp:useBean id="bookDB" class="database.BookDB" scope="page" >
+ <jsp:setProperty name="bookDB" property="database" value="${bookDBAO}" />
+</jsp:useBean>
+
+<jsp:setProperty name="bookDB" property="bookId" value="203" />
+
+<p>
+<c:url var="url" value="/bookdetails" />
+<blockquote><p><em><a href="${url}?bookId=203">${bookDB.bookDetails.title}</a></em>,
+<c:url var="url" value="/bookcatalog" />
+<fmt:message key="Talk"/></blockquote>
+<p><b><a href="${url}?Add="><fmt:message key="Start"/></a></b>
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/tags/catalog.tag b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/tags/catalog.tag
new file mode 100644
index 0000000..c1811a6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/tags/catalog.tag
@@ -0,0 +1,72 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+
+<%@ attribute name="bookDB" required="true" type="database.BookDB" %>
+<%@ attribute name="color" required="true" %>
+
+<%@ attribute name="normalPrice" fragment="true" %>
+<%@ attribute name="onSale" fragment="true" %>
+<%@ variable name-given="price" %>
+<%@ variable name-given="salePrice" %>
+
+<center>
+<table summary="layout">
+<c:forEach var="book" begin="0" items="${bookDB.books}">
+ <tr>
+ <c:set var="bookId" value="${book.bookId}" />
+ <td bgcolor="${color}">
+ <c:url var="url" value="/bookdetails" >
+ <c:param name="bookId" value="${bookId}" />
+ </c:url>
+ <a href="${url}"><strong>${book.title} </strong></a></td>
+ <td bgcolor="${color}" rowspan=2>
+
+
+ <c:set var="salePrice" value="${book.price * .85}" />
+ <c:set var="price" value="${book.price}" />
+
+ <c:choose>
+ <c:when test="${book.onSale}" >
+ <jsp:invoke fragment="onSale" />
+ </c:when>
+ <c:otherwise>
+ <jsp:invoke fragment="normalPrice" />
+ </c:otherwise>
+ </c:choose>
+
+ </td>
+
+ <td bgcolor="${color}" rowspan=2>
+ <c:url var="url" value="/bookcatalog" >
+ <c:param name="Add" value="${bookId}" />
+ </c:url>
+ <p><strong><a href="${url}"> <fmt:message key="CartAdd"/> </a></td></tr>
+
+ <tr>
+ <td bgcolor="#ffffff">
+ <fmt:message key="By"/> <em>${book.firstName} ${book.surname}</em></td></tr>
+</c:forEach>
+
+</table>
+</center>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/tags/shipDate.tag b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/tags/shipDate.tag
new file mode 100644
index 0000000..06aa96f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/tags/shipDate.tag
@@ -0,0 +1,38 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ attribute name="shipping" required="true" %>
+
+<jsp:useBean id="now" class="java.util.Date" />
+<jsp:useBean id="shipDate" class="java.util.Date" />
+<c:choose>
+ <c:when test="${shipping == 'QuickShip'}">
+ <c:set var="days" value="2" />
+ </c:when>
+ <c:when test="${shipping == 'NormalShip'}">
+ <c:set var="days" value="5" />
+ </c:when>
+ <c:when test="${shipping == 'SaverShip'}">
+ <c:set var="days" value="7" />
+ </c:when>
+</c:choose>
+<jsp:setProperty name="shipDate" property="time" value="${now.time + 86400000 * days}" />
+<fmt:formatDate value="${shipDate}" type="date" dateStyle="full"/>.<br><br>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/banner.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/banner.jsp
new file mode 100644
index 0000000..6df9a8a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/banner.jsp
@@ -0,0 +1,29 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<center>
+<hr>
+<br>
+<h1>
+<font size="+3" color="#CC0066">Duke's </font>
+<img src="template/duke.books.gif" alt="Duke holding books">
+<font size="+3" color="black">Bookstore</font>
+</h1>
+<br>
+<hr>
+</center>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/duke.books.gif b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/duke.books.gif
new file mode 100644
index 0000000..bd6753f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/duke.books.gif
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/errorinclude.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/errorinclude.jsp
new file mode 100644
index 0000000..2ca62d9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/errorinclude.jsp
@@ -0,0 +1,36 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ page isErrorPage="true" %>
+<h3>
+<fmt:message key="ServerError"/>
+</h3>
+<p>
+${pageContext.errorData.throwable}
+<c:choose>
+ <c:when test="${!empty pageContext.errorData.throwable.cause}">
+ : ${pageContext.errorData.throwable.cause}
+ </c:when>
+ <c:when test="${!empty pageContext.errorData.throwable.rootCause}">
+ : ${pageContext.errorData.throwable.rootCause}
+ </c:when>
+</c:choose>
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/errorpage.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/errorpage.jsp
new file mode 100644
index 0000000..fed4610
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/errorpage.jsp
@@ -0,0 +1,43 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ page isErrorPage="true" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<html>
+<head>
+<title><fmt:message key="ServerError"/></title>
+</head>
+<body bgcolor="white">
+<h3>
+<fmt:message key="ServerError"/>
+</h3>
+<p>
+${pageContext.errorData.throwable}
+<c:choose>
+ <c:when test="${!empty pageContext.errorData.throwable.cause}">
+ : ${pageContext.errorData.throwable.cause}
+ </c:when>
+ <c:when test="${!empty pageContext.errorData.throwable.rootCause}">
+ : ${pageContext.errorData.throwable.rootCause}
+ </c:when>
+</c:choose>
+</body>
+</html>
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/prelude.jspf b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/prelude.jspf
new file mode 100644
index 0000000..493500a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/prelude.jspf
@@ -0,0 +1,20 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/screendefinitions.jspf b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/screendefinitions.jspf
new file mode 100644
index 0000000..0010d0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/screendefinitions.jspf
@@ -0,0 +1,73 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+
+<tt:definition name="bookstore" screen="${requestScope['javax.servlet.forward.servlet_path']}">
+ <tt:screen screenId="/bookstore">
+ <tt:parameter name="title" value="Duke's Bookstore" direct="true"/>
+ <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
+ <tt:parameter name="body" value="/bookstore.jsp" direct="false"/>
+ </tt:screen>
+ <tt:screen screenId="/bookcatalog">
+ <tt:parameter name="title" direct="true">
+ <jsp:attribute name="value" >
+ <fmt:message key="TitleBookCatalog"/>
+ </jsp:attribute>
+ </tt:parameter>
+ <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
+ <tt:parameter name="body" value="/bookcatalog.jsp" direct="false"/>
+ </tt:screen>
+ <tt:screen screenId="/bookdetails">
+ <tt:parameter name="title" direct="true">
+ <jsp:attribute name="value" >
+ <fmt:message key="TitleBookDescription"/>
+ </jsp:attribute>
+ </tt:parameter>
+ <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
+ <tt:parameter name="body" value="/bookdetails.jsp" direct="false"/>
+ </tt:screen>
+ <tt:screen screenId="/bookshowcart">
+ <tt:parameter name="title" direct="true">
+ <jsp:attribute name="value" >
+ <fmt:message key="TitleShoppingCart"/>
+ </jsp:attribute>
+ </tt:parameter>
+ <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
+ <tt:parameter name="body" value="/bookshowcart.jsp" direct="false"/>
+ </tt:screen>
+ <tt:screen screenId="/bookcashier">
+ <tt:parameter name="title" direct="true">
+ <jsp:attribute name="value" >
+ <fmt:message key="TitleCashier"/>
+ </jsp:attribute>
+ </tt:parameter>
+ <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
+ <tt:parameter name="body" value="/bookcashier.jsp" direct="false"/>
+ </tt:screen>
+ <tt:screen screenId="/bookreceipt">
+ <tt:parameter name="title" direct="true">
+ <jsp:attribute name="value" >
+ <fmt:message key="TitleReceipt"/>
+ </jsp:attribute>
+ </tt:parameter>
+ <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
+ <tt:parameter name="body" value="/bookreceipt.jsp" direct="false"/>
+ </tt:screen>
+</tt:definition>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/template.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/template.jsp
new file mode 100644
index 0000000..70854dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/docroot/template/template.jsp
@@ -0,0 +1,32 @@
+<%--
+
+ Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%@ taglib uri="/WEB-INF/tlds/tutorial-template.tld" prefix="tt" %>
+<%@ page errorPage="/template/errorinclude.jsp" %>
+<%@ include file="/template/screendefinitions.jspf" %>
+<html>
+<head>
+<title>
+ <tt:insert definition="bookstore" parameter="title"/>
+</title>
+</head>
+<body bgcolor="#FFFFFF">
+ <tt:insert definition="bookstore" parameter="banner"/>
+ <tt:insert definition="bookstore" parameter="body"/>
+</body>
+</html>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/lib/foo/Bar.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/lib/foo/Bar.java
new file mode 100644
index 0000000..7d9ba42
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/lib/foo/Bar.java
@@ -0,0 +1,11 @@
+package foo;
+
+public class Bar {
+
+public void baz(){
+ System.out.println(" ************************* BAZ called ************************* ");
+}
+}
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/lib/foolib.jar b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/lib/foolib.jar
new file mode 100644
index 0000000..ef87981
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/lib/foolib.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/script.txt b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/script.txt
new file mode 100644
index 0000000..b0908f6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/script.txt
@@ -0,0 +1,104 @@
+GET /bookstore3/bookcatalog?Add= HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+Host: localhost:8080
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookstore
+
+
+!
+!GET /bookstore3/template/duke.books.gif HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+If-Modified-Since: Wed, 09 Mar 2005 19:01:04 GMT
+Host: localhost:8080
+Accept: image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+If-None-Match: "3c0-422f47f0"
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookcatalog?Add=
+
+
+!
+!GET /bookstore3/bookdetails?bookId=205 HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+Host: localhost:8080
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookcatalog?Add=
+
+
+!
+!GET /bookstore3/bookcatalog?Add=205 HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+Host: localhost:8080
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookdetails?bookId=205
+
+
+!
+!GET /bookstore3/bookcatalog?Add=207 HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+Host: localhost:8080
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookcatalog?Add=
+
+
+!
+!GET /bookstore3/bookcashier HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+Host: localhost:8080
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookcatalog?Add=207
+
+
+!
+!POST /bookstore3/bookreceipt HTTP/1.0
+Cookie: JSESSIONID=88fa2a91404d1f3148d1e86d02c8
+Host: localhost:8080
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.01.0
+Content-Length: 71
+Keep-Alive: 300
+Accept-Language: en-us,en;q=0.5
+Proxy-Connection: keep-alive
+Accept-Encoding: gzip,deflate
+Content-Type: application/x-www-form-urlencoded
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Referer: http://localhost:8080/bookstore3/bookcashier
+
+cardname=Gwen+Canigetit&cardnum=xxxx+xxxx+xxxx+xxxx&shipping=NormalShip
+
+!
+!
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create.sql b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create.sql
new file mode 100644
index 0000000..1131d71
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create.sql
@@ -0,0 +1,42 @@
+DROP TABLE books;
+
+CREATE TABLE books
+(id VARCHAR(8),
+surname VARCHAR(24),
+first_name VARCHAR(24),
+title VARCHAR(96),
+price FLOAT,
+onSale BOOLEAN,
+year INT,
+description VARCHAR(30),
+inventory INT);
+
+
+INSERT INTO books VALUES('201', 'Duke', '',
+ 'My Early Years: Growing up on *7',
+ 30.75, true, 1995, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('202', 'Jeeves', '',
+ 'Web Servers for Fun and Profit', 40.75, false,
+ 2000, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('203', 'Masterson', 'Webster',
+ 'Web Components for Web Developers',
+ 27.75, true, 2000, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('205', 'Novation', 'Kevin',
+ 'From Oak to Java: The Revolution of a Language',
+ 10.75, false, 1998, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('206', 'Gosling', 'James',
+ 'Java Intermediate Bytecodes', 30.95, false,
+ 2000, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('207', 'Thrilled', 'Ben',
+ 'The Green Project: Programming for Consumer Devices',
+ 30.00, false, 1998, 'What a cool book', 20);
+
+INSERT INTO books VALUES('208', 'Tru', 'Itzal',
+ 'Duke: A Biography of the Java Evangelist',
+ 45.00, true, 2001, 'What a cool book.', 20);
+
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
new file mode 100644
index 0000000..a4ec6c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_derby.sql
@@ -0,0 +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,
+ DESCRIPTION VARCHAR(30),
+ INVENTORY INTEGER NOT NULL
+);
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_pointbase.sql
new file mode 100644
index 0000000..9e9a2ed
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_pointbase.sql
@@ -0,0 +1,44 @@
+DROP TABLE books;
+
+CREATE TABLE books
+(id VARCHAR(8),
+surname VARCHAR(24),
+first_name VARCHAR(24),
+title VARCHAR(96),
+price FLOAT,
+onSale BOOLEAN,
+year INT,
+description VARCHAR(30),
+inventory INT);
+
+
+INSERT INTO books VALUES('201', 'Duke', '',
+ 'My Early Years: Growing up on *7',
+ 30.75, true, 1995, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('202', 'Jeeves', '',
+ 'Web Servers for Fun and Profit', 40.75, false,
+ 2000, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('203', 'Masterson', 'Webster',
+ 'Web Components for Web Developers',
+ 27.75, true, 2000, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('205', 'Novation', 'Kevin',
+ 'From Oak to Java: The Revolution of a Language',
+ 10.75, false, 1998, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('206', 'Gosling', 'James',
+ 'Java Intermediate Bytecodes', 30.95, false,
+ 2000, 'What a cool book.', 20);
+
+INSERT INTO books VALUES('207', 'Thrilled', 'Ben',
+ 'The Green Project: Programming for Consumer Devices',
+ 30.00, false, 1998, 'What a cool book', 20);
+
+INSERT INTO books VALUES('208', 'Tru', 'Itzal',
+ 'Duke: A Biography of the Java Evangelist',
+ 45.00, true, 2001, 'What a cool book.', 20);
+
+SELECT * FROM BOOKS;
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop.sql b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop.sql
new file mode 100644
index 0000000..3bd92c6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop.sql
@@ -0,0 +1 @@
+DROP TABLE books;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop_derby.sql
new file mode 100644
index 0000000..3bd92c6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop_derby.sql
@@ -0,0 +1 @@
+DROP TABLE books;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop_pointbase.sql
new file mode 100644
index 0000000..3bd92c6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/drop_pointbase.sql
@@ -0,0 +1 @@
+DROP TABLE books;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/cart/ShoppingCart.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/cart/ShoppingCart.java
new file mode 100644
index 0000000..ca091d4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/cart/ShoppingCart.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cart;
+
+import java.util.*;
+import database.BookDetails;
+
+
+public class ShoppingCart {
+ HashMap items = null;
+ int numberOfItems = 0;
+
+ public ShoppingCart() {
+ items = new HashMap();
+ }
+
+ public synchronized void add(String bookId, BookDetails book) {
+ if (items.containsKey(bookId)) {
+ ShoppingCartItem scitem = (ShoppingCartItem) items.get(bookId);
+ scitem.incrementQuantity();
+ System.out.println("in add, quantity is " + scitem.getQuantity());
+ } else {
+ ShoppingCartItem newItem = new ShoppingCartItem(book);
+ items.put(bookId, newItem);
+ System.out.println("in add, quantity is " + newItem.getQuantity());
+ }
+
+ // numberOfItems++;
+ }
+
+ public synchronized void remove(String bookId) {
+ if (items.containsKey(bookId)) {
+ ShoppingCartItem scitem = (ShoppingCartItem) items.get(bookId);
+ scitem.decrementQuantity();
+
+ if (scitem.getQuantity() <= 0) {
+ items.remove(bookId);
+ }
+
+ numberOfItems--;
+ }
+ }
+
+ public synchronized List getItems() {
+ List results = new ArrayList();
+ Iterator items = this.items.values()
+ .iterator();
+
+ while (items.hasNext()) {
+ results.add(items.next());
+ }
+
+ return (results);
+ }
+
+ protected void finalize() throws Throwable {
+ items.clear();
+ }
+
+ public synchronized int getNumberOfItems() {
+ numberOfItems = 0;
+
+ for (Iterator i = getItems()
+ .iterator(); i.hasNext();) {
+ ShoppingCartItem item = (ShoppingCartItem) i.next();
+ numberOfItems += item.getQuantity();
+ System.out.println("number of items is " + numberOfItems);
+ }
+
+ return numberOfItems;
+ }
+
+ public synchronized double getTotal() {
+ double amount = 0.0;
+
+ for (Iterator i = getItems()
+ .iterator(); i.hasNext();) {
+ ShoppingCartItem item = (ShoppingCartItem) i.next();
+ BookDetails bookDetails = (BookDetails) item.getItem();
+
+ amount += (item.getQuantity() * bookDetails.getPrice());
+ }
+
+ return roundOff(amount);
+ }
+
+ private double roundOff(double x) {
+ long val = Math.round(x * 100); // cents
+
+ return val / 100.0;
+ }
+
+ public synchronized void clear() {
+ System.err.println("Clearing cart.");
+ items.clear();
+ numberOfItems = 0;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/cart/ShoppingCartItem.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/cart/ShoppingCartItem.java
new file mode 100644
index 0000000..58c29ac
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/cart/ShoppingCartItem.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cart;
+
+public class ShoppingCartItem {
+ Object item;
+ int quantity;
+
+ public ShoppingCartItem(Object anItem) {
+ item = anItem;
+ quantity = 1;
+ }
+
+ public void incrementQuantity() {
+ quantity++;
+ }
+
+ public void decrementQuantity() {
+ quantity--;
+ }
+
+ public Object getItem() {
+ return item;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDB.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDB.java
new file mode 100644
index 0000000..6f1591d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDB.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package database;
+
+import exception.*;
+import java.util.List;
+import cart.*;
+
+
+public class BookDB {
+ private String bookId = "0";
+ private BookDBAO database = null;
+
+ public BookDB() {
+ }
+
+ public void setBookId(String bookId) {
+ this.bookId = bookId;
+ }
+
+ public void setDatabase(BookDBAO database) {
+ this.database = database;
+ }
+
+ public BookDetails getBookDetails() throws BookNotFoundException {
+ return (BookDetails) database.getBookDetails(bookId);
+ }
+
+ public List getBooks() throws BooksNotFoundException {
+ return database.getBooks();
+ }
+
+ public void buyBooks(ShoppingCart cart) throws OrderException {
+ database.buyBooks(cart);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDBAO.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDBAO.java
new file mode 100644
index 0000000..2015fee
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDBAO.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package database;
+
+import java.sql.*;
+import javax.sql.*;
+import javax.naming.*;
+import java.util.*;
+import exception.*;
+import cart.*;
+
+
+public class BookDBAO {
+ private ArrayList books;
+ Connection con;
+
+ public BookDBAO() throws Exception {
+ try {
+ InitialContext ic = new InitialContext();
+ Context envCtx = (Context) ic.lookup("java:comp/env");
+ DataSource ds = (DataSource) envCtx.lookup("jdbc/BookDB");
+ con = ds.getConnection();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new Exception("Couldn't open connection to database: " +
+ ex.getMessage());
+ }
+ }
+
+ public void remove() {
+ try {
+ con.close();
+ } catch (SQLException ex) {
+ System.out.println(ex.getMessage());
+ }
+ }
+
+ public List getBooks() throws BooksNotFoundException {
+ books = new ArrayList();
+
+ try {
+ String selectStatement = "select * " + "from books";
+ PreparedStatement prepStmt = con.prepareStatement(selectStatement);
+ ResultSet rs = prepStmt.executeQuery();
+
+ while (rs.next()) {
+ BookDetails bd =
+ new BookDetails(rs.getString(1), rs.getString(2),
+ rs.getString(3), rs.getString(4), rs.getFloat(5),
+ rs.getBoolean(6), rs.getInt(7), rs.getString(8),
+ rs.getInt(9));
+
+ if (rs.getInt(9) > 0) {
+ books.add(bd);
+ }
+ }
+
+ prepStmt.close();
+ } catch (SQLException ex) {
+ ex.printStackTrace();
+ throw new BooksNotFoundException(ex.getMessage());
+ }
+
+ Collections.sort(books);
+
+ return books;
+ }
+
+ public BookDetails getBookDetails(String bookId)
+ throws BookNotFoundException {
+ try {
+ String selectStatement = "select * " + "from books where id = ? ";
+ PreparedStatement prepStmt = con.prepareStatement(selectStatement);
+ prepStmt.setString(1, bookId);
+
+ ResultSet rs = prepStmt.executeQuery();
+
+ if (rs.next()) {
+ BookDetails bd =
+ new BookDetails(rs.getString(1), rs.getString(2),
+ rs.getString(3), rs.getString(4), rs.getFloat(5),
+ rs.getBoolean(6), rs.getInt(7), rs.getString(8),
+ rs.getInt(9));
+ prepStmt.close();
+
+ return bd;
+ } else {
+ prepStmt.close();
+ System.err.println("Couldn't find book: " + bookId);
+ throw new BookNotFoundException("Couldn't find book: " +
+ bookId);
+ }
+ } catch (SQLException ex) {
+ ex.printStackTrace();
+ throw new BookNotFoundException("Couldn't find book: " + bookId +
+ " " + ex.getMessage());
+ }
+ }
+
+ public void buyBooks(ShoppingCart cart) throws OrderException {
+ Collection items = cart.getItems();
+ Iterator i = items.iterator();
+
+ try {
+ con.setAutoCommit(false);
+
+ while (i.hasNext()) {
+ ShoppingCartItem sci = (ShoppingCartItem) i.next();
+ BookDetails bd = (BookDetails) sci.getItem();
+ String id = bd.getBookId();
+ int quantity = sci.getQuantity();
+ buyBook(id, quantity);
+ }
+
+ con.commit();
+ con.setAutoCommit(true);
+ } catch (Exception ex) {
+ try {
+ con.rollback();
+ throw new OrderException("Transaction failed: " +
+ ex.getMessage());
+ } catch (SQLException sqx) {
+ throw new OrderException("Rollback failed: " +
+ sqx.getMessage());
+ }
+ }
+ }
+
+ public void buyBook(String bookId, int quantity) throws OrderException {
+ try {
+ String selectStatement = "select * " + "from books where id = ? ";
+ PreparedStatement prepStmt = con.prepareStatement(selectStatement);
+ prepStmt.setString(1, bookId);
+
+ ResultSet rs = prepStmt.executeQuery();
+
+ if (rs.next()) {
+ int inventory = rs.getInt(9);
+ prepStmt.close();
+
+ if ((inventory - quantity) >= 0) {
+ String updateStatement =
+ "update books set inventory = inventory - ? where id = ?";
+ prepStmt = con.prepareStatement(updateStatement);
+ prepStmt.setInt(1, quantity);
+ prepStmt.setString(2, bookId);
+ prepStmt.executeUpdate();
+ prepStmt.close();
+ } else {
+ throw new OrderException("Not enough of " + bookId +
+ " in stock to complete order.");
+ }
+ }
+ } catch (Exception ex) {
+ throw new OrderException("Couldn't purchase book: " + bookId +
+ ex.getMessage());
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDetails.java
new file mode 100644
index 0000000..856f1a3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/database/BookDetails.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package database;
+
+public class BookDetails implements Comparable {
+ private String bookId = null;
+ private String title = null;
+ private String firstName = null;
+ private String surname = null;
+ private float price = 0.0F;
+ private boolean onSale = false;
+ private int year = 0;
+ private String description = null;
+ private int inventory = 0;
+
+ public BookDetails() {
+ }
+
+ public BookDetails(String bookId, String surname, String firstName,
+ String title, float price, boolean onSale, int year,
+ String description, int inventory) {
+ this.bookId = bookId;
+ this.title = title;
+ this.firstName = firstName;
+ this.surname = surname;
+ this.price = price;
+ this.onSale = onSale;
+ this.year = year;
+ this.description = description;
+ this.inventory = inventory;
+ }
+
+ public String getBookId() {
+ return this.bookId;
+ }
+
+ public String getTitle() {
+ return this.title;
+ }
+
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public String getSurname() {
+ return this.surname;
+ }
+
+ public float getPrice() {
+ return this.price;
+ }
+
+ public boolean getOnSale() {
+ return this.onSale;
+ }
+
+ public int getYear() {
+ return this.year;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public int getInventory() {
+ return this.inventory;
+ }
+
+ public void setBookId(String id) {
+ this.bookId = id;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+
+ public void setPrice(float price) {
+ this.price = price;
+ }
+
+ public void setOnSale(boolean onSale) {
+ this.onSale = onSale;
+ }
+
+ public void setYear(int year) {
+ this.year = year;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public void setInventory(int inventory) {
+ this.inventory = inventory;
+ }
+
+ public int compareTo(Object o) {
+ BookDetails n = (BookDetails) o;
+ int lastCmp = title.compareTo(n.title);
+
+ return (lastCmp);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/dispatcher/Dispatcher.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/dispatcher/Dispatcher.java
new file mode 100644
index 0000000..c85bbe1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/dispatcher/Dispatcher.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dispatcher;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.util.*;
+import cart.ShoppingCart;
+import database.*;
+import exception.*;
+import foo.Bar;
+
+public class Dispatcher extends HttpServlet {
+ public void init() {
+ //to test --libraries
+ (new Bar()).baz();
+ }
+ public void doGet(HttpServletRequest request, HttpServletResponse response) {
+ String bookId = null;
+ BookDetails book = null;
+ String clear = null;
+ BookDBAO bookDBAO =
+ (BookDBAO) getServletContext()
+ .getAttribute("bookDBAO");
+
+ HttpSession session = request.getSession();
+ String selectedScreen = request.getServletPath();
+ ShoppingCart cart = (ShoppingCart) session.getAttribute("cart");
+
+ if (cart == null) {
+ cart = new ShoppingCart();
+
+ session.setAttribute("cart", cart);
+ }
+
+ if (selectedScreen.equals("/bookcatalog")) {
+ bookId = request.getParameter("Add");
+
+ if (!bookId.equals("")) {
+ try {
+ book = bookDBAO.getBookDetails(bookId);
+
+ if (book.getOnSale()) {
+ double sale = book.getPrice() * .85;
+ Float salePrice = new Float(sale);
+ book.setPrice(salePrice.floatValue());
+ }
+
+ cart.add(bookId, book);
+ } catch (BookNotFoundException ex) {
+ // not possible
+ }
+ }
+ } else if (selectedScreen.equals("/bookshowcart")) {
+ bookId = request.getParameter("Remove");
+
+ if (bookId != null) {
+ cart.remove(bookId);
+ }
+
+ clear = request.getParameter("Clear");
+
+ if ((clear != null) && clear.equals("clear")) {
+ cart.clear();
+ }
+ } else if (selectedScreen.equals("/bookreceipt")) {
+ // Update the inventory
+ try {
+ bookDBAO.buyBooks(cart);
+ } catch (OrderException ex) {
+ try {
+ request.getRequestDispatcher("/bookordererror.jsp")
+ .forward(request, response);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ try {
+ request.getRequestDispatcher("/template/template.jsp")
+ .forward(request, response);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ public void doPost(HttpServletRequest request, HttpServletResponse response) {
+ request.setAttribute("selectedScreen", request.getServletPath());
+
+ try {
+ request.getRequestDispatcher("/template/template.jsp")
+ .forward(request, response);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/BookNotFoundException.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/BookNotFoundException.java
new file mode 100644
index 0000000..c9fc36b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/BookNotFoundException.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package exception;
+
+
+/** This application exception indicates that a book
+ * has not been found.
+ */
+public class BookNotFoundException extends Exception {
+ public BookNotFoundException() {
+ }
+
+ public BookNotFoundException(String msg) {
+ super(msg);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/BooksNotFoundException.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/BooksNotFoundException.java
new file mode 100644
index 0000000..d931166
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/BooksNotFoundException.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package exception;
+
+
+/** This application exception indicates that books
+ * have not been found.
+ */
+public class BooksNotFoundException extends Exception {
+ public BooksNotFoundException() {
+ }
+
+ public BooksNotFoundException(String msg) {
+ super(msg);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/OrderException.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/OrderException.java
new file mode 100644
index 0000000..3e5bd52
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/exception/OrderException.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package exception;
+
+
+/** This application exception indicates that an order cannot be completed.
+ */
+public class OrderException extends Exception {
+ public OrderException() {
+ }
+
+ public OrderException(String msg) {
+ super(msg);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/listeners/ContextListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/listeners/ContextListener.java
new file mode 100644
index 0000000..33e21be
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/listeners/ContextListener.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package listeners;
+
+import database.BookDBAO;
+import javax.servlet.*;
+
+
+public final class ContextListener implements ServletContextListener {
+ private ServletContext context = null;
+
+ public void contextInitialized(ServletContextEvent event) {
+ context = event.getServletContext();
+
+ try {
+ BookDBAO bookDBAO = new BookDBAO();
+ context.setAttribute("bookDBAO", bookDBAO);
+ } catch (Exception ex) {
+ System.out.println("Couldn't create bookstore database bean: " +
+ ex.getMessage());
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent event) {
+ context = event.getServletContext();
+
+ BookDBAO bookDBAO = (BookDBAO) context.getAttribute("bookDBAO");
+
+ if (bookDBAO != null) {
+ bookDBAO.remove();
+ }
+
+ context.removeAttribute("bookDBAO");
+ }
+}
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
new file mode 100644
index 0000000..3b1817e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package messages;
+
+import java.util.*;
+
+
+public class BookstoreMessages extends ListResourceBundle {
+ static final Object[][] contents =
+ {
+ {
+ "ServerError",
+ "Your request cannot be completed. The server got the following error: "
+ },
+ { "TitleServerError", "Server Error" },
+ { "TitleShoppingCart", "Shopping Cart" },
+ { "TitleReceipt", "Receipt" },
+ { "TitleBookCatalog", "Book Catalog" },
+ { "TitleCashier", "Cashier" },
+ { "TitleBookDescription", "Book Description" },
+ { "Visitor", "You are visitor number " },
+
+ { "What", "What We\'re Reading" },
+ {
+ "Talk",
+ " talks about how web components can transform the way you develop applications for the web. This is a must read for any self respecting web developer!"
+ },
+ { "Start", "Start Shopping" },
+ { "Critics", "Here's what the critics say: " },
+ { "Price", "Our Price: " },
+ { "CartRemoved", "You just removed " },
+ { "CartCleared", "You just cleared your shopping cart!" },
+ { "CartContents", "Your shopping cart contains " },
+ { "CartItem", " item" },
+ { "CartItems", " items" },
+ { "CartAdded1", "You added " },
+ { "CartAdded2", " to your shopping cart." },
+ { "CartCheck", "Check Shopping Cart" },
+ { "CartAdd", "Add to Cart" },
+ { "By", "by" },
+ { "Buy", "Buy Your Books" },
+ { "Choose", "Please choose from our selections:" },
+ { "ItemQuantity", "Quantity" },
+ { "ItemTitle", "Title" },
+ { "ItemPrice", "Price" },
+ { "RemoveItem", "Remove Item" },
+ { "Subtotal", "Subtotal:" },
+ { "ContinueShopping", "Continue Shopping" },
+ { "Checkout", "Check Out" },
+ { "ClearCart", "Clear Cart" },
+ { "CartEmpty", "Your cart is empty." },
+ { "Amount", "Your total purchase amount is:" },
+ {
+ "Purchase",
+ "To purchase the items in your shopping cart, please provide us with the following information:"
+ },
+ { "Name", "Name:" },
+ { "CCNumber", "Credit Card Number:" },
+ { "Submit", "Submit Information" },
+ { "Catalog", "Back to the Catalog" },
+ { "ThankYou", "Thank you for purchasing your books from us " },
+ { "ThankYouParam", "Thank you, {0} for purchasing your books from us " },
+ {
+ "OrderError",
+ "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" },
+ {
+ "CartItemCount",
+ "Your shopping cart contains " +
+ "{0,choice,0#no items|1#one item|1< {0} items}"
+ },
+ { "Newsletters", "FREE Newsletter Subscriptions:" },
+ { "ThanksMsg", "Thank you. Please click Submit to purchase your books." },
+ {
+ "DukeFanClub",
+ "I'd like to join the Duke Fan Club, free with my purchase of over $100"
+ },
+ { "UpdateQuantities", "Update Quantities" },
+ {
+ "QuantitiesUpdated",
+ "You just updated the quantity of each book in your shopping cart"
+ },
+ { "Quantities", "Copies of book in cart" },
+ { "ChooseLocale", "Choose Your Preferred Locale From the Map" },
+ { "English", "English" },
+ { "German", "German" },
+ { "Spanish", "Spanish" },
+ { "French", "French" },
+ { "CustomerInfo", "Enter your information into the form." },
+ { "BookCatalog", "Add books from the catalog to your shopping cart." },
+ { "ShoppingCart", "This page lists the books in your shopping cart." }
+ };
+
+ public Object[][] getContents() {
+ return contents;
+ }
+}
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
new file mode 100644
index 0000000..e8f7f41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_de_DE.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package messages;
+
+import java.util.*;
+
+
+public class BookstoreMessages_de_DE extends ListResourceBundle {
+ static final Object[][] contents =
+ {
+ {
+ "ServerError",
+ "Aufgrund eines Server Fehlers kann ihre Anfrage nicht erfuellt werden. Server Fehler: "
+ },
+ { "TitleServerError", "Server Fehler" },
+ { "TitleShoppingCart", "Einkaufswagen" },
+ { "TitleReceipt", "Quittung" },
+ { "TitleBookCatalog", "Buchkatalog" },
+ { "TitleCashier", "Kasse" },
+ { "TitleBookDescription", "Buchbeschreibung" },
+ { "Visitor", "Sie sind Besucher Nummer " },
+
+ { "What", "Was wir gerade lesen" },
+ {
+ "Talk",
+ " handelt davon, wie Sie mit Hilfe von Webkomponenten ganz neuartige Webapplikationen entwickeln koennen. Ein Muss fuer jeden Webentwickler, der etwas auf sich haelt!"
+ },
+ { "Start", "Einkauf Beginnen" },
+ { "Critics", "Das meinen die Kritiker: " },
+ { "Price", "Unser Preis: " },
+ { "CartRemoved", "Sie haben gerade entfernt " },
+ { "CartCleared", "Sie haben gerade Ihren Einkaufswagen geleert!" },
+ { "CartContents", "Ihr Einkaufswagen enthaelt " },
+ { "CartItem", " Artikel" },
+ { "CartItems", " Artikel" },
+ { "CartAdded1", "Sie haben hinzugefuegt " },
+ { "CartAdded2", " zu Ihrem Einkaufswagen." },
+ { "CartCheck", "Einkaufswagen Pruefen" },
+ { "CartAdd", "Zum Einkaufswagen Zufuegen" },
+ { "By", "von" },
+ { "Buy", "Buecher Kaufen" },
+ { "Choose", "Bitte waehlen Sie aus unserer Auswahl:" },
+ { "ItemQuantity", "Anzahl" },
+ { "ItemTitle", "Titel" },
+ { "ItemPrice", "Preis" },
+ { "RemoveItem", "Artikel Entfernen" },
+ { "Subtotal", "Zwischensumme:" },
+ { "ContinueShopping", "Einkauf Fortsetzen" },
+ { "Checkout", "Bezahlen" },
+ { "ClearCart", "Einkaufswagen Leeren" },
+ { "CartEmpty", "Ihr Einkaufswagen ist leer." },
+ { "Amount", "Gesamtpreis:" },
+ {
+ "Purchase",
+ "Damit Sie die Artikel in Ihrem Einkaufswagen kaufen koennen, geben Sie uns bitte die folgenden Informationen:"
+ },
+ { "Name", "Name:" },
+ { "CCNumber", "Kreditkartennummer:" },
+ { "Submit", "Information Abschicken" },
+ { "Catalog", "Zurueck zum Katalog" },
+ { "ThankYou", "Vielen Dank fuer Ihren Buechereinkauf bei uns " },
+ { "ThankYouParam", "Vielen Dank, {0} fuer Ihren Buechereinkauf bei uns " },
+ {
+ "OrderError",
+ "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",
+ "Sie haben gerade \"{0}\" von Ihrem Einkaufswagen entfernt"
+ },
+ {
+ "CartItemCount",
+ "Ihr Einkaufswagen enthaelt " +
+ "{0,choice,0#Ihr Einkaufswagen enthaelt keine Artikel |1#Ihr Einkaufswagen enthaelt einen Artikel|1< Ihr Einkaufswagen enthaelt {0} Artikel }"
+ },
+ { "Newsletters", "Kostenloses Newsletter-Abo:" },
+ {
+ "ThanksMsg",
+ "Vielen Dank. Bitte klicken Sie auf Submit, um ihre Buecher zu kaufen."
+ },
+ {
+ "DukeFanClub",
+ "Ich moechte dem Duke Fanclub beitreten, kostenlos mit meinem Einkauf ueber 100" +
+ "\u20a0"
+ },
+ { "UpdateQuantities", "Anzahl neu berechnen " },
+ {
+ "QuantitiesUpdated",
+ "Sie haben gerade die Anzahl fuer jedes Buch in Ihrem Einkaufswagen neu berechnet "
+ },
+ { "Quantities", "Buchexemplare in Ihrem Einkaufswagen" },
+ {
+ "ChooseLocale",
+ "W\u00e4hlen Sie Ihren bevorzugten Standort aus der Karte."
+ },
+ { "English", "Englisch" },
+ { "German", "Deutch" },
+ { "Spanish", "Spanisch" },
+ { "French", "Franzoesisch" },
+ { "CustomerInfo", "Tragen Sie Ihre Informationen in die Form ein." },
+ {
+ "BookCatalog",
+ "F" + "\u00fc" + "gen Sie die B" + "\u00fc" +
+ "cher vom Katalog Ihrer Einkaufenkarre hinzu."
+ },
+ {
+ "ShoppingCart",
+ "Diese Seite verzeichnet die B" + "\u00fc" +
+ "cher in Ihrer Einkaufenkarre."
+ }
+ };
+
+ public Object[][] getContents() {
+ return contents;
+ }
+}
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
new file mode 100644
index 0000000..9d965bd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_en_US.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package messages;
+
+import java.util.*;
+
+
+public class BookstoreMessages_en_US extends ListResourceBundle {
+ static final Object[][] contents =
+ {
+ {
+ "ServerError",
+ "Your request cannot be completed. The server got the following error: "
+ },
+ { "TitleServerError", "Server Error" },
+ { "TitleShoppingCart", "Shopping Cart" },
+ { "TitleReceipt", "Receipt" },
+ { "TitleBookCatalog", "Book Catalog" },
+ { "TitleCashier", "Cashier" },
+ { "TitleBookDescription", "Book Description" },
+ { "Visitor", "You are visitor number " },
+
+ { "What", "What We\'re Reading" },
+ {
+ "Talk",
+ " talks about how web components can transform the way you develop applications for the web. This is a must read for any self respecting web developer!"
+ },
+ { "Start", "Start Shopping" },
+ { "Critics", "Here's what the critics say: " },
+ { "Price", "Our Price: " },
+ { "CartRemoved", "You just removed " },
+ { "CartCleared", "You just cleared your shopping cart!" },
+ { "CartContents", "Your shopping cart contains " },
+ { "CartItem", " item" },
+ { "CartItems", " items" },
+ { "CartAdded1", "You added " },
+ { "CartAdded2", " to your shopping cart." },
+ { "CartCheck", "Check Shopping Cart" },
+ { "CartAdd", "Add to Cart" },
+ { "By", "by" },
+ { "Buy", "Buy Your Books" },
+ { "Choose", "Please choose from our selections:" },
+ { "ItemQuantity", "Quantity" },
+ { "ItemTitle", "Title" },
+ { "ItemPrice", "Price" },
+ { "RemoveItem", "Remove Item" },
+ { "Subtotal", "Subtotal:" },
+ { "ContinueShopping", "Continue Shopping" },
+ { "Checkout", "Check Out" },
+ { "ClearCart", "Clear Cart" },
+ { "CartEmpty", "Your cart is empty." },
+ { "Amount", "Your total purchase amount is:" },
+ {
+ "Purchase",
+ "To purchase the items in your shopping cart, please provide us with the following information:"
+ },
+ { "Name", "Name:" },
+ { "CCNumber", "Credit Card Number:" },
+ { "Submit", "Submit Information" },
+ { "Catalog", "Back to the Catalog" },
+ { "ThankYou", "Thank you for purchasing your books from us " },
+ { "ThankYouParam", "Thank you, {0} for purchasing your books from us " },
+ {
+ "OrderError",
+ "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" },
+ {
+ "CartItemCount",
+ "Your shopping cart contains " +
+ "{0,choice,0#no items|1#one item|1< {0} items}"
+ },
+ { "Newsletters", "FREE Newsletter Subscriptions:" },
+ { "ThanksMsg", "Thank you. Please click Submit to purchase your books." },
+ {
+ "DukeFanClub",
+ "I'd like to join the Duke Fan Club, free with my purchase of over $100"
+ },
+ { "UpdateQuantities", "Update Quantities" },
+ {
+ "QuantitiesUpdated",
+ "You just updated the quantity of each book in your shopping cart"
+ },
+ { "Quantities", "Copies of book in cart" },
+ { "ChooseLocale", "Choose Your Preferred Locale From the Map" },
+ { "English", "English" },
+ { "German", "German" },
+ { "Spanish", "Spanish" },
+ { "French", "French" },
+ { "CustomerInfo", "Enter your information into the form." },
+ { "BookCatalog", "Add books from the catalog to your shopping cart." },
+ { "ShoppingCart", "This page lists the books in your shopping cart." }
+ };
+
+ public Object[][] getContents() {
+ return contents;
+ }
+}
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
new file mode 100644
index 0000000..ac4c61d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_es_MX.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package messages;
+
+import java.util.*;
+
+
+public class BookstoreMessages_es_MX extends ListResourceBundle {
+ static final Object[][] contents =
+ {
+ {
+ "ServerError",
+ "Su petici" + "\u00f3" +
+ "n no pudo completarse. El servidor devolvi" + "\u00f3" +
+ " el error siguiente: "
+ },
+ { "TitleServerError", "Error en el Servidor" },
+ { "TitleShoppingCart", "Carro de Compras" },
+ { "TitleReceipt", "Recibo" },
+ { "TitleBookCatalog", "Cat" + "\u00e1" + "logo" },
+ { "TitleCashier", "Cajero" },
+ { "TitleBookDescription", "Descripci" + "\u00f3" + "n del Libro" },
+ { "Visitor", "Es visitante n" + "\u00fa" + "mero " },
+ { "What", "Qu" + "\u00e9" + " libros leemos" },
+ {
+ "Talk",
+ " describe como componentes de software de web pueden transformar la manera en que desrrollamos aplicaciones para el web. Este libro es obligatorio para cualquier programador de respeto!"
+ },
+ { "Start", "Empezar a Comprar" },
+ { "Critics", "Esto es lo que dicen los cr" + "\u00ed" + "ticos: " },
+ { "Price", "Precio: " },
+ { "CartRemoved", "Acaba de quitar " },
+ { "CartCleared", "Acaba de vaciar el carro de compras." },
+ { "CartContents", "Su carro de compras tiene " },
+ { "CartItem", " art" + "\u00ed" + "culo" },
+ { "CartItems", " art" + "\u00ed" + "culos" },
+ { "CartAdded1", "A" + "\u00f1" + "adi" + "\u00f3" + " " },
+ { "CartAdded2", " a su carro de compras." },
+ { "CartCheck", "Comprobar el Carro de Compras" },
+ { "CartAdd", "A" + "\u00f1" + "adir al Carro de Compras" },
+ { "By", "por" },
+ { "Buy", "Comprar Sus Libros" },
+ { "Choose", "Escoja de nuestro cat" + "\u00e1" + "logo:" },
+ { "ItemQuantity", "Cantidad" },
+ { "ItemTitle", "T" + "\u00ed" + "tulo" },
+ { "ItemPrice", "Precio" },
+ { "RemoveItem", "Quitar art" + "\u00ed" + "culo" },
+ { "Subtotal", "Subtotal:" },
+ { "ContinueShopping", "Continuar Comprando" },
+ { "Checkout", "Salir" },
+ { "ClearCart", "Vaciar el Carro de Compras" },
+ { "CartEmpty", "Su carro de compras esta vac" + "\u00ed" + "o." },
+ { "Amount", "Su importe total es:" },
+ {
+ "Purchase",
+ "Para poder comprar los art" + "\u00ed" +
+ "culos en su carro de compras, facilite la informaci" + "\u00f3" +
+ "n siguiente:"
+ },
+ { "Name", "Nombre:" },
+ {
+ "CCNumber",
+ "N" + "\u00fa" + "mero de Tarjeta de Cr" + "\u00e9" + "dito:"
+ },
+ { "Submit", "Entregar la Informaci" + "\u00f3" + "n" },
+ { "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:" },
+ { "QuickShip", "Env" + "\u00ed" + "o Aprisa" },
+ { "NormalShip", "Env" + "\u00ed" + "o Normal" },
+ { "SaverShip", "Env" + "\u00ed" + "o Descuento" },
+ { "ShipDate", "Su compra ser" + "\u00e1" + " enviada " },
+ { "ShipDateLC", "su order ser" + "\u00e1" + " enviada " },
+ {
+ "ConfirmAdd",
+ "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." },
+ {
+ "BookCatalog",
+ "Agregue los libros del cat" + "\u00c2" +
+ "logo a su carro de compras."
+ },
+ {
+ "ShoppingCart",
+ "Esta p" + "\u00c2" +
+ "gina enumera los libros en su carro de compras."
+ }
+ };
+
+ public Object[][] getContents() {
+ return contents;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_fr_FR.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_fr_FR.java
new file mode 100644
index 0000000..01a7c3c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_fr_FR.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package messages;
+
+import java.util.*;
+
+
+public class BookstoreMessages_fr_FR extends ListResourceBundle {
+ static final Object[][] contents =
+ {
+ {
+ "ServerError",
+ "Votre commande ne peut pas se completer. Le serveur a retourne l'erreur suivante: "
+ },
+ { "TitleServerError", "Erreur de serveur" },
+ { "TitleShoppingCart", "Panier" },
+ { "TitleReceipt", "Re" + "\u00e7" + "u" },
+ { "TitleBookCatalog", "Catalogue" },
+ { "TitleCashier", "Cassier" },
+ { "TitleBookDescription", "Description du livre" },
+ { "Visitor", "Vous " + "\u00ea" + "tes visiteur numero " },
+ { "What", "Ce que nous lisons" },
+ {
+ "Talk",
+ " parle de comment les elements du web peuvent transformer la mani" +
+ "\u00e8" + "re dont vous d" + "\u00e9" +
+ "veloppez des applications d'internet. Ce livre est obligatoire pour tout d" +
+ "\u00e9" + "veloppeur de web!"
+ },
+ { "Start", "Panier" },
+ { "Critics", "Commentaires: " },
+ { "Price", "Prix: " },
+ { "CartRemoved", "Vous venez d'enlever " },
+ { "CartCleared", "Vous avez vide votre panier" },
+ { "CartContents", "Votre panier contient " },
+ { "CartItem", " article" },
+ { "CartItem", " articles" },
+ { "CartAdded1", "Vous avez ajoute " },
+ { "CartAdded2", "a votre panier." },
+ { "CartCheck", "Verifier votre panier" },
+ { "CartAdd", "Ajouter au panier" },
+ { "By", "par" },
+ { "Buy", "Achetez vos livres" },
+ { "Choose", "Choisissez:" },
+ { "ItemQuantity", "Quantite" },
+ { "ItemTitle", "Titre" },
+ { "ItemPrice", "Prix" },
+ { "RemoveItem", "Supprimer" },
+ { "Subtotal", "Total partiel:" },
+ { "ContinueShopping", "Continuer" },
+ { "Checkout", "Caisse et Sortie" },
+ { "ClearCart", "Vider le panier" },
+ { "CartEmpty", "Votre panier est vide." },
+ { "Amount", "Le montant de votre achat is:" },
+ {
+ "Purchase",
+ "Pour acheter les articles dans votre panier, veuillez nous donner l'information suivante:"
+ },
+ { "Name", "Nom:" },
+ { "CCNumber", "Numero de votre Carte de Credit:" },
+ { "Submit", "Soumettre l'information" },
+ { "Catalog", "Retourner au catalogue" },
+ { "ThankYou", "Merci de votre achat " },
+ { "ThankYouParam", "Merci, {0} pour acheter les livres ici " },
+ {
+ "OrderError",
+ "Votre commande ne peut pas se faire a cause de manque d'inventaire"
+ },
+ { "With", "Avec" },
+ { "Shipping", "Envoi:" },
+ { "QuickShip", "Envoi Express" },
+ { "NormalShip", "Envoi Normal" },
+ { "SaverShip", "Envoi Economique" },
+ { "ShipDate", "Votre commande sera envoyee le " },
+ { "ShipDateLC", "Votre commande sera envoyee le " },
+ { "ConfirmAdd", "Vous avez ajoute \"{0}\" a votre panier" },
+ {
+ "ConfirmRemove",
+ "Vous avez supprim" + "\00e9" + " \"{0}\" de votre panier"
+ },
+ {
+ "CartItemCount",
+ "Votre panier contient " +
+ "{0,choice,0#aucun article|1#un article|1< {0} articles}"
+ },
+ { "Newsletters", "Abonnement gratuit a notre bulletin :" },
+ { "ThanksMsg", "Merci. Cliquez Soumettre pour acheter les livres." },
+ {
+ "DukeFanClub",
+ "Je veux joindre le Duke Fan Club gratuitement avec mon achat de plus de 100" +
+ "\u20a0"
+ },
+ { "UpdateQuantities", "Mettre a jour" },
+ {
+ "QuantitiesUpdated",
+ "Vous venez de mettre a jour le nombre de livres dans votre panier "
+ },
+ { "Quantities", "Copies de livres dans le panier" },
+ { "ChooseLocale", "Choisissez Votre Language dans la Carte" },
+ { "English", "anglais" },
+ { "German", "allemand" },
+ { "Spanish", "espagnol" },
+ { "French", "fran" + "\u00e7" + "ais" },
+ { "CustomerInfo", "\u0039" + "crivez votre information dans la forme." },
+ {
+ "BookCatalog",
+ "Ajoutez les livres du catalogue" + "\u00c1" + "votre caddie."
+ },
+ {
+ "ShoppingCart",
+ "Cette page " + "\u00e9" + "num" + "\u00e8" +
+ "re les livres dans votre caddie."
+ }
+ };
+
+ public Object[][] getContents() {
+ return contents;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Debug.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Debug.java
new file mode 100644
index 0000000..cdc3275
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Debug.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+public final class Debug {
+ public static final boolean debuggingOn = true;
+
+ public static void print(String msg) {
+ if (debuggingOn) {
+ System.err.print(msg);
+ }
+ }
+
+ public static void println(String msg) {
+ if (debuggingOn) {
+ System.err.println(msg);
+ }
+ }
+
+ public static void print(Exception e, String msg) {
+ print((Throwable) e, msg);
+ }
+
+ public static void print(Exception e) {
+ print(e, null);
+ }
+
+ public static void print(Throwable t, String msg) {
+ if (debuggingOn) {
+ System.err.println("Received throwable with Message: " +
+ t.getMessage());
+
+ if (msg != null) {
+ System.err.print(msg);
+ }
+
+ t.printStackTrace();
+ }
+ }
+
+ public static void print(Throwable t) {
+ print(t, null);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Definition.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Definition.java
new file mode 100644
index 0000000..7365d05
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Definition.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+import java.util.HashMap;
+
+
+public class Definition {
+ private HashMap params = new HashMap();
+
+ public void setParam(Parameter p) {
+ params.put(p.getName(), p);
+ }
+
+ public Parameter getParam(String name) {
+ return (Parameter) params.get(name);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/DefinitionTag.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/DefinitionTag.java
new file mode 100644
index 0000000..055a185
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/DefinitionTag.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+import java.util.*;
+
+
+public class DefinitionTag extends SimpleTagSupport {
+ private String definitionName = null;
+ private String screenId;
+ private HashMap screens = null;
+
+ public DefinitionTag() {
+ super();
+ }
+
+ public HashMap getScreens() {
+ return screens;
+ }
+
+ public void setName(String name) {
+ this.definitionName = name;
+ }
+
+ public void setScreen(String screenId) {
+ this.screenId = screenId;
+ }
+
+ public void doTag() {
+ try {
+ screens = new HashMap();
+
+ getJspBody()
+ .invoke(null);
+
+ Definition definition = new Definition();
+ PageContext context = (PageContext) getJspContext();
+ ArrayList params = (ArrayList) screens.get(screenId);
+ Iterator ir = null;
+
+ if (params != null) {
+ ir = params.iterator();
+
+ while (ir.hasNext())
+ definition.setParam((Parameter) ir.next());
+
+ // put the definition in the page context
+ context.setAttribute(definitionName, definition,
+ context.APPLICATION_SCOPE);
+ } else {
+ Debug.println("DefinitionTag: params are not defined.");
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+}
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
new file mode 100644
index 0000000..de8441f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/InsertTag.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+import javax.servlet.ServletException;
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+import java.util.HashMap;
+
+
+public class InsertTag extends SimpleTagSupport {
+ private String parameterName = null;
+ private String definitionName = null;
+
+ public InsertTag() {
+ super();
+ }
+
+ public void setParameter(String parameter) {
+ this.parameterName = parameter;
+ }
+
+ public void setDefinition(String name) {
+ this.definitionName = name;
+ }
+
+ public void doTag() throws JspTagException {
+ Definition definition = null;
+ Parameter parameter = null;
+ boolean directInclude = false;
+ PageContext context = (PageContext) getJspContext();
+
+ // get the definition from the page context
+ definition =
+ (Definition) context.getAttribute(definitionName,
+ context.APPLICATION_SCOPE);
+
+ // get the parameter
+ if ((parameterName != null) && (definition != null)) {
+ parameter = (Parameter) definition.getParam(parameterName);
+ }
+
+ if (parameter != null) {
+ directInclude = parameter.isDirect();
+ }
+
+ try {
+ // if parameter is direct, print to out
+ if (directInclude && (parameter != null)) {
+ context.getOut()
+ .print(parameter.getValue());
+ }
+ // if parameter is indirect, include results of dispatching to page
+ else {
+ if ((parameter != null) && (parameter.getValue() != null)) {
+ context.include(parameter.getValue());
+ }
+ }
+ } catch (Exception ex) {
+ Throwable rootCause = null;
+
+ if (ex instanceof ServletException) {
+ rootCause = ((ServletException) ex).getRootCause();
+ }
+
+ throw new JspTagException(ex.getMessage(), rootCause);
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Parameter.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Parameter.java
new file mode 100644
index 0000000..b89a3c4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/Parameter.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+public class Parameter {
+ private String name;
+ private boolean isDirect;
+ private String value;
+
+ public Parameter(String name, String value, boolean isDirect) {
+ this.name = name;
+ this.isDirect = isDirect;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean isDirect() {
+ return isDirect;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/ParameterTag.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/ParameterTag.java
new file mode 100644
index 0000000..eb9d472
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/ParameterTag.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+import javax.servlet.jsp.tagext.*;
+import javax.servlet.jsp.PageContext;
+import java.util.*;
+
+
+public class ParameterTag extends SimpleTagSupport {
+ private String paramName = null;
+ private String paramValue = null;
+ private String isDirectString = null;
+
+ public ParameterTag() {
+ super();
+ }
+
+ public void setName(String paramName) {
+ this.paramName = paramName;
+ }
+
+ public void setValue(String paramValue) {
+ this.paramValue = paramValue;
+ }
+
+ public void setDirect(String isDirectString) {
+ this.isDirectString = isDirectString;
+ }
+
+ public void doTag() {
+ boolean isDirect = false;
+
+ if ((isDirectString != null) &&
+ isDirectString.toLowerCase()
+ .equals("true")) {
+ isDirect = true;
+ }
+
+ try {
+ // retrieve the parameters list
+ if (paramName != null) {
+ ArrayList parameters =
+ ((ScreenTag) getParent()).getParameters();
+
+ if (parameters != null) {
+ Parameter param =
+ new Parameter(paramName, paramValue, isDirect);
+ parameters.add(param);
+ } else {
+ Debug.println("ParameterTag: parameters do not exist.");
+ }
+ }
+ } catch (Exception e) {
+ Debug.println("ParameterTag: error in doTag: " + e);
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/ScreenTag.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/ScreenTag.java
new file mode 100644
index 0000000..68bb848
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/ScreenTag.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package template;
+
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+import javax.servlet.jsp.PageContext;
+import java.util.*;
+
+
+public class ScreenTag extends SimpleTagSupport {
+ private String screenId;
+ private ArrayList parameters = null;
+
+ public ScreenTag() {
+ super();
+ }
+
+ public ArrayList getParameters() {
+ return parameters;
+ }
+
+ public void setScreenId(String screenId) {
+ this.screenId = screenId;
+ }
+
+ public void doTag() {
+ parameters = new ArrayList();
+
+ HashMap screens = (HashMap) ((DefinitionTag) getParent()).getScreens();
+
+ if (screens != null) {
+ try {
+ if (!screens.containsKey(screenId)) {
+ screens.put(screenId, parameters);
+ }
+
+ getJspBody()
+ .invoke(null);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ } else {
+ Debug.println("ScreenTag: Unable to get screens object.");
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/README.txt b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/README.txt
new file mode 100644
index 0000000..1e49503
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/README.txt
@@ -0,0 +1,13 @@
+Tests JAXP parser overrideablity on a per-application basis
+
+- Initial setup
+ - Copy xercesImpl.jar to domains/domain1/lib/applibs/
+
+- To run individual tests
+ - Follow steps outlined in "Initial Setup"
+ $ cd $APS_HOME
+ $ $S1AS_HOME/bin/asadmin start-domain domain1
+ $ ant startDerby
+
+ $ cd <indiv-test-dir>
+ $ ant all
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
new file mode 100644
index 0000000..ae72ce1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="ejb" default="usage" basedir=".">
+
+ <property name="stateless-target" value="all"/>
+
+ <target name="run-test">
+ <antcall target="converter">
+ <param name="stateless-target" value="run-test"/>
+ </antcall>
+ </target>
+
+ <target name="all">
+ <antcall target="converter">
+ <param name="stateless-target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="converter">
+ <param name="stateless-target" value="clean"/>
+ </antcall>
+ </target>
+
+ <target name="build">
+ <antcall target="converter">
+ <param name="stateless-target" value="build"/>
+ </antcall>
+ </target>
+
+ <target name="setup">
+ <antcall target="converter">
+ <param name="stateless-target" value="setup"/>
+ </antcall>
+ </target>
+
+ <target name="deploy">
+ <antcall target="converter">
+ <param name="stateless-target" value="deploy"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy">
+ <antcall target="converter">
+ <param name="stateless-target" value="undeploy"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup">
+ <antcall target="converter">
+ <param name="stateless-target" value="unsetup"/>
+ </antcall>
+ </target>
+
+ <target name="run">
+ <antcall target="converter">
+ <param name="stateless-target" value="run"/>
+ </antcall>
+ </target>
+
+ <target name="converter">
+ <record name="converter.output" action="start" />
+ <ant dir="converter" target="${stateless-target}"/>
+ <record name="converter.output" action="stop" />
+ </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>
+ </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
new file mode 100644
index 0000000..eaa4b7c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.properties
@@ -0,0 +1,52 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-stateless"/>
+<property name="appname" value="${module}-converter"/>
+
+<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="test.client"
+ 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="app.type" value="application"/>
+
+<!-- ============================================================ -->
+<!-- Standalone Client specific properties which run without ACC -->
+<!-- ============================================================ -->
+<!--
+<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"/>
+-->
+
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
new file mode 100644
index 0000000..8f7641b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="converterApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+
+ <target name="all" depends="clean,build,setup,deploy,run,undeploy,unsetup"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" if="ee">
+ <echo message="Copy xercesImpl.jar to domains/domain1/lib/applibs"/>
+ <antcall target="deploy-jdbc-common">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ <param name="jdbc.conpool.name" value="sqe-timer-pool"/>
+ </antcall>
+ <antcall target="setupTimer">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup" if="ee">
+ <antcall target="unsetupTimer">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ </antcall>
+ <antcall target="undeploy-jdbc-common">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <!-- <antcall target="deploy-common"/> -->
+ <property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
+ <echo message="asadmin deploy --user ${admin.user} --password ${admin.password} --host ${admin.host} --port ${admin.port} --target ${appserver.instance.name} --retrieve ${assemble.dir} --libraries xercesImpl.jar ${deployed.app}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--libraries xercesImpl.jar"/>
+<!-- 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} successful"/>
+
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common"/>
+ <antcall target="run-standalone-client"/>
+ </target>
+
+ <!-- =============================================== -->
+ <!-- Target to run the standalone client without ACC -->
+ <!-- =============================================== -->
+ <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"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..75db78e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/ConverterClient.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.client;
+
+import java.util.Properties;
+import java.math.BigDecimal;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import com.sun.s1peqe.ejb.stateless.converter.ejb.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class ConverterClient {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ ConverterClient() {
+ }
+
+ public static void main(String[] args) {
+ ConverterClient client = new ConverterClient();
+ client.run(args);
+ }
+
+ private void run(String[] args) {
+ String url = null;
+ String testId = null;
+ String jndiName = null;
+ Context context = null;
+ String ctxFactory = 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];
+ }
+
+ if ( (url == null) || (ctxFactory == null) ) {
+ 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";
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", url);
+ env.put("java.naming.factory.initial", ctxFactory);
+ // Initialize the Context with JNDI specific properties
+ context = new InitialContext(env);
+ System.out.println("Context Initialized with " +
+ "URL: " + url + ", Factory: " + ctxFactory);
+ // Create Home object
+ obj = context.lookup(jndiName);
+ }
+
+ ConverterRemoteHome home =
+ (ConverterRemoteHome) PortableRemoteObject.narrow(obj,
+ ConverterRemoteHome.class);
+
+ 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();
+
+ System.out.println("Parser Factory classname in EJB is " + parserFactoryClassName);
+ System.out.println("Expected parser is " + expectedParser);
+ if (expectedParser.equals(parserFactoryClassName)) {
+ stat.addStatus(testId, stat.PASS);
+ } else {
+ stat.addStatus(testId, stat.FAIL);
+ }
+ } catch (Exception ex) {
+ stat.addStatus(testId, stat.FAIL);
+ System.err.println("Caught an unexpected exception!");
+ ex.printStackTrace();
+ } finally {
+ stat.printSummary(testId);
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/MANIFEST.MF
new file mode 100644
index 0000000..2c7c0d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application-client.xml
new file mode 100644
index 0000000..8582ba9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-stateless-converterClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleConverter</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemoteHome</home>
+ <remote>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemote</remote>
+ </ejb-ref>
+</application-client>
+
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
new file mode 100644
index 0000000..dc859fe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>ConverterApp</display-name>
+ <module>
+ <java>ejb-stateless-converter-client.jar</java>
+ </module>
+ <module>
+ <ejb>ejb-stateless-converter-ejb.jar</ejb>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..c9da4c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <display-name>ConverterApp</display-name>
+ <ejb-name>TheConverter</ejb-name>
+ <home>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemoteHome</home>
+ <remote>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemote</remote>
+ <ejb-class>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Bean</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..b5b84d0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/sun-application-client.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleConverter</ejb-ref-name>
+ <jndi-name>converter</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..8ed0a3b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>TheConverter</ejb-name>
+ <jndi-name>converter</jndi-name>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..33a526d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterBean.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.ejb;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.TimedObject;
+import javax.ejb.TimerService;
+import javax.ejb.Timer;
+import javax.ejb.TimerHandle;
+import javax.ejb.EJBException;
+import javax.xml.parsers.*;
+
+/**
+ * A simple stateless bean for the Converter application. This bean implements all
+ * business method as declared by the remote interface, <code>Converter</code>.
+ *
+ * @see Converter
+ * @see ConverterHome
+ */
+public class ConverterBean implements SessionBean, TimedObject {
+
+ SessionContext sessionContext_;
+
+ public String getParserFactoryClassName() {
+ String parserFactoryClassName = (SAXParserFactory.newInstance()).getClass().getName();
+ System.out.println("ParserFactoryClassName" + parserFactoryClassName);
+ return parserFactoryClassName;
+ }
+
+
+ /**
+ * Required by EJB spec.
+ */
+ public ConverterBean() {
+ }
+
+ /**
+ * Creates a bean. Required by EJB spec.
+ * @exception throws CreateException.
+ */
+ public void ejbCreate() {}
+
+ /**
+ * Removes the bean. Required by EJB spec.
+ */
+ public void ejbRemove() {}
+
+ /**
+ * 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.
+ */
+ public void ejbPassivate() {}
+
+ /**
+ * Sets the session context. Required by EJB spec.
+ * @param ctx A SessionContext object.
+ */
+ public void setSessionContext(SessionContext sc) {
+ sessionContext_ = sc;
+ }
+
+ public void ejbTimeout(Timer t) {}
+
+} // ConverterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterRemote.java
new file mode 100644
index 0000000..862f3aa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterRemote.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.ejb;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+import java.math.*;
+
+public interface ConverterRemote extends EJBObject {
+ public String getParserFactoryClassName() throws RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterRemoteHome.java
new file mode 100644
index 0000000..591f1d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterRemoteHome.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.ejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+public interface ConverterRemoteHome extends EJBHome {
+ ConverterRemote create() throws RemoteException, CreateException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/README b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/README
new file mode 100644
index 0000000..97f0c7c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/README
@@ -0,0 +1 @@
+unit tests on CMP
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
new file mode 100644
index 0000000..20e4a83
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="Blob"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..7695261
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="blob" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="test1-all"/>
+
+ <target name="test1-all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources,clean"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/*Blob*.class" />
+ <param name="appclientjar.classes"
+ value="**/BlobTestHome.class,**/BlobTest.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/blob_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..b035a51
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/Client.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @version
+ */
+public class Client {
+ private static test.BlobTestHome bhome = null;
+
+ private static SimpleReporterAdapter stat =
+ 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");
+ bhome =
+ (test.BlobTestHome) PortableRemoteObject.narrow(
+ objref, test.BlobTestHome.class);
+
+ System.out.println("START");
+ stat.addDescription("Blob");
+
+ test(100, "FOO", new byte[]{'A', 'B', 'C'});
+ test(200, "BAR", new byte[]{'M', 'N', 'O'});
+ test(300, null, new byte[]{'X', 'Y', 'Z'});
+
+ if (!isJava2DBTest) {
+ System.out.println("Testing old...");
+ test.BlobTest bean = bhome.findByPrimaryKey(new Integer(1));
+ System.out.println(new String(bean.getBlb()));
+ System.out.println(new String(bean.getByteblb()));
+ System.out.println(new String(bean.getByteblb2()));
+ } else {
+ try {
+ test(40, "BAZ", null);
+ 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);
+ System.out.println("FINISH");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient Blob", stat.FAIL);
+ }
+ 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());
+
+ System.out.println("Testing new...");
+ bean = bhome.findByPrimaryKey(pk);
+
+ byte[] blb = bean.getBlb();
+ String blbString = blb == null ? "null" : new String(blb);
+
+ byte[] byteBlb = bean.getByteblb();
+ String byteBlbString = byteBlb == null ? "null" : new String(byteBlb);
+
+ byte[] byteBlb2 = bean.getByteblb2();
+ String byteBlb2String = byteBlb2 == null ? "null" : new String(byteBlb2);
+
+ System.out.println("blb=" + blbString);
+ System.out.println("byteblb=" + byteBlbString);
+ System.out.println("byteblb2=" + byteBlb2String);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/MANIFEST.MF
new file mode 100644
index 0000000..222815c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.5.2
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/application-client.xml
new file mode 100644
index 0000000..2b219eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>BlobClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteBlobTest</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.BlobTest</home>
+ <remote>test.BlobTest</remote>
+ <ejb-link>BlobTest</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/application.xml
new file mode 100644
index 0000000..3172492
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>Blob</display-name>
+ <description>J2EE Application Blob</description>
+ <module>
+ <ejb>Blob-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>Blob-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..82c1d3b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/ejb-jar.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>BlobTest</display-name>
+ <ejb-name>BlobTest</ejb-name>
+ <home>test.BlobTestHome</home>
+ <remote>test.BlobTest</remote>
+ <ejb-class>test.BlobTestBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>BlobTest</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>blb</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>byteblb</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>byteblb2</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>BlobTest</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value overrides above.</description>
+ <method>
+ <ejb-name>BlobTest</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>RequiresNew</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..ca05c8a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteBlobTest</ejb-ref-name>
+ <jndi-name>SimpleBlobTest</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..ff48bb3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema/>
+ <entity-mapping>
+ <ejb-name>BlobTest</ejb-name>
+ <table-name>MYBLOB</table-name>
+
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>MYBLOB.ID</column-name>
+ </cmp-field-mapping>
+
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>MYBLOB.NAME</column-name>
+ </cmp-field-mapping>
+
+ <cmp-field-mapping>
+ <field-name>blb</field-name>
+ <column-name>MYBLOB.BLB</column-name>
+ </cmp-field-mapping>
+
+ <cmp-field-mapping>
+ <field-name>byteblb</field-name>
+ <column-name>MYBLOB.BYTEBLB</column-name>
+ </cmp-field-mapping>
+
+ <cmp-field-mapping>
+ <field-name>byteblb2</field-name>
+ <column-name>MYBLOB.BYTEBLB2</column-name>
+ </cmp-field-mapping>
+
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..0eb74ef
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>456565</unique-id>
+ <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>
+ </ejb>
+
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTest.java
new file mode 100755
index 0000000..3bd36af
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTest.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface BlobTest extends javax.ejb.EJBObject {
+ public byte[] getBlb() throws java.rmi.RemoteException;
+
+ public byte[] getByteblb() throws java.rmi.RemoteException;
+
+ public byte[] getByteblb2() throws java.rmi.RemoteException;
+}
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
new file mode 100755
index 0000000..8eb5af9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestBean.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * @author mvatkina
+ */
+
+
+public abstract class BlobTestBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: BlobTest ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract Integer getId();
+ public abstract void setId(Integer id);
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ // When tested with Java2DB, this gets a user overrides of type, nullable,
+ // and maximum-length.
+ public abstract byte[] getBlb();
+ public abstract void setBlb(byte[] b);
+
+ // When tested with Java2DB, this does not get any user override.
+ public abstract byte[] getByteblb();
+ public abstract void setByteblb(byte[] b);
+
+ // When tested with Java2DB, this gets a user override of non-nullable only.
+ public abstract byte[] getByteblb2();
+ public abstract void setByteblb2(byte[] b);
+
+ public java.lang.Integer ejbCreate(Integer id, java.lang.String name, byte[] b) throws javax.ejb.CreateException {
+
+ setId(id);
+ setName(name);
+ setBlb(b);
+ setByteblb(null);
+ setByteblb2(b);
+
+ return null;
+ }
+
+ public void ejbPostCreate(Integer id, java.lang.String name, byte[] b) throws javax.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
new file mode 100755
index 0000000..5c79db8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface BlobTestHome extends javax.ejb.EJBHome {
+
+ public BlobTest create(Integer i, java.lang.String name, byte[] b) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public BlobTest findByPrimaryKey (Integer key) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..d9e5942
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_db2.sql
@@ -0,0 +1,19 @@
+drop table myblob;
+
+create table myblob (
+ 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));
+
+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
new file mode 100755
index 0000000..1901a41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_derby.sql
@@ -0,0 +1,17 @@
+drop table MYBLOB;
+
+create table MYBLOB (
+ 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));
+
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
new file mode 100755
index 0000000..2ce6023
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ifx.sql
@@ -0,0 +1,19 @@
+drop table myblob;
+
+create table myblob (
+ 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));
+
+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
new file mode 100755
index 0000000..f9f70c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mssql.sql
@@ -0,0 +1,20 @@
+drop table MYBLOB
+go
+
+create table MYBLOB (
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ BLB IMAGE,
+ BYTEBLB IMAGE,
+ BYTEBLB2 IMAGE
+)
+go
+
+insert into MYBLOB values (
+ 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
new file mode 100755
index 0000000..4e31799
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mysql.sql
@@ -0,0 +1,19 @@
+drop table MYBLOB;
+
+create table MYBLOB (
+ 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');
+
+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
new file mode 100755
index 0000000..2128c04
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ora.sql
@@ -0,0 +1,19 @@
+drop table MYBLOB;
+
+create table MYBLOB (
+ 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');
+
+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
new file mode 100755
index 0000000..990766f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_pbs.sql
@@ -0,0 +1,19 @@
+drop table myblob;
+
+create table myblob (
+ 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));
+
+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
new file mode 100755
index 0000000..5666aad
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_psql.sql
@@ -0,0 +1,19 @@
+drop table MYBLOB cascade;
+
+create table MYBLOB (
+ ID int primary key,
+ NAME VARCHAR(100),
+ BLB BYTEA,
+ BYTEBLB BYTEA,
+ BYTEBLB2 BYTEA
+) ;
+
+commit;
+insert into MYBLOB values (
+ 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
new file mode 100755
index 0000000..86b7f39
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_syb.sql
@@ -0,0 +1,21 @@
+drop table MYBLOB
+go
+
+create table MYBLOB (
+ 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')
+
+go
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/drop_blob_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/drop_blob_derby.sql
new file mode 100755
index 0000000..d37735c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/drop_blob_derby.sql
@@ -0,0 +1,2 @@
+drop table MYBLOB;
+
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
new file mode 100644
index 0000000..8641afd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.properties
@@ -0,0 +1,34 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="BlobJ2DB"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..0a6e173
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="blobJ2DB" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="test1-all"/>
+
+ <target name="test1-all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources,clean"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/*Blob*.class" />
+ <param name="appclientjar.classes"
+ value="**/BlobTestHome.class,**/BlobTest.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-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"
+ value="--uniquetablenames=true --dropandcreatetables=true"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args"
+ value="Java2DBTest"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..b035a51
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/Client.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @version
+ */
+public class Client {
+ private static test.BlobTestHome bhome = null;
+
+ private static SimpleReporterAdapter stat =
+ 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");
+ bhome =
+ (test.BlobTestHome) PortableRemoteObject.narrow(
+ objref, test.BlobTestHome.class);
+
+ System.out.println("START");
+ stat.addDescription("Blob");
+
+ test(100, "FOO", new byte[]{'A', 'B', 'C'});
+ test(200, "BAR", new byte[]{'M', 'N', 'O'});
+ test(300, null, new byte[]{'X', 'Y', 'Z'});
+
+ if (!isJava2DBTest) {
+ System.out.println("Testing old...");
+ test.BlobTest bean = bhome.findByPrimaryKey(new Integer(1));
+ System.out.println(new String(bean.getBlb()));
+ System.out.println(new String(bean.getByteblb()));
+ System.out.println(new String(bean.getByteblb2()));
+ } else {
+ try {
+ test(40, "BAZ", null);
+ 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);
+ System.out.println("FINISH");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient Blob", stat.FAIL);
+ }
+ 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());
+
+ System.out.println("Testing new...");
+ bean = bhome.findByPrimaryKey(pk);
+
+ byte[] blb = bean.getBlb();
+ String blbString = blb == null ? "null" : new String(blb);
+
+ byte[] byteBlb = bean.getByteblb();
+ String byteBlbString = byteBlb == null ? "null" : new String(byteBlb);
+
+ byte[] byteBlb2 = bean.getByteblb2();
+ String byteBlb2String = byteBlb2 == null ? "null" : new String(byteBlb2);
+
+ System.out.println("blb=" + blbString);
+ System.out.println("byteblb=" + byteBlbString);
+ System.out.println("byteblb2=" + byteBlb2String);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/MANIFEST.MF
new file mode 100644
index 0000000..222815c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.5.2
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/application-client.xml
new file mode 100644
index 0000000..2b219eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>BlobClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteBlobTest</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.BlobTest</home>
+ <remote>test.BlobTest</remote>
+ <ejb-link>BlobTest</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/application.xml
new file mode 100644
index 0000000..9761527
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>Blob</display-name>
+ <description>J2EE Application Blob</description>
+ <module>
+ <ejb>BlobJ2DB-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>BlobJ2DB-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..82c1d3b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/ejb-jar.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>BlobTest</display-name>
+ <ejb-name>BlobTest</ejb-name>
+ <home>test.BlobTestHome</home>
+ <remote>test.BlobTest</remote>
+ <ejb-class>test.BlobTestBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>BlobTest</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>blb</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>byteblb</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>byteblb2</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>BlobTest</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value overrides above.</description>
+ <method>
+ <ejb-name>BlobTest</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>RequiresNew</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..ca05c8a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteBlobTest</ejb-ref-name>
+ <jndi-name>SimpleBlobTest</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
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
new file mode 100644
index 0000000..5d047a8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>456565</unique-id>
+ <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>
+ </ejb>
+
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <create-tables-at-deploy>true</create-tables-at-deploy>
+ <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
+ <schema-generator-properties>
+ <property>
+ <name>BlobTest.blb.jdbc-type</name>
+ <value>BLOB</value>
+ </property>
+ <property>
+ <name>BlobTest.blb.jdbc-nullable</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>BlobTest.blb.jdbc-maximum-length</name>
+ <value>10240</value>
+ </property>
+ <property>
+ <name>BlobTest.byteblb2.jdbc-nullable</name>
+ <value>false</value>
+ </property>
+ </schema-generator-properties>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTest.java
new file mode 100755
index 0000000..3bd36af
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTest.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface BlobTest extends javax.ejb.EJBObject {
+ public byte[] getBlb() throws java.rmi.RemoteException;
+
+ public byte[] getByteblb() throws java.rmi.RemoteException;
+
+ public byte[] getByteblb2() throws java.rmi.RemoteException;
+}
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
new file mode 100755
index 0000000..8eb5af9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestBean.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * @author mvatkina
+ */
+
+
+public abstract class BlobTestBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: BlobTest ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract Integer getId();
+ public abstract void setId(Integer id);
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ // When tested with Java2DB, this gets a user overrides of type, nullable,
+ // and maximum-length.
+ public abstract byte[] getBlb();
+ public abstract void setBlb(byte[] b);
+
+ // When tested with Java2DB, this does not get any user override.
+ public abstract byte[] getByteblb();
+ public abstract void setByteblb(byte[] b);
+
+ // When tested with Java2DB, this gets a user override of non-nullable only.
+ public abstract byte[] getByteblb2();
+ public abstract void setByteblb2(byte[] b);
+
+ public java.lang.Integer ejbCreate(Integer id, java.lang.String name, byte[] b) throws javax.ejb.CreateException {
+
+ setId(id);
+ setName(name);
+ setBlb(b);
+ setByteblb(null);
+ setByteblb2(b);
+
+ return null;
+ }
+
+ public void ejbPostCreate(Integer id, java.lang.String name, byte[] b) throws javax.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
new file mode 100755
index 0000000..5c79db8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface BlobTestHome extends javax.ejb.EJBHome {
+
+ public BlobTest create(Integer i, java.lang.String name, byte[] b) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public BlobTest findByPrimaryKey (Integer key) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..d9e5942
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_db2.sql
@@ -0,0 +1,19 @@
+drop table myblob;
+
+create table myblob (
+ 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));
+
+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
new file mode 100755
index 0000000..1901a41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_derby.sql
@@ -0,0 +1,17 @@
+drop table MYBLOB;
+
+create table MYBLOB (
+ 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));
+
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
new file mode 100755
index 0000000..2ce6023
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ifx.sql
@@ -0,0 +1,19 @@
+drop table myblob;
+
+create table myblob (
+ 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));
+
+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
new file mode 100755
index 0000000..f9f70c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mssql.sql
@@ -0,0 +1,20 @@
+drop table MYBLOB
+go
+
+create table MYBLOB (
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ BLB IMAGE,
+ BYTEBLB IMAGE,
+ BYTEBLB2 IMAGE
+)
+go
+
+insert into MYBLOB values (
+ 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
new file mode 100755
index 0000000..4e31799
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mysql.sql
@@ -0,0 +1,19 @@
+drop table MYBLOB;
+
+create table MYBLOB (
+ 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');
+
+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
new file mode 100755
index 0000000..2128c04
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ora.sql
@@ -0,0 +1,19 @@
+drop table MYBLOB;
+
+create table MYBLOB (
+ 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');
+
+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
new file mode 100755
index 0000000..990766f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_pbs.sql
@@ -0,0 +1,19 @@
+drop table myblob;
+
+create table myblob (
+ 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));
+
+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
new file mode 100755
index 0000000..5666aad
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_psql.sql
@@ -0,0 +1,19 @@
+drop table MYBLOB cascade;
+
+create table MYBLOB (
+ ID int primary key,
+ NAME VARCHAR(100),
+ BLB BYTEA,
+ BYTEBLB BYTEA,
+ BYTEBLB2 BYTEA
+) ;
+
+commit;
+insert into MYBLOB values (
+ 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
new file mode 100755
index 0000000..86b7f39
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_syb.sql
@@ -0,0 +1,21 @@
+drop table MYBLOB
+go
+
+create table MYBLOB (
+ 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')
+
+go
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/drop_blob_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/drop_blob_derby.sql
new file mode 100755
index 0000000..d37735c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/drop_blob_derby.sql
@@ -0,0 +1,2 @@
+drop table MYBLOB;
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml
new file mode 100644
index 0000000..57ac4ae
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../config/common.xml">
+<!ENTITY commonRun SYSTEM "../../config/run.xml">
+<!ENTITY reporting SYSTEM "report.xml">
+]>
+
+<project name="cmp" default="usage" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &reporting;
+
+ <target name="all">
+
+ <antcall target="setup"/>
+
+ <delete>
+ <fileset dir="${env.APS_HOME}" includes="test_results*"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="cmp.output" action="start" />
+
+ <ant dir="blob" target="all"/>
+ <ant dir="cascadeDelete" target="all"/>
+
+<!-- Need to fix the client to report pass/fail status
+ <ant dir="collegeapp" target="all"/>
+-->
+ <ant dir="copySemantics" target="all"/>
+ <ant dir="createExceptionsTest" target="all"/>
+ <ant dir="ejbflush" target="all"/>
+ <ant dir="fieldtest" target="all"/>
+ <ant dir="inheritedpk" target="all"/>
+ <ant dir="j2eeguide_product" target="all"/>
+ <ant dir="orderapp" target="all"/>
+ <ant dir="partSupplier" target="all"/>
+ <ant dir="robeans" target="all"/>
+ <ant dir="roster2Teams" target="all"/>
+ <ant dir="rosterGenDBSchema" target="all"/>
+ <ant dir="rosterJava2DB" target="all"/>
+ <ant dir="rosterVC" target="all"/>
+ <ant dir="rosterext" target="all"/>
+
+<!-- Need to fix the client to report pass/fail status
+ <ant dir="sampleapp" target="all"/>
+-->
+ <ant dir="unknownpk" target="all"/>
+ <ant dir="unknownpkVC" target="all"/>
+
+ <antcall target="unsetup"/>
+
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="start-database"/>
+
+ <ant target="startDomain"/>
+
+ </target>
+
+ <target name="unsetup" depends="init-common">
+ <echo message="Stopping app server instance"/>
+ <ant target="stopDomain"/>
+
+ <antcall target="stop-database"/>
+
+
+ <record name="cmp.output" action="stop" />
+ <antcall target="report"/>
+
+ </target>
+
+ <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">
+ <arg line="start-database --dbport ${db.port}"/>
+ </exec>
+ </target>
+
+
+ <target name="stop-database" depends="init-common">
+ <echo message="Stopping database --dbport ${db.port}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="stop-database --dbport ${db.port}"/>
+ </exec>
+ </target>
+
+ <target name="clean-result">
+
+ <delete>
+ <fileset dir="${env.APS_HOME}" includes="test_results*"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="cmp.output" action="start" />
+
+ </target>
+
+ <target name="report-result" depends="init-common">
+ <antcall target="dev-report"/>
+ </target>
+
+ <target name="blob">
+ <record name="blob.output" action="start" />
+ <ant dir="blob" target="all"/>
+ <record name="blob.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="cascadeDelete">
+ <record name="cascadeDelete.output" action="start" />
+ <ant dir="cascadeDelete" target="all"/>
+ <record name="cascadeDelete.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="collegeapp">
+ <record name="collegeapp.output" action="start" />
+ <ant dir="collegeapp" target="all"/>
+ <record name="collegeapp.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="copySemantics">
+ <record name="copySemantics.output" action="start" />
+ <ant dir="copySemantics" target="all"/>
+ <record name="copySemantics.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="createExceptionsTest">
+ <record name="createExceptionsTest.output" action="start" />
+ <ant dir="createExceptionsTest" target="all"/>
+ <record name="createExceptionsTest.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="ejbflush">
+ <record name="ejbflush.output" action="start" />
+ <ant dir="ejbflush" target="all"/>
+ <record name="ejbflush.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="fieldtest">
+ <record name="fieldtest.output" action="start" />
+ <ant dir="fieldtest" target="all"/>
+ <record name="fieldtest.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="inheritedpk">
+ <record name="inheritedpk.output" action="start" />
+ <ant dir="inheritedpk" target="all"/>
+ <record name="inheritedpk.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="j2eeguide_product">
+ <record name="j2eeguide_product.output" action="start" />
+ <ant dir="j2eeguide_product" target="all"/>
+ <record name="j2eeguide_product.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="orderapp">
+ <record name="orderapp.output" action="start" />
+ <ant dir="orderapp" target="all"/>
+ <record name="orderapp.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="partSupplier">
+ <record name="partSupplier.output" action="start" />
+ <ant dir="partSupplier" target="all"/>
+ <record name="partSupplier.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="robeans">
+ <record name="robeans.output" action="start" />
+ <ant dir="robeans" target="all"/>
+ <record name="robeans.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="roster2Teams">
+ <record name="roster2Teams.output" action="start" />
+ <ant dir="roster2Teams" target="all"/>
+ <record name="roster2Teams.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="rosterGenDBSchema">
+ <record name="rosterGenDBSchema.output" action="start" />
+ <ant dir="rosterGenDBSchema" target="all"/>
+ <record name="rosterGenDBSchema.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="rosterJava2DB">
+ <record name="rosterJava2DB.output" action="start" />
+ <ant dir="rosterJava2DB" target="all"/>
+ <record name="rosterJava2DB.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="rosterVC">
+ <record name="rosterVC.output" action="start" />
+ <ant dir="rosterVC" target="all"/>
+ <record name="rosterVC.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="rosterext">
+ <record name="rosterext.output" action="start" />
+ <ant dir="rosterext" target="all"/>
+ <record name="rosterext.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="sampleapp">
+ <record name="sampleapp.output" action="start" />
+ <ant dir="sampleapp" target="all"/>
+ <record name="sampleapp.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="unknownpk">
+ <record name="unknownpk.output" action="start" />
+ <ant dir="unknownpk" target="all"/>
+ <record name="unknownpk.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="unknownpkVC">
+ <record name="unknownpkVC.output" action="start" />
+ <ant dir="unknownpkVC" target="all"/>
+ <record name="unknownpkVC.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+
+ <target name="usage">
+ <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
new file mode 100644
index 0000000..ce73fb0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.properties
@@ -0,0 +1,45 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="CascadeDelete"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="web.xml"
+ value="descriptor/web.xml"/>
+<property name="sun-web.xml"
+ value="descriptor/sun-web.xml"/>
+<property name="ejb.xml"
+ value="descriptor/ejb.xml"/>
+<property name="cdclient.xml"
+ value="descriptor/cdclient.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<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"/>
+<property name="hasWebclient" value="true"/>
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
new file mode 100644
index 0000000..bbb1791
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="cascadeDelete" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+
+ </target>
+
+ <target name="build" depends="compile">
+
+ <antcall target="build-ear-common">
+ <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"
+ 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>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <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"/>
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <fileset dir="${TEMPDIR}" />
+ </jar>
+
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/cascadeDelete_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..a0d20a0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/Client.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/RemoteA");
+ cascadeDelete.AHome ahome =
+ (cascadeDelete.AHome)PortableRemoteObject.narrow(objref,
+ cascadeDelete.AHome.class);
+
+ objref = initial.lookup("java:comp/env/ejb/RemoteB");
+ cascadeDelete.BHome bhome =
+ (cascadeDelete.BHome)PortableRemoteObject.narrow(objref,
+ cascadeDelete.BHome.class);
+
+ objref = initial.lookup("java:comp/env/ejb/RemoteC");
+ 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,
+ cascadeDelete.DHome.class);
+
+
+ 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();
+
+ System.out.println("Created " + ahome.findAll().size() + " As.");
+ System.out.println("Created " + bhome.findAll().size() + " Bs.");
+ System.out.println("Created " + chome.findAll().size() + " Cs.");
+ System.out.println("Created " + dhome.findAll().size() + " Ds.");
+
+ System.out.println("Removing last C...");
+ cbean.remove();
+
+ System.out.println("Left " + ahome.findAll().size() + " As.");
+ System.out.println("Left " + bhome.findAll().size() + " Bs.");
+ System.out.println("Left " + chome.findAll().size() + " Cs.");
+ System.out.println("Left " + dhome.findAll().size() + " Ds.");
+
+
+ System.out.println("Removing A...");
+ abean.remove();
+
+ System.out.println("Left " + ahome.findAll().size() + " As.");
+ System.out.println("Left " + bhome.findAll().size() + " Bs.");
+ System.out.println("Left " + chome.findAll().size() + " Cs.");
+ System.out.println("Left " + dhome.findAll().size() + " Ds.");
+
+ stat.addStatus("ejbclient cascadeDelete", stat.PASS);
+ System.out.println("FINISH");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient cascadeDelete", stat.FAIL);
+ }
+ stat.printSummary("cascadeDelete");
+
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/MANIFEST.MF
new file mode 100644
index 0000000..08dcafc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/application-client.xml
new file mode 100644
index 0000000..5c55fc7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/application-client.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>CascadeDeleteClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.AHome</home>
+ <remote>cascadeDelete.A</remote>
+ <ejb-link>A</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteB</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.BHome</home>
+ <remote>cascadeDelete.B</remote>
+ <ejb-link>B</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteC</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.CHome</home>
+ <remote>cascadeDelete.C</remote>
+ <ejb-link>C</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteD</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.DHome</home>
+ <remote>cascadeDelete.D</remote>
+ <ejb-link>D</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/application.xml
new file mode 100644
index 0000000..652c213
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/application.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>CDTest</display-name>
+ <description>J2EE Application CDTest</description>
+ <module>
+ <ejb>CascadeDelete-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>CascadeDelete-web.war</web-uri>
+ <context-root>/cd</context-root>
+ </web>
+ </module>
+ <module>
+ <java>CascadeDelete-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/cdclient.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/cdclient.xml
new file mode 100644
index 0000000..e232a45
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/cdclient.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app>
+ <display-name>cdclient</display-name>
+ <servlet>
+ <servlet-name>Servlet</servlet-name>
+ <servlet-class>Servlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Servlet</servlet-name>
+ <url-pattern>/servlet/Servlet</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ <welcome-file>
+ index.html
+ </welcome-file>
+ <welcome-file>
+ index.htm
+ </welcome-file>
+ </welcome-file-list>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.AHome</home>
+ <remote>cascadeDelete.A</remote>
+ <ejb-link>A</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteB</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.BHome</home>
+ <remote>cascadeDelete.B</remote>
+ <ejb-link>B</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteC</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.CHome</home>
+ <remote>cascadeDelete.C</remote>
+ <ejb-link>C</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteD</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.DHome</home>
+ <remote>cascadeDelete.D</remote>
+ <ejb-link>D</ejb-link>
+ </ejb-ref>
+</web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..ca6674e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/ejb-jar.xml
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>A</display-name>
+ <ejb-name>A</ejb-name>
+ <home>cascadeDelete.AHome</home>
+ <remote>cascadeDelete.A</remote>
+ <local-home>cascadeDelete.LocalAHome</local-home>
+ <local>cascadeDelete.LocalA</local>
+ <ejb-class>cascadeDelete.ABean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>A</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleB</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>cascadeDelete.LocalBHome</local-home>
+ <local>cascadeDelete.LocalB</local>
+ <ejb-link>B</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleC</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>cascadeDelete.LocalCHome</local-home>
+ <local>cascadeDelete.LocalC</local>
+ <ejb-link>C</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleD</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>cascadeDelete.LocalDHome</local-home>
+ <local>cascadeDelete.LocalD</local>
+ <ejb-link>D</ejb-link>
+ </ejb-local-ref>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM A o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>B</display-name>
+ <ejb-name>B</ejb-name>
+ <home>cascadeDelete.BHome</home>
+ <remote>cascadeDelete.B</remote>
+ <local-home>cascadeDelete.LocalBHome</local-home>
+ <local>cascadeDelete.LocalB</local>
+ <ejb-class>cascadeDelete.BBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>B</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM B o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>C</display-name>
+ <ejb-name>C</ejb-name>
+ <home>cascadeDelete.CHome</home>
+ <remote>cascadeDelete.C</remote>
+ <local-home>cascadeDelete.LocalCHome</local-home>
+ <local>cascadeDelete.LocalC</local>
+ <ejb-class>cascadeDelete.CBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>C</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM C o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>D</display-name>
+ <ejb-name>D</ejb-name>
+ <home>cascadeDelete.DHome</home>
+ <remote>cascadeDelete.D</remote>
+ <local-home>cascadeDelete.LocalDHome</local-home>
+ <local>cascadeDelete.LocalD</local>
+ <ejb-class>cascadeDelete.DBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>D</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM D o</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findInRange</method-name>
+ <method-params>
+ <method-param>java.lang.Integer</method-param>
+ <method-param>java.lang.Integer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM D o WHERE o.id between ?1 AND ?2</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <ejb-relation>
+ <ejb-relation-name>A-B</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>B</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>B</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>a</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>A</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>A</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>bs</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <ejb-relation-name>A-C</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>C</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>C</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>a</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>A</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>A</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>cs</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <ejb-relation-name>A-D</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>D</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>D</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>a</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>A</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>A</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>ds</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <ejb-relation-name>B-C</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>C</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>C</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>b</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>B</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>B</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>c</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <ejb-relation-name>B-D</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>D</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <!--cascade-delete/-->
+ <relationship-role-source>
+ <ejb-name>D</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>b</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>B</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>B</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>ds</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <ejb-relation-name>C-D</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>D</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>D</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>c</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>C</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>C</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>ds</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>A</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>B</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>C</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>D</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/ejb.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/ejb.xml
new file mode 100644
index 0000000..6ec70be
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/ejb.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>A</display-name>
+ <ejb-name>A</ejb-name>
+ <home>cascadeDelete.AHome</home>
+ <remote>cascadeDelete.A</remote>
+ <local-home>cascadeDelete.LocalAHome</local-home>
+ <local>cascadeDelete.LocalA</local>
+ <ejb-class>cascadeDelete.ABean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>A</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleB</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>cascadeDelete.LocalBHome</local-home>
+ <local>cascadeDelete.LocalB</local>
+ <ejb-link>B</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleC</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>cascadeDelete.LocalCHome</local-home>
+ <local>cascadeDelete.LocalC</local>
+ <ejb-link>C</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleD</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>cascadeDelete.LocalDHome</local-home>
+ <local>cascadeDelete.LocalD</local>
+ <ejb-link>D</ejb-link>
+ </ejb-local-ref>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM A o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>B</display-name>
+ <ejb-name>B</ejb-name>
+ <home>cascadeDelete.BHome</home>
+ <remote>cascadeDelete.B</remote>
+ <local-home>cascadeDelete.LocalBHome</local-home>
+ <local>cascadeDelete.LocalB</local>
+ <ejb-class>cascadeDelete.BBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>B</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM B o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>C</display-name>
+ <ejb-name>C</ejb-name>
+ <home>cascadeDelete.CHome</home>
+ <remote>cascadeDelete.C</remote>
+ <local-home>cascadeDelete.LocalCHome</local-home>
+ <local>cascadeDelete.LocalC</local>
+ <ejb-class>cascadeDelete.CBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>C</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM C o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>D</display-name>
+ <ejb-name>D</ejb-name>
+ <home>cascadeDelete.DHome</home>
+ <remote>cascadeDelete.D</remote>
+ <local-home>cascadeDelete.LocalDHome</local-home>
+ <local>cascadeDelete.LocalD</local>
+ <ejb-class>cascadeDelete.DBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>D</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM D o</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>A</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>B</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>C</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>D</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..a33020b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-application-client.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA</ejb-ref-name>
+ <jndi-name>SimpleA</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteB</ejb-ref-name>
+ <jndi-name>SimpleB</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteC</ejb-ref-name>
+ <jndi-name>SimpleC</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteD</ejb-ref-name>
+ <jndi-name>SimpleD</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..2581e97
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema/>
+ <entity-mapping>
+ <ejb-name>A</ejb-name>
+ <table-name>A</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>A.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>A.NAME</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>bs</cmr-field-name>
+ <column-pair>
+ <column-name>A.ID</column-name>
+ <column-name>B.AID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>cs</cmr-field-name>
+ <column-pair>
+ <column-name>A.ID</column-name>
+ <column-name>C.AID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>ds</cmr-field-name>
+ <column-pair>
+ <column-name>A.ID</column-name>
+ <column-name>D.AID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>B</ejb-name>
+ <table-name>B</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>B.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>B.NAME</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>a</cmr-field-name>
+ <column-pair>
+ <column-name>B.AID</column-name>
+ <column-name>A.ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>c</cmr-field-name>
+ <column-pair>
+ <column-name>B.ID</column-name>
+ <column-name>C.BID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>ds</cmr-field-name>
+ <column-pair>
+ <column-name>B.ID</column-name>
+ <column-name>D.BID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>C</ejb-name>
+ <table-name>C</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>C.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>C.NAME</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>b</cmr-field-name>
+ <column-pair>
+ <column-name>C.BID</column-name>
+ <column-name>B.ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>a</cmr-field-name>
+ <column-pair>
+ <column-name>C.AID</column-name>
+ <column-name>A.ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>ds</cmr-field-name>
+ <column-pair>
+ <column-name>C.ID</column-name>
+ <column-name>D.CID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>D</ejb-name>
+ <table-name>D</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>D.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>D.NAME</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>b</cmr-field-name>
+ <column-pair>
+ <column-name>D.BID</column-name>
+ <column-name>B.ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>a</cmr-field-name>
+ <column-pair>
+ <column-name>D.AID</column-name>
+ <column-name>A.ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>c</cmr-field-name>
+ <column-pair>
+ <column-name>D.CID</column-name>
+ <column-name>C.ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..95edce2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>156565</unique-id>
+ <ejb>
+ <ejb-name>A</ejb-name>
+ <jndi-name>SimpleA</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleB</ejb-ref-name>
+ <jndi-name>localejbs/SimpleB</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleC</ejb-ref-name>
+ <jndi-name>localejbs/SimpleC</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <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>
+ </ejb>
+ <ejb>
+ <ejb-name>B</ejb-name>
+ <jndi-name>SimpleB</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>
+ </ejb>
+ <ejb>
+ <ejb-name>C</ejb-name>
+ <jndi-name>SimpleC</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>
+ </ejb>
+ <ejb>
+ <ejb-name>D</ejb-name>
+ <jndi-name>SimpleD</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>
+ </ejb>
+
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-web.xml
new file mode 100644
index 0000000..347a691
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA</ejb-ref-name>
+ <jndi-name>SimpleA</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/web.xml
new file mode 100644
index 0000000..4b6c0e5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/web.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>cdclient</display-name>
+ <servlet>
+ <servlet-name>Servlet</servlet-name>
+ <servlet-class>Servlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Servlet</servlet-name>
+ <url-pattern>/servlet/Servlet</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ <welcome-file>
+ index.html
+ </welcome-file>
+ <welcome-file>
+ index.htm
+ </welcome-file>
+ </welcome-file-list>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.AHome</home>
+ <remote>cascadeDelete.A</remote>
+ <ejb-link>A</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteB</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.BHome</home>
+ <remote>cascadeDelete.B</remote>
+ <ejb-link>B</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteC</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.CHome</home>
+ <remote>cascadeDelete.C</remote>
+ <ejb-link>C</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteD</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>cascadeDelete.DHome</home>
+ <remote>cascadeDelete.D</remote>
+ <ejb-link>D</ejb-link>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..0398b68
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/A.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:09 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface A extends javax.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
new file mode 100755
index 0000000..e29116a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/ABean.java
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.util.*;
+
+/**
+ * Created Dec 23, 2002 12:43:09 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public abstract class ABean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+ LocalBHome bhome;
+ LocalCHome chome;
+ LocalDHome dhome;
+
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ try {
+ bhome = lookupB();
+ chome = lookupC();
+ dhome = lookupD();
+ } catch (NamingException e) {
+ throw new EJBException(e.getMessage());
+ }
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A ejbRemove");
+ Collection bs = getBs();
+ System.out.println("Bs: " + bs.size());
+ System.out.println("Cs: " + getCs().size());
+ System.out.println("Ds: " + getDs().size());
+ for (java.util.Iterator it = bs.iterator(); it.hasNext();) {
+ ((LocalB)it.next()).cascadeDeleteFromA();
+ }
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.CreateException {
+ setId(id);
+ setName(name);
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws javax.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);
+ int i = pk.intValue() - 1;
+ System.out.println("Debug: A find Ds between " + (i*10) + " and " + (i*20));
+ ds = dhome.findInRange(new Integer(i*10), new Integer(i*20));
+
+ b.getDs().addAll(ds);
+ c.getDs().addAll(ds);
+ }
+ } catch (Exception e) {
+ 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();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleD");
+ return (LocalDHome) objref;
+ }
+
+}
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
new file mode 100755
index 0000000..7f2f26c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/AHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:09 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface AHome extends javax.ejb.EJBHome {
+
+ public cascadeDelete.A findByPrimaryKey(java.lang.Integer aKey)
+ throws javax.ejb.FinderException, java.rmi.RemoteException;
+
+ public A create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..fef3619
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/B.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:06 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface B extends javax.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
new file mode 100755
index 0000000..72bdd0c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BBean.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:06 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public abstract class BBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+ private boolean cascadeDeleteFromA = false;
+ private boolean cascadeDeleteFromC = false;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ 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()));
+
+ if (cascadeDeleteFromC && (c != null) )
+ throw new EJBException("In B - getC() not NULL in CascadeDeleteFromC!");
+
+ if (cascadeDeleteFromA) {
+ if( a != null ) {
+ throw new EJBException("In B - getA() not NULL in CascadeDeleteFromA!");
+
+ } else if (c != null) {
+ c.cascadeDeleteFromA();
+ c.cascadeDeleteFromB();
+ }
+ }
+
+ System.out.println("Ds: " + getDs().size());
+
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+ cascadeDeleteFromA = false;
+ cascadeDeleteFromC = false;
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.CreateException {
+ setId(id);
+ setName(name);
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws javax.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
new file mode 100755
index 0000000..fe27f45
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BHome.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:06 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface BHome extends javax.ejb.EJBHome {
+
+ public cascadeDelete.B findByPrimaryKey(java.lang.Integer aKey) throws javax.ejb.FinderException, java.rmi.RemoteException;
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public B create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..e9bde03
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/C.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:05 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface C extends javax.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
new file mode 100755
index 0000000..faf4950
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CBean.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:05 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public abstract class CBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+ private boolean cascadeDeleteFromA = false;
+ private boolean cascadeDeleteFromB = false;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.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) {
+ if (cascadeDeleteFromB) {
+ throw new EJBException("In C - getB() not NULL in CascadeDeleteFromB!");
+ } else {
+ b.cascadeDeleteFromC();
+ }
+ }
+
+ System.out.println("Ds: " + getDs().size());
+
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+ cascadeDeleteFromA = false;
+ cascadeDeleteFromB = false;
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.CreateException {
+ setId(id);
+ setName(name);
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws javax.ejb.CreateException {
+ }
+
+ public void cascadeDeleteFromA() {
+ cascadeDeleteFromA = true;
+ }
+
+ public void cascadeDeleteFromB() {
+ cascadeDeleteFromB = 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
new file mode 100755
index 0000000..2c96e7f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CHome.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:05 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface CHome extends javax.ejb.EJBHome {
+
+ public cascadeDelete.C findByPrimaryKey(java.lang.Integer aKey) throws javax.ejb.FinderException, java.rmi.RemoteException;
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public C create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..4210bd8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/D.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:03 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface D extends javax.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
new file mode 100755
index 0000000..72f3505
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DBean.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:03 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public abstract class DBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.CreateException {
+ setId(id);
+ setName(name);
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws javax.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
new file mode 100755
index 0000000..17a220c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DHome.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:03 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface DHome extends javax.ejb.EJBHome {
+
+ public cascadeDelete.D findByPrimaryKey(java.lang.Integer aKey) throws javax.ejb.FinderException, java.rmi.RemoteException;
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public D create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..7c97fe6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalA.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:09 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalA extends javax.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
new file mode 100755
index 0000000..8f23367
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalAHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:09 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalAHome extends javax.ejb.EJBLocalHome {
+
+ public cascadeDelete.LocalA findByPrimaryKey(java.lang.Integer aKey)
+ throws javax.ejb.FinderException;
+
+ public java.util.Collection findAll() throws javax.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
new file mode 100755
index 0000000..ac22e4c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalB.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:06 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalB extends javax.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
new file mode 100755
index 0000000..976867b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalBHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:06 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalBHome extends javax.ejb.EJBLocalHome {
+
+ public cascadeDelete.LocalB findByPrimaryKey(java.lang.Integer aKey)
+ throws javax.ejb.FinderException;
+
+ public java.util.Collection findAll() throws javax.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
new file mode 100755
index 0000000..8748133
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalC.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:05 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalC extends javax.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
new file mode 100755
index 0000000..2501fa7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalCHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:05 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalCHome extends javax.ejb.EJBLocalHome {
+
+ public cascadeDelete.LocalC findByPrimaryKey(java.lang.Integer aKey)
+ throws javax.ejb.FinderException;
+
+ public java.util.Collection findAll() throws javax.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
new file mode 100755
index 0000000..6379ce6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalD.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:03 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalD extends javax.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
new file mode 100755
index 0000000..d120311
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalDHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package cascadeDelete;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 23, 2002 12:43:03 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalDHome extends javax.ejb.EJBLocalHome {
+
+ public cascadeDelete.LocalD findByPrimaryKey(java.lang.Integer aKey)
+ throws javax.ejb.FinderException;
+
+ public java.util.Collection findAll() throws javax.ejb.FinderException;
+
+ public java.util.Collection findInRange(java.lang.Integer p0, java.lang.Integer p1) throws javax.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
new file mode 100755
index 0000000..54106c7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/servlet/Servlet.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Servlet.java
+ *
+ * Created on December 23, 2002, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+/**
+ *
+ * @author mvatkina
+ * @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
+ */
+ protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+ 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/RemoteA");
+ cascadeDelete.AHome ahome =
+ (cascadeDelete.AHome)PortableRemoteObject.narrow(objref,
+ cascadeDelete.AHome.class);
+
+ objref = initial.lookup("java:comp/env/ejb/RemoteB");
+ cascadeDelete.BHome bhome =
+ (cascadeDelete.BHome)PortableRemoteObject.narrow(objref,
+ cascadeDelete.BHome.class);
+
+ objref = initial.lookup("java:comp/env/ejb/RemoteC");
+ 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,
+ cascadeDelete.DHome.class);
+
+
+ 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();
+
+ out.println("Left " + ahome.findAll().size() + " As.");
+ 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();
+
+ out.println("Left " + ahome.findAll().size() + " As.");
+ 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) {
+ 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
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response)
+ 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_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_db2.sql
new file mode 100755
index 0000000..489a5fc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_db2.sql
@@ -0,0 +1,45 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+CREATE TABLE B
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32) ,
+ aId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32) ,
+ aId INT ,
+ bId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id)
+);
+
+CREATE TABLE D
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32) ,
+ aId INT ,
+ bId INT ,
+ cId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ FOREIGN KEY (cId) REFERENCES C (id)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_derby.sql
new file mode 100755
index 0000000..8bb06a1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_derby.sql
@@ -0,0 +1,41 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+CREATE TABLE B
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32) ,
+ aId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32) ,
+ aId INT ,
+ bId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id)
+);
+
+CREATE TABLE D
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32) ,
+ aId INT ,
+ bId INT ,
+ cId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ FOREIGN KEY (cId) REFERENCES C (id)
+);
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
new file mode 100755
index 0000000..03c9184
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ifx.sql
@@ -0,0 +1,45 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY,
+ name VARCHAR(32)
+);
+
+CREATE TABLE B
+(
+ id INT PRIMARY KEY,
+ name VARCHAR(32) ,
+ aId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY,
+ name VARCHAR(32) ,
+ aId INT ,
+ bId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id)
+);
+
+CREATE TABLE D
+(
+ id INT PRIMARY KEY,
+ name VARCHAR(32) ,
+ aId INT ,
+ bId INT ,
+ cId INT ,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ FOREIGN KEY (cId) REFERENCES C (id)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_mssql.sql
new file mode 100755
index 0000000..e28ec98
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_mssql.sql
@@ -0,0 +1,44 @@
+DROP TABLE D
+DROP TABLE C
+DROP TABLE B
+DROP TABLE A
+go
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+)
+
+CREATE TABLE B
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID)
+)
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID)
+)
+
+CREATE TABLE D
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ CID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID),
+ FOREIGN KEY (CID) REFERENCES C (ID)
+)
+
+go
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_mysql.sql
new file mode 100755
index 0000000..91240b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_mysql.sql
@@ -0,0 +1,46 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+) ENGINE=INNODB;
+
+CREATE TABLE B
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID)
+) ENGINE=INNODB;
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID),
+ UNIQUE (BID)
+) ENGINE=INNODB;
+
+CREATE TABLE D
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ CID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID),
+ FOREIGN KEY (CID) REFERENCES C (ID)
+) ENGINE=INNODB;
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ora.sql
new file mode 100755
index 0000000..7bdce24
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ora.sql
@@ -0,0 +1,46 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+CREATE TABLE B
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL,
+ aId INT NULL,
+ FOREIGN KEY (aId) REFERENCES A (id)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL,
+ aId INT NULL,
+ bId INT NULL,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ UNIQUE (bId)
+);
+
+CREATE TABLE D
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL,
+ aId INT NULL,
+ bId INT NULL,
+ cId INT NULL,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ FOREIGN KEY (cId) REFERENCES C (id)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_pbs.sql
new file mode 100755
index 0000000..7bdce24
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_pbs.sql
@@ -0,0 +1,46 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+CREATE TABLE B
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL,
+ aId INT NULL,
+ FOREIGN KEY (aId) REFERENCES A (id)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL,
+ aId INT NULL,
+ bId INT NULL,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ UNIQUE (bId)
+);
+
+CREATE TABLE D
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL,
+ aId INT NULL,
+ bId INT NULL,
+ cId INT NULL,
+ FOREIGN KEY (aId) REFERENCES A (id),
+ FOREIGN KEY (bId) REFERENCES B (id),
+ FOREIGN KEY (cId) REFERENCES C (id)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_psql.sql
new file mode 100755
index 0000000..f1ed8d6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_psql.sql
@@ -0,0 +1,46 @@
+DROP TABLE D cascade;
+DROP TABLE C cascade;
+DROP TABLE B cascade;
+DROP TABLE A cascade;
+
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+);
+
+CREATE TABLE B
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID)
+);
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID),
+ UNIQUE (BID)
+);
+
+CREATE TABLE D
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ CID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID),
+ FOREIGN KEY (CID) REFERENCES C (ID)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_syb.sql
new file mode 100755
index 0000000..80cff49
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_syb.sql
@@ -0,0 +1,45 @@
+DROP TABLE D
+DROP TABLE C
+DROP TABLE B
+DROP TABLE A
+go
+
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL
+)
+
+CREATE TABLE B
+(
+ ID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID)
+)
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID)
+)
+
+CREATE TABLE D
+(
+ ID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL,
+ AID INT NULL,
+ BID INT NULL,
+ CID INT NULL,
+ FOREIGN KEY (AID) REFERENCES A (ID),
+ FOREIGN KEY (BID) REFERENCES B (ID),
+ FOREIGN KEY (CID) REFERENCES C (ID)
+)
+
+go
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/drop_cascadeDelete_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/drop_cascadeDelete_derby.sql
new file mode 100755
index 0000000..77e554c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/drop_cascadeDelete_derby.sql
@@ -0,0 +1,4 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
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
new file mode 100644
index 0000000..e60efd3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="College"/>
+<property name="appname" value="${module}"/>
+<!-- <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="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
new file mode 100644
index 0000000..e76a123
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="collegeapp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="assemble.dir => ${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>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..b22bd92
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp.sql
@@ -0,0 +1,32 @@
+
+drop table address CASCADE CONSTRAINTS;
+create table address (addressId Number, street varchar2(255), code Number, city varchar2(255), state varchar2(255) ,constraint addr_ct primary key (addressId));
+
+drop table account CASCADE CONSTRAINTS;
+create table account (accountId varchar2(255), feesPaid Number, feesDue Number, dueDate Date ,constraint acc_ct primary key (accountId));
+
+
+drop table dept CASCADE CONSTRAINTS;
+create table dept (deptId Number, deptName Varchar2(255) ,constraint dept_ct primary key (deptId));
+
+drop table student CASCADE CONSTRAINTS;
+
+create table student (studentId Number, StudentName varchar2(255), deptId Number, AddressId Number, AccountId Varchar2(255), constraint st_c primary key (studentId),
+FOREIGN KEY (deptId) REFERENCES dept (deptId),
+FOREIGN KEY (AddressId) REFERENCES address (addressId),
+FOREIGN KEY (AccountId) REFERENCES account (accountId)
+);
+
+drop table course CASCADE CONSTRAINTS;
+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),
+FOREIGN KEY (courseId) REFERENCES course (courseId),
+FOREIGN KEY (studentId) REFERENCES student (studentId)
+);
+
+exit;
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
new file mode 100755
index 0000000..5f5212e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_db2.sql
@@ -0,0 +1,61 @@
+drop table stud_course;
+drop table course;
+drop table student;
+drop table dept;
+drop table account;
+drop table address;
+
+
+create table address (
+ 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,
+ constraint acc_ct primary key (accountId)
+);
+
+create table dept (
+ 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),
+ constraint st_ct primary key (studentId),
+ FOREIGN KEY (deptId) REFERENCES dept (deptId),
+ FOREIGN KEY (addressId) REFERENCES address (addressId),
+ FOREIGN KEY (accountId) REFERENCES account (accountId)
+);
+
+create table course (
+ 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,
+ studentId NUMERIC(30) NOT NULL,
+ constraint stco_ct primary key (courseId, studentId),
+ FOREIGN KEY (courseId) REFERENCES course (courseId),
+ FOREIGN KEY (studentId) REFERENCES student (studentId)
+);
+
+exit;
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
new file mode 100755
index 0000000..2b279a5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_derby.sql
@@ -0,0 +1,60 @@
+drop table stud_course;
+drop table course;
+drop table student;
+drop table dept;
+drop table account;
+drop table address;
+
+
+create table address (
+ 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,
+ constraint acc_ct primary key (accountId)
+);
+
+create table dept (
+ 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),
+ constraint st_ct primary key (studentId),
+ FOREIGN KEY (deptId) REFERENCES dept (deptId),
+ FOREIGN KEY (addressId) REFERENCES address (addressId),
+ FOREIGN KEY (accountId) REFERENCES account (accountId)
+);
+
+create table course (
+ 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,
+ studentId NUMERIC(30) NOT NULL,
+ constraint stco_ct primary key (courseId, studentId),
+ FOREIGN KEY (courseId) REFERENCES course (courseId),
+ FOREIGN KEY (studentId) REFERENCES student (studentId)
+);
+
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
new file mode 100755
index 0000000..b349c3e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ifx.sql
@@ -0,0 +1,61 @@
+drop table stud_course;
+drop table course;
+drop table student;
+drop table dept;
+drop table account;
+drop table address;
+
+
+create table address (
+ 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,
+ primary key (accountId)
+);
+
+create table dept (
+ 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),
+ primary key (studentId),
+ FOREIGN KEY (deptId) REFERENCES dept (deptId),
+ FOREIGN KEY (addressId) REFERENCES address (addressId),
+ FOREIGN KEY (accountId) REFERENCES account (accountId)
+);
+
+create table course (
+ 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),
+ studentId DECIMAL(32),
+ primary key (courseId, studentId),
+ FOREIGN KEY (courseId) REFERENCES course (courseId),
+ FOREIGN KEY (studentId) REFERENCES student (studentId)
+);
+
+exit;
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
new file mode 100755
index 0000000..50aab44
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mssql.sql
@@ -0,0 +1,62 @@
+drop table STUD_COURSE
+drop table COURSE
+drop table STUDENT
+drop table DEPT
+drop table ACCOUNT
+drop table ADDRESS
+go
+
+create table ADDRESS (
+ 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,
+ CONSTRAINT ACC_CT PRIMARY KEY (ACCOUNTID)
+)
+
+create table DEPT (
+ 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),
+ CONSTRAINT ST_CT PRIMARY KEY (STUDENTID),
+ FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID),
+ FOREIGN KEY (ADDRESSID) REFERENCES ADDRESS (ADDRESSID),
+ FOREIGN KEY (ACCOUNTID) REFERENCES ACCOUNT (ACCOUNTID)
+)
+
+create table COURSE (
+ 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),
+ STUDENTID NUMERIC(38),
+ CONSTRAINT STCO_CT PRIMARY KEY (COURSEID, STUDENTID),
+ FOREIGN KEY (COURSEID) REFERENCES COURSE (COURSEID),
+ FOREIGN KEY (STUDENTID) REFERENCES STUDENT (STUDENTID)
+)
+
+go
+
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
new file mode 100755
index 0000000..8fbe82d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mysql.sql
@@ -0,0 +1,61 @@
+DROP TABLE STUD_COURSE;
+DROP TABLE COURSE;
+DROP TABLE STUDENT;
+DROP TABLE DEPT;
+DROP TABLE ACCOUNT;
+DROP TABLE ADDRESS;
+
+
+CREATE TABLE ADDRESS (
+ 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,
+ CONSTRAINT ACC_CT PRIMARY KEY (ACCOUNTID)
+) ENGINE=INNODB;
+
+CREATE TABLE DEPT (
+ 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),
+ CONSTRAINT st_CT PRIMARY KEY (STUDENTID),
+ FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID),
+ FOREIGN KEY (ADDRESSID) REFERENCES ADDRESS (ADDRESSID),
+ FOREIGN KEY (ACCOUNTID) REFERENCES ACCOUNT (ACCOUNTID)
+) ENGINE=INNODB;
+
+CREATE TABLE COURSE (
+ 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),
+ STUDENTID DECIMAL(38),
+ CONSTRAINT STCO_CT PRIMARY KEY (COURSEID, STUDENTID),
+ FOREIGN KEY (COURSEID) REFERENCES COURSE (COURSEID),
+ FOREIGN KEY (STUDENTID) REFERENCES STUDENT (STUDENTID)
+) ENGINE=INNODB;
+
+exit;
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
new file mode 100755
index 0000000..92c0801
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ora.sql
@@ -0,0 +1,61 @@
+drop table stud_course;
+drop table course;
+drop table student;
+drop table dept;
+drop table account;
+drop table address;
+
+
+create table address (
+ 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,
+ constraint acc_ct primary key (accountId)
+);
+
+create table dept (
+ 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),
+ constraint st_ct primary key (studentId),
+ FOREIGN KEY (deptId) REFERENCES dept (deptId),
+ FOREIGN KEY (addressId) REFERENCES address (addressId),
+ FOREIGN KEY (accountId) REFERENCES account (accountId)
+);
+
+create table course (
+ 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),
+ studentId NUMBER(38),
+ constraint stco_ct primary key (courseId, studentId),
+ FOREIGN KEY (courseId) REFERENCES course (courseId),
+ FOREIGN KEY (studentId) REFERENCES student (studentId)
+);
+
+exit;
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
new file mode 100755
index 0000000..57a0362
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_pbs.sql
@@ -0,0 +1,61 @@
+drop table stud_course;
+drop table course;
+drop table student;
+drop table dept;
+drop table account;
+drop table address;
+
+
+create table address (
+ 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,
+ constraint acc_ct primary key (accountId)
+);
+
+create table dept (
+ 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),
+ constraint st_ct primary key (studentId),
+ FOREIGN KEY (deptId) REFERENCES dept (deptId),
+ FOREIGN KEY (addressId) REFERENCES address (addressId),
+ FOREIGN KEY (accountId) REFERENCES account (accountId)
+);
+
+create table course (
+ 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),
+ studentId NUMBER(38),
+ constraint stco_ct primary key (courseId, studentId),
+ FOREIGN KEY (courseId) REFERENCES course (courseId),
+ FOREIGN KEY (studentId) REFERENCES student (studentId)
+);
+
+exit;
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
new file mode 100755
index 0000000..6342587
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_psql.sql
@@ -0,0 +1,61 @@
+DROP TABLE STUD_COURSE cascade;
+DROP TABLE COURSE cascade;
+DROP TABLE STUDENT cascade;
+DROP TABLE DEPT cascade;
+DROP TABLE ACCOUNT cascade;
+DROP TABLE ADDRESS cascade;
+
+
+CREATE TABLE ADDRESS (
+ 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,
+ CONSTRAINT ACC_CT PRIMARY KEY (ACCOUNTID)
+);
+
+CREATE TABLE DEPT (
+ 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),
+ CONSTRAINT st_CT PRIMARY KEY (STUDENTID),
+ FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID),
+ FOREIGN KEY (ADDRESSID) REFERENCES ADDRESS (ADDRESSID),
+ FOREIGN KEY (ACCOUNTID) REFERENCES ACCOUNT (ACCOUNTID)
+);
+
+CREATE TABLE COURSE (
+ 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),
+ STUDENTID DECIMAL(38),
+ CONSTRAINT STCO_CT PRIMARY KEY (COURSEID, STUDENTID),
+ FOREIGN KEY (COURSEID) REFERENCES COURSE (COURSEID),
+ FOREIGN KEY (STUDENTID) REFERENCES STUDENT (STUDENTID)
+);
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_syb.sql
new file mode 100755
index 0000000..872aa09
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_syb.sql
@@ -0,0 +1,63 @@
+drop table STUD_COURSE
+drop table COURSE
+drop table STUDENT
+drop table DEPT
+drop table ACCOUNT
+drop table ADDRESS
+go
+
+create table ADDRESS (
+ ADDRESSID NUMERIC(38) not null,
+ STREET VARCHAR(255),
+ CODE NUMERIC(38),
+ CITY VARCHAR(255),
+ STATE VARCHAR(255),
+ constraint ADDR_CT primary key (ADDRESSID)
+)
+
+create table ACCOUNT (
+ ACCOUNTID VARCHAR(255) not null,
+ FEESPAID NUMERIC(38,2),
+ FEESDUE NUMERIC(38,2),
+ DUEDATE DATETIME,
+ constraint ACC_CT primary key (ACCOUNTID)
+)
+
+create table DEPT (
+ DEPTID NUMERIC(38) not null,
+ DEPTNAME VARCHAR(255),
+ constraint DEPT_CT primary key (DEPTID)
+)
+
+create table STUDENT (
+ STUDENTID NUMERIC(38) not null,
+ 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),
+ foreign key (ACCOUNTID) references ACCOUNT (ACCOUNTID)
+)
+
+create table COURSE (
+ COURSEID NUMERIC(38) not null,
+ 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) not null,
+ STUDENTID NUMERIC(38) not null,
+ constraint STCO_CT primary key (COURSEID, STUDENTID),
+ foreign key (COURSEID) references COURSE (COURSEID),
+ foreign key (STUDENTID) references STUDENT (STUDENTID)
+)
+
+go
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/drop_CollegeApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/drop_CollegeApp_derby.sql
new file mode 100755
index 0000000..a5df06f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/drop_CollegeApp_derby.sql
@@ -0,0 +1,6 @@
+drop table stud_course;
+drop table course;
+drop table student;
+drop table dept;
+drop table account;
+drop table address;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/common/create_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/common/create_resources.asadmin
new file mode 100644
index 0000000..716ddd6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/common/create_resources.asadmin
@@ -0,0 +1,3 @@
+create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --property "user=APP:password=APP:portNumber=1527:dataBaseName=sun-appserv-samples:retrieveMessagesFromServerOnGetMessage=true:serverName=localhost:connectionAttributes=\;create\=true" jdbc-derby-pool
+create-jdbc-resource --connectionpoolid jdbc-derby-pool jdo/pmf
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/common/delete_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/common/delete_resources.asadmin
new file mode 100644
index 0000000..07274f0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/common/delete_resources.asadmin
@@ -0,0 +1,2 @@
+delete-jdbc-resource jdo/pmf
+delete-jdbc-connection-pool jdbc-derby-pool
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
new file mode 100644
index 0000000..c2cdb96
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="CopySemantics"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..cc761c8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="copySemantics" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A*.class" />
+ <param name="appclientjar.classes"
+ value="**/AHome.class,**/A.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/copySemantics_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..ac8d4de
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/Client.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ 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),
+ new byte[]{'A', 'B', 'C'});
+
+ abean.test();
+ 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.printSummary("copySemantics");
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/application-client.xml
new file mode 100644
index 0000000..47a142b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>CopySemanticsClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA1</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.AHome</home>
+ <remote>test.A</remote>
+ <ejb-link>A1</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/application.xml
new file mode 100644
index 0000000..7baa56a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>CopySemanticsTest</display-name>
+ <description>J2EE Application CopySemanticsTest</description>
+ <module>
+ <ejb>CopySemantics-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>CopySemantics-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..2c2c015
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/ejb-jar.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>A1</display-name>
+ <ejb-name>A1</ejb-name>
+ <home>test.AHome</home>
+ <remote>test.A</remote>
+ <ejb-class>test.ABean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>A1</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>date</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>blb</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>A1</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..359cb5c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteA1</ejb-ref-name>
+ <jndi-name>SimpleA1</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..722539a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema/>
+ <entity-mapping>
+ <ejb-name>A1</ejb-name>
+ <table-name>COPYTEST</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>COPYTEST.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>COPYTEST.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>date</field-name>
+ <column-name>COPYTEST.MYDATE</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>blb</field-name>
+ <column-name>COPYTEST.BLB</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-cmp-mappings.xml.orig b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-cmp-mappings.xml.orig
new file mode 100644
index 0000000..807e532
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-cmp-mappings.xml.orig
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>test/copytest</schema>
+ <entity-mapping>
+ <ejb-name>A1</ejb-name>
+ <table-name>COPYTEST</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>COPYTEST.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>COPYTEST.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>date</field-name>
+ <column-name>COPYTEST.MYDATE</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>blb</field-name>
+ <column-name>COPYTEST.BLB</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..4346bcc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <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>
+ </ejb>
+
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..e398d7b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/A.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A extends javax.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
new file mode 100755
index 0000000..ca2c0f1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/ABean.java
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * @author mvatkina
+ */
+
+
+public abstract class ABean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: ABean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract Integer getId();
+ public abstract void setId(Integer id);
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ public abstract java.util.Date getDate();
+ public abstract void setDate(java.util.Date date);
+
+ 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)
+ throws javax.ejb.CreateException {
+
+ setId(id);
+ setName(name);
+ setDate(date);
+ setBlb(b);
+
+ return null;
+ }
+
+ public void ejbPostCreate(Integer id, java.lang.String name, java.util.Date date, byte[] b)
+ throws javax.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);
+
+ java.util.Date d2 = getDate();
+ System.out.println("Debug: ABean d2: " + d2);
+ if (d1.equals(d2))
+ throw new EJBException("Same d1 and d2!");
+
+ setDate(d1);
+ d2.setMonth(2);
+ System.out.println("Debug: ABean d2 after setMonth: " + d2);
+
+ d1 = getDate();
+ System.out.println("Debug: ABean d1: " + d1);
+ if (d1.equals(d2))
+ throw new EJBException("Same d1 and d2 after set!");
+
+ setDate(null);
+ if (getDate() != null)
+ throw new EJBException("Date is not null after set!");
+
+ byte[] b = getBlb();
+ System.out.println("Debug: ABean b[0]: " + b[0]);
+ b[0] = 90;
+
+ 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!");
+
+ setBlb(b);
+ 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();
+
+ 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]);
+
+ if (b[1] == b1[1])
+ throw new EJBException("Same b and b1 after set!");
+
+ setBlb(null);
+ if (getBlb() != null)
+ throw new EJBException("Blob is not null after set!");
+
+ }
+}
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
new file mode 100755
index 0000000..662556c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/AHome.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface AHome extends javax.ejb.EJBHome {
+
+ public A create(Integer i, java.lang.String name, java.util.Date d, byte[] b) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..0c425a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_db2.sql
@@ -0,0 +1,10 @@
+drop table COPYTEST;
+
+create table COPYTEST (
+ 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
new file mode 100755
index 0000000..82fdd0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_derby.sql
@@ -0,0 +1,8 @@
+drop table COPYTEST;
+
+create table COPYTEST (
+ 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
new file mode 100755
index 0000000..9f9276c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ifx.sql
@@ -0,0 +1,10 @@
+drop table COPYTEST;
+
+create table COPYTEST (
+ 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
new file mode 100755
index 0000000..c2ced74
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mssql.sql
@@ -0,0 +1,11 @@
+drop table COPYTEST
+go
+
+create table COPYTEST (
+ 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
new file mode 100755
index 0000000..111f25e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mysql.sql
@@ -0,0 +1,10 @@
+DROP TABLE COPYTEST;
+
+CREATE TABLE COPYTEST (
+ 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
new file mode 100755
index 0000000..343d3fd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ora.sql
@@ -0,0 +1,10 @@
+drop table COPYTEST;
+
+create table COPYTEST (
+ 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
new file mode 100755
index 0000000..0a1ef8c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_pbs.sql
@@ -0,0 +1,10 @@
+drop table COPYTEST;
+
+create table COPYTEST (
+ 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
new file mode 100755
index 0000000..2ac8a86
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_psql.sql
@@ -0,0 +1,10 @@
+DROP TABLE COPYTEST cascade;
+
+CREATE TABLE COPYTEST (
+ 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
new file mode 100755
index 0000000..34f903b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_syb.sql
@@ -0,0 +1,12 @@
+drop table COPYTEST
+go
+
+create table COPYTEST (
+ 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/copySemantics/sql/drop_copySemantics_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/drop_copySemantics_derby.sql
new file mode 100755
index 0000000..306c195
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/drop_copySemantics_derby.sql
@@ -0,0 +1 @@
+drop table COPYTEST;
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
new file mode 100644
index 0000000..bad5b59
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="CreateExceptionsTest"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..ff50a6f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="createExceptionsTest" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A*.class" />
+ <param name="appclientjar.classes"
+ value="**/A1Home.class,**/A1.class,**/A1UnPKHome.class,**/A2UnPKHome.class,**/A2Home.class,**/A2.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="deleteRows" depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/delete_tables.sql"/>
+ </antcall>
+ </target>
+-->
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..fde3107
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/Client.java
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import java.util.Collection;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @version
+ */
+public class Client {
+ private static create.A1Home a1home;
+ 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");
+
+ lookupBeans();
+ runCreateException20Test();
+ runCreateException11Test();
+ runBeanStateResetTest();
+
+ 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.printSummary("createExceptionsTest");
+ }
+
+ private static void lookupBeans() throws NamingException {
+
+ Context initial = new InitialContext();
+
+ Object objref = initial.lookup("java:comp/env/ejb/CR2");
+ a2home = (create.A2Home)PortableRemoteObject.narrow(objref, create.A2Home.class);
+
+ objref = initial.lookup("java:comp/env/ejb/CRUN2");
+ 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,
+ create.A1UnPKHome.class);
+
+ }
+
+ /**
+ * Test CreateException behavior in ejbCreate/ejbPostCreate for CMP 2.x beans.
+ * 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,
+ javax.ejb.FinderException, javax.ejb.RemoveException {
+
+ // Test CreateException from ejbPostCreate
+ try {
+ a2home.create("A2");
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // The bean should be created. If not - an exception would be thrown.
+ create.A2 a2bean = a2home.findByPrimaryKey("A2");
+ System.out.println("FOUND A2 Bean after failed ejbPostCreate");
+
+ // Test CreateException from ejbCreate
+ try {
+ a2home.create();
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // Only 1 A2 bean should be found.
+ Collection c = a2home.findAll();
+ if (c.size() == 1)
+ System.out.println("FOUND 1 A2 Bean after failed ejbCreate");
+ else
+ System.out.println("ERROR found " + c.size() + " A2 Beans");
+
+ // Test 2.0 bean with Unknown PK for CreateException from ejbPostCreate.
+ try {
+ a2unhome.create("A2");
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // Bean should be created.
+ c = a2unhome.findAll();
+ if (c.size() == 1)
+ System.out.println("FOUND A2 Bean with Unknown PK after failed ejbPostCreate");
+ else
+ System.out.println("ERROR found " + c.size()
+ + " A2 Beans with Unknown PK after failed ejbPostCreate");
+
+ }
+
+ /**
+ * Test CreateException behavior in ejbCreate/ejbPostCreate for CMP 1.1 beans.
+ * 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,
+ javax.ejb.FinderException, javax.ejb.RemoveException {
+
+ // Test CreateException from ejbPostCreate
+ try {
+ a1home.create("A1");
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // The bean should be created. If not - an exception would be thrown.
+ create.A1 a1bean = a1home.findByPrimaryKey("A1");
+ System.out.println("FOUND A1 Bean after failed ejbPostCreate");
+
+ // Test CreateException from ejbPostCreate without a container transaction.
+ try {
+ a1home.create("A11", true);
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // The bean should be created. If not - an exception would be thrown.
+ a1bean = a1home.findByPrimaryKey("A11");
+ System.out.println("FOUND A1 Bean (A11) after failed ejbPostCreate");
+
+ // We will also test non-transactional remove, as there are no other
+ // CMP unit test that tests this feature.
+ a1bean.remove();
+
+ // Only 1 A1 bean should be left.
+ Collection c = a1home.findAll();
+ if (c.size() == 1)
+ System.out.println("FOUND 1 A1 Bean after non-tx remove");
+ else
+ System.out.println("ERROR found " + c.size()
+ + " A1 Beans after non-tx remove");
+
+ // Test CreateException from ejbCreate without a container transaction.
+ try {
+ a1home.create("A111", false);
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // Nothing should be added to A1 beans.
+ c = a1home.findAll();
+ if (c.size() == 1)
+ System.out.println("FOUND 1 A1 Beans after failed ejbCreate");
+ else
+ System.out.println("ERROR found " + c.size()
+ + " A1 Beans after failed ejbCreate");
+
+ // Test 1.1 bean with Unknown PK for CreateException from ejbPostCreate.
+ try {
+ a1unhome.create("A1");
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("Caught expected CreateException: " + e.getMessage());
+ }
+
+ // Bean should be created.
+ c = a1unhome.findAll();
+ if (c.size() == 1)
+ System.out.println("FOUND A1 Bean with Unknown PK after failed ejbPostCreate");
+ else
+ System.out.println("ERROR found " + c.size()
+ + " A1 Beans with Unknown PK after failed ejbPostCreate");
+
+ }
+
+ /** Test bean state to be reset before invoking bean's ejbCreate method.
+ * Use different create() methods not to get unexpected CreateExceptions.
+ */
+ private static void runBeanStateResetTest() throws java.rmi.RemoteException {
+ try {
+ a2home.create(200);
+ System.out.println("State of A2 Bean is reset");
+ } catch (Exception e) {
+ System.out.println("ERROR creating A2 Bean: " + e);
+ }
+
+ try {
+ a2unhome.create(201);
+ System.out.println("State of A2 Bean with Unknown PK is reset");
+ } catch (Exception e) {
+ System.out.println("ERROR creating A2 Bean with Unknown PK: " + e);
+ }
+
+ try {
+ a1home.create(100);
+ System.out.println("State of A1 Bean is reset");
+ } catch (Exception e) {
+ System.out.println("ERROR creating A1 Bean: " + e);
+ }
+
+ try {
+ a1unhome.create(101);
+ System.out.println("State of A1 Bean with Unknown PK is reset");
+ } catch (Exception e) {
+ System.out.println("ERROR creating A1 Bean with Unknown PK: " + e);
+ }
+
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/application-client.xml
new file mode 100644
index 0000000..3797fee
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/application-client.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>CreateTest</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CR2</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>create.A2Home</home>
+ <remote>create.A2</remote>
+ <ejb-link>CR2</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CR1</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>create.A1Home</home>
+ <remote>create.A1</remote>
+ <ejb-link>CR1</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CRUN2</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>create.A2UnPKHome</home>
+ <remote>create.A2</remote>
+ <ejb-link>CRUN2</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CRUN1</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>create.A1UnPKHome</home>
+ <remote>create.A1</remote>
+ <ejb-link>CRUN1</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/application.xml
new file mode 100644
index 0000000..d3b0f59
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>CreateTest</display-name>
+ <description>J2EE Application CreateTest</description>
+ <module>
+ <ejb>CreateExceptionsTest-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>CreateExceptionsTest-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..f4d6573
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/ejb-jar.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>CR2</display-name>
+ <ejb-name>CR2</ejb-name>
+ <home>create.A2Home</home>
+ <remote>create.A2</remote>
+ <ejb-class>create.A2Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>CR2</abstract-schema-name>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>name</primkey-field>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(o) from CR2 o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>CR1</display-name>
+ <ejb-name>CR1</ejb-name>
+ <home>create.A1Home</home>
+ <remote>create.A1</remote>
+ <ejb-class>create.A1Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>name</primkey-field>
+ </entity>
+ <entity>
+ <display-name>CRUN2</display-name>
+ <ejb-name>CRUN2</ejb-name>
+ <home>create.A2UnPKHome</home>
+ <remote>create.A2</remote>
+ <ejb-class>create.A2UnPKBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Object</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>CRUN2</abstract-schema-name>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(o) from CRUN2 o</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>CRUN1</display-name>
+ <ejb-name>CRUN1</ejb-name>
+ <home>create.A1UnPKHome</home>
+ <remote>create.A1</remote>
+ <ejb-class>create.A1UnPKBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Object</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>CR1</ejb-name>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>boolean</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Never</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>CR1</ejb-name>
+ <method-name>remove</method-name>
+ <method-params/>
+ </method>
+ <trans-attribute>Never</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..689129e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/sun-application-client.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CR2</ejb-ref-name>
+ <jndi-name>CR2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CR1</ejb-ref-name>
+ <jndi-name>CR1</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CRUN2</ejb-ref-name>
+ <jndi-name>CRUN2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/CRUN1</ejb-ref-name>
+ <jndi-name>CRUN1</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..467e10a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <ejb>
+ <ejb-name>CR2</ejb-name>
+ <jndi-name>CR2</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>CR1</ejb-name>
+ <jndi-name>CR1</jndi-name>
+ <cmp>
+ <one-one-finders>
+ <finder>
+ <method-name>findAll</method-name>
+ <query-filter>true</query-filter>
+ </finder>
+ </one-one-finders>
+ </cmp>
+ </ejb>
+ <ejb>
+ <ejb-name>CRUN2</ejb-name>
+ <jndi-name>CRUN2</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>CRUN1</ejb-name>
+ <jndi-name>CRUN1</jndi-name>
+ <cmp>
+ <one-one-finders>
+ <finder>
+ <method-name>findAll</method-name>
+ <query-filter>true</query-filter>
+ </finder>
+ </one-one-finders>
+ </cmp>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <create-tables-at-deploy>true</create-tables-at-deploy>
+ <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..1012512
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1 extends javax.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
new file mode 100755
index 0000000..91e71f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Bean.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 1.1 bean.
+ * @author mvatkina
+ */
+
+
+public class A1Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A1Bean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+ }
+
+ public java.lang.String name;
+
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
+ */
+ public java.lang.String ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ this.name = name;
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name) throws javax.ejb.CreateException {
+ throw new javax.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.
+ */
+ public java.lang.String ejbCreate(java.lang.String name, boolean b) throws javax.ejb.CreateException {
+ if (b) {
+ this.name = name;
+ } else {
+ throw new javax.ejb.CreateException("A1Bean.ejbCreate");
+ }
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name, boolean b) throws javax.ejb.CreateException {
+ if (b) {
+ throw new javax.ejb.CreateException("A1Bean.ejbPostCreate");
+ }
+ }
+
+ /** This ejbCreate/ejbPostCreate combination tests that bean state is
+ * reset prior to call to ejbCreate.
+ */
+ public java.lang.String ejbCreate(int i) throws javax.ejb.CreateException {
+ if (this.name != null) {
+ throw new java.lang.IllegalStateException("A1Bean.ejbCreate not reset");
+ }
+
+ this.name = "A1Bean_" + i;
+ return null;
+ }
+
+ public void ejbPostCreate(int i) throws javax.ejb.CreateException {
+ }
+
+}
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
new file mode 100755
index 0000000..8d6b9a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Home.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1Home extends javax.ejb.EJBHome {
+
+ public A1 findByPrimaryKey(java.lang.String pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A1 create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public A1 create(java.lang.String name, boolean b) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public A1 create(int i) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..b5bba50
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKBean.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 1.1 bean with unknown PK.
+ * @author mvatkina
+ */
+
+
+public class A1UnPKBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A1UnPKBean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+ }
+
+ public java.lang.String name;
+
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
+ */
+ public java.lang.Object ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ this.name = name;
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name) throws javax.ejb.CreateException {
+ throw new javax.ejb.CreateException("A1UnPKBean.ejbPostCreate");
+ }
+
+ /** This ejbCreate/ejbPostCreate combination tests that bean state is
+ * reset prior to call to ejbCreate.
+ */
+ public java.lang.Object ejbCreate(int i) throws javax.ejb.CreateException {
+ if (this.name != null) {
+ throw new java.lang.IllegalStateException("A1UnPKBean.ejbCreate not reset");
+ }
+
+ this.name = "A1UnPKBean_" + i;
+ return null;
+ }
+
+ public void ejbPostCreate(int i) throws javax.ejb.CreateException {
+ }
+
+}
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
new file mode 100755
index 0000000..a9f1298
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1UnPKHome extends javax.ejb.EJBHome {
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A1 create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public A1 create(int i) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..a84dee8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2 extends javax.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
new file mode 100755
index 0000000..d8fe258
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Bean.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 2.0 bean.
+ * @author mvatkina
+ */
+
+
+public abstract class A2Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A2Bean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+ }
+
+ public abstract java.lang.String getName() ;
+ public abstract void setName(java.lang.String s) ;
+
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
+ */
+ public java.lang.String ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ setName(name);
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name) throws javax.ejb.CreateException {
+ throw new javax.ejb.CreateException("A2Bean.ejbPostCreate");
+ }
+
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbCreate.
+ */
+ public java.lang.String ejbCreate() throws javax.ejb.CreateException {
+ throw new javax.ejb.CreateException("A2Bean.ejbCreate");
+ }
+
+ public void ejbPostCreate() throws javax.ejb.CreateException {
+ }
+
+ /** This ejbCreate/ejbPostCreate combination tests that bean state is
+ * reset prior to call to ejbCreate.
+ */
+ public java.lang.String ejbCreate(int i) throws javax.ejb.CreateException {
+ if (getName() != null) {
+ throw new java.lang.IllegalStateException("A2Bean.ejbCreate not reset");
+ }
+
+ setName("A2Bean_" + i);
+ return null;
+ }
+
+ public void ejbPostCreate(int i) throws javax.ejb.CreateException {
+ }
+
+}
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
new file mode 100755
index 0000000..80393b5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Home.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2Home extends javax.ejb.EJBHome {
+
+ public A2 findByPrimaryKey(java.lang.String pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A2 create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public A2 create() throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public A2 create(int i) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..c45beaf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKBean.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 2.0 bean with unknown PK.
+ * @author mvatkina
+ */
+
+
+public abstract class A2UnPKBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A2UnPKBean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+ }
+
+ public abstract java.lang.String getName() ;
+ public abstract void setName(java.lang.String s) ;
+
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
+ */
+ public java.lang.Object ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ setName(name);
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name) throws javax.ejb.CreateException {
+ throw new javax.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 javax.ejb.CreateException {
+ if (getName() != null) {
+ throw new java.lang.IllegalStateException("A2UnPKBean.ejbCreate not reset");
+ }
+
+ setName("A2UnPKBean_" + i);
+ return null;
+ }
+
+ public void ejbPostCreate(int i) throws javax.ejb.CreateException {
+ }
+
+}
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
new file mode 100755
index 0000000..4b00b9c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package create;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2UnPKHome extends javax.ejb.EJBHome {
+
+ public java.util.Collection findAll() throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A2 create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+ public A2 create(int i) throws java.rmi.RemoteException, javax.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
new file mode 100644
index 0000000..953ec76
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="EjbFlush"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..91b678b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="ejbflush" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A*.class,**/FlushException.class,**/Test*.class" />
+ <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"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/ejbflush_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..9779c29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/Client.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+
+/**
+ * This class 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 executed with flush after business method (set to true
+ * for setNameWithFlush()), and without flush (is not set, i.e. false
+ * for seName()).
+ * The test is executed for CMP1.1 bean (A1) and CMP2.x bean (A2).
+ *
+ * @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");
+
+ Context initial = new InitialContext();
+
+ Object objref = initial.lookup("java:comp/env/ejb/TestFlush");
+ test.TestHome thome = (test.TestHome)PortableRemoteObject.narrow(objref, test.TestHome.class);
+
+ test.Test t = thome.create();
+
+ // Run CMP1.1 test without flush. This test will fail
+ // at transaction commit.
+ try {
+ t.testA1();
+ System.out.println("A1 FAILED");
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("A1 FAILED");
+ } catch (Exception e) {
+ System.out.println("A1 OK");
+ }
+
+ // Run CMP2.x test without flush. This test will fail
+ // at transaction commit.
+ try {
+ t.testA2();
+ System.out.println("A2 FAILED");
+ } catch (javax.ejb.CreateException e) {
+ System.out.println("A1 FAILED");
+ } catch (Exception e) {
+ System.out.println("A2 OK");
+ }
+
+ // 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) {
+ System.out.println("A1 FAILED " + e.getMessage());
+ }
+
+ // 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) {
+ System.out.println("A2 FAILED " + e.getMessage());
+ }
+
+ 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.printSummary("ejbflush");
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/MANIFEST.MF
new file mode 100644
index 0000000..08dcafc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/application-client.xml
new file mode 100644
index 0000000..55272ce
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>FlushTest</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/TestFlush</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.TestHome</home>
+ <remote>test.Test</remote>
+ <ejb-link>TestFlush</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/application.xml
new file mode 100644
index 0000000..1bf1115
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>CreateTest</display-name>
+ <description>J2EE Application CreateTest</description>
+ <module>
+ <ejb>EjbFlush-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>EjbFlush-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..baf825f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/ejb-jar.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>A1Flush</display-name>
+ <ejb-name>A1</ejb-name>
+ <local-home>test.A1LocalHome</local-home>
+ <local>test.A1Local</local>
+ <ejb-class>test.A1Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ <entity>
+ <display-name>A2Flush</display-name>
+ <ejb-name>A2</ejb-name>
+ <local-home>test.A2LocalHome</local-home>
+ <local>test.A2Local</local>
+ <ejb-class>test.A2Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>A2</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ <session>
+ <display-name>TestFlush</display-name>
+ <ejb-name>TestFlush</ejb-name>
+ <home>test.TestHome</home>
+ <remote>test.Test</remote>
+ <ejb-class>test.TestBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/A1Flush</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>test.A1LocalHome</local-home>
+ <local>test.A1Local</local>
+ <ejb-link>A1</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/A2Flush</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>test.A2LocalHome</local-home>
+ <local>test.A2Local</local>
+ <ejb-link>A2</ejb-link>
+ </ejb-local-ref>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..22f434a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/TestFlush</ejb-ref-name>
+ <jndi-name>TestFlush</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..c98c526
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema></schema>
+ <entity-mapping>
+ <ejb-name>A1</ejb-name>
+ <table-name>FLUSHTEST1</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>FLUSHTEST1.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>FLUSHTEST1.NAME</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>A2</ejb-name>
+ <table-name>FLUSHTEST2</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>FLUSHTEST2.ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>FLUSHTEST2.NAME</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..374fcd1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <ejb>
+ <ejb-name>A1</ejb-name>
+ <jndi-name>A1Flush</jndi-name>
+ <flush-at-end-of-method>
+ <method>
+ <method-name>setNameWithFlush</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ </flush-at-end-of-method>
+ </ejb>
+ <ejb>
+ <ejb-name>A2</ejb-name>
+ <jndi-name>A2Flush</jndi-name>
+ <flush-at-end-of-method>
+ <method>
+ <method-name>setNameWithFlush</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ </flush-at-end-of-method>
+ </ejb>
+ <ejb>
+ <ejb-name>TestFlush</ejb-name>
+ <jndi-name>TestFlush</jndi-name>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..e7a2e9c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Bean.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+
+/**
+ * 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()
+ */
+ public void ejbStore() {
+ }
+
+ public String id;
+ public String name;
+
+ public String ejbCreate(String id) throws CreateException {
+
+ this.id = id;
+ name = "ABC";
+ return null;
+ }
+
+ public void ejbPostCreate(String id) throws CreateException {
+ }
+
+ public void setName(String s) {
+ name = s;
+ }
+
+ public void setNameWithFlush(String s) {
+ name = 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
new file mode 100755
index 0000000..7f8e7a6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Local.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1Local extends javax.ejb.EJBLocalObject {
+
+ public void setName(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
new file mode 100755
index 0000000..f4a7b78
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1LocalHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1LocalHome extends javax.ejb.EJBLocalHome {
+
+ public A1Local findByPrimaryKey(java.lang.String pk) throws javax.ejb.FinderException;
+
+ public A1Local create(java.lang.String id) throws javax.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
new file mode 100755
index 0000000..1620b4f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Bean.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+
+/**
+ * 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()
+ */
+ public void ejbStore() {
+ }
+
+ public abstract String getId() ;
+ public abstract void setId(String s) ;
+
+ public abstract String getName() ;
+ public abstract void setName(String s) ;
+
+ public String ejbCreate(String id) throws CreateException {
+
+ setId(id);
+ setName("ABC");
+ return null;
+ }
+
+ public void ejbPostCreate(String name) throws CreateException {
+ }
+
+ public void setNameWithFlush(String s) {
+ setName(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
new file mode 100755
index 0000000..d640319
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Local.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2Local extends javax.ejb.EJBLocalObject {
+
+ 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
new file mode 100755
index 0000000..85351b1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2LocalHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2LocalHome extends javax.ejb.EJBLocalHome {
+
+ public A2Local findByPrimaryKey(java.lang.String pk) throws javax.ejb.FinderException;
+
+ public A2Local create(java.lang.String name) throws javax.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
new file mode 100644
index 0000000..f3d1c49
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/FlushException.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+public class FlushException extends Exception {
+
+ String flushEx;
+
+ public FlushException() {
+ super(); // call superclass constructor
+ }
+
+ public FlushException(String flushException) {
+ super(flushException);
+ flushEx = flushException;
+ }
+
+ 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
new file mode 100755
index 0000000..8268426
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/Test.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+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,
+ FlushException, RemoteException;
+
+ 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
new file mode 100755
index 0000000..365cc2d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestBean.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 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
+ * 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;
+ private A2LocalHome a2Home = null;
+ private A1Local a1bean = null;
+ 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;
+ a2Home = null;
+ }
+
+ public void ejbRemove() {
+
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ }
+
+ private A1LocalHome lookupA1() throws NamingException {
+ 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");
+ }
+
+ /**
+ * 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");
+ }
+
+ /**
+ * Run test for CMP1.1 bean with flush after business
+ * method. This method will fail at flush and the client
+ * will get our FlushException.
+ */
+ public void testA1WithFlush() throws CreateException, FlushException {
+ a1bean = a1Home.create("B1");
+ try {
+ a1bean.setNameWithFlush("A12345678901234567890");
+ } catch (EJBException e) {
+ if (isExpectedException(e))
+ throw new FlushException(e.toString());
+ else
+ throw e;
+ }
+ }
+
+ /**
+ * Run test for CMP2.x bean with flush after business
+ * method. This method will fail at flush and the client
+ * will get our FlushException.
+ */
+ public void testA2WithFlush() throws CreateException, FlushException {
+ a2bean = a2Home.create("B2");
+ try {
+ a2bean.setNameWithFlush("A12345678901234567890");
+ } catch (EJBException e) {
+ if (isExpectedException(e))
+ throw new FlushException(e.toString());
+ else
+ throw e;
+ }
+
+ }
+
+ private boolean isExpectedException (Exception e) {
+ boolean expected = false;
+
+ Throwable c = e.getCause();
+ if (c != null &&
+ (c instanceof com.sun.jdo.api.persistence.support.JDODataStoreException)) {
+
+ String msg = c.getMessage();
+ expected = (msg != null) && (msg.indexOf("JDO76400") > -1);
+ }
+
+ 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
new file mode 100755
index 0000000..745516c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestHome.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+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/drop_ejbflush_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/drop_ejbflush_derby.sql
new file mode 100755
index 0000000..25584fd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/drop_ejbflush_derby.sql
@@ -0,0 +1,2 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_db2.sql
new file mode 100755
index 0000000..030102d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_db2.sql
@@ -0,0 +1,18 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
+
+CREATE TABLE FLUSHTEST1
+(
+ id VARCHAR(3) PRIMARY KEY NOT NULL,
+ name VARCHAR(5)
+);
+
+CREATE TABLE FLUSHTEST2
+(
+ id VARCHAR(3) PRIMARY KEY NOT NULL,
+ name VARCHAR(5)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_derby.sql
new file mode 100755
index 0000000..cabe192
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_derby.sql
@@ -0,0 +1,14 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
+
+CREATE TABLE FLUSHTEST1
+(
+ id VARCHAR(3) PRIMARY KEY NOT NULL,
+ name VARCHAR(5)
+);
+
+CREATE TABLE FLUSHTEST2
+(
+ id VARCHAR(3) PRIMARY KEY NOT NULL,
+ name VARCHAR(5)
+);
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
new file mode 100755
index 0000000..4dbe720
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ifx.sql
@@ -0,0 +1,16 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
+
+CREATE TABLE FLUSHTEST1 (
+ ID VARCHAR(3) NOT NULL PRIMARY KEY ,
+ NAME VARCHAR(5)
+);
+
+CREATE TABLE FLUSHTEST2 (
+ ID VARCHAR(3) NOT NULL PRIMARY KEY ,
+ NAME VARCHAR(5)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mssql.sql
new file mode 100755
index 0000000..fba9fed
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mssql.sql
@@ -0,0 +1,16 @@
+DROP TABLE FLUSHTEST1
+DROP TABLE FLUSHTEST2
+go
+
+CREATE TABLE FLUSHTEST1
+(
+ ID VARCHAR(3) PRIMARY KEY,
+ NAME VARCHAR(5) NULL
+)
+
+CREATE TABLE FLUSHTEST2
+(
+ ID VARCHAR(3) PRIMARY KEY,
+ NAME VARCHAR(5) NULL
+)
+go
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
new file mode 100755
index 0000000..77009b8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mysql.sql
@@ -0,0 +1,16 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
+
+CREATE TABLE FLUSHTEST1 (
+ 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
+) engine=InnoDB;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..54d269a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ora.sql
@@ -0,0 +1,16 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
+
+CREATE TABLE FLUSHTEST1 (
+ 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
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_pbs.sql
new file mode 100755
index 0000000..649f29a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_pbs.sql
@@ -0,0 +1,18 @@
+DROP TABLE FLUSHTEST1;
+DROP TABLE FLUSHTEST2;
+
+CREATE TABLE FLUSHTEST1
+(
+ id VARCHAR2(3) PRIMARY KEY,
+ name VARCHAR2(5) NULL
+);
+
+CREATE TABLE FLUSHTEST2
+(
+ id VARCHAR2(3) PRIMARY KEY,
+ name VARCHAR2(5) NULL
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..70488eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_psql.sql
@@ -0,0 +1,16 @@
+DROP TABLE FLUSHTEST1 cascade;
+DROP TABLE FLUSHTEST2 cascade;
+
+CREATE TABLE FLUSHTEST1 (
+ 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
+) ;
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_syb.sql
new file mode 100755
index 0000000..da1d3ea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_syb.sql
@@ -0,0 +1,16 @@
+DROP TABLE FLUSHTEST1
+DROP TABLE FLUSHTEST2
+go
+
+CREATE TABLE FLUSHTEST1
+(
+ 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
+)
+go
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
new file mode 100644
index 0000000..ce87c1c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="FieldTest"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..be67b00
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="fieldtest" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A*.class" />
+ <param name="appclientjar.classes"
+ value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/A1PK.class,**/A2PK.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..623c3db
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/Client.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/FT2");
+ fieldtest.A2Home a2home = (fieldtest.A2Home)PortableRemoteObject.narrow(objref, fieldtest.A2Home.class);
+
+ fieldtest.A2 a2bean = a2home.create("A2");
+ fieldtest.A2PK pk2 = (fieldtest.A2PK)a2bean.getPrimaryKey();
+ System.out.println("CREATED 2.x WITH PK: " + pk2.id1 + " " + pk2.iddate);
+
+ System.out.println("CREATED 2.x: " + a2bean.getName());
+ if (!a2bean.getName().equals("A2")) throw new RuntimeException("Wrong result after CREATE 2.x");
+
+ System.out.println("CREATED 2.x: " + a2bean.getMyDate());
+ if(a2bean.getMyDate().getYear() != new java.util.Date().getYear())
+ throw new RuntimeException("Wrong result after CREATE 2.x");
+
+ System.out.println("CREATED 2.x: " + a2bean.getSqlDate());
+ if(a2bean.getSqlDate() != null) throw new RuntimeException("Wrong result after CREATE 2.x");
+
+ System.out.println("CREATED 2.x: " + a2bean.getBlb()[0] + " " + a2bean.getBlb()[1]);
+ if(a2bean.getBlb().length != 2) throw new RuntimeException("Wrong result after CREATE 2.x");
+
+ System.out.println("CREATED 2.x: " + a2bean.getList());
+ if (a2bean.getList().size() != 0) throw new RuntimeException("Wrong result after CREATE 2.x");
+
+ a2bean.update();
+
+ System.out.println("UPDATED 2.x: " + a2bean.getName());
+ if (!a2bean.getName().equals("A2")) throw new RuntimeException("Wrong result after UPDATE 2.x");
+
+ System.out.println("UPDATED 2.x: " + a2bean.getMyDate());
+ if(a2bean.getMyDate().getYear() != new java.util.Date(0).getYear())
+ 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())
+ 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");
+
+ objref = initial.lookup("java:comp/env/ejb/FT1");
+ fieldtest.A1Home a1home = (fieldtest.A1Home)PortableRemoteObject.narrow(objref, fieldtest.A1Home.class);
+
+ fieldtest.A1 a1bean = a1home.create("A1");
+ fieldtest.A1PK pk1 = (fieldtest.A1PK)a1bean.getPrimaryKey();
+ System.out.println("CREATED 1.1 WITH PK: " + pk1.id1 + " " + pk1.iddate);
+ System.out.println("CREATED 1.1: " + a1bean.getName());
+ if (!a1bean.getName().equals("A1")) throw new RuntimeException("Wrong result after CREATE 1.x");
+
+ System.out.println("CREATED 1.1: " + a1bean.getMyDate());
+ if(a1bean.getMyDate().getYear() != new java.util.Date().getYear())
+ throw new RuntimeException("Wrong result after CREATE 1.x");
+
+ System.out.println("CREATED 1.1: " + a1bean.getSqlDate());
+ if(a1bean.getSqlDate() != null) throw new RuntimeException("Wrong result after CREATE 1.x");
+
+ System.out.println("CREATED 1.1: " + a1bean.getBlb()[0] + " " + a1bean.getBlb()[1]);
+ if(a1bean.getBlb().length != 2) throw new RuntimeException("Wrong result after CREATE 1.x");
+
+ System.out.println("CREATED 1.1: " + a1bean.getList());
+ if (a1bean.getList().size() != 0) throw new RuntimeException("Wrong result after CREATE 1.x");
+
+ a1bean.update();
+
+ System.out.println("UPDATED 1.1: " + a1bean.getName());
+ if (!a1bean.getName().equals("A1")) throw new RuntimeException("Wrong result after UPDATE 1.x");
+
+ System.out.println("UPDATED 1.1: " + a1bean.getMyDate());
+ if(a1bean.getMyDate().getYear() != new java.util.Date(0).getYear())
+ 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())
+ 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");
+
+ a1bean = a1home.findByPrimaryKey(pk1);
+ System.out.println("FOUND 1.1: " + a1bean.getName());
+
+ 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.printSummary("fieldtest");
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/MANIFEST.MF
new file mode 100644
index 0000000..f4551fa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
+Name: META-INF/sun-application-client.xml
+
+Name: Client.class
+
+Name: META-INF/application-client.xml
+
+Name: META-INF/sun-j2ee-ri.project
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/application-client.xml
new file mode 100644
index 0000000..f8705f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" 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>FieldTest</display-name>
+<ejb-ref>
+<ejb-ref-name>ejb/FT2</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<home>fieldtest.A2Home</home>
+<remote>fieldtest.A2</remote>
+<ejb-link>FT2</ejb-link>
+</ejb-ref>
+<ejb-ref>
+<ejb-ref-name>ejb/FT1</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<home>fieldtest.A1Home</home>
+<remote>fieldtest.A1</remote>
+<ejb-link>FT1</ejb-link>
+</ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/application.xml
new file mode 100644
index 0000000..bb9d464
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" 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_1_4.xsd">
+<description>J2EE Application FieldTest</description>
+<display-name>FieldTest</display-name>
+<module>
+<java>FieldTest-client.jar</java>
+</module>
+<module>
+<ejb>FieldTest-ejb.jar</ejb>
+</module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..d6446cf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/ejb-jar.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" 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/ejb-jar_2_1.xsd">
+<display-name>ejb</display-name>
+<enterprise-beans>
+<entity>
+<ejb-name>FT2</ejb-name>
+<home>fieldtest.A2Home</home>
+<remote>fieldtest.A2</remote>
+<ejb-class>fieldtest.A2Bean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>fieldtest.A2PK</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>2.x</cmp-version>
+<abstract-schema-name>FT2</abstract-schema-name>
+<cmp-field>
+<field-name>blb</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>list</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>id1</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>myDate</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>sqlDate</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>iddate</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>name</field-name>
+</cmp-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</entity>
+<entity>
+<ejb-name>FT1</ejb-name>
+<home>fieldtest.A1Home</home>
+<remote>fieldtest.A1</remote>
+<ejb-class>fieldtest.A1Bean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>fieldtest.A1PK</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>1.x</cmp-version>
+<cmp-field>
+<field-name>blb</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>list</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>id1</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>iddate</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>name</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>sqldate</field-name>
+</cmp-field>
+<cmp-field>
+<field-name>mydate</field-name>
+</cmp-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</entity>
+</enterprise-beans>
+<assembly-descriptor>
+<container-transaction>
+<method>
+<ejb-name>FT1</ejb-name>
+<method-name>*</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+</assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..fcf11fa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/FT2</ejb-ref-name>
+ <jndi-name>FT2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/FT1</ejb-ref-name>
+ <jndi-name>FT1</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-application.xml
new file mode 100644
index 0000000..99720a8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-application.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/appserver/dtds/sun-application_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application>
+ <pass-by-reference>false</pass-by-reference>
+ <unique-id>975368962</unique-id>
+</sun-application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..2618b30
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ejb</name>
+ <unique-id>342026596</unique-id>
+ <ejb>
+ <ejb-name>FT2</ejb-name>
+ <jndi-name>FT2</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>FT1</ejb-name>
+ <jndi-name>FT1</jndi-name>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <create-tables-at-deploy>true</create-tables-at-deploy>
+ <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
+ <schema-generator-properties>
+ <property>
+ <name>use-unique-table-names</name>
+ <value>false</value>
+ </property>
+ <property>
+ <name>FT2.name.jdbc-type</name>
+ <value>CLOB</value>
+ </property>
+ <property>
+ <name>FT2.name.jdbc-maximum-length</name>
+ <value>100000</value>
+ </property>
+ </schema-generator-properties>
+ </cmp-resource>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..31ad889
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1 extends javax.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
new file mode 100755
index 0000000..7a5a925
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Bean.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 1.1 bean.
+ * @author mvatkina
+ */
+
+
+public class A1Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A1Bean ejbRemove");
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+ }
+
+ public void update() {
+ sqldate = new java.sql.Date(mydate.getTime());
+ mydate.setTime(0);
+ list.add(name);
+ }
+
+ public java.lang.String getName() {
+ return name;
+ }
+
+ public java.util.ArrayList getList() {
+ return list;
+ }
+
+ public java.util.Date getMyDate() {
+ return mydate;
+ }
+
+ public java.sql.Date getSqlDate() {
+ return sqldate;
+ }
+
+ public byte[] getBlb() {
+ return blb;
+ }
+
+ public java.lang.String id1;
+ public java.util.Date iddate;
+
+ public java.lang.String name;
+ public java.util.Date mydate;
+ public java.sql.Date sqldate;
+ public byte[] blb;
+ public java.util.ArrayList list;
+
+ public A1PK ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ this.name = name;
+ id1 = name;
+ long now = System.currentTimeMillis();
+ iddate = new java.util.Date(0);
+ mydate = new java.util.Date(now);
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name) throws javax.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
new file mode 100755
index 0000000..d3fa871
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Home.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1Home extends javax.ejb.EJBHome {
+
+ public A1 findByPrimaryKey(A1PK pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A1 create(java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..abef258
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1PK.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+public class A1PK implements java.io.Serializable {
+
+ public String id1;
+ public java.util.Date iddate;
+
+ public A1PK() {}
+
+ public boolean equals(java.lang.Object obj) {
+ if( obj==null ||
+ !this.getClass().equals(obj.getClass()) ) return( false );
+ A1PK o=(A1PK) obj;
+ 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();
+ return( 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
new file mode 100755
index 0000000..eaa643c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2 extends javax.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/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Bean.java
new file mode 100755
index 0000000..1626b63
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Bean.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 2.0 bean.
+ * @author mvatkina
+ */
+
+
+public abstract class A2Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A2Bean ejbRemove");
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+ }
+
+ public void update() {
+
+ setSqlDate(new java.sql.Date(getMyDate().getTime()));
+ java.util.Date d = getMyDate();
+ d.setTime(0);
+ setMyDate(d);
+ java.util.ArrayList c = getList();
+ c.add(getName());
+ setList(c);
+ }
+
+ public abstract java.lang.String getId1() ;
+ public abstract void setId1(java.lang.String s) ;
+
+ public abstract java.util.Date getIddate();
+ public abstract void setIddate(java.util.Date d);
+
+ public abstract java.lang.String getName() ;
+ public abstract void setName(java.lang.String s) ;
+
+ public abstract java.util.ArrayList getList();
+ public abstract void setList(java.util.ArrayList l);
+
+ public abstract java.util.Date getMyDate();
+ public abstract void setMyDate(java.util.Date d);
+
+ public abstract java.sql.Date getSqlDate() ;
+ public abstract void setSqlDate(java.sql.Date d) ;
+
+ public abstract byte[] getBlb() ;
+ public abstract void setBlb(byte[] b) ;
+
+ public A2PK ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ long now = System.currentTimeMillis();
+ setId1(name);
+ setName(name);
+ setIddate(new java.util.Date(0));
+ setMyDate(new java.util.Date(now));
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name) throws javax.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
new file mode 100755
index 0000000..9d95905
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Home.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2Home extends javax.ejb.EJBHome {
+
+ public A2 findByPrimaryKey(A2PK pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A2 create(java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..3e60a4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2PK.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package fieldtest;
+
+public class A2PK implements java.io.Serializable {
+
+ public String id1;
+ public java.util.Date iddate;
+
+ public A2PK() {}
+
+ public boolean equals(java.lang.Object obj) {
+ if( obj==null ||
+ !this.getClass().equals(obj.getClass()) ) return( false );
+ A2PK o=(A2PK) obj;
+ 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();
+ return( 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
new file mode 100644
index 0000000..eb56127
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="Inheritedpk"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..7bcc6d8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="inheritedpk" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <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">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A**.class,**/B**.class,**/C**.class,**/T**.class,**/test.dbschema" />
+ <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"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/inheritedpk_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="deleteRows" depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/delete_tables.sql"/>
+ </antcall>
+ </target>
+-->
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..e7aa31e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/Client.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ Context initial = new InitialContext();
+
+ Object objref = initial.lookup("java:comp/env/ejb/PKA");
+ pkvalidation.AHome ahome = (pkvalidation.AHome)PortableRemoteObject.narrow(objref, pkvalidation.AHome.class);
+
+ pkvalidation.A abean = ahome.create(1, "A1", 2000.0);
+ pkvalidation.APK pk1 = (pkvalidation.APK)abean.getPrimaryKey();
+ System.out.println("CREATED A WITH PK: " + pk1.id);
+ System.out.println("CREATED A WITH LASTNAME: " + abean.getLastname());
+
+ pkvalidation.APK pk = new pkvalidation.APK();
+ pk.id = 1;
+ abean = ahome.findByPrimaryKey(pk);
+ System.out.println("FOUND: " + abean.getLastname());
+
+ objref = initial.lookup("java:comp/env/ejb/PKB");
+ pkvalidation.BHome bhome = (pkvalidation.BHome)PortableRemoteObject.narrow(objref, pkvalidation.BHome.class);
+
+ java.sql.Date d = new java.sql.Date(System.currentTimeMillis());
+
+ pkvalidation.B bbean = bhome.create(d, "B1");
+ System.out.println("CREATED B WITH PK: " + d);
+
+ objref = initial.lookup("java:comp/env/ejb/PKC");
+ pkvalidation.CHome chome = (pkvalidation.CHome)PortableRemoteObject.narrow(objref, pkvalidation.CHome.class);
+
+ pkvalidation.C cbean = chome.create(1, "C1");
+ pkvalidation.CPK pkc = (pkvalidation.CPK)cbean.getPrimaryKey();
+ System.out.println("CREATED C WITH PK: " + pkc.id);
+ System.out.println("CREATED C WITH NAME: " + cbean.getName());
+
+ pkvalidation.CPK cpk = new pkvalidation.CPK();
+ cpk.id = 1;
+ cbean = chome.findByPrimaryKey(cpk);
+ System.out.println("FOUND C: " + cbean.getName());
+
+ 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.printSummary("inheritedpk");
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/application-client.xml
new file mode 100644
index 0000000..c15aa89
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/application-client.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>PKA</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/PKA</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>pkvalidation.AHome</home>
+ <remote>pkvalidation.A</remote>
+ <ejb-link>PKA</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/PKB</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>pkvalidation.BHome</home>
+ <remote>pkvalidation.B</remote>
+ <ejb-link>PKB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/PKC</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>pkvalidation.CHome</home>
+ <remote>pkvalidation.C</remote>
+ <ejb-link>PKC</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/application.xml
new file mode 100644
index 0000000..e742aa6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>APK</display-name>
+ <description>J2EE Application APK</description>
+ <module>
+ <ejb>Inheritedpk-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>Inheritedpk-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..d43c621
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/ejb-jar.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>PKA</display-name>
+ <ejb-name>PKA</ejb-name>
+ <home>pkvalidation.AHome</home>
+ <remote>pkvalidation.A</remote>
+ <ejb-class>pkvalidation.ABean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>pkvalidation.APK</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>PKA</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>lastname</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>salary</field-name>
+ </cmp-field>
+ </entity>
+ <entity>
+ <display-name>PKB</display-name>
+ <ejb-name>PKB</ejb-name>
+ <home>pkvalidation.BHome</home>
+ <remote>pkvalidation.B</remote>
+ <ejb-class>pkvalidation.BBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.sql.Date</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>PKB</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ <entity>
+ <display-name>PKC</display-name>
+ <ejb-name>PKC</ejb-name>
+ <home>pkvalidation.CHome</home>
+ <remote>pkvalidation.C</remote>
+ <ejb-class>pkvalidation.CBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>pkvalidation.CPK</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>PKC</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>PKA</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..9b75d44
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-application-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/PKA</ejb-ref-name>
+ <jndi-name>PKA</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/PKB</ejb-ref-name>
+ <jndi-name>PKB</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/PKC</ejb-ref-name>
+ <jndi-name>PKC</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..fe18890
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>pkvalidation/test</schema>
+ <entity-mapping>
+ <ejb-name>PKA</ejb-name>
+ <table-name>A</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>lastname</field-name>
+ <column-name>LASTNAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>salary</field-name>
+ <column-name>SALARY</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PKB</ejb-name>
+ <table-name>B</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>NAME</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PKC</ejb-name>
+ <table-name>C</table-name>
+ <cmp-field-mapping>
+ <field-name>id</field-name>
+ <column-name>ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>NAME</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..1749051
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <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>
+ </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>
+ </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>
+ </ejb>
+
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..d3da6a8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/A.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A extends javax.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
new file mode 100755
index 0000000..b97d97a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/ABean.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * @author mvatkina
+ */
+
+
+public abstract class ABean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: ABean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract long getId();
+ public abstract void setId(long id);
+
+ public abstract java.lang.String getLastname();
+ public abstract void setLastname(java.lang.String name);
+
+ public abstract double getSalary();
+ public abstract void setSalary(double s);
+
+ public APK ejbCreate(long id, java.lang.String name, double s) throws javax.ejb.CreateException {
+
+ setId(id);
+ setLastname(name);
+ setSalary(s);
+
+ return null;
+ }
+
+ public void ejbPostCreate(long id, java.lang.String name, double s)
+ throws javax.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
new file mode 100755
index 0000000..e01b878
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/AHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface AHome extends javax.ejb.EJBHome {
+
+ public A findByPrimaryKey(APK pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A create(long i, java.lang.String name, double s) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..14253cd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/APK.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+public class APK extends TestOidSuper implements java.io.Serializable {
+
+ // public long id;
+
+ public APK() {}
+
+ public boolean equals(java.lang.Object obj) {
+ if( obj==null ||
+ !this.getClass().equals(obj.getClass()) ) return( false );
+ APK o=(APK) obj;
+ if( this.id!=o.id ) return( false );
+ return( true );
+ }
+
+ public int hashCode() {
+ int hashCode=0;
+ hashCode += id;
+ return( hashCode );
+ }
+}
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
new file mode 100755
index 0000000..bdf246c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/B.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface B extends javax.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
new file mode 100755
index 0000000..374c38b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BBean.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * @author mvatkina
+ */
+
+
+public abstract class BBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: BBean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract java.sql.Date getId();
+ public abstract void setId(java.sql.Date id);
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ public java.sql.Date ejbCreate(java.sql.Date id, java.lang.String name) throws javax.ejb.CreateException {
+
+ setId(id);
+ setName(name);
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.sql.Date id, java.lang.String name)
+ throws javax.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
new file mode 100755
index 0000000..e5f302b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface BHome extends javax.ejb.EJBHome {
+
+ public B findByPrimaryKey(java.sql.Date pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public B create(java.sql.Date i, java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..05a0d7b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/C.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface C extends javax.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
new file mode 100755
index 0000000..4462407
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CBean.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * @author mvatkina
+ */
+
+
+public abstract class CBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: CBean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract long getId();
+ public abstract void setId(long id);
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ public CPK ejbCreate(long id, java.lang.String name) throws javax.ejb.CreateException {
+
+ setId(id);
+ setName(name);
+
+ return null;
+ }
+
+ public void ejbPostCreate(long id, java.lang.String name)
+ throws javax.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
new file mode 100755
index 0000000..b7fe766
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface CHome extends javax.ejb.EJBHome {
+
+ public C findByPrimaryKey(CPK pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public C create(long i, java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..7f5a8fb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CPK.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+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
new file mode 100755
index 0000000..af20aa5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestOidSuper.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+/*
+ * TestOidSuper.java
+ *
+ * Created on May 6, 2003, 12:32 PM
+ */
+
+/**
+ *
+ * @author raccah
+ */
+public class TestOidSuper implements java.io.Serializable {
+ public long id;
+
+ //public long foo = 1;
+
+ /** 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
new file mode 100755
index 0000000..e11de37
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestPKSuper.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package pkvalidation;
+
+/*
+ * TestPKSuper.java
+ *
+ * Created on May 16, 2003, 12:32 PM
+ */
+
+/**
+ *
+ * @author Marina Vatkina
+ */
+public class TestPKSuper implements java.io.Serializable {
+ public long id;
+
+ /** 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 );
+
+ TestPKSuper o=(TestPKSuper) obj;
+ return ( this.id == o.id );
+ }
+
+ public int hashCode() {
+ int hashCode=0;
+ hashCode += id;
+ return( hashCode );
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/test.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/test.dbschema
new file mode 100755
index 0000000..9653014
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/test.dbschema
@@ -0,0 +1,813 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl31149935">
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection24893089">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl31149935"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-752311751">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </element>
+ <table>A</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection19930840">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement712148687">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl17900022">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement712148687"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30199356">
+ <name>SYS_C008173808</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2570525">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl17900022"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-979976976">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl15684866">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979976976"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer22">
+ <value>22</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14867177">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer22"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement712148687">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl13170424">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement712148687"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30289364">
+ <name>SYS_C008173808</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2704014">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979976976"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19058102">
+ <name>A</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1073282">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement712148687"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection970341">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="6" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979976976"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1815576010">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl32477527">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1815576010"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer32">
+ <value>32</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19859865">
+ <name>LASTNAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1953875878">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl18820833">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1953875878"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4116479">
+ <name>FIRSTNAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1729567561">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl6662015">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1729567561"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer7">
+ <value>7</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30911772">
+ <name>HIREDATE</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer7"/>
+ </_precision>
+ <_type>93</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement611008344">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10883428">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement611008344"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer7"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier12568800">
+ <name>BIRTHDATE</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer7"/>
+ </_precision>
+ <_type>93</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="5">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2112323809">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl18680399">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2112323809"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer126">
+ <value>126</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier26204548">
+ <name>SALARY</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer126"/>
+ </_precision>
+ <_type>8</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311751"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-752311750">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl17934197">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311750"/>
+ </element>
+ <table>B</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30426707">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl17934197"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement201614511">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl597230">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement201614511"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4875224">
+ <name>SYS_C008173809</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection26867996">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl597230"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-979947185">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl31522607">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979947185"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer7"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9532399">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer7"/>
+ </_precision>
+ <_type>93</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311750"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311750"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement201614511">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl22201561">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement201614511"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16359413">
+ <name>SYS_C008173809</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection10923757">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl17934197"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979947185"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl17934197"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311750"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7652266">
+ <name>B</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection3705235">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl17934197"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement201614511"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13673945">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl17934197"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979947185"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1131258433">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl31063377">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1131258433"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8785225">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311750"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-752311749">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13783459">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311749"/>
+ </element>
+ <table>C</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13799530">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13783459"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-308919644">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl32358515">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-308919644"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32887686">
+ <name>SYS_C008173810</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection20918341">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl32358515"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-979917394">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1187613">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979917394"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer22"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16695559">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer22"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311749"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311749"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-308919644">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl20111677">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-308919644"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier23163273">
+ <name>SYS_C008173810</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection22052786">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13783459"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979917394"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13783459"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311749"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6616781">
+ <name>C</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11646147">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13783459"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-308919644"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection19300430">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13783459"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-979917394"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1102629282">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8856448">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1102629282"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2864404">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-752311749"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier24993066">
+ <name>MV</name>
+ </OBJECT>
+ </_name>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier24093812">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.7.0.0 - Production</_databaseProductVersion>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722"/>
+ </element>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <_databaseProductName>Oracle</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9814147">
+ <name>MV</name>
+ </OBJECT>
+ </_schema>
+ <_url>jdbc:oracle:thin:@bsqe-giant.eng.sun.com:1521:ora817</_url>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_username>MV</_username>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/drop_inheritedpk_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/drop_inheritedpk_derby.sql
new file mode 100755
index 0000000..5ddefd6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/drop_inheritedpk_derby.sql
@@ -0,0 +1,3 @@
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
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
new file mode 100755
index 0000000..7554e16
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_db2.sql
@@ -0,0 +1,31 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY NOT NULL,
+ lastName VARCHAR(32) ,
+ firstName VARCHAR(32) ,
+ hireDate DATE ,
+ birthDate DATE ,
+ salary FLOAT NOT NULL
+);
+
+CREATE TABLE B
+(
+ id DATE PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..2e7e59c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_derby.sql
@@ -0,0 +1,27 @@
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY NOT NULL,
+ lastName VARCHAR(32) ,
+ firstName VARCHAR(32) ,
+ hireDate DATE ,
+ birthDate DATE ,
+ salary FLOAT NOT NULL
+);
+
+CREATE TABLE B
+(
+ id DATE PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY NOT NULL,
+ 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
new file mode 100755
index 0000000..e586edd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ifx.sql
@@ -0,0 +1,31 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY,
+ lastName VARCHAR(32) ,
+ firstName VARCHAR(32) ,
+ hireDate DATE ,
+ birthDate DATE ,
+ salary FLOAT NOT NULL
+);
+
+CREATE TABLE B
+(
+ id DATE PRIMARY KEY,
+ name VARCHAR(32)
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY,
+ name VARCHAR(32)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_mssql.sql
new file mode 100755
index 0000000..d640d62
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_mssql.sql
@@ -0,0 +1,29 @@
+DROP TABLE D
+DROP TABLE C
+DROP TABLE B
+DROP TABLE A
+go
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY,
+ LASTNAME VARCHAR(32) NULL,
+ FIRSTNAME VARCHAR(32) NULL,
+ HIREDATE DATETIME NULL,
+ BIRTHDATE DATETIME NULL,
+ SALARY FLOAT NOT NULL
+)
+
+CREATE TABLE B
+(
+ ID DATETIME PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+)
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+)
+
+go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_mysql.sql
new file mode 100755
index 0000000..771efa2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_mysql.sql
@@ -0,0 +1,31 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY,
+ LASTNAME VARCHAR(32) NULL,
+ FIRSTNAME VARCHAR(32) NULL,
+ HIREDATE DATE NULL,
+ BIRTHDATE DATE NULL,
+ SALARY FLOAT NOT NULL
+) ENGINE=INNODB;
+
+CREATE TABLE B
+(
+ ID DATE PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+) ENGINE=INNODB;
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+) ENGINE=INNODB;
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ora.sql
new file mode 100755
index 0000000..7ae471b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ora.sql
@@ -0,0 +1,31 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY,
+ lastName VARCHAR2(32) NULL,
+ firstName VARCHAR2(32) NULL,
+ hireDate DATE NULL,
+ birthDate DATE NULL,
+ salary FLOAT NOT NULL
+);
+
+CREATE TABLE B
+(
+ id DATE PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_pbs.sql
new file mode 100755
index 0000000..0c89dc6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_pbs.sql
@@ -0,0 +1,31 @@
+DROP TABLE D;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;
+
+
+CREATE TABLE A
+(
+ id INT PRIMARY KEY,
+ lastName VARCHAR2(32) NULL,
+ firstName VARCHAR2(32) NULL,
+ hireDate DATE NULL,
+ birthDate DATE NULL,
+ salary FLOAT NOT NULL
+);
+
+CREATE TABLE B
+(
+ id TIMESTAMP PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+CREATE TABLE C
+(
+ id INT PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_psql.sql
new file mode 100755
index 0000000..aef5606
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_psql.sql
@@ -0,0 +1,31 @@
+DROP TABLE D cascade;
+DROP TABLE C cascade;
+DROP TABLE B cascade;
+DROP TABLE A cascade;
+
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY,
+ LASTNAME VARCHAR(32) NULL,
+ FIRSTNAME VARCHAR(32) NULL,
+ HIREDATE TIMESTAMP NULL,
+ BIRTHDATE TIMESTAMP NULL,
+ SALARY FLOAT NOT NULL
+);
+
+CREATE TABLE B
+(
+ ID TIMESTAMP PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+);
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_syb.sql
new file mode 100755
index 0000000..3a2ed8b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_syb.sql
@@ -0,0 +1,30 @@
+DROP TABLE D
+DROP TABLE C
+DROP TABLE B
+DROP TABLE A
+go
+
+
+CREATE TABLE A
+(
+ ID INT PRIMARY KEY NOT NULL,
+ LASTNAME VARCHAR(32) NULL,
+ FIRSTNAME VARCHAR(32) NULL,
+ HIREDATE DATETIME NULL,
+ BIRTHDATE DATETIME NULL,
+ SALARY FLOAT NOT NULL
+)
+
+CREATE TABLE B
+(
+ ID DATETIME PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL
+)
+
+CREATE TABLE C
+(
+ ID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL
+)
+
+go
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
new file mode 100644
index 0000000..18192ea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.properties
@@ -0,0 +1,51 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="j2eeguide_product"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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"/>
+<property name="productWebStuff.xml"
+ value="descriptor/productWebStuff.xml"/>
+<property name="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}"/>
+<property name="appclient.jar" value="${assemble.dir}/productClient.jar"/>
+<property name="war.file" value="${assemble.dir}/productWebStuff.war"/>
+<property name="app.type" value="application"/>
+<property name="dbschema" value="ejb/productSchema.dbschema"/>
+<property name="hasWebclient" value="true"/>
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
new file mode 100644
index 0000000..7f75ebd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.xml
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="j2eeguide_product" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources,clean"/>
+
+ <target name="clean" depends="init-common">
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- Target to create the ejb application jar file -->
+ <!-- ================================================================ -->
+
+ <target name="package-ejb-jar" >
+
+ <antcall target="package-ejbjar-common">
+
+ <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" value="${assemble.dir}/j2eeguide_productEjb.jar"/>
+
+ </antcall>
+ </target>
+ <target name="package-webclient-war" >
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ <param name="war.classes"
+ value="**/Servlet.class" />
+ <param name="war.file" value="${assemble.dir}/productWebStuff.war"/>
+ </antcall>
+
+ </target>
+
+ <target name="package-appclient" >
+ <mkdir dir="${assemble.dir}"/>
+
+ <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="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
+
+ </antcall>
+ </target>
+
+ <target name="package-ear">
+
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+ <mkdir dir="${TEMPDIR}" />
+ <copy file="${j2eeguide_productEjb.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <copy file="${productWebStuff.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <copy file="${sun-j2eeguide_productEjb.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <copy file="${sun-productWebStuff.xml}" todir="${TEMPDIR}" 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="${TEMPDIR}" />
+
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+ </target>
+
+
+
+
+
+
+ <target name="build" depends="compile">
+
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${basedir}/docroot" />
+ <mkdir dir="${build.classes.dir}/j2eeguide/product" />
+ <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" />
+
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/j2eeguide_product_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="deleteRows" depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/delete_tables.sql"/>
+ </antcall>
+ </target>
+-->
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/MANIFEST.MF
new file mode 100644
index 0000000..eb53f38
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: j2eeguide.product.ProductClient
+
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
new file mode 100755
index 0000000..a9e6679
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/ProductClient.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package j2eeguide.product;
+
+import java.util.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class ProductClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+
+ try {
+
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/MyProduct");
+
+ ProductHome home =
+ (ProductHome)PortableRemoteObject.narrow(objref,
+ ProductHome.class);
+ System.out.println("START");
+ stat.addDescription("j2eeguide_product");
+
+ Product duke = home.create("123", "Ceramic Dog", 10.00);
+ System.out.println(duke.getDescription() + ": " + duke.getPrice());
+ duke.setPrice(14.00);
+ System.out.println(duke.getDescription() + ": " + duke.getPrice());
+
+ duke = home.create("456", "Wooden Duck", 13.00);
+ duke = home.create("999", "Ivory Cat", 19.00);
+ duke = home.create("789", "Ivory Cat", 33.00);
+ duke = home.create("876", "Chrome Fish", 22.00);
+
+ Product earl = home.findByPrimaryKey("876");
+ System.out.println(earl.getDescription() + ": " + earl.getPrice());
+
+ Collection c = home.findByDescription("Ivory Cat");
+ Iterator i = c.iterator();
+
+ while (i.hasNext()) {
+ Product product = (Product)i.next();
+ String productId = (String)product.getPrimaryKey();
+ String description = product.getDescription();
+ double price = product.getPrice();
+ System.out.println(productId + ": " + description + " " + price);
+ }
+
+ c = home.findInRange(10.00, 20.00);
+ i = c.iterator();
+
+ while (i.hasNext()) {
+ Product product = (Product)i.next();
+ String productId = (String)product.getPrimaryKey();
+ double price = product.getPrice();
+ System.out.println(productId + ": " + price);
+ }
+ stat.addStatus("ejbclient j2eeguide_product", stat.PASS);
+ System.out.println("FINISH");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception." );
+ ex.printStackTrace();
+ 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/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/application-client.xml
new file mode 100644
index 0000000..41b06a7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>j2eeguide</display-name>
+ <ejb-ref>
+ <ejb-ref-name>MyProduct</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>j2eeguide.product.ProductHome</home>
+ <remote>j2eeguide.product.Product</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/application.xml
new file mode 100644
index 0000000..781fcb1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/application.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>j2eeguide_product</display-name>
+ <description>J2EE Application j2eeguide_product</description>
+ <module>
+ <web>
+ <web-uri>j2eeguide_product-web.war</web-uri>
+ <context-root>j2eeguide_product</context-root>
+ </web>
+ <alt-dd>productWebStuff.xml</alt-dd>
+ </module>
+ <module>
+ <ejb>j2eeguide_productEjb.jar</ejb>
+ <alt-dd>j2eeguide_productEjb.xml</alt-dd>
+ </module>
+ <module>
+ <java>j2eeguide_productAppClient.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..e0d9fbe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/ejb-jar.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>j2eeguide_productEjb</display-name>
+ <enterprise-beans>
+ <entity>
+ <description>Product Entity Bean</description>
+ <display-name>MyProduct</display-name>
+ <ejb-name>MyProduct</ejb-name>
+ <home>j2eeguide.product.ProductHome</home>
+ <remote>j2eeguide.product.Product</remote>
+ <ejb-class>j2eeguide.product.ProductEJB</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>description</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>price</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>productId</field-name>
+ </cmp-field>
+ <primkey-field>productId</primkey-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>MyProduct</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/index.html b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/index.html
new file mode 100644
index 0000000..6b1164e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/index.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+ <HEAD>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ <TITLE></TITLE>
+ </HEAD>
+ <BODY>
+ this is the index for my app
+
+try the <a href=''>product serverlet</a>
+ </BODY>
+</HTML>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/j2eeguide_productEjb.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/j2eeguide_productEjb.xml
new file mode 100644
index 0000000..e0d9fbe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/j2eeguide_productEjb.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>j2eeguide_productEjb</display-name>
+ <enterprise-beans>
+ <entity>
+ <description>Product Entity Bean</description>
+ <display-name>MyProduct</display-name>
+ <ejb-name>MyProduct</ejb-name>
+ <home>j2eeguide.product.ProductHome</home>
+ <remote>j2eeguide.product.Product</remote>
+ <ejb-class>j2eeguide.product.ProductEJB</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>description</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>price</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>productId</field-name>
+ </cmp-field>
+ <primkey-field>productId</primkey-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>MyProduct</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/productWebStuff.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/productWebStuff.xml
new file mode 100644
index 0000000..39bc815
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/productWebStuff.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app>
+ <servlet>
+ <servlet-name>Servlet_j2eeguide.product.ProductServlet</servlet-name>
+ <display-name>Servlet j2eeguide.product.ProductServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>j2eeguide.product.ProductServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Servlet_j2eeguide.product.ProductServlet</servlet-name>
+ <url-pattern>/servlet/ProductServlet</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ <welcome-file>
+ index.html
+ </welcome-file>
+ <welcome-file>
+ index.htm
+ </welcome-file>
+ </welcome-file-list>
+ <ejb-ref>
+ <ejb-ref-name>MyProduct</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>j2eeguide.product.ProductHome</home>
+ <remote>j2eeguide.product.Product</remote>
+ <ejb-link>MyProduct</ejb-link>
+ </ejb-ref>
+</web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..99cccdd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>MyProduct</ejb-ref-name>
+ <jndi-name>ejb/MyProduct</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..b5d68bc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>productSchema</schema>
+ <entity-mapping>
+ <ejb-name>MyProduct</ejb-name>
+ <table-name>PRODUCT</table-name>
+ <cmp-field-mapping>
+ <field-name>description</field-name>
+ <column-name>DESCRIPTION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>price</field-name>
+ <column-name>PRICE</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>productId</field-name>
+ <column-name>PRODUCTID</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..a4318bf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>j2eeguide_productEjb</name>
+ <unique-id>758826287</unique-id>
+ <ejb>
+ <ejb-name>MyProduct</ejb-name>
+ <jndi-name>ejb/MyProduct</jndi-name>
+ <cmp>
+ <is-one-one-cmp>true</is-one-one-cmp>
+ <one-one-finders>
+ <finder>
+ <method-name>findByDescription</method-name>
+ <query-params>String desc</query-params>
+ <query-filter>desc == description</query-filter>
+ </finder>
+ <finder>
+ <method-name>findInRange</method-name>
+ <query-params>double low, double high</query-params>
+ <query-filter>price > low && price < high</query-filter>
+ </finder>
+ </one-one-finders>
+ </cmp>
+ <principal>
+ <name></name>
+ </principal>
+ <ior-security-config>
+ <transport-config>
+ <integrity>NONE</integrity>
+ <confidentiality>NONE</confidentiality>
+ <establish-trust-in-target>NONE</establish-trust-in-target>
+ <establish-trust-in-client>NONE</establish-trust-in-client>
+ </transport-config>
+ <as-context>
+ <auth-method>USERNAME_PASSWORD</auth-method>
+ <realm></realm>
+ <required>FALSE</required>
+ </as-context>
+ <sas-context>
+ <caller-propagation>NONE</caller-propagation>
+ </sas-context>
+ </ior-security-config>
+ <refresh-period-in-seconds>599</refresh-period-in-seconds>
+ <commit-option>COMMIT_OPTION_B</commit-option>
+ <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>
+ <pm-descriptor>
+ <pm-identifier>IPLANET</pm-identifier>
+ <pm-version>1.0</pm-version>
+ <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+ <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+ </pm-descriptor>
+ <pm-inuse>
+ <pm-identifier>IPLANET</pm-identifier>
+ <pm-version>1.0</pm-version>
+ </pm-inuse>
+ </pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <default-resource-principal>
+ <name>mv</name>
+ <password>mv</password>
+ </default-resource-principal>
+ </cmp-resource>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..d6ed7c6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-j2eeguide_productEjb.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>j2eeguide_productEjb</name>
+ <unique-id>758826287</unique-id>
+ <ejb>
+ <ejb-name>MyProduct</ejb-name>
+ <jndi-name>ejb/MyProduct</jndi-name>
+ <cmp>
+ <is-one-one-cmp>true</is-one-one-cmp>
+ <one-one-finders>
+ <finder>
+ <method-name>findByDescription</method-name>
+ <query-params>String desc</query-params>
+ <query-filter>desc == description</query-filter>
+ <query-variables/>
+ </finder>
+ <finder>
+ <method-name>findInRange</method-name>
+ <query-params>double low, double high</query-params>
+ <query-filter>price > low && price < high</query-filter>
+ <query-variables/>
+ </finder>
+ </one-one-finders>
+ </cmp>
+ <principal>
+ <name></name>
+ </principal>
+ <ior-security-config>
+ <transport-config>
+ <integrity>NONE</integrity>
+ <confidentiality>NONE</confidentiality>
+ <establish-trust-in-target>NONE</establish-trust-in-target>
+ <establish-trust-in-client>NONE</establish-trust-in-client>
+ </transport-config>
+ <as-context>
+ <auth-method>USERNAME_PASSWORD</auth-method>
+ <realm></realm>
+ <required>FALSE</required>
+ </as-context>
+ <sas-context>
+ <caller-propagation>NONE</caller-propagation>
+ </sas-context>
+ </ior-security-config>
+ <refresh-period-in-seconds>599</refresh-period-in-seconds>
+ <commit-option>COMMIT_OPTION_B</commit-option>
+ <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>
+ <pm-descriptor>
+ <pm-identifier>IPLANET</pm-identifier>
+ <pm-version>1.0</pm-version>
+ <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+ <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+ </pm-descriptor>
+ <pm-inuse>
+ <pm-identifier>IPLANET</pm-identifier>
+ <pm-version>1.0</pm-version>
+ </pm-inuse>
+ </pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <default-resource-principal>
+ <name>mv</name>
+ <password>mv</password>
+ </default-resource-principal>
+ </cmp-resource>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-productWebStuff.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-productWebStuff.xml
new file mode 100644
index 0000000..96fc1cc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-productWebStuff.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>MyProduct</ejb-ref-name>
+ <jndi-name>ejb/MyProduct</jndi-name>
+ </ejb-ref>
+ <jsp-config/>
+</sun-web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-web.xml
new file mode 100644
index 0000000..96fc1cc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>MyProduct</ejb-ref-name>
+ <jndi-name>ejb/MyProduct</jndi-name>
+ </ejb-ref>
+ <jsp-config/>
+</sun-web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/web.xml
new file mode 100644
index 0000000..bf7dbb0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/web.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <servlet>
+ <servlet-name>Servlet_j2eeguide.product.ProductServlet</servlet-name>
+ <display-name>Servlet j2eeguide.product.ProductServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>j2eeguide.product.ProductServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Servlet_j2eeguide.product.ProductServlet</servlet-name>
+ <url-pattern>/servlet/ProductServlet</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ <welcome-file>
+ index.html
+ </welcome-file>
+ <welcome-file>
+ index.htm
+ </welcome-file>
+ </welcome-file-list>
+ <ejb-ref>
+ <ejb-ref-name>MyProduct</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>j2eeguide.product.ProductHome</home>
+ <remote>j2eeguide.product.Product</remote>
+ <ejb-link>MyProduct</ejb-link>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..c3a7f4c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/Product.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package j2eeguide.product;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+public interface Product extends EJBObject {
+
+ public void setPrice(double price) 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
new file mode 100755
index 0000000..9ceda1c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package j2eeguide.product;
+
+import java.util.*;
+import javax.ejb.*;
+
+public class ProductEJB implements EntityBean {
+
+ public String productId;
+ public String description;
+ public double price;
+
+ private EntityContext context;
+
+ public void setPrice(double price) {
+
+ this.price = price;
+ }
+
+ public double getPrice() {
+
+ return price;
+ }
+
+ public String getDescription() {
+
+ return description;
+ }
+
+ public String ejbCreate(String productId, String description,
+ double price) throws CreateException {
+
+ if (productId == null) {
+ throw new CreateException("The productId is required.");
+ }
+
+ this.productId = productId;
+ this.description = description;
+ this.price = price;
+
+ return null;
+ }
+
+ public void setEntityContext(EntityContext context) {
+
+ this.context = context;
+ }
+
+ public void ejbActivate() {
+
+ productId = (String)context.getPrimaryKey();
+ }
+
+ public void ejbPassivate() {
+
+ productId = null;
+ description = null;
+ }
+
+ public void ejbRemove() { }
+ public void ejbLoad() { }
+ public void ejbStore() { }
+ public void unsetEntityContext() { }
+ public void ejbPostCreate(String productId, String description,
+ double balance) { }
+
+} // ProductEJB
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB_JDOState.mapping b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB_JDOState.mapping
new file mode 100644
index 0000000..2f4f808
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB_JDOState.mapping
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl" ID="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl-608616140">
+ <_databaseRoot>productSchema</_databaseRoot>
+ <_persistenceElement>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement" ID="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement-608616140">
+ <_impl>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceClassElementImpl" ID="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceClassElementImpl6241271">
+ <_element>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement-608616140"/>
+ </_element>
+ <_name>j2eeguide.product.ProductEJB_JDOState</_name>
+ <_fields>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementCollection" ID="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementCollection5897293">
+ <_propertyName>fields</_propertyName>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement">
+ </ARRAY>
+ </_template>
+ <_elements>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement" ID="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement-1660446818">
+ <_impl>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl" ID="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl12788585">
+ <_element>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement-1660446818"/>
+ </_element>
+ <_name>productId</_name>
+ <_persistenceType>0</_persistenceType>
+ <_isKey>true</_isKey>
+ <_derivedModifier>0</_derivedModifier>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport4836513">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement-1660446818"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ </OBJECT>
+ </_impl>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement-608616140"/>
+ </_declaringClass>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement" ID="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement1961805104">
+ <_impl>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl" ID="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl1677214">
+ <_element>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement1961805104"/>
+ </_element>
+ <_name>description</_name>
+ <_persistenceType>0</_persistenceType>
+ <_isKey>false</_isKey>
+ <_derivedModifier>0</_derivedModifier>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport3229244">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement1961805104"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ </OBJECT>
+ </_impl>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement-608616140"/>
+ </_declaringClass>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement" ID="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement-501681539">
+ <_impl>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl" ID="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl16390934">
+ <_element>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement-501681539"/>
+ </_element>
+ <_name>price</_name>
+ <_persistenceType>0</_persistenceType>
+ <_isKey>false</_isKey>
+ <_derivedModifier>0</_derivedModifier>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport549418">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement-501681539"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ </OBJECT>
+ </_impl>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement-608616140"/>
+ </_declaringClass>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elements>
+ <_owner>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceClassElementImpl6241271"/>
+ </_owner>
+ </OBJECT>
+ </_fields>
+ <_keyClass>j2eeguide.product.ProductEJB_JDOState.Oid</_keyClass>
+ <_objectIdentityType>0</_objectIdentityType>
+ <_groups>
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementCollection" ID="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementCollection6607539">
+ <_propertyName>groups</_propertyName>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.jdo.api.persistence.model.jdo.ConcurrencyGroupElement">
+ </ARRAY>
+ </_template>
+ <_elements>
+ <OBJECT/>
+ </_elements>
+ <_owner>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.impl.PersistenceClassElementImpl6241271"/>
+ </_owner>
+ </OBJECT>
+ </_groups>
+ <_isModified>false</_isModified>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport4530158">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement-608616140"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ </OBJECT>
+ </_impl>
+ </OBJECT>
+ </_persistenceElement>
+ <_name>j2eeguide.product.ProductEJB_JDOState</_name>
+ <versionNo>3</versionNo>
+ <_fields>
+ <ARRAY SIZE="3" CLASS="java.util.ArrayList" ROWCLASS="">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl" ID="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl1961805104">
+ <_columns>
+ <ARRAY SIZE="1" CLASS="java.util.ArrayList" ROWCLASS="">
+ <ROW ROW="0" ROWCLASS="java.lang.String" VALUE="PRODUCT.DESCRIPTION"/>
+ </ARRAY>
+ </_columns>
+ <_properties>0</_properties>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport3361696">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl1961805104"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl-608616140"/>
+ </_declaringClass>
+ <_name>description</_name>
+ <_fetchGroup>1</_fetchGroup>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl" ID="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl-501681539">
+ <_columns>
+ <ARRAY SIZE="1" CLASS="java.util.ArrayList" ROWCLASS="">
+ <ROW ROW="0" ROWCLASS="java.lang.String" VALUE="PRODUCT.PRICE"/>
+ </ARRAY>
+ </_columns>
+ <_properties>0</_properties>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport11154182">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl-501681539"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl-608616140"/>
+ </_declaringClass>
+ <_name>price</_name>
+ <_fetchGroup>1</_fetchGroup>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl" ID="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl-1660446818">
+ <_columns>
+ <ARRAY SIZE="1" CLASS="java.util.ArrayList" ROWCLASS="">
+ <ROW ROW="0" ROWCLASS="java.lang.String" VALUE="PRODUCT.PRODUCTID"/>
+ </ARRAY>
+ </_columns>
+ <_properties>0</_properties>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport16517168">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl-1660446818"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl-608616140"/>
+ </_declaringClass>
+ <_name>productId</_name>
+ <_fetchGroup>1</_fetchGroup>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_fields>
+ <_tables>
+ <ARRAY SIZE="1" CLASS="java.util.ArrayList" ROWCLASS="">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.jdo.api.persistence.model.mapping.impl.MappingTableElementImpl" ID="com.sun.jdo.api.persistence.model.mapping.impl.MappingTableElementImpl-200107517">
+ <_table>PRODUCT</_table>
+ <_referencingKeys>
+ <OBJECT/>
+ </_referencingKeys>
+ <_name>PRODUCT</_name>
+ <_support>
+ <OBJECT/>
+ </_support>
+ <_declaringClass>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl-608616140"/>
+ </_declaringClass>
+ <_key>
+ <ARRAY SIZE="1" CLASS="java.util.ArrayList" ROWCLASS="">
+ <ROW ROW="0" ROWCLASS="java.lang.String" VALUE="PRODUCT.PRODUCTID"/>
+ </ARRAY>
+ </_key>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_tables>
+ <_properties>4</_properties>
+ <_isModified>false</_isModified>
+ <_support>
+ <OBJECT CLASS="java.beans.PropertyChangeSupport" ID="java.beans.PropertyChangeSupport8228607">
+ <children>
+ <OBJECT/>
+ </children>
+ <source>
+ <OBJECT REFERENCE="com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl-608616140"/>
+ </source>
+ <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
+ </OBJECT>
+ </_support>
+</OBJECT>
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
new file mode 100755
index 0000000..e44baea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package j2eeguide.product;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.*;
+
+public interface ProductHome extends EJBHome {
+
+ public Product create(String productId, String description,
+ double balance) throws RemoteException, CreateException;
+
+ public Product findByPrimaryKey(String productId)
+ throws FinderException, RemoteException;
+
+ public Collection findByDescription(String description)
+ throws FinderException, RemoteException;
+
+ public Collection findInRange(double low, double high)
+ throws FinderException, RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/productSchema.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/productSchema.dbschema
new file mode 100644
index 0000000..2bb5139
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/productSchema.dbschema
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement1027358576">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl238339">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement1027358576"/>
+ </element>
+ <_driverName>PointBase JDBC Driver</_driverName>
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection7871549">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl238339"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-1186121647">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4404583">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1921558">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4404583"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-903670337">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl6760684">
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3126852">
+ <name>DESCRIPTION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
+ <value>255</value>
+ </OBJECT>
+ </_precision>
+ <_type>12</_type>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-903670337"/>
+ </element>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1186121647"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement946380108">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl7709756">
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7442852">
+ <name>PRICE</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer64">
+ <value>64</value>
+ </OBJECT>
+ </_precision>
+ <_type>8</_type>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement946380108"/>
+ </element>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer32">
+ <value>32</value>
+ </OBJECT>
+ </_scale>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer64"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1186121647"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1390639923">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl5901103">
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1332217">
+ <name>PRODUCTID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1390639923"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1186121647"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1186121647"/>
+ </element>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection7879562">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4404583"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-587851704">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl1378281">
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3827867">
+ <name>PK_PRODUCT</name>
+ </OBJECT>
+ </_name>
+ <_unique>true</_unique>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-587851704"/>
+ </element>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection8226997">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4404583"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1390639923"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4404583"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1186121647"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2729163">
+ <name>PRODUCT</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection860315">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4404583"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-587851704">
+ <_associatedIndex>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-587851704"/>
+ </_associatedIndex>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl149512">
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4659645">
+ <name>PK_PRODUCT</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-587851704"/>
+ </element>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1863278">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl149512"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1390639923"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1186121647"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <table>PRODUCT</table>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_url>jdbc:pointbase://localhost:9092/sample</_url>
+ <_username>public</_username>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7003845">
+ <name>productSchema</name>
+ </OBJECT>
+ </_name>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4689432">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <_driverVersion>3.5RE LIMITED TO 5MB</_driverVersion>
+ <_driver>com.pointbase.jdbc.jdbcUniversalDriver</_driver>
+ <_databaseProductVersion>3.5RE LIMITED TO 5MB</_databaseProductVersion>
+ <_databaseProductName>PointBase</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4313338">
+ <name>PUBLIC</name>
+ </OBJECT>
+ </_schema>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
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
new file mode 100755
index 0000000..d5a5cc6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/servlet/ProductServlet.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package j2eeguide.product;
+
+import java.io.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.rmi.PortableRemoteObject;
+import javax.naming.InitialContext;
+
+import j2eeguide.product.*;
+
+public class ProductServlet extends HttpServlet {
+
+ public void doGet (HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.setContentType("text/html");
+ PrintWriter out = res.getWriter();
+
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>Product Sample App for CMP</title>");
+ out.println("</head>");
+ out.println("<body>");
+
+ try {
+
+ 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.class);
+
+ Product duke = home.create("123", "Ceramic Dog", 10.00);
+ out.println("<BR>" + duke.getDescription() + ": " + duke.getPrice());
+ duke.setPrice(14.00);
+ out.println("<BR>" + duke.getDescription() + ": " + duke.getPrice());
+
+ duke = home.create("456", "Wooden Duck", 13.00);
+ duke = home.create("999", "Ivory Cat", 19.00);
+ duke = home.create("789", "Ivory Cat", 33.00);
+ duke = home.create("876", "Chrome Fish", 22.00);
+
+ Product earl = home.findByPrimaryKey("876");
+ out.println("<BR>" + earl.getDescription() + ": " + earl.getPrice());
+
+ Collection c = home.findByDescription("Ivory Cat");
+ Iterator i = c.iterator();
+
+ while (i.hasNext()) {
+ Product product = (Product)i.next();
+ String productId = (String)product.getPrimaryKey();
+ String description = product.getDescription();
+ double price = product.getPrice();
+ out.println("<BR>" + productId + ": " + description + " " + price);
+ }
+
+ c = home.findInRange(10.00, 20.00);
+ i = c.iterator();
+
+ while (i.hasNext()) {
+ Product product = (Product)i.next();
+ String productId = (String)product.getPrimaryKey();
+ double price = product.getPrice();
+ out.println("<BR>" + productId + ": " + price);
+ }
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception." );
+ ex.printStackTrace();
+ }
+
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/drop_j2eeguide_product_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/drop_j2eeguide_product_derby.sql
new file mode 100755
index 0000000..e41c51a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/drop_j2eeguide_product_derby.sql
@@ -0,0 +1 @@
+drop table product;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product.sql
new file mode 100755
index 0000000..f8f5574
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product.sql
@@ -0,0 +1,12 @@
+drop table product;
+
+create table product
+(
+ description varchar(255),
+ price double precision not null,
+ productid varchar(255) constraint pk_product primary key
+);
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_db2.sql
new file mode 100755
index 0000000..b3504cf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_db2.sql
@@ -0,0 +1,12 @@
+drop table product;
+
+create table product
+(
+ description VARCHAR(255),
+ price double precision not null,
+ productid VARCHAR(255) constraint pk_product primary key NOT NULL
+);
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_derby.sql
new file mode 100755
index 0000000..9259140
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_derby.sql
@@ -0,0 +1,8 @@
+drop table product;
+
+create table product
+(
+ description VARCHAR(255),
+ price double precision not null,
+ productid VARCHAR(255) constraint pk_product primary key NOT NULL
+);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_ifx.sql
new file mode 100755
index 0000000..6090117
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_ifx.sql
@@ -0,0 +1,12 @@
+drop table product;
+
+create table product
+(
+ description VARCHAR(127),
+ price double precision not null,
+ productid VARCHAR(127) primary key
+);
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_mssql.sql
new file mode 100755
index 0000000..a181d14
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_mssql.sql
@@ -0,0 +1,12 @@
+drop table PRODUCT
+go
+
+create table PRODUCT
+(
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION NOT NULL,
+ PRODUCTID VARCHAR(255) CONSTRAINT PK_PRODUCT PRIMARY KEY
+)
+
+go
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_mysql.sql
new file mode 100755
index 0000000..da7235c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_mysql.sql
@@ -0,0 +1,12 @@
+DROP TABLE PRODUCT;
+
+CREATE TABLE PRODUCT
+(
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION NOT NULL,
+ PRODUCTId VARCHAR(255) PRIMARY KEY
+) ENGINE=INNODB;
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_ora.sql
new file mode 100755
index 0000000..cf8f979
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_ora.sql
@@ -0,0 +1,12 @@
+drop table product;
+
+create table product
+(
+ description VARCHAR(255),
+ price double precision not null,
+ productid VARCHAR(255) constraint pk_product primary key
+);
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_pbs.sql
new file mode 100755
index 0000000..cf8f979
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_pbs.sql
@@ -0,0 +1,12 @@
+drop table product;
+
+create table product
+(
+ description VARCHAR(255),
+ price double precision not null,
+ productid VARCHAR(255) constraint pk_product primary key
+);
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_psql.sql
new file mode 100755
index 0000000..7c1c413
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_psql.sql
@@ -0,0 +1,12 @@
+DROP TABLE PRODUCT cascade;
+
+CREATE TABLE PRODUCT
+(
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION NOT NULL,
+ PRODUCTId VARCHAR(255) PRIMARY KEY
+);
+
+commit;
+
+exit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_syb.sql
new file mode 100755
index 0000000..b8ecf94
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/sql/j2eeguide_product_syb.sql
@@ -0,0 +1,10 @@
+drop table PRODUCT
+go
+
+create table PRODUCT
+(
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION not null,
+ PRODUCTID VARCHAR(255) not null constraint PK_PRODUCT primary key
+)
+go
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
new file mode 100644
index 0000000..99dc805
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.properties
@@ -0,0 +1,41 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="OrderApp"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="ejb-jar-request.xml" value="descriptor/ejb-jar-request.xml"/>
+<property name="sun-ejb-jar-request.xml" value="descriptor/sun-ejb-jar-request.xml"/>
+<property name="ejb-jar-dataregistry.xml" value="descriptor/ejb-jar-dataregistry.xml"/>
+<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="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
new file mode 100644
index 0000000..d9a3a6a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="orderapp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="test1-all"/>
+
+ <target name="test1-all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <delete file="${sun-ejb-jar.xml}"/>
+ <delete file="${ejb-jar.xml}"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-request-jar"/>
+ <antcall target="package-dataregistry-jar"/>
+ <antcall target="package-appclient-jar"/>
+ <antcall target="package-ear"/>
+ </target>
+
+ <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="ejbjar.classes" value="**/**/*Request*.class" />
+ <param name="ejb.jar" value="${assemble.dir}/ejb-jar-ic.jar"/>
+ </antcall>
+ </target>
+
+ <target name="package-dataregistry-jar">
+ <antcall target="package-ejbjar-common">
+ <param name="ejb-jar.xml" value="${ejb-jar-dataregistry.xml}"/>
+ <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="ejb.jar" value="${assemble.dir}/ejb-jar-ic1.jar"/>
+ </antcall>
+ </target>
+
+ <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>
+
+
+ <target name="package-ear">
+
+ <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"/>
+
+ <ear earfile="${assemble.dir}/${appname}.ear" appxml="${application.xml}">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ </fileset>
+
+ <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"/>
+ </fileset>
+
+ </ear>
+ </target>
+
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/orderapp_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common" >
+ <param name="deployed.app" value="${assemble.dir}/${appname}.ear"/>
+ </antcall>
+
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/drop_orderapp_derby.sql"/>
+ </antcall>
+ </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"/>
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/*Blob*.class" />
+ <param name="appclientjar.classes"
+ value="**/BlobTestHome.class,**/BlobTest.class,**/*Client*.class"
+/>
+ </antcall>
+ </target>
+
+ <target name="deploy1"
+ depends="init-common">
+ <antcall target="deploy-common">
+ <param name="extra-params"
+ value="--uniquetablenames=true --createtables=true"/>
+ </antcall>
+ </target>
+
+ <target name="run1" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args"
+ value="Java2DBTest"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy1" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..ffc408e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/Client.java
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+
+import java.text.MessageFormat;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import request.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static OrderRequest orderRequest;
+
+ public static void main(String[] args) {
+
+ try {
+ stat.addDescription("OrderApp");
+ Context initial = new InitialContext();
+
+ Object objref = initial.lookup("java:comp/env/ejb/Request");
+ RequestHome home = (RequestHome)PortableRemoteObject.narrow(objref,
+ RequestHome.class);
+
+ Request request = home.create();
+
+ createData(request);
+ printData(request);
+ stat.addStatus("ejbclient OrderApp", stat.PASS);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient OrderApp", stat.FAIL);
+ }
+ stat.printSummary("OrderApp");
+ }
+
+ private static void createData(Request request) {
+ try {
+ request.createPart(new PartRequest("1234-5678-01", 1, "ABC PART",
+ new java.util.Date(), "PARTQWERTYUIOPASXDCFVGBHNJMKL", null));
+ request.createPart(new PartRequest("9876-4321-02", 2, "DEF PART",
+ new java.util.Date(), "PARTQWERTYUIOPASXDCFVGBHNJMKL", null));
+ request.createPart(new PartRequest("5456-6789-03", 3, "GHI PART",
+ new java.util.Date(), "PARTQWERTYUIOPASXDCFVGBHNJMKL", null));
+ request.createPart(new PartRequest("ABCD-XYZW-FF", 5, "XYZ PART",
+ new java.util.Date(), "PARTQWERTYUIOPASXDCFVGBHNJMKL", null));
+ request.createPart(new PartRequest("SDFG-ERTY-BN", 7, "BOM PART",
+ new java.util.Date(), "PARTQWERTYUIOPASXDCFVGBHNJMKL", null));
+
+ request.addPartToBillOfMaterial(new BomRequest("SDFG-ERTY-BN", 7,
+ "1234-5678-01", 1));
+ request.addPartToBillOfMaterial(new BomRequest("SDFG-ERTY-BN", 7,
+ "9876-4321-02", 2));
+ request.addPartToBillOfMaterial(new BomRequest("SDFG-ERTY-BN", 7,
+ "5456-6789-03", 3));
+ request.addPartToBillOfMaterial(new BomRequest("SDFG-ERTY-BN", 7,
+ "ABCD-XYZW-FF", 5));
+
+ request.createVendor(new VendorRequest(100, "WidgetCorp",
+ "111 Main St., Anytown, KY 99999", "Mr. Jones",
+ "888-777-9999"));
+ request.createVendor(new VendorRequest(200, "Gadget, Inc.",
+ "123 State St., Sometown, MI 88888", "Mrs. Smith",
+ "866-345-6789"));
+
+ request.createVendorPart(new VendorPartRequest("1234-5678-01", 1,
+ "PART1", 100.00, 100));
+ request.createVendorPart(new VendorPartRequest("9876-4321-02", 2,
+ "PART2", 10.44, 200));
+ request.createVendorPart(new VendorPartRequest("5456-6789-03", 3,
+ "PART3", 76.23, 200));
+ request.createVendorPart(new VendorPartRequest("ABCD-XYZW-FF", 5,
+ "PART4", 55.19, 100));
+ request.createVendorPart(new VendorPartRequest("SDFG-ERTY-BN", 7,
+ "PART5", 345.87, 100));
+
+ Integer orderId = new Integer(1111);
+ request.createOrder(new OrderRequest(orderId, 'N', 10,
+ "333 New Court, NewCity, CA 90000"));
+ request.addLineItem(new LineItemRequest(orderId, "1234-5678-01", 1, 3));
+ request.addLineItem(new LineItemRequest(orderId, "9876-4321-02", 2, 5));
+ request.addLineItem(new LineItemRequest(orderId, "ABCD-XYZW-FF", 5, 7));
+
+ orderId = new Integer(4312);
+ request.createOrder(new OrderRequest(orderId, 'N', 0,
+ "333 New Court, NewCity, CA 90000"));
+ request.addLineItem(new LineItemRequest(orderId, "SDFG-ERTY-BN", 7, 1));
+ request.addLineItem(new LineItemRequest(orderId, "ABCD-XYZW-FF", 5, 3));
+ request.addLineItem(new LineItemRequest(orderId, "1234-5678-01", 1, 15));
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient OrderApp", stat.FAIL);
+ }
+ }
+
+ private static MessageFormat mf = new MessageFormat(": {0, number, $#,##0.##}");
+
+ private static void printData(Request request) {
+ try {
+
+ BomRequest bomRequest = new BomRequest("SDFG-ERTY-BN", 7, null, 0);
+ double price = request.getBillOfMaterialPrice(bomRequest);
+ System.out.println("Cost of Bill of Material for PN "
+ + bomRequest.bomPartNumber + " Rev: "
+ + bomRequest.bomRevision
+ + mf.format(new Object[] {new Double(price)}));
+
+ printCostOfOrders(request);
+
+ System.out.println("\nAdding 5% discount");
+ request.adjustOrderDiscount(5);
+ printCostOfOrders(request);
+
+ System.out.println("\nRemoving 7% discount");
+ request.adjustOrderDiscount(-7);
+ printCostOfOrders(request);
+
+ java.lang.Double price0 = request.getAvgPrice();
+ if (price0 == null) {
+ System.out.println("\nNo parts found");
+ } else {
+ System.out.println("\nAverage price of all parts"
+ + mf.format(new Object[] {price0}));
+ }
+
+ VendorRequest vendorRequest = new VendorRequest(100, null, null, null, null);
+ price0 = request.getTotalPricePerVendor(vendorRequest);
+ if (price0 == null) {
+ System.out.println("\nNo parts found for Vendor "
+ + vendorRequest.vendorId);
+ } else {
+ System.out.println("\nTotal price of parts for Vendor "
+ + vendorRequest.vendorId + ""
+ + mf.format(new Object[] {price0}));
+ }
+
+ System.out.println("\nOrdered list of vendors for order 1111");
+ System.out.println(request.reportVendorsByOrder(new Integer(1111)));
+
+ System.out.println("Counting all line items");
+ int count = request.countAllItems();
+ System.out.println("Found " + count + " line items");
+
+ System.out.println("\nRemoving Order");
+ request.removeOrder(new Integer(4312));
+ count = request.countAllItems();
+ System.out.println("Found " + count + " line items");
+
+ Collection names = request.locateVendorsByPartialName("I");
+ System.out.println("\nFound " + names.size()
+ + " out of 2 vendors with 'I' in the name:");
+ for (Iterator it = names.iterator(); it.hasNext();) {
+ System.out.println(it.next());
+ }
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient OrderApp", stat.FAIL);
+ }
+ }
+
+ 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
+ + mf.format(new Object[] {new Double(price)}));
+
+ orderId = new Integer(4312);
+ price = request.getOrderPrice(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/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/MANIFEST.MF
new file mode 100644
index 0000000..fb51caf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.1_01 (Sun Microsystems Inc.)
+Main-Class: client.Client
+Name: client/Client.class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/application-client.xml
new file mode 100644
index 0000000..50e3f0f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/application-client.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" 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>OrderAppClient</display-name>
+<ejb-ref>
+<ejb-ref-name>ejb/Request</ejb-ref-name>
+<ejb-ref-type>Session</ejb-ref-type>
+<home>request.RequestHome</home>
+<remote>request.Request</remote>
+</ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/application.xml
new file mode 100644
index 0000000..9e59d2a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/application.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" 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_1_4.xsd">
+<description>Application description</description>
+<display-name>OrderApp</display-name>
+<module>
+<java>OrderAppAppClient.jar</java>
+</module>
+<module>
+<ejb>ejb-jar-ic.jar</ejb>
+</module>
+<module>
+<ejb>ejb-jar-ic1.jar</ejb>
+</module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/ejb-jar-dataregistry.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/ejb-jar-dataregistry.xml
new file mode 100644
index 0000000..6e9340b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/ejb-jar-dataregistry.xml
@@ -0,0 +1,512 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" 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/ejb-jar_2_1.xsd">
+<display-name>DataRegistryJAR</display-name>
+<enterprise-beans>
+<entity>
+<ejb-name>OrderBean</ejb-name>
+<local-home>dataregistry.LocalOrderHome</local-home>
+<local>dataregistry.LocalOrder</local>
+<ejb-class>dataregistry.OrderBean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>java.lang.Integer</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>2.x</cmp-version>
+<abstract-schema-name>Order</abstract-schema-name>
+<cmp-field>
+<description>no description</description>
+<field-name>discount</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>orderId</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>shipmentInfo</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>status</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>lastUpdate</field-name>
+</cmp-field>
+<primkey-field>orderId</primkey-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+<query>
+<query-method>
+<method-name>ejbSelectAll</method-name>
+<method-params/>
+</query-method>
+<result-type-mapping>Local</result-type-mapping>
+<ejb-ql>SELECT OBJECT(o)
+FROM Order o</ejb-ql>
+</query>
+</entity>
+<entity>
+<ejb-name>VendorPartBean</ejb-name>
+<local-home>dataregistry.LocalVendorPartHome</local-home>
+<local>dataregistry.LocalVendorPart</local>
+<ejb-class>dataregistry.VendorPartBean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>java.lang.Object</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>2.x</cmp-version>
+<abstract-schema-name>VendorPart</abstract-schema-name>
+<cmp-field>
+<description>no description</description>
+<field-name>price</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>description</field-name>
+</cmp-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+<query>
+<query-method>
+<method-name>ejbSelectTotalPricePerVendor</method-name>
+<method-params>
+<method-param>int</method-param>
+</method-params>
+</query-method>
+<ejb-ql>SELECT SUM(vp.price)
+FROM VendorPart vp
+WHERE vp.vendor.vendorId = ?1</ejb-ql>
+</query>
+<query>
+<query-method>
+<method-name>ejbSelectAvgPrice</method-name>
+<method-params/>
+</query-method>
+<ejb-ql>SELECT AVG(vp.price)
+FROM VendorPart vp</ejb-ql>
+</query>
+</entity>
+<entity>
+<ejb-name>LineItemBean</ejb-name>
+<local-home>dataregistry.LocalLineItemHome</local-home>
+<local>dataregistry.LocalLineItem</local>
+<ejb-class>dataregistry.LineItemBean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>dataregistry.LineItemKey</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>2.x</cmp-version>
+<abstract-schema-name>LineItem</abstract-schema-name>
+<cmp-field>
+<description>no description</description>
+<field-name>orderId</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>itemId</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>quantity</field-name>
+</cmp-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+<query>
+<query-method>
+<method-name>findAll</method-name>
+<method-params/>
+</query-method>
+<ejb-ql>SELECT OBJECT(l)
+FROM LineItem l</ejb-ql>
+</query>
+</entity>
+<entity>
+<ejb-name>PartBean</ejb-name>
+<local-home>dataregistry.LocalPartHome</local-home>
+<local>dataregistry.LocalPart</local>
+<ejb-class>dataregistry.PartBean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>dataregistry.PartKey</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>2.x</cmp-version>
+<abstract-schema-name>Part</abstract-schema-name>
+<cmp-field>
+<description>no description</description>
+<field-name>drawing</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>partNumber</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>revisionDate</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>description</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>revision</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>specification</field-name>
+</cmp-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</entity>
+<entity>
+<ejb-name>VendorBean</ejb-name>
+<local-home>dataregistry.LocalVendorHome</local-home>
+<local>dataregistry.LocalVendor</local>
+<ejb-class>dataregistry.VendorBean</ejb-class>
+<persistence-type>Container</persistence-type>
+<prim-key-class>dataregistry.VendorKey</prim-key-class>
+<reentrant>false</reentrant>
+<cmp-version>2.x</cmp-version>
+<abstract-schema-name>Vendor</abstract-schema-name>
+<cmp-field>
+<description>no description</description>
+<field-name>phone</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>contact</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>vendorId</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>address</field-name>
+</cmp-field>
+<cmp-field>
+<description>no description</description>
+<field-name>name</field-name>
+</cmp-field>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+<query>
+<query-method>
+<method-name>findByPartialName</method-name>
+<method-params>
+<method-param>java.lang.String</method-param>
+</method-params>
+</query-method>
+<ejb-ql>SELECT OBJECT(v) FROM Vendor v
+WHERE LOCATE(?1, v.name) > 0</ejb-ql>
+</query>
+<query>
+<query-method>
+<method-name>findByOrder</method-name>
+<method-params>
+<method-param>java.lang.Integer</method-param>
+</method-params>
+</query-method>
+<ejb-ql>SELECT DISTINCT
+l.vendorPart.vendor
+FROM Order o, IN(o.lineItems) AS l
+WHERE o.orderId = ?1 ORDER BY l.vendorPart.vendor.name</ejb-ql>
+</query>
+</entity>
+</enterprise-beans>
+<relationships>
+<ejb-relation>
+<ejb-relationship-role>
+<multiplicity>Many</multiplicity>
+<relationship-role-source>
+<ejb-name>LineItemBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>vendorPart</cmr-field-name>
+</cmr-field>
+</ejb-relationship-role>
+<ejb-relationship-role>
+<multiplicity>One</multiplicity>
+<relationship-role-source>
+<ejb-name>VendorPartBean</ejb-name>
+</relationship-role-source>
+</ejb-relationship-role>
+</ejb-relation>
+<ejb-relation>
+<ejb-relationship-role>
+<multiplicity>One</multiplicity>
+<relationship-role-source>
+<ejb-name>OrderBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>lineItems</cmr-field-name>
+<cmr-field-type>java.util.Collection</cmr-field-type>
+</cmr-field>
+</ejb-relationship-role>
+<ejb-relationship-role>
+<multiplicity>Many</multiplicity>
+<cascade-delete/>
+<relationship-role-source>
+<ejb-name>LineItemBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>order</cmr-field-name>
+</cmr-field>
+</ejb-relationship-role>
+</ejb-relation>
+<ejb-relation>
+<ejb-relationship-role>
+<multiplicity>One</multiplicity>
+<relationship-role-source>
+<ejb-name>VendorPartBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>part</cmr-field-name>
+</cmr-field>
+</ejb-relationship-role>
+<ejb-relationship-role>
+<multiplicity>One</multiplicity>
+<relationship-role-source>
+<ejb-name>PartBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>vendorPart</cmr-field-name>
+</cmr-field>
+</ejb-relationship-role>
+</ejb-relation>
+<ejb-relation>
+<ejb-relationship-role>
+<multiplicity>Many</multiplicity>
+<cascade-delete/>
+<relationship-role-source>
+<ejb-name>VendorPartBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>vendor</cmr-field-name>
+</cmr-field>
+</ejb-relationship-role>
+<ejb-relationship-role>
+<multiplicity>One</multiplicity>
+<relationship-role-source>
+<ejb-name>VendorBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>vendorParts</cmr-field-name>
+<cmr-field-type>java.util.Collection</cmr-field-type>
+</cmr-field>
+</ejb-relationship-role>
+</ejb-relation>
+<ejb-relation>
+<ejb-relationship-role>
+<multiplicity>Many</multiplicity>
+<relationship-role-source>
+<ejb-name>PartBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>bomPart</cmr-field-name>
+</cmr-field>
+</ejb-relationship-role>
+<ejb-relationship-role>
+<multiplicity>One</multiplicity>
+<relationship-role-source>
+<ejb-name>PartBean</ejb-name>
+</relationship-role-source>
+<cmr-field>
+<cmr-field-name>parts</cmr-field-name>
+<cmr-field-type>java.util.Collection</cmr-field-type>
+</cmr-field>
+</ejb-relationship-role>
+</ejb-relation>
+</relationships>
+<assembly-descriptor>
+<container-transaction>
+<method>
+<ejb-name>OrderBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getDiscount</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>OrderBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>remove</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>OrderBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>calculateAmmount</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>OrderBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getOrderId</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>OrderBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getNextId</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>OrderBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>setDiscount</method-name>
+<method-params>
+<method-param>int</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorPartBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>remove</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorPartBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getPrice</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>LineItemBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>remove</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>LineItemBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getVendorPart</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>LineItemBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getQuantity</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>PartBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>setBomPart</method-name>
+<method-params>
+<method-param>dataregistry.LocalPart</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>PartBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>remove</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>PartBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getVendorPart</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>PartBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getParts</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getVendorId</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getName</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>remove</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>addVendorPart</method-name>
+<method-params>
+<method-param>dataregistry.LocalVendorPart</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>VendorBean</ejb-name>
+<method-intf>Local</method-intf>
+<method-name>getContact</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+</assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/ejb-jar-request.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/ejb-jar-request.xml
new file mode 100644
index 0000000..38fbb4b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/ejb-jar-request.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" 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/ejb-jar_2_1.xsd">
+<display-name>RequestJAR</display-name>
+<enterprise-beans>
+<session>
+<ejb-name>RequestBean</ejb-name>
+<home>request.RequestHome</home>
+<remote>request.Request</remote>
+<ejb-class>request.RequestBean</ejb-class>
+<session-type>Stateful</session-type>
+<transaction-type>Container</transaction-type>
+<ejb-local-ref>
+<ejb-ref-name>ejb/SimpleLineItem</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<local-home>dataregistry.LocalLineItemHome</local-home>
+<local>dataregistry.LocalLineItem</local>
+<ejb-link>ejb-jar-ic1.jar#LineItemBean</ejb-link>
+</ejb-local-ref>
+<ejb-local-ref>
+<ejb-ref-name>ejb/SimpleVendorPart</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<local-home>dataregistry.LocalVendorPartHome</local-home>
+<local>dataregistry.LocalVendorPart</local>
+<ejb-link>ejb-jar-ic1.jar#VendorPartBean</ejb-link>
+</ejb-local-ref>
+<ejb-local-ref>
+<ejb-ref-name>ejb/SimpleOrder</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<local-home>dataregistry.LocalOrderHome</local-home>
+<local>dataregistry.LocalOrder</local>
+<ejb-link>ejb-jar-ic1.jar#OrderBean</ejb-link>
+</ejb-local-ref>
+<ejb-local-ref>
+<ejb-ref-name>ejb/SimplePart</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<local-home>dataregistry.LocalPartHome</local-home>
+<local>dataregistry.LocalPart</local>
+<ejb-link>ejb-jar-ic1.jar#PartBean</ejb-link>
+</ejb-local-ref>
+<ejb-local-ref>
+<ejb-ref-name>ejb/SimpleVendor</ejb-ref-name>
+<ejb-ref-type>Entity</ejb-ref-type>
+<local-home>dataregistry.LocalVendorHome</local-home>
+<local>dataregistry.LocalVendor</local>
+<ejb-link>ejb-jar-ic1.jar#VendorBean</ejb-link>
+</ejb-local-ref>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</session>
+</enterprise-beans>
+<assembly-descriptor>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>getAvgPrice</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>getTotalPricePerVendor</method-name>
+<method-params>
+<method-param>request.VendorRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>addPartToBillOfMaterial</method-name>
+<method-params>
+<method-param>request.BomRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>getOrderPrice</method-name>
+<method-params>
+<method-param>java.lang.Integer</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>addLineItem</method-name>
+<method-params>
+<method-param>request.LineItemRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>createPart</method-name>
+<method-params>
+<method-param>request.PartRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>removeOrder</method-name>
+<method-params>
+<method-param>java.lang.Integer</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>locateVendorsByPartialName</method-name>
+<method-params>
+<method-param>java.lang.String</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>countAllItems</method-name>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>reportVendorsByOrder</method-name>
+<method-params>
+<method-param>java.lang.Integer</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>createVendorPart</method-name>
+<method-params>
+<method-param>request.VendorPartRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>createVendor</method-name>
+<method-params>
+<method-param>request.VendorRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>adjustOrderDiscount</method-name>
+<method-params>
+<method-param>int</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>getBillOfMaterialPrice</method-name>
+<method-params>
+<method-param>request.BomRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+<container-transaction>
+<method>
+<ejb-name>RequestBean</ejb-name>
+<method-intf>Remote</method-intf>
+<method-name>createOrder</method-name>
+<method-params>
+<method-param>request.OrderRequest</method-param>
+</method-params>
+</method>
+<trans-attribute>Required</trans-attribute>
+</container-transaction>
+</assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..870e11a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Request</ejb-ref-name>
+ <jndi-name>RequestBean</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-application.xml
new file mode 100644
index 0000000..96ae025
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-application.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/appserver/dtds/sun-application_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application>
+ <pass-by-reference>false</pass-by-reference>
+</sun-application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-cmp-mappings-dataregistry.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-cmp-mappings-dataregistry.xml
new file mode 100644
index 0000000..29bdcd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-cmp-mappings-dataregistry.xml
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 OR Mapping//EN" "http://www.sun.com/software/appserver/dtds/sun-cmp-mapping_1_1.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema/>
+ <entity-mapping>
+ <ejb-name>LineItemBean</ejb-name>
+ <table-name>LINEITEM</table-name>
+ <cmp-field-mapping>
+ <field-name>itemId</field-name>
+ <column-name>LINEITEM.ITEM_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>orderId</field-name>
+ <column-name>LINEITEM.ORDER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>quantity</field-name>
+ <column-name>LINEITEM.QUANTITY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>order</cmr-field-name>
+ <column-pair>
+ <column-name>LINEITEM.ORDER_ID</column-name>
+ <column-name>ORDERS.ORDER_ID</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>vendorPart</cmr-field-name>
+ <column-pair>
+ <column-name>LINEITEM.VENDOR_PART_NUMBER</column-name>
+ <column-name>VENDOR_PART.VENDOR_PART_NUMBER</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>PartBean</ejb-name>
+ <table-name>PART</table-name>
+ <cmp-field-mapping>
+ <field-name>description</field-name>
+ <column-name>PART.DESCRIPTION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>drawing</field-name>
+ <column-name>PART_DETAIL.DRAWING</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>partNumber</field-name>
+ <column-name>PART.PART_NUMBER</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>revision</field-name>
+ <column-name>PART.REVISION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>revisionDate</field-name>
+ <column-name>PART.REVISION_DATE</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>specification</field-name>
+ <column-name>PART_DETAIL.SPECIFICATION</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>bomPart</cmr-field-name>
+ <column-pair>
+ <column-name>PART.BOM_PART_NUMBER</column-name>
+ <column-name>PART.PART_NUMBER</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>PART.BOM_REVISION</column-name>
+ <column-name>PART.REVISION</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>parts</cmr-field-name>
+ <column-pair>
+ <column-name>PART.PART_NUMBER</column-name>
+ <column-name>PART.BOM_PART_NUMBER</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>PART.REVISION</column-name>
+ <column-name>PART.BOM_REVISION</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ <!-- add secondary table PART_DETAIL in relationship mapping -->
+ <cmr-field-mapping>
+ <cmr-field-name>vendorPart</cmr-field-name>
+ <column-pair>
+ <column-name>PART_DETAIL.PART_NUMBER</column-name>
+ <column-name>VENDOR_PART.PART_NUMBER</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>PART_DETAIL.REVISION</column-name>
+ <column-name>VENDOR_PART.PART_REVISION</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ <secondary-table>
+ <table-name>PART_DETAIL</table-name>
+ <column-pair>
+ <column-name>PART.PART_NUMBER</column-name>
+ <column-name>PART_DETAIL.PART_NUMBER</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>PART.REVISION</column-name>
+ <column-name>PART_DETAIL.REVISION</column-name>
+ </column-pair>
+ </secondary-table>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>VendorBean</ejb-name>
+ <table-name>VENDOR</table-name>
+ <cmp-field-mapping>
+ <field-name>address</field-name>
+ <column-name>VENDOR.ADDRESS</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>contact</field-name>
+ <column-name>VENDOR.CONTACT</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>VENDOR.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>phone</field-name>
+ <column-name>VENDOR.PHONE</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>vendorId</field-name>
+ <column-name>VENDOR.VENDOR_ID</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>vendorParts</cmr-field-name>
+ <column-pair>
+ <column-name>VENDOR.VENDOR_ID</column-name>
+ <column-name>VENDOR_PART.VENDOR_ID</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>VendorPartBean</ejb-name>
+ <table-name>VENDOR_PART</table-name>
+ <cmp-field-mapping>
+ <field-name>description</field-name>
+ <column-name>VENDOR_PART.DESCRIPTION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>price</field-name>
+ <column-name>VENDOR_PART.PRICE</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <!-- add secondary table PART_DETAIL in relationship mapping -->
+ <cmr-field-name>part</cmr-field-name>
+ <column-pair>
+ <column-name>VENDOR_PART.PART_NUMBER</column-name>
+ <column-name>PART_DETAIL.PART_NUMBER</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>VENDOR_PART.PART_REVISION</column-name>
+ <column-name>PART_DETAIL.REVISION</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>vendor</cmr-field-name>
+ <column-pair>
+ <column-name>VENDOR_PART.VENDOR_ID</column-name>
+ <column-name>VENDOR.VENDOR_ID</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>OrderBean</ejb-name>
+ <table-name>ORDERS</table-name>
+ <cmp-field-mapping>
+ <field-name>discount</field-name>
+ <column-name>ORDERS.DISCOUNT</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>lastUpdate</field-name>
+ <column-name>ORDERS.LAST_UPDATE</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>orderId</field-name>
+ <column-name>ORDERS.ORDER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>shipmentInfo</field-name>
+ <column-name>ORDERS.SHIPMENT_INFO</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>status</field-name>
+ <column-name>ORDERS.STATUS</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>lineItems</cmr-field-name>
+ <column-pair>
+ <column-name>ORDERS.ORDER_ID</column-name>
+ <column-name>LINEITEM.ORDER_ID</column-name>
+ </column-pair>
+ <fetched-with>
+ <none/>
+ </fetched-with>
+ </cmr-field-mapping>
+ </entity-mapping>
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-ejb-jar-dataregistry.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-ejb-jar-dataregistry.xml
new file mode 100644
index 0000000..5cf3de7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-ejb-jar-dataregistry.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>DataRegistryJAR</name>
+ <ejb>
+ <ejb-name>LineItemBean</ejb-name>
+ </ejb>
+ <ejb>
+ <ejb-name>OrderBean</ejb-name>
+ </ejb>
+ <ejb>
+ <ejb-name>PartBean</ejb-name>
+ </ejb>
+ <ejb>
+ <ejb-name>VendorBean</ejb-name>
+ </ejb>
+ <ejb>
+ <ejb-name>VendorPartBean</ejb-name>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-ejb-jar-request.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-ejb-jar-request.xml
new file mode 100644
index 0000000..d24f02a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/descriptor/sun-ejb-jar-request.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>RequestJAR</name>
+ <ejb>
+ <ejb-name>RequestBean</ejb-name>
+ <jndi-name>RequestBean</jndi-name>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LineItemBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LineItemBean.java
new file mode 100755
index 0000000..0c3f10e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LineItemBean.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public abstract class LineItemBean 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()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract Integer getOrderId();
+ public abstract void setOrderId(Integer orderId);
+
+ public abstract int getItemId();
+ public abstract void setItemId(int itemId);
+
+ public abstract int getQuantity();
+ public abstract void setQuantity(int quantity);
+
+ public abstract LocalVendorPart getVendorPart();
+ public abstract void setVendorPart(LocalVendorPart vendorPart);
+
+ public abstract LocalOrder getOrder();
+ public abstract void setOrder(LocalOrder order);
+
+ public LineItemKey ejbCreate(LocalOrder order, int quantity,
+ LocalVendorPart vendorPart) throws CreateException {
+
+ setOrderId(order.getOrderId());
+ setItemId(order.getNextId());
+ setQuantity(quantity);
+
+ return null;
+ }
+
+ public void ejbPostCreate(LocalOrder order, int quantity,
+ LocalVendorPart vendorPart) throws CreateException {
+
+ setVendorPart(vendorPart);
+
+ // This assignment is not necessary if the CMP container
+ // treats setOrderId() as a relationship assignment.
+ setOrder(order);
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LineItemKey.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LineItemKey.java
new file mode 100755
index 0000000..ed622ce
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LineItemKey.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+
+public final class LineItemKey implements java.io.Serializable {
+
+ public Integer orderId;
+ public int itemId;
+
+ /**
+ * @see Object#equals(Object)
+ */
+ public boolean equals(Object otherOb) {
+
+ if (this == otherOb) {
+ return true;
+ }
+ if (!(otherOb instanceof LineItemKey)) {
+ return false;
+ }
+ LineItemKey other = (LineItemKey) otherOb;
+ return (
+
+ (orderId==null?other.orderId==null:orderId.equals(other.orderId))
+ &&
+ (itemId == other.itemId)
+
+ );
+ }
+
+ /**
+ * @see Object#hashCode()
+ */
+ public int hashCode() {
+ return (
+
+ (orderId==null?0:orderId.hashCode())
+ ^
+ ((int) itemId)
+
+ );
+ }
+
+ /**
+ * @see Object#toString()
+ */
+ public String toString() {
+ return "" + orderId + "-" + itemId;
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalLineItem.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalLineItem.java
new file mode 100755
index 0000000..f1a4b90
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalLineItem.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public interface LocalLineItem extends EJBLocalObject {
+
+ public int getQuantity();
+
+ public LocalVendorPart getVendorPart();
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalLineItemHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalLineItemHome.java
new file mode 100755
index 0000000..51397a5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalLineItemHome.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.util.Collection;
+
+import javax.ejb.*;
+
+
+public interface LocalLineItemHome extends EJBLocalHome {
+
+ public LocalLineItem findByPrimaryKey(LineItemKey aKey)
+ throws FinderException;
+
+ public LocalLineItem create(LocalOrder order, int quantity,
+ LocalVendorPart vendorPart) throws CreateException;
+
+ public Collection findAll() throws FinderException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalOrder.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalOrder.java
new file mode 100755
index 0000000..82f123d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalOrder.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public interface LocalOrder extends EJBLocalObject {
+
+ public Integer getOrderId();
+
+ public int getDiscount();
+
+ public void setDiscount(int discount);
+
+ public int getNextId();
+
+ public double calculateAmmount();
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalOrderHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalOrderHome.java
new file mode 100755
index 0000000..d904afc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalOrderHome.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public interface LocalOrderHome extends EJBLocalHome {
+
+ public LocalOrder findByPrimaryKey(Integer aKey)
+ throws FinderException;
+
+ public LocalOrder create(Integer orderId, char status, int discount,
+ String shipmentInfo) throws CreateException;
+
+ public void adjustDiscount(int adjustment);
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalPart.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalPart.java
new file mode 100755
index 0000000..35e3f85
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalPart.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.util.Collection;
+import javax.ejb.*;
+
+
+public interface LocalPart extends EJBLocalObject {
+
+ public void setBomPart(LocalPart bomPart);
+
+ public LocalVendorPart getVendorPart();
+
+ public Collection getParts();
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalPartHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalPartHome.java
new file mode 100755
index 0000000..bfc3dc0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalPartHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.ejb.*;
+
+
+public interface LocalPartHome extends EJBLocalHome {
+
+ public LocalPart findByPrimaryKey(PartKey aKey)
+ throws FinderException;
+
+ public LocalPart create(String partNumber, int revision, String description,
+ Date revisionDate, String specification, Serializable drawing)
+ throws CreateException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendor.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendor.java
new file mode 100755
index 0000000..ae0c18c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendor.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public interface LocalVendor extends EJBLocalObject {
+
+ public void addVendorPart(LocalVendorPart part);
+
+ public int getVendorId();
+
+ public String getName();
+
+ public String getContact();
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorHome.java
new file mode 100755
index 0000000..475b0da
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorHome.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.util.Collection;
+
+import javax.ejb.*;
+
+
+public interface LocalVendorHome extends EJBLocalHome {
+
+ public LocalVendor findByPrimaryKey(VendorKey aKey) throws FinderException;
+
+ public LocalVendor create(int vendorId, String name, String address,
+ String contact, String phone) throws CreateException;
+
+ public Collection findByPartialName(String name) throws FinderException;
+
+ public Collection findByOrder(Integer orderId) throws FinderException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPart.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPart.java
new file mode 100755
index 0000000..6cd8c16
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPart.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public interface LocalVendorPart extends EJBLocalObject {
+
+ public double getPrice();
+
+}
+
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
new file mode 100755
index 0000000..3e38aef
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPartHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public interface LocalVendorPartHome extends EJBLocalHome {
+
+ public LocalVendorPart findByPrimaryKey(Object aKey)
+ throws FinderException;
+
+ public LocalVendorPart create(String description, double price,
+ LocalPart part) throws CreateException;
+
+ public Double getAvgPrice();
+
+ public Double getTotalPricePerVendor(int vendorId);
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/OrderBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/OrderBean.java
new file mode 100755
index 0000000..038f42f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/OrderBean.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+
+import javax.ejb.*;
+
+
+public abstract class OrderBean 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()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract Integer getOrderId();
+ public abstract void setOrderId(Integer orderId);
+
+ public abstract char getStatus();
+ public abstract void setStatus(char status);
+
+ public abstract Date getLastUpdate();
+ public abstract void setLastUpdate(Date lastUpdate);
+
+ public abstract int getDiscount();
+ public abstract void setDiscount(int discount);
+
+ public abstract String getShipmentInfo();
+ public abstract void setShipmentInfo(String shipmentInfo);
+
+ public abstract Collection getLineItems();
+ public abstract void setLineItems(Collection lineItems);
+
+ public Integer ejbCreate(Integer orderId, char status, int discount,
+ String shipmentInfo) throws CreateException {
+
+ setOrderId(orderId);
+ setStatus(status);
+ setLastUpdate(new Date());
+ setDiscount(discount);
+ setShipmentInfo(shipmentInfo);
+
+ return null;
+ }
+
+ public void ejbPostCreate(Integer orderId, char status, int discount,
+ String shipmentInfo) throws CreateException {
+ }
+
+ public abstract Collection ejbSelectAll() throws FinderException;
+
+ public double calculateAmmount() {
+ double ammount = 0;
+ Collection items = getLineItems();
+ for (Iterator it = items.iterator(); it.hasNext();) {
+ LocalLineItem item = (LocalLineItem)it.next();
+ LocalVendorPart part = item.getVendorPart();
+ ammount += part.getPrice() * item.getQuantity();
+ }
+
+ return (ammount * (100 - getDiscount()))/100;
+ }
+
+ public int getNextId() {
+ return getLineItems().size() + 1;
+ }
+
+ public void ejbHomeAdjustDiscount(int adjustment) {
+ try {
+ Collection orders = ejbSelectAll();
+ for (Iterator it = orders.iterator(); it.hasNext();) {
+ LocalOrder order = (LocalOrder)it.next();
+ int newDiscount = order.getDiscount() + adjustment;
+ order.setDiscount((newDiscount > 0)? newDiscount : 0);
+ }
+ } catch (Exception ex) {
+ throw new EJBException (ex.getMessage());
+ }
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/PartBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/PartBean.java
new file mode 100755
index 0000000..dc0a56f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/PartBean.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+
+import javax.ejb.*;
+
+
+public abstract class PartBean 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()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract String getPartNumber();
+ public abstract void setPartNumber(String partNumber);
+
+ public abstract int getRevision();
+ public abstract void setRevision(int revision);
+
+ public abstract String getDescription();
+ public abstract void setDescription(String description);
+
+ public abstract Date getRevisionDate();
+ public abstract void setRevisionDate(Date revisionDate);
+
+ public abstract Serializable getDrawing();
+ public abstract void setDrawing(Serializable drawing);
+
+ public abstract String getSpecification();
+ public abstract void setSpecification(String specification);
+
+ public abstract LocalPart getBomPart();
+ public abstract void setBomPart(LocalPart bomPart);
+
+ public abstract Collection getParts();
+ public abstract void setParts(Collection parts);
+
+ public abstract LocalVendorPart getVendorPart();
+ public abstract void setVendorPart(LocalVendorPart vendorPart);
+
+ public PartKey ejbCreate(String partNumber, int revision, String description,
+ Date revisionDate, String specification, Serializable drawing)
+ throws CreateException {
+
+ setPartNumber(partNumber);
+ setRevision(revision);
+ setDescription(description);
+ setRevisionDate(revisionDate);
+ setSpecification(specification);
+ setDrawing(drawing);
+
+ return null;
+ }
+
+ public void ejbPostCreate(String partNumber, int revision, String description,
+ Date revisionDate, String specification, Serializable drawing)
+ throws CreateException {
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/PartKey.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/PartKey.java
new file mode 100755
index 0000000..a224a0c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/PartKey.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+
+public final class PartKey implements java.io.Serializable {
+
+ public String partNumber;
+ public int revision;
+
+ /**
+ * @see Object#equals(Object)
+ */
+ public boolean equals(Object otherOb) {
+
+ if (this == otherOb) {
+ return true;
+ }
+ if (!(otherOb instanceof PartKey)) {
+ return false;
+ }
+ PartKey other = (PartKey) otherOb;
+ return (
+
+ (partNumber==null?other.partNumber==null:partNumber.equals(other.partNumber))
+ &&
+ (revision == other.revision)
+
+ );
+ }
+
+ /**
+ * @see Object#hashCode()
+ */
+ public int hashCode() {
+ return (
+
+ (partNumber==null?0:partNumber.hashCode())
+ ^
+ ((int) revision)
+
+ );
+ }
+
+ /**
+ * @see Object#toString()
+ */
+ public String toString() {
+ return partNumber + " rev" + revision;
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorBean.java
new file mode 100755
index 0000000..9dc1443
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorBean.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import java.util.Collection;
+
+import javax.ejb.*;
+
+
+public abstract class VendorBean 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()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract int getVendorId();
+ public abstract void setVendorId(int vendorId);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getAddress();
+ public abstract void setAddress(String address);
+
+ public abstract String getContact();
+ public abstract void setContact(String contact);
+
+ public abstract String getPhone();
+ public abstract void setPhone(String phone);
+
+ public abstract Collection getVendorParts();
+ public abstract void setVendorParts(Collection vendorParts);
+
+ public VendorKey ejbCreate(int vendorId, String name, String address,
+ String contact, String phone) throws CreateException {
+
+ setVendorId(vendorId);
+ setName(name);
+ setAddress(address);
+ setContact(contact);
+ setPhone(phone);
+
+ return null;
+ }
+
+ public void ejbPostCreate(int vendorId, String name, String address,
+ String contact, String phone) throws CreateException {
+ }
+
+ public void addVendorPart(LocalVendorPart part) {
+ getVendorParts().add(part);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorKey.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorKey.java
new file mode 100755
index 0000000..277edfa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorKey.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+
+public final class VendorKey implements java.io.Serializable {
+
+ public int vendorId;
+
+ /**
+ * @see Object#equals(Object)
+ */
+ public boolean equals(Object otherOb) {
+
+ if (this == otherOb) {
+ return true;
+ }
+ if (!(otherOb instanceof VendorKey)) {
+ return false;
+ }
+ VendorKey other = (VendorKey) otherOb;
+ return (vendorId == other.vendorId);
+ }
+
+ /**
+ * @see Object#hashCode()
+ */
+ public int hashCode() {
+ return vendorId;
+ }
+
+ /**
+ * @see Object#toString()
+ */
+ public String toString() {
+ return "" + vendorId;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorPartBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorPartBean.java
new file mode 100755
index 0000000..5b64640
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/VendorPartBean.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package dataregistry;
+
+import javax.ejb.*;
+
+
+public abstract class VendorPartBean 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()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract String getDescription();
+ public abstract void setDescription(String description);
+
+ public abstract double getPrice();
+ public abstract void setPrice(double price);
+
+ public abstract LocalPart getPart();
+ public abstract void setPart(LocalPart part);
+
+ public abstract LocalVendor getVendor();
+ public abstract void setVendor(LocalVendor vendor);
+
+ public Object ejbCreate(String description, double price, LocalPart part)
+ throws CreateException {
+
+ setDescription(description);
+ setPrice(price);
+
+ return null;
+ }
+
+ public void ejbPostCreate(String description, double price, LocalPart part)
+ throws CreateException {
+
+ setPart(part);
+ }
+
+ public abstract Double ejbSelectAvgPrice() throws FinderException;
+
+ public abstract Double ejbSelectTotalPricePerVendor(int vendorId) throws FinderException;
+
+ public Double ejbHomeGetAvgPrice() throws FinderException {
+ return ejbSelectAvgPrice();
+ }
+
+ public Double ejbHomeGetTotalPricePerVendor(int vendorId) throws FinderException {
+ return ejbSelectTotalPricePerVendor(vendorId);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/BomRequest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/BomRequest.java
new file mode 100755
index 0000000..d6b716c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/BomRequest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.io.Serializable;
+
+
+public class BomRequest implements Serializable {
+
+ public String bomPartNumber;
+ public int bomRevision;
+ public String partNumber;
+ public int revision;
+
+ public BomRequest(String bomPartNumber, int bomRevision,
+ String partNumber, int revision) {
+
+ this.bomPartNumber = bomPartNumber;
+ this.bomRevision = bomRevision;
+ this.partNumber = partNumber;
+ this.revision = revision;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/LineItemRequest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/LineItemRequest.java
new file mode 100755
index 0000000..b2f48d0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/LineItemRequest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.io.Serializable;
+
+
+public class LineItemRequest implements Serializable {
+
+ public Integer orderId;
+ public String partNumber;
+ public int revision;
+ public int quantity;
+
+ public LineItemRequest(Integer orderId, String partNumber,
+ int revision, int quantity) {
+
+ this.orderId = orderId;
+ this.partNumber = partNumber;
+ this.revision = revision;
+ this.quantity = quantity;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/OrderRequest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/OrderRequest.java
new file mode 100755
index 0000000..f631f14
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/OrderRequest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.io.Serializable;
+
+
+public class OrderRequest implements Serializable {
+
+ public Integer orderId;
+ public char status;
+ public int discount;
+ public String shipmentInfo;
+
+ public OrderRequest(Integer orderId, char status,
+ int discount, String shipmentInfo) {
+
+ this.orderId = orderId;
+ this.status = status;
+ this.discount = discount;
+ this.shipmentInfo = shipmentInfo;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/PartRequest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/PartRequest.java
new file mode 100755
index 0000000..44448d2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/PartRequest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+public class PartRequest implements Serializable {
+
+ public String partNumber;
+ public int revision;
+ public String description;
+ public Date revisionDate;
+ public String specification;
+ public Serializable drawing;
+
+ public PartRequest(String partNumber, int revision, String description,
+ Date revisionDate, String specification, Serializable drawing) {
+
+ this.partNumber = partNumber;
+ this.revision = revision;
+ this.description = description;
+ this.revisionDate = revisionDate;
+ this.specification = specification;
+ this.drawing = drawing;
+ }
+}
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
new file mode 100755
index 0000000..c11b937
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/Request.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+import javax.ejb.*;
+
+
+public interface Request extends EJBObject {
+
+ public void createPart(PartRequest partRequest) throws RemoteException;
+
+ public void addPartToBillOfMaterial(BomRequest bomRequest) throws RemoteException;
+
+ public void createVendor(VendorRequest vendorRequest) throws RemoteException;
+
+ public void createVendorPart(VendorPartRequest vendorPartRequest) throws RemoteException;
+
+ public void createOrder(OrderRequest orderRequest) throws RemoteException;
+
+ public void addLineItem(LineItemRequest lineItemRequest) throws RemoteException;
+
+ 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;
+
+ public int countAllItems() throws RemoteException;
+
+ public void removeOrder(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
new file mode 100755
index 0000000..ac63fa8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestBean.java
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+import dataregistry.*;
+
+
+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
+ */
+ public void ejbCreate() {
+ try {
+ lineItemHome = lookupLineItem();
+ orderHome = lookupOrder();
+ partHome = lookupPart();
+ vendorHome = lookupVendor();
+ vendorPartHome = lookupVendorPart();
+ } catch (Exception e) {
+ throw new EJBException(e.getMessage());
+ }
+ }
+
+ public void createPart(PartRequest partRequest) {
+ try {
+ LocalPart part = partHome.create(partRequest.partNumber,
+ partRequest.revision, partRequest.description,
+ 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,
+ 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,
+ part);
+
+ VendorKey vkey = new VendorKey();
+ vkey.vendorId = vendorPartRequest.vendorId;
+
+ LocalVendor vendor = vendorHome.findByPrimaryKey(vkey);
+ vendor.addVendorPart(vendorPart);
+
+ } catch (Exception e) {
+ throw new EJBException(e.getMessage());
+ }
+ }
+
+ public void createOrder(OrderRequest orderRequest) {
+ try {
+ 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) {
+ 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) {
+ throw new EJBException(e.getMessage());
+ }
+ }
+
+ public double getBillOfMaterialPrice(BomRequest bomRequest) {
+ double price = 0.0;
+ try {
+ 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();) {
+ LocalPart part = (LocalPart)iterator.next();
+ LocalVendorPart vendorPart = part.getVendorPart();
+ price += vendorPart.getPrice();
+ }
+
+ } catch (Exception e) {
+ throw new EJBException(e.getMessage());
+ }
+
+ return price;
+ }
+
+ public double getOrderPrice(Integer orderId) {
+ double price = 0.0;
+ try {
+ LocalOrder order = orderHome.findByPrimaryKey(orderId);
+ price = order.calculateAmmount();
+
+ } catch (Exception e) {
+ throw new EJBException(e.getMessage());
+ }
+
+ return price;
+ }
+
+ public void adjustOrderDiscount(int adjustment) {
+ orderHome.adjustDiscount(adjustment);
+ }
+
+ public Double getAvgPrice() {
+ return vendorPartHome.getAvgPrice();
+ }
+
+ public Double getTotalPricePerVendor(VendorRequest vendorRequest) {
+ return vendorPartHome.getTotalPricePerVendor(vendorRequest.vendorId);
+ }
+
+ public Collection locateVendorsByPartialName(String name) {
+
+ Collection names = new ArrayList();
+ try {
+ Collection vendors = vendorHome.findByPartialName(name);
+ for (Iterator iterator = vendors.iterator(); iterator.hasNext();) {
+ LocalVendor vendor = (LocalVendor)iterator.next();
+ names.add(vendor.getName());
+ }
+
+ } catch (FinderException e) {
+ }
+
+ return names;
+ }
+
+ public int countAllItems() {
+ int count = 0;
+ try {
+ count = lineItemHome.findAll().size();
+ } catch (Exception e) {
+ throw new EJBException(e.getMessage());
+ }
+
+ return count;
+ }
+
+ public void removeOrder(Integer orderId) {
+ try {
+ orderHome.remove(orderId);
+ } catch (Exception e) {
+ throw new EJBException(e.getMessage());
+ }
+ }
+
+ public String reportVendorsByOrder(Integer orderId) {
+ StringBuffer report = new StringBuffer();
+ try {
+ Collection vendors = vendorHome.findByOrder(orderId);
+ for (Iterator iterator = vendors.iterator(); iterator.hasNext();) {
+ LocalVendor vendor = (LocalVendor)iterator.next();
+ report.append(vendor.getVendorId()).append(' ')
+ .append(vendor.getName()).append(' ')
+ .append(vendor.getContact()).append('\n');
+ }
+
+ } catch (FinderException e) {
+ throw new EJBException(e.getMessage());
+ }
+
+ return report.toString();
+ }
+
+ private LocalLineItemHome lookupLineItem() throws NamingException {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleLineItem");
+
+ return (LocalLineItemHome) objref;
+ }
+
+ private LocalOrderHome lookupOrder() throws NamingException {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleOrder");
+
+ return (LocalOrderHome) objref;
+ }
+
+ private LocalPartHome lookupPart() throws NamingException {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimplePart");
+
+ return (LocalPartHome) objref;
+ }
+
+ private LocalVendorHome lookupVendor() throws NamingException {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleVendor");
+
+ return (LocalVendorHome) objref;
+ }
+
+ private LocalVendorPartHome lookupVendorPart() throws NamingException {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleVendorPart");
+
+ return (LocalVendorPartHome) objref;
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestHome.java
new file mode 100755
index 0000000..866589d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.rmi.RemoteException;
+import javax.ejb.*;
+
+
+public interface RequestHome extends EJBHome {
+
+ public request.Request create() throws CreateException, RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/VendorPartRequest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/VendorPartRequest.java
new file mode 100755
index 0000000..2ce969f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/VendorPartRequest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.io.Serializable;
+
+public class VendorPartRequest implements Serializable {
+
+ public String partNumber;
+ public int revision;
+ public String description;
+ public double price;
+ public int vendorId;
+
+ public VendorPartRequest(String partNumber, int revision,
+ String description, double price, int vendorId) {
+
+ this.partNumber = partNumber;
+ this.revision = revision;
+ this.description = description;
+ this.price = price;
+ this.vendorId = vendorId;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/VendorRequest.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/VendorRequest.java
new file mode 100755
index 0000000..3ed7f23
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/VendorRequest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package request;
+
+import java.io.Serializable;
+
+public class VendorRequest implements Serializable {
+
+ public int vendorId;
+ public String name;
+ public String address;
+ public String contact;
+ public String phone;
+
+ public VendorRequest(int vendorId, String name, String address,
+ String contact, String phone) {
+
+ this.vendorId = vendorId;
+ this.name = name;
+ this.address = address;
+ this.contact = contact;
+ this.phone = phone;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/drop_orderapp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/drop_orderapp_derby.sql
new file mode 100755
index 0000000..55c4ffe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/drop_orderapp_derby.sql
@@ -0,0 +1,6 @@
+drop table LINEITEM;
+drop table ORDERS;
+drop table VENDOR_PART;
+drop table VENDOR;
+drop table PART_DETAIL;
+drop table PART;
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
new file mode 100755
index 0000000..685a39c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_db2.sql
@@ -0,0 +1,81 @@
+drop table LINEITEM;
+drop table ORDERS;
+drop table VENDOR_PART;
+drop table VENDOR;
+drop table PART_DETAIL;
+drop table PART;
+
+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)
+);
+
+alter table PART
+ 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)
+);
+
+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
+);
+
+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)
+);
+
+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)
+);
+
+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)
+);
+
+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
new file mode 100755
index 0000000..8cde7e8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_derby.sql
@@ -0,0 +1,67 @@
+drop table LINEITEM;
+drop table ORDERS;
+drop table VENDOR_PART;
+drop table VENDOR;
+drop table PART_DETAIL;
+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)
+);
+
+alter table PART
+ 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)
+);
+
+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
+);
+
+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)
+);
+
+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)
+);
+
+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)
+);
+
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
new file mode 100755
index 0000000..8e60c87
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ifx.sql
@@ -0,0 +1,76 @@
+drop table LINEITEM;
+drop table ORDERS;
+drop table VENDOR_PART;
+drop table VENDOR;
+drop table PART_DETAIL;
+drop table PART;
+
+/* Self-ref to identify Bill of Material (BOM)
+ * 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)
+);
+
+/* 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)
+);
+
+/* 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
+);
+
+/* 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)
+);
+
+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)
+);
+
+/* 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)
+);
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
new file mode 100755
index 0000000..ca3d7b7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mssql.sql
@@ -0,0 +1,99 @@
+drop table LINEITEM
+drop table ORDERS
+drop table VENDOR_PART
+drop table VENDOR
+drop table PART_DETAIL
+drop table PART
+
+go
+
+/* Self-ref to identify Bill of Material (BOM)
+ * Compound PK
+ */
+create table PART (
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION_DATE DATETIME NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
+)
+
+go
+
+alter table PART
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ REFERENCES PART (PART_NUMBER, REVISION)
+
+go
+
+/* 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 TEXT NULL,
+ DRAWING IMAGE NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
+)
+
+go
+
+/* PK can be mapped to a primitive PK field type */
+create table VENDOR (
+ VENDOR_ID INTEGER NOT NULL,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL,
+ PRIMARY KEY (VENDOR_ID)
+)
+
+go
+
+/* Can be used for unknown PK
+ * 1-1 to PART
+ * Compound FK
+ */
+create table VENDOR_PART (
+ VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
+ 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,
+ PRIMARY KEY (VENDOR_PART_NUMBER),
+ 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)
+)
+
+go
+
+create table ORDERS (
+ ORDER_ID INTEGER NOT NULL,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE DATETIME NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255) NULL,
+ PRIMARY KEY (ORDER_ID)
+)
+
+go
+
+/* 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,
+ 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)
+)
+
+go
+
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
new file mode 100755
index 0000000..c03a3f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mysql.sql
@@ -0,0 +1,75 @@
+
+DROP TABLE LINEITEM;
+DROP TABLE ORDERS;
+DROP TABLE VENDOR_PART;
+DROP TABLE VENDOR;
+DROP TABLE PART_DETAIL;
+DROP TABLE PART;
+
+/* Self-ref to identify Bill of Material (BOM)
+ * 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)
+) ENGINE=INNODB;
+
+
+/* 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 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
+) ENGINE=INNODB;
+
+/* 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)
+) 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
+) ENGINE=INNODB;
+
+/* 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)
+) 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
new file mode 100755
index 0000000..a678e64
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ora.sql
@@ -0,0 +1,76 @@
+drop table LINEITEM;
+drop table ORDERS;
+drop table VENDOR_PART;
+drop table VENDOR;
+drop table PART_DETAIL;
+drop table PART;
+
+/* Self-ref to identify Bill of Material (BOM)
+ * 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)
+);
+
+/* 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)
+);
+
+/* 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
+);
+
+/* 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)
+);
+
+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
+);
+
+/* 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)
+);
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
new file mode 100755
index 0000000..cf75e8d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_pbs.sql
@@ -0,0 +1,97 @@
+drop table LINEITEM;
+drop table ORDERS;
+drop table VENDOR_PART;
+drop table VENDOR;
+drop table PART_DETAIL;
+drop table PART;
+
+commit;
+
+/* Self-ref to identify Bill of Material (BOM)
+ * 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)
+);
+
+alter table PART
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ REFERENCES PART (PART_NUMBER, REVISION);
+
+commit;
+
+/* 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(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
+);
+
+commit;
+
+/* 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)
+);
+
+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
+);
+
+commit;
+
+/* 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)
+);
+
+commit;
+
+exit;
\ No newline at end of file
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
new file mode 100755
index 0000000..9d2470b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_psql.sql
@@ -0,0 +1,80 @@
+
+DROP TABLE LINEITEM cascade;
+DROP TABLE ORDERS cascade;
+DROP TABLE VENDOR_PART cascade;
+DROP TABLE VENDOR cascade;
+DROP TABLE PART_DETAIL cascade;
+DROP TABLE PART cascade;
+
+/* Self-ref to identify Bill of Material (BOM)
+ * 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)
+);
+
+
+/* Bean will be mapped to 2 tables (PART and PART_DETAIL)
+ * 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)
+);
+
+/* 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
+);
+
+/* 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)
+);
+
+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
+);
+
+/* 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)
+);
+
+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
new file mode 100755
index 0000000..6c4f60c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_syb.sql
@@ -0,0 +1,99 @@
+drop table LINEITEM
+drop table ORDERS
+drop table VENDOR_PART
+drop table VENDOR
+drop table PART_DETAIL
+drop table PART
+
+go
+
+/* Self-ref to identify Bill of Material (BOM)
+ * Compound PK
+ */
+create table PART (
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION_DATE DATETIME NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
+)
+
+go
+
+alter table PART
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ REFERENCES PART (PART_NUMBER, REVISION)
+
+go
+
+/* 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 TEXT NULL,
+ DRAWING IMAGE NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
+)
+
+go
+
+/* PK can be mapped to a primitive PK field type */
+create table VENDOR (
+ VENDOR_ID INTEGER NOT NULL,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL,
+ PRIMARY KEY (VENDOR_ID)
+)
+
+go
+
+/* Can be used for unknown PK
+ * 1-1 to PART
+ * Compound FK
+ */
+create table VENDOR_PART (
+ VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
+ 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,
+ PRIMARY KEY (VENDOR_PART_NUMBER),
+ 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)
+)
+
+go
+
+create table ORDERS (
+ ORDER_ID INTEGER NOT NULL,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE DATETIME NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ PRIMARY KEY (ORDER_ID),
+ SHIPMENT_INFO VARCHAR(255) NULL
+)
+
+go
+
+/* 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,
+ 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)
+)
+
+go
+
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
new file mode 100644
index 0000000..f0e45eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.properties
@@ -0,0 +1,46 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="PartSupplier"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="web.xml"
+ value="descriptor/web.xml"/>
+<property name="sun-web.xml"
+ value="descriptor/sun-web.xml"/>
+<property name="partsupplier.xml"
+ value="descriptor/partsupplier.xml"/>
+<property name="ps.xml"
+ value="descriptor/ps.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<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"/>
+<property name="dbschema" value="ejb/SP.dbschema"/>
+<property name="hasWebclient" value="true"/>
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
new file mode 100644
index 0000000..62c839f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="partSupplier" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+
+ </target>
+
+ <target name="build" depends="compile">
+
+ <antcall target="build-ear-common">
+ <param name="war.classes"
+ value="**/Servlet.class" />
+ <param name="ejbjar.classes"
+ value="**/**.class,SP.dbschema" />
+ <param name="appclientjar.classes"
+ value="**/LocalPartsHome.class,**/LocalParts.class,**/LocalSuppliersHome.class,**/LocalSuppliers.class,**/SPSessionHome.class,**/SPSession.class,**/SuppliersKey.class,**/*Client*.class" />
+ </antcall>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <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"/>
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <fileset dir="${TEMPDIR}" />
+ </jar>
+
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/partSupplier_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..dd6d5a0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/Client.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SPSession");
+ Data.SPSessionHome home =
+ (Data.SPSessionHome)PortableRemoteObject.narrow(objref,
+ Data.SPSessionHome.class);
+
+ Data.SPSession myspsession = home.create();
+
+ myspsession.createPartsAndSuppliers();
+ System.out.println("Created " + myspsession.checkAllParts() + " Parts.");
+ System.out.println("Created " + myspsession.checkAllSuppliers() + " Suppliers.");
+
+ System.out.println("Removing Part 200...");
+ myspsession.removePart(new java.lang.Integer(200));
+
+ System.out.println("Removing Supplier 145/145...");
+ myspsession.removeSupplier(new java.lang.Integer(145), new java.lang.Integer(145));
+
+ System.out.println("Left " + myspsession.checkAllParts() + " Parts.");
+ System.out.println("Left " + myspsession.checkAllSuppliers() + " Suppliers.");
+ stat.addStatus("ejbclient partSupplier", stat.PASS);
+
+ System.out.println("FINISH");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient partSupplier", stat.FAIL);
+
+ }
+ stat.printSummary("partSupplier");
+
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/application-client.xml
new file mode 100644
index 0000000..169c2c3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>partsupplier</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SPSession</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>Data.SPSessionHome</home>
+ <remote>Data.SPSession</remote>
+ <ejb-link>SPSession</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/application.xml
new file mode 100644
index 0000000..83869b3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/application.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>Application_PartSupplier</display-name>
+ <description>J2EE Application Application_PartSupplier</description>
+ <module>
+ <ejb>PartSupplier-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>PartSupplier-client.jar</java>
+ </module>
+ <module>
+ <web>
+ <web-uri>PartSupplier-web.war</web-uri>
+ <context-root>partsupplier</context-root>
+ </web>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..467419f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/ejb-jar.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>PartSupplier</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>SPSession</display-name>
+ <ejb-name>SPSession</ejb-name>
+ <home>Data.SPSessionHome</home>
+ <remote>Data.SPSession</remote>
+ <ejb-class>Data.SPSessionBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleParts</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>Data.LocalPartsHome</local-home>
+ <local>Data.LocalParts</local>
+ <ejb-link>Parts</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleSuppliers</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>Data.LocalSuppliersHome</local-home>
+ <local>Data.LocalSuppliers</local>
+ <ejb-link>Suppliers</ejb-link>
+ </ejb-local-ref>
+ </session>
+ <entity>
+ <display-name>Parts</display-name>
+ <ejb-name>Parts</ejb-name>
+ <local-home>Data.LocalPartsHome</local-home>
+ <local>Data.LocalParts</local>
+ <ejb-class>Data.PartsBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>Parts</abstract-schema-name>
+ <cmp-field>
+ <field-name>partid</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>color</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>weight</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>price</field-name>
+ </cmp-field>
+ <primkey-field>partid</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM Parts o</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPartsName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM Parts o WHERE o.name = ?1</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>Suppliers</display-name>
+ <ejb-name>Suppliers</ejb-name>
+ <local-home>Data.LocalSuppliersHome</local-home>
+ <local>Data.LocalSuppliers</local>
+ <ejb-class>Data.SuppliersBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>Data.SuppliersKey</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>Suppliers</abstract-schema-name>
+ <cmp-field>
+ <field-name>partid</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>supplierid</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>status</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>city</field-name>
+ </cmp-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM Suppliers o</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <ejb-relation>
+ <ejb-relation-name>Suppliers-Parts</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>Suppliers</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>Suppliers</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>parts</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>Partid</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>Parts</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>suppliers</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>Suppliers</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>Parts</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>SPSession</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/partsupplier.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/partsupplier.xml
new file mode 100755
index 0000000..e4956f3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/partsupplier.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app>
+ <display-name>partsupplier</display-name>
+ <description>cascade_delete</description>
+ <servlet>
+ <servlet-name>Servlet_client.Servlet</servlet-name>
+ <display-name>Servlet client.Servlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.Servlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Servlet_client.Servlet</servlet-name>
+ <url-pattern>/servlet/client.Servlet</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ <welcome-file>
+ index.html
+ </welcome-file>
+ <welcome-file>
+ index.htm
+ </welcome-file>
+ </welcome-file-list>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SPSession</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>Data.SPSessionHome</home>
+ <remote>Data.SPSession</remote>
+ <ejb-link>SPSession</ejb-link>
+ </ejb-ref>
+</web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/ps.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/ps.xml
new file mode 100755
index 0000000..467419f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/ps.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>PartSupplier</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>SPSession</display-name>
+ <ejb-name>SPSession</ejb-name>
+ <home>Data.SPSessionHome</home>
+ <remote>Data.SPSession</remote>
+ <ejb-class>Data.SPSessionBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleParts</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>Data.LocalPartsHome</local-home>
+ <local>Data.LocalParts</local>
+ <ejb-link>Parts</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleSuppliers</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>Data.LocalSuppliersHome</local-home>
+ <local>Data.LocalSuppliers</local>
+ <ejb-link>Suppliers</ejb-link>
+ </ejb-local-ref>
+ </session>
+ <entity>
+ <display-name>Parts</display-name>
+ <ejb-name>Parts</ejb-name>
+ <local-home>Data.LocalPartsHome</local-home>
+ <local>Data.LocalParts</local>
+ <ejb-class>Data.PartsBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Integer</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>Parts</abstract-schema-name>
+ <cmp-field>
+ <field-name>partid</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>color</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>weight</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>price</field-name>
+ </cmp-field>
+ <primkey-field>partid</primkey-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM Parts o</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPartsName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM Parts o WHERE o.name = ?1</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <display-name>Suppliers</display-name>
+ <ejb-name>Suppliers</ejb-name>
+ <local-home>Data.LocalSuppliersHome</local-home>
+ <local>Data.LocalSuppliers</local>
+ <ejb-class>Data.SuppliersBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>Data.SuppliersKey</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>Suppliers</abstract-schema-name>
+ <cmp-field>
+ <field-name>partid</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>supplierid</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>status</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>city</field-name>
+ </cmp-field>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>SELECT Object(o) FROM Suppliers o</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <ejb-relation>
+ <ejb-relation-name>Suppliers-Parts</ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>Suppliers</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>Suppliers</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>parts</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>Partid</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>Parts</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>suppliers</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>Suppliers</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>Parts</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>SPSession</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..d5a6362
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SPSession</ejb-ref-name>
+ <jndi-name>SPSession</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..24d790a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>SP</schema>
+ <entity-mapping>
+ <ejb-name>Parts</ejb-name>
+ <table-name>PARTS</table-name>
+ <cmp-field-mapping>
+ <field-name>partid</field-name>
+ <column-name>PARTS.PARTID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>PARTS.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>color</field-name>
+ <column-name>PARTS.COLOR</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>weight</field-name>
+ <column-name>PARTS.WEIGHT</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>price</field-name>
+ <column-name>PARTS.PRICE</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>suppliers</cmr-field-name>
+ <column-pair>
+ <column-name>PARTS.PARTID</column-name>
+ <column-name>SUPPLIERS.PARTID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>Suppliers</ejb-name>
+ <table-name>SUPPLIERS</table-name>
+ <cmp-field-mapping>
+ <field-name>partid</field-name>
+ <column-name>SUPPLIERS.PARTID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>supplierid</field-name>
+ <column-name>SUPPLIERS.SUPPLIERID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>SUPPLIERS.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>status</field-name>
+ <column-name>SUPPLIERS.STATUS</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>city</field-name>
+ <column-name>SUPPLIERS.CITY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>parts</cmr-field-name>
+ <column-pair>
+ <column-name>SUPPLIERS.PARTID</column-name>
+ <column-name>PARTS.PARTID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..0b30de9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>156565</unique-id>
+ <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>
+ </ejb>
+ <ejb>
+ <ejb-name>Suppliers</ejb-name>
+ <jndi-name>SimpleSuppliers</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>
+ </ejb>
+ <ejb>
+ <ejb-name>SPSession</ejb-name>
+ <jndi-name>SPSession</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleParts</ejb-ref-name>
+ <jndi-name>localejbs/SimpleParts</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleSuppliers</ejb-ref-name>
+ <jndi-name>localejbs/SimpleSuppliers</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>
+ </ejb>
+
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-web.xml
new file mode 100644
index 0000000..a461b6a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SPSession</ejb-ref-name>
+ <jndi-name>SPSession</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/web.xml
new file mode 100644
index 0000000..00f14b1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/web.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>partsupplier</display-name>
+ <description>cascade_delete</description>
+ <servlet>
+ <servlet-name>Servlet_client.Servlet</servlet-name>
+ <display-name>Servlet client.Servlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.Servlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Servlet_client.Servlet</servlet-name>
+ <url-pattern>/servlet/client.Servlet</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ <welcome-file>
+ index.html
+ </welcome-file>
+ <welcome-file>
+ index.htm
+ </welcome-file>
+ </welcome-file-list>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SPSession</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>Data.SPSessionHome</home>
+ <remote>Data.SPSession</remote>
+ <ejb-link>SPSession</ejb-link>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..0df1542
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalParts.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 1:22:14 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalParts extends javax.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
new file mode 100755
index 0000000..65063b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalPartsHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 1:22:14 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalPartsHome extends javax.ejb.EJBLocalHome {
+
+ public Data.LocalParts findByPrimaryKey(java.lang.Integer aKey)
+ throws javax.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 javax.ejb.CreateException;
+
+ public java.util.Collection findAll() throws javax.ejb.FinderException;
+
+ public java.util.Collection findByPartsName(java.lang.String name) throws javax.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
new file mode 100755
index 0000000..473fc37
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliers.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 1:22:07 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalSuppliers extends javax.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
new file mode 100755
index 0000000..65abafc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliersHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 1:22:07 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface LocalSuppliersHome extends javax.ejb.EJBLocalHome {
+
+ public Data.LocalSuppliers findByPrimaryKey(Data.SuppliersKey aKey)
+ throws javax.ejb.FinderException;
+
+ public LocalSuppliers create(java.lang.Integer partid, java.lang.Integer supplierid, java.lang.String name, int status, java.lang.String city) throws javax.ejb.CreateException;
+
+ public java.util.Collection findAll() throws javax.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
new file mode 100755
index 0000000..b47afc0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/PartsBean.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * Created Dec 16, 2002 1:22:14 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public abstract class PartsBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.CreateException {
+ if (partid == null) {
+ throw new javax.ejb.CreateException("The partid is required.");
+ }
+ setPartid(partid);
+ setName(name);
+ setColor(color);
+ setWeight(weight);
+ setPrice(price);
+
+ 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 javax.ejb.CreateException {
+
+ }
+
+ public void addSupplier(Data.LocalSuppliers supplier) {
+ System.out.println("Debug : PartsBean addSupplier");
+ if (supplier != null)
+ System.out.println("Debug : supplier is null");
+ try {
+ java.util.Collection sups = getSuppliers();
+ sups.add(supplier);
+
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropSupplier(Data.LocalSuppliers supplier) {
+ System.out.println("Debug : PartsBean dropSupplier");
+ try {
+ java.util.Collection suppliers = getSuppliers();
+ suppliers.remove(supplier);
+ } catch (Exception ex) {
+ 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/SP.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SP.dbschema
new file mode 100644
index 0000000..326780d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SP.dbschema
@@ -0,0 +1,783 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement2653">
+ <versionNo>2</versionNo>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl9597866">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement2653"/>
+ </element>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15182070">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <_username>pbpublic</_username>
+ <_driverName>PointBase JDBC Driver</_driverName>
+ <_driverVersion>4.2ECF build 178RE</_driverVersion>
+ <_url>jdbc:PointBase://localhost:9092/sample</_url>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier380999">
+ <name>SP</name>
+ </OBJECT>
+ </_name>
+ <_driver>com.pointbase.jdbc.jdbcUniversalDriver</_driver>
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection14312094">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-1879171658">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404">
+ <table>SUPPLIERS</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection3582556">
+ <_elms>
+ <ARRAY SIZE="5" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2146827386">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl9032049">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer12">
+ <value>12</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2146827386"/>
+ </element>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1405123">
+ <name>PARTID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>3</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer12"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1896882975">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1028263">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer12"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1896882975"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1489940">
+ <name>SUPPLIERID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>3</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer12"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1955246019">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl9821490">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer15">
+ <value>15</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1955246019"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15547911">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer15"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2043899094">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8616986">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer2">
+ <value>2</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2043899094"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4764448">
+ <name>STATUS</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>3</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer2"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1954926243">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl15215689">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer50">
+ <value>50</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1954926243"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11761233">
+ <name>CITY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer50"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1893664">
+ <name>SUPPLIERS</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection720915">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1564883604">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl448655">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection697499">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-916973288">
+ <_referencedColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1781251885">
+ <declaringTable>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-1996939281">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7578149">
+ <table>PARTS</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11644445">
+ <_elms>
+ <ARRAY SIZE="5" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1781251885"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1419433686">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10115988">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer15"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1419433686"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15896555">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer15"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1062513532">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13012950">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer20">
+ <value>20</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1062513532"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier873480">
+ <name>COLOR</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer20"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1985069399">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl518043">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer4">
+ <value>4</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1985069399"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16156988">
+ <name>WEIGHT</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>3</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer4"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1050421654">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11262653">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer23">
+ <value>23</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1050421654"/>
+ </element>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer32">
+ <value>32</value>
+ </OBJECT>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10871015">
+ <name>PRICE</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>6</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer23"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7578149"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5266950">
+ <name>PARTS</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12675308">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement133495959">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement133495959">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl5038388">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12086612">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1781251885"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7578149"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement133495959"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5582467">
+ <name>PARTS_0_SYSTEMNAMEDCONSTRAINT__PRIMARYKEY</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7578149"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6344302">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2959801">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1781251885"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6344302"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement133495959"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9483830">
+ <name>PARTS_0_SYSTEMNAMEDCONSTRAINT__PRIMARYKEY</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7578149"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1979241">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement133495959"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7578149"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4240038">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer12"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1781251885"/>
+ </element>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9494558">
+ <name>PARTID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>3</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer12"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2146827386"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl6943670">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-916973288"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16731423">
+ <name>PARTID;PARTID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl448655"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1564883604"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2117256">
+ <name>SUPPLIERS_0_SYSTEMNAMEDCONSTRAINT_PARTS_FOREIGNKEY_PARTID</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1101931525">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1101931525">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl260522">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6285220">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1896882975"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2146827386"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1101931525"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16519984">
+ <name>PK_SUPPLIERS</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl5235975">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12378121">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1896882975"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2146827386"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl5235975"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1101931525"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4549571">
+ <name>PK_SUPPLIERS</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15378741">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1101931525"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1564883604">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1879171658"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl10870459">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6356409">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2146827386"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1564883604"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier12711948">
+ <name>SUPPLIERS_0_SYSTEMNAMEDCONSTRAINT_PARTS_FOREIGNKEY_PARTID</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </tei>
+ <_unique>false</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl11341404"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1996939281"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl9597866"/>
+ </owner>
+ </OBJECT>
+ </tables>
+ <_databaseProductVersion>4.2ECF build 178RE</_databaseProductVersion>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8641854">
+ <name>PBPUBLIC</name>
+ </OBJECT>
+ </_schema>
+ <_databaseProductName>PointBase</_databaseProductName>
+ </OBJECT>
+ </impl>
+</OBJECT>
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
new file mode 100755
index 0000000..c588109
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSession.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 2:08:21 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface SPSession extends javax.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
new file mode 100755
index 0000000..c56c206
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionBean.java
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+
+/**
+ * Created Dec 16, 2002 2:08:21 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public class SPSessionBean implements javax.ejb.SessionBean {
+ private javax.ejb.SessionContext context;
+ private LocalSuppliersHome suppliersHome = null;
+ private LocalPartsHome partsHome = null;
+
+
+ /**
+ * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
+ */
+ public void setSessionContext(javax.ejb.SessionContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.SessionBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.SessionBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.SessionBean#ejbRemove()
+ */
+ public void ejbRemove() {
+
+ }
+
+
+ /**
+ * See section 7.10.3 of the EJB 2.0 specification
+ */
+ public void ejbCreate() throws CreateException {
+ System.out.println("Debug: SPSession ejbCreate");
+ try {
+ suppliersHome = lookupSuppliers();
+ partsHome = lookupParts();
+ } catch (NamingException ex) {System.out.println("lookupSuppliers");
+ 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;
+ try {
+ parts = partsHome.findAll();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new EJBException(ex.getMessage());
+ }
+ return parts.size();
+ }
+
+ public int checkAllSuppliers() {
+ System.out.println("Debug: SPSessionBean getAllSuppliers");
+ java.util.Collection suppliers = null;
+ try {
+ suppliers = suppliersHome.findAll();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new EJBException(ex.getMessage());
+ }
+ return suppliers.size();
+ }
+
+ public void createPartsAndSuppliers() {
+ try {
+ System.out.println("InsertData");
+ java.lang.Integer partid1 = new java.lang.Integer(807);
+ java.lang.Integer partid2 = new java.lang.Integer(200);
+ java.lang.Integer partid3 = new java.lang.Integer(145);
+ 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));
+ suppliersHome.create(partid1,supplierid1,"suppliername1",1,"San Jose");
+ suppliersHome.create(partid1,supplierid2,"suppliername2",1,"Oakland");
+ suppliersHome.create(partid1,supplierid3,"suppliername3",1,"Menlo Park");
+ suppliersHome.create(partid2,supplierid2,"suppliername2",1,"Oakland");
+ suppliersHome.create(partid2,supplierid3,"suppliername3",1,"Menlo Park");
+ suppliersHome.create(partid3,supplierid2,"suppliername2",1,"Oakland");
+ } catch (Exception ex) {
+ System.err.println("Caught an exception during createPartsAndSuppliers:");
+ ex.printStackTrace();
+ }
+ }
+
+ public void removePart(java.lang.Integer partid) {
+ System.out.println("Debug: SPSession removePart");
+ try {
+ LocalParts parts = partsHome.findByPrimaryKey(partid);
+ parts.remove();
+ } catch (Exception ex) {
+ System.out.println("inside removePart exception");
+ ex.printStackTrace();
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeSupplier(java.lang.Integer partid, java.lang.Integer supplierid) {
+ System.out.println("Debug: SPSession removeSupplier");
+ try {
+ SuppliersKey key = new SuppliersKey();
+ key.partid = partid;
+ key.supplierid = supplierid;
+ LocalSuppliers supplier = suppliersHome.findByPrimaryKey(key);
+ supplier.remove();
+ } catch (Exception ex) {
+ System.out.println("inside removeSupplier exception");
+ ex.printStackTrace();
+ 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
new file mode 100755
index 0000000..1fbd4bc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionHome.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 2:08:21 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+public interface SPSessionHome extends javax.ejb.EJBHome {
+
+ public Data.SPSession create()
+ throws javax.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
new file mode 100755
index 0000000..7704fa1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersBean.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+import javax.ejb.*;
+
+/**
+ * Created Dec 16, 2002 1:22:07 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+
+public abstract class SuppliersBean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+ private LocalParts part0;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ Data.LocalParts part = getParts();
+ System.out.print("Removing Supplier: " + getName());
+ if (part == null) {
+ System.out.println(" ...for cascade-delete");
+ } else {
+ System.out.println(" for Part: " + part.getName());
+ }
+ //part0.testInCascadeDelete();
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.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 javax.ejb.CreateException {
+ if ((supplierid == null) ||(partid == null)){
+ throw new javax.ejb.CreateException("The partid and supplierid are required.");
+ }
+ setPartid(partid);
+ setSupplierid(supplierid);
+ setName(name);
+ setStatus(status);
+ 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 javax.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
new file mode 100755
index 0000000..7afe0eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersKey.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package Data;
+
+/**
+ * Created Dec 16, 2002 1:22:07 PM
+ * Code generated by the Forte For Java EJB Builder
+ * @author mvatkina
+ */
+
+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;
+ }
+ if (!(otherOb instanceof Data.SuppliersKey)) {
+ return false;
+ }
+ 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
new file mode 100755
index 0000000..1247c11
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/servlet/Servlet.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Servlet.java
+ *
+ * Created on December 16, 2002, 2:02 PM
+ */
+
+package client;
+
+import javax.servlet.*;
+import javax.naming.*;
+import javax.servlet.http.*;
+import javax.rmi.PortableRemoteObject;
+import Data.SPSession;
+import Data.SPSessionHome;
+
+/**
+ *
+ * @author mvatkina
+ * @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
+ */
+ protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+ 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
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response)
+ 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/drop_partSupplier_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/drop_partSupplier_derby.sql
new file mode 100755
index 0000000..3bafd6b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/drop_partSupplier_derby.sql
@@ -0,0 +1,2 @@
+drop table suppliers;
+drop table parts;
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
new file mode 100755
index 0000000..acf76a6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_db2.sql
@@ -0,0 +1,23 @@
+drop table suppliers;
+drop table parts;
+
+create table parts (
+ PARTID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+);
+
+create table suppliers (
+ PARTID INT NOT NULL references parts(PARTID),
+ SUPPLIERID INT NOT NULL,
+ NAME VARCHAR(15),
+ STATUS INT,
+ CITY VARCHAR(50),
+ constraint pk_suppliers primary key (SUPPLIERID, PARTID)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..4f15445
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_derby.sql
@@ -0,0 +1,19 @@
+drop table suppliers;
+drop table parts;
+
+create table parts (
+ PARTID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+);
+
+create table suppliers (
+ PARTID INT NOT NULL references parts(PARTID),
+ SUPPLIERID INT NOT NULL,
+ 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
new file mode 100755
index 0000000..f03dc23
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ifx.sql
@@ -0,0 +1,23 @@
+drop table SUPPLIERS;
+drop table PARTS;
+
+create table PARTS (
+ PARTID INT NOT NULL PRIMARY KEY,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+);
+
+create table SUPPLIERS (
+ PARTID INT NOT NULL references PARTS(PARTID),
+ SUPPLIERID INT NOT NULL,
+ NAME VARCHAR(15),
+ STATUS INT,
+ CITY VARCHAR(50),
+ primary key(SUPPLIERID, PARTID)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..24cf9c7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mssql.sql
@@ -0,0 +1,22 @@
+drop table suppliers
+drop table parts
+go
+
+create table parts (
+ PARTID INT PRIMARY KEY,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+)
+
+create table suppliers (
+ PARTID INT not null references parts(PARTID),
+ SUPPLIERID INT,
+ NAME VARCHAR(15),
+ STATUS INT,
+ CITY VARCHAR(50),
+ constraint pk_suppliers primary key(SUPPLIERID, PARTID)
+)
+
+go
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
new file mode 100755
index 0000000..0b3a938
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mysql.sql
@@ -0,0 +1,23 @@
+DROP TABLE SUPPLIERS;
+DROP TABLE PARTS;
+
+CREATE TABLE PARTS (
+ PARTID INT PRIMARY KEY,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+) ENGINE=INNODB;
+
+CREATE TABLE SUPPLIERS (
+ PARTID INT NOT NULL REFERENCES PARTS(PARTID),
+ SUPPLIERID INT,
+ NAME VARCHAR(15),
+ STATUS INT,
+ CITY VARCHAR(50),
+ CONSTRAINT PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
+) ENGINE=INNODB;
+
+COMMIT;
+
+quit;
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
new file mode 100755
index 0000000..121f772
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ora.sql
@@ -0,0 +1,23 @@
+drop table suppliers;
+drop table parts;
+
+create table parts (
+ PARTID INT PRIMARY KEY,
+ NAME VARCHAR2(15),
+ COLOR VARCHAR2(20),
+ WEIGHT INT,
+ PRICE FLOAT
+);
+
+create table suppliers (
+ PARTID INT not null references parts(PARTID),
+ SUPPLIERID INT,
+ NAME VARCHAR2(15),
+ STATUS INT,
+ CITY VARCHAR2(50),
+ constraint pk_suppliers primary key(SUPPLIERID, PARTID)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..19cd2e0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_pbs.sql
@@ -0,0 +1,20 @@
+drop table suppliers;
+drop table parts;
+
+create table parts (
+ PARTID NUMERIC(12),
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT NUMERIC(4),
+ PRICE FLOAT(23),
+ PRIMARY KEY(PARTID)
+);
+
+create table suppliers (
+ PARTID NUMERIC(12) not null references parts(PARTID),
+ SUPPLIERID NUMERIC(12),
+ 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
new file mode 100755
index 0000000..f14b97f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_psql.sql
@@ -0,0 +1,23 @@
+DROP TABLE SUPPLIERS cascade;
+DROP TABLE PARTS cascade;
+
+CREATE TABLE PARTS (
+ PARTID INT PRIMARY KEY,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+);
+
+CREATE TABLE SUPPLIERS (
+ PARTID INT NOT NULL REFERENCES PARTS(PARTID),
+ SUPPLIERID INT,
+ NAME VARCHAR(15),
+ STATUS INT,
+ CITY VARCHAR(50),
+ CONSTRAINT PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
+);
+
+COMMIT;
+
+quit;
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
new file mode 100755
index 0000000..9fa7291
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_syb.sql
@@ -0,0 +1,22 @@
+drop table SUPPLIERS
+drop table PARTS
+go
+
+create table PARTS (
+ PARTID INT PRIMARY KEY NOT NULL,
+ NAME VARCHAR(15),
+ COLOR VARCHAR(20),
+ WEIGHT INT,
+ PRICE FLOAT
+)
+
+create table SUPPLIERS (
+ PARTID INT NOT NULL references PARTS(PARTID),
+ SUPPLIERID INT NOT NULL,
+ NAME VARCHAR(15),
+ STATUS INT,
+ CITY VARCHAR(50),
+ constraint PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
+)
+
+go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/report.xml
new file mode 100644
index 0000000..b228941
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/report.xml
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="report-sh">
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ </exec>
+</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/resultCount.sh b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/resultCount.sh
new file mode 100644
index 0000000..f0c2ac5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/resultCount.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=18
+
+PASSED=`grep "status value" $FILE | grep "pass" | wc -l`
+FAILED=`grep "status value" $FILE | grep "fail" | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/cmp/count.txt;
+date>>$APS_HOME/devtests/cmp/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/cmp/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/cmp/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/cmp/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/cmp/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/cmp/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/cmp/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/cmp/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/cmp/count.txt;
+echo "************************">>$APS_HOME/devtests/cmp/count.txt;
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
new file mode 100644
index 0000000..1e7428f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="Robeans"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..83a3fd7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="robeans" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A*.class,**/Test*.class" />
+ <param name="appclientjar.classes"
+ value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/TestHome.class,**/Test.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..5f1f705
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/Client.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import java.util.*;
+
+import javax.naming.*;
+import javax.ejb.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import java.rmi.*;
+
+import test.*;
+
+/**
+ * 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
+ * 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");
+
+ private static A1Home a1home = null;
+ private static A2Home a2home = null;
+ private static TestHome thome = null;
+ private static Test tbean = null;
+
+ public static void main(String[] args) {
+
+ try {
+ System.out.println("START");
+ stat.addDescription("robeans");
+
+ lookupBeans();
+ tbean = thome.create();
+
+ testA1();
+ testA2();
+
+ 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.printSummary("robeans");
+ }
+
+ /** Run CMP1.1 test.
+ * getShortName() must return the same value.
+ * getDescription() must return non-null value.
+ */
+ private static void testA1() throws FinderException, RemoteException {
+ tbean.insertValues("A1RO");
+ A1 a1bean = a1home.findByPrimaryKey("A1RO");
+ String name = a1bean.getShortName();
+
+ verifyDescription(a1bean.getDescription(), "A1RO", true);
+
+ tbean.updateValues("A1RO");
+ verifyShortName(name, a1bean.getShortName(), "A1RO");
+
+ // Find another bean.
+ Collection c = a1home.findByShortName("A1RO1");
+ if (c.size() != 1) {
+ 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.
+ * getShortName() must return the same value.
+ * getDescription() must return non-null value.
+ */
+ private static void testA2() throws FinderException, RemoteException {
+ tbean.insertValues("A2RO");
+ A2 a2bean = a2home.findByPrimaryKey("A2RO");
+ String name = a2bean.getShortName();
+
+ verifyDescription(a2bean.getDescription(), "A2RO", true);
+
+ tbean.updateValues("A2RO");
+ verifyShortName(name, a2bean.getShortName(), "A2RO");
+
+ // Find another bean.
+ Collection c = a2home.findByShortName("A2RO1");
+ if (c.size() != 1) {
+ 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");
+ a1home = (A1Home)PortableRemoteObject.narrow(objref, test.A1Home.class);
+
+ objref = initial.lookup("java:comp/env/ejb/A2RO");
+ a2home = (A2Home)PortableRemoteObject.narrow(objref, test.A2Home.class);
+
+ objref = initial.lookup("java:comp/env/ejb/TestRO");
+ thome = (TestHome)PortableRemoteObject.narrow(objref, test.TestHome.class);
+
+ }
+
+ /** Verifies that the value of the 'shortName' field didn't change.
+ * @param name1 the value of the first access of the field.
+ * @param name2 the value of the second access of the field.
+ * @param beanName the name of the bean to test.
+ */
+ private static void verifyShortName(String name1, String name2, String beanName) {
+ if (name1.equals(name2)) {
+ System.out.println(beanName + " shortName OK: " + name1);
+ } else {
+ System.out.println(beanName + " FAILED: " + name1 + "-" + name2);
+ }
+ }
+
+ /** Verifies that the value of the 'description' field had been loaded.
+ * @param description the value of the field.
+ * @param beanName the name of the bean to test.
+ * @param isFindByPK true if verification is done after findByPrimaryKey
+ * call.
+ */
+ 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") + ": "
+ + description);
+ } else {
+ 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/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/application-client.xml
new file mode 100644
index 0000000..bdeed37
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/application-client.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ROTest</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/TestRO</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.TestHome</home>
+ <remote>test.Test</remote>
+ <ejb-link>TestRO</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/A1RO</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.A1Home</home>
+ <remote>test.A1</remote>
+ <ejb-link>A1RO</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/A2RO</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>test.A2Home</home>
+ <remote>test.A2</remote>
+ <ejb-link>A2RO</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/application.xml
new file mode 100644
index 0000000..c040dba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>CreateTest</display-name>
+ <description>J2EE Application CreateTest</description>
+ <module>
+ <ejb>Robeans-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>Robeans-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..45cde3d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/ejb-jar.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>A1RO</display-name>
+ <ejb-name>A1RO</ejb-name>
+ <home>test.A1Home</home>
+ <remote>test.A1</remote>
+ <ejb-class>test.A1Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>shortName</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>description</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+ <entity>
+ <display-name>A2RO</display-name>
+ <ejb-name>A2RO</ejb-name>
+ <home>test.A2Home</home>
+ <remote>test.A2</remote>
+ <ejb-class>test.A2Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>A2</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>shortName</field-name>
+ </cmp-field>
+ <cmp-field>
+ <field-name>description</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByShortName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(a) from A2 a where a.shortName = ?1</ejb-ql>
+ </query>
+ </entity>
+ <session>
+ <display-name>TestRO</display-name>
+ <ejb-name>TestRO</ejb-name>
+ <home>test.TestHome</home>
+ <remote>test.Test</remote>
+ <ejb-class>test.TestBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..cbe6a71
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/sun-application-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/A1RO</ejb-ref-name>
+ <jndi-name>A1RO</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/A2RO</ejb-ref-name>
+ <jndi-name>A2RO</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/TestRO</ejb-ref-name>
+ <jndi-name>TestRO</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..53c6cc7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <ejb>
+ <ejb-name>A1RO</ejb-name>
+ <jndi-name>A1RO</jndi-name>
+ <is-read-only-bean>true</is-read-only-bean>
+ <refresh-period-in-seconds>60</refresh-period-in-seconds>
+ <cmt-timeout-in-seconds>0</cmt-timeout-in-seconds>
+ <cmp>
+ <one-one-finders>
+ <finder>
+ <method-name>findByShortName</method-name>
+ <query-params>String shortName</query-params>
+ <query-filter>this.shortName == shortName</query-filter>
+ </finder>
+ </one-one-finders>
+ </cmp>
+ </ejb>
+ <ejb>
+ <ejb-name>A2RO</ejb-name>
+ <jndi-name>A2RO</jndi-name>
+ <is-read-only-bean>true</is-read-only-bean>
+ <refresh-period-in-seconds>60</refresh-period-in-seconds>
+ <cmt-timeout-in-seconds>0</cmt-timeout-in-seconds>
+ </ejb>
+ <ejb>
+ <ejb-name>TestRO</ejb-name>
+ <jndi-name>TestRO</jndi-name>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <create-tables-at-deploy>true</create-tables-at-deploy>
+ <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
+ <schema-generator-properties>
+ <property>
+ <name>A1RO.description.jdbc-type</name>
+ <value>CLOB</value>
+ </property>
+ <property>
+ <name>A2RO.description.jdbc-type</name>
+ <value>CLOB</value>
+ </property>
+ </schema-generator-properties>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..df2f407
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.rmi.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1 extends javax.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/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Bean.java
new file mode 100755
index 0000000..e2d9b8f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Bean.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+
+/**
+ * 1.1 Bean that is deployed as a read-only bean
+ * @author mvatkina
+ */
+
+
+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()
+ */
+ public void ejbStore() {
+ }
+
+ /** Method is used to test read-only functionality */
+ public String getShortName() {
+ return shortName;
+ }
+
+ /** Method is used to test non-DFG field in read-only beans */
+ public String getDescription() {
+ return description;
+ }
+}
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
new file mode 100755
index 0000000..5bc87e0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Home.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.rmi.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1Home extends javax.ejb.EJBHome {
+
+ public A1 findByPrimaryKey(java.lang.String pk)
+ throws FinderException, RemoteException;
+
+ 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
new file mode 100755
index 0000000..97fed8b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.rmi.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2 extends javax.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
new file mode 100755
index 0000000..c6e7ce3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Bean.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+
+/**
+ * 2.0 Bean that is deployed as a read-only bean
+ * @author mvatkina
+ */
+
+
+public abstract class A2Bean implements EntityBean {
+
+ private EntityContext context;
+
+ public abstract String getId();
+ public abstract void setId(String s);
+
+ public abstract String getShortName();
+ public abstract void setShortName(String s);
+
+ public abstract String getDescription();
+ public abstract void setDescription(String s);
+
+ /**
+ * @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()
+ */
+ public void 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
new file mode 100755
index 0000000..b4a90f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Home.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import java.rmi.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2Home extends javax.ejb.EJBHome {
+
+ public A2 findByPrimaryKey(java.lang.String pk)
+ throws FinderException, RemoteException;
+
+ 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
new file mode 100755
index 0000000..6f6b539
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/Test.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+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
new file mode 100755
index 0000000..ec0e0c3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestBean.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+import javax.naming.*;
+import javax.sql.DataSource;
+
+import java.sql.*;
+
+import com.sun.jdo.api.persistence.support.PersistenceManagerFactory;
+
+/**
+ * This SessionBean is used to test Read-Only CMP beans by inserting
+ * 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;
+ }
+
+ public void ejbRemove() {
+
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ }
+
+ /** Look up a DataSource by JNDI name.
+ * The JNDI name is expected to be 'jdo/pmf', but it can reference
+ * either a PersistenceManagerFactory or a DataSource. In case of
+ * a former, the DataSource name will be a ConnectionFactory's name.
+ */
+ private DataSource lookupDataSource() throws NamingException {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("jdo/pmf");
+
+ if (objref instanceof PersistenceManagerFactory) {
+ PersistenceManagerFactory pmf = (PersistenceManagerFactory)objref;
+ String cfname = pmf.getConnectionFactoryName();
+
+ 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 ('" +
+ table_name + "', '" + table_name + "', '" + table_name + "')";
+ System.out.println("INSERT STATEMENT: " + st);
+ executeStatement(st);
+
+ // Insert another row
+ st = "INSERT INTO " + table_name + " VALUES ('" +
+ table_name + "1', '" + table_name + "1', '" + table_name + "1')";
+ System.out.println("INSERT STATEMENT: " + st);
+ executeStatement(st);
+ }
+
+ /** Update values via jdbc call */
+ public void updateValues (String table_name) {
+ String st = "UPDATE " + table_name + " SET SHORTNAME = 'FOO' WHERE ID = '" + table_name + "'";
+ System.out.println("UPDATE STATEMENT: " + st);
+ executeStatement(st);
+ }
+
+ /** Execute SQL statement.
+ * @param st the SQL statement as a String.
+ * @throws EJBException to wrap a SQLException.
+ */
+ private void executeStatement (String st) {
+ Connection conn = null;
+ try {
+ conn = ds.getConnection();
+ PreparedStatement ps = conn.prepareStatement(st);
+ ps.execute();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new EJBException(e.toString());
+ } finally {
+ try {
+ if (conn != null) conn.close();
+ } catch (SQLException e1) {
+ e1.printStackTrace();
+ }
+ }
+ }
+
+}
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
new file mode 100755
index 0000000..745516c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestHome.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.ejb.*;
+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
new file mode 100644
index 0000000..21fa096
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.properties
@@ -0,0 +1,54 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="roster2Teams"/>
+<property name="appname" value="${module}"/>
+
+<property name="test.client"
+ value="RosterClient"/>
+
+<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"/>
+<property name="sun-ejb-jar-team.xml" value="descriptor/sun-ejb-jar-team.xml"/>
+
+<property name="ejb-jar-team2.xml" value="descriptor/ejb-jar-team2.xml"/>
+<property name="sun-ejb-jar-team2.xml" value="descriptor/sun-ejb-jar-team2.xml"/>
+
+<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="appclientjar.files" value="${build.classes.dir}"/>
+
+<property name="appclient.jar" value="${assemble.dir}/rosterextAppClient.jar"/>
+<property name="war.file" value="${assemble.dir}/rosterext-web.war"/>
+<property name="app.type" value="application"/>
+<property name="hasWebclient" value="true"/>
+
+<property name="web.xml"
+ value="descriptor/web.xml"/>
+<property name="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
new file mode 100644
index 0000000..fef8e99
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+
+<project name="rosterJava2DB" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build, create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <delete file="${sun-ejb-jar.xml}"/>
+ <delete file="${ejb-jar.xml}"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <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"
+ 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">
+
+ <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" />
+
+ </antcall>
+ </target>
+
+
+ <target name="package-roster-jar" >
+
+ <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>
+
+ <target name="package-webclient-war" >
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ <param name="war.classes"
+ value="**/RosterServlet.class" />
+ </antcall>
+
+ </target>
+
+ <target name="package-appclient" >
+ <mkdir dir="${assemble.dir}"/>
+
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.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}/rosterextAppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
+
+ </antcall>
+ </target>
+
+
+ <target name="package-ear">
+
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <mkdir dir="${TEMPDIR}/src" />
+ <copy todir="${TEMPDIR}/src" >
+ <fileset dir="${basedir}/ejb" />
+ </copy>
+ <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"/>
+
+ <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
+
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+ </target>
+
+
+
+ <target name="build" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-team-jar" />
+ <antcall target="package-team2-jar" />
+ <antcall target="package-roster-jar" />
+ <antcall target="package-webclient-war" />
+ <antcall target="package-appclient" />
+
+ <antcall target="package-ear" />
+
+
+ </target>
+
+
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common">
+ <param name="extra-params"
+ value="--uniquetablenames=true --dropandcreatetables=true"/>
+ </antcall>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/MANIFEST.MF
new file mode 100644
index 0000000..bca2971
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: client.RosterClient
+
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
new file mode 100644
index 0000000..8d111aa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/RosterClient.java
@@ -0,0 +1,425 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import util.*;
+import roster.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class RosterClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ try {
+ 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.class);
+
+ Roster myRoster = home.create();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ 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);
+ stat.printSummary("rosterJava2DB");
+ }
+ stat.printSummary("rosterJava2DB");
+ } // main
+
+
+ private static void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ }
+
+ } // getSomeInfo
+
+ private static void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamDetails = myRoster.getTeam("T3");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ playerDetails = myRoster.getPlayer("P20");
+ System.out.println(playerDetails.toString());
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ 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");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ System.out.println(it.next());
+ }
+ System.out.println();
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ System.out.println(myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ System.out.println();
+
+ System.out.println(myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList);
+
+ System.out.println(myRoster.getTeamNameVariations("T5"));
+ System.out.println();
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ }
+
+ } // getMoreInfo
+
+ private static void printDetailsList(ArrayList list) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ System.out.println(details.toString());
+ }
+ System.out.println();
+ } // printDetailsList
+
+
+ private static void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ }
+
+ } // insertInfo
+
+
+} // class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/INDEX.LIST b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/INDEX.LIST
new file mode 100644
index 0000000..41895d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/INDEX.LIST
@@ -0,0 +1,13 @@
+JarIndex-Version: 1.0
+
+RosterAppBerlin.ear
+roster-ac.jar
+team-ejb.jar
+roster-ejb.jar
+RosterClient.war
+src
+src/client
+src/roster
+src/team
+src/util
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/application-client.xml
new file mode 100644
index 0000000..2263938
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>RosterClientExt</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/application.xml
new file mode 100644
index 0000000..4d96565
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/application.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>RosterAppExt</display-name>
+ <description>Application description</description>
+ <module>
+ <ejb>roster-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>rosterextAppClient.jar</java>
+ </module>
+ <module>
+ <ejb>team-ejb.jar</ejb>
+ </module>
+ <module>
+ <ejb>team2-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>roster2Teams-web.war</web-uri>
+ <context-root>rosterext</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-roster.xml
new file mode 100644
index 0000000..fac24dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-roster.xml
@@ -0,0 +1,993 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar version="2.1" 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/ejb-jar_2_1.xsd">
+ <display-name>RosterJAR</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>RosterEJB</ejb-name>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ <ejb-class>roster.RosterBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemotePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-local-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked/>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithSalaryUsingABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getRemoteTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamOfLeagueByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>cleanUp</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithPositionsGoalkeeperOrDefender</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsNameOfLeagueByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithSalaryUsingSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getEJBMetaData</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeagueByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueIdWithNULL</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithNullName</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getRemotePlayersOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamNameVariations</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getCitiesOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getRemoteTeamOfLeagueByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSalaryOfPlayerFromTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithNameEndingWithON</method-name>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>cleanUp</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithNameEndingWithON</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getRemoteTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithSalaryUsingSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamNameVariations</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithNullName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getRemotePlayersOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithPositionsGoalkeeperOrDefender</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersWithSalaryUsingABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeagueByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getCitiesOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueIdWithNULL</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSalaryOfPlayerFromTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamOfLeagueByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getRemoteTeamOfLeagueByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
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
new file mode 100644
index 0000000..d59a0d4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team.xml
@@ -0,0 +1,1547 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar version="2.1" 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/ejb-jar_2_1.xsd">
+ <description>League-Team</description>
+ <display-name>TeamJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <ejb-name>TeamEJB</ejb-name>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-class>team.TeamBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Team</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>teamId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>city</field-name>
+ </cmp-field>
+ <primkey-field>teamId</primkey-field>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ <query>
+ <description>Selector single object int</description>
+ <query-method>
+ <method-name>ejbSelectSalaryOfPlayerInTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select p.salary from Team t, in(t.players) as p where t = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(t) from Team t</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with LOCATE</description>
+ <query-method>
+ <method-name>ejbSelectNameLocate</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </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>
+ <description>Remote finder</description>
+ <query-method>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with SUBSTRING</description>
+ <query-method>
+ <method-name>ejbSelectByNameSubstring</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = SUBSTRING(?1, 5, 5)</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with CONCAT</description>
+ <query-method>
+ <method-name>ejbSelectByNameWithCONCAT</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = CONCAT(?1, ?2)</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <ejb-name>PlayerEJB</ejb-name>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-class>team.PlayerBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Player</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>position</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>playerId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>salary</field-name>
+ </cmp-field>
+ <primkey-field>playerId</primkey-field>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ <query>
+ <description>Finder using the IN Expression</description>
+ <query-method>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.position IN ('goalkeeper', 'defender')</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league.sport = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the ABS function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = ABS(?1)</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the MEMBER OF Expression</description>
+ <query-method>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where ?1 MEMBER p.teams</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findNotOnTeam</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p
+where p.teams is empty</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IS NULL Expression</description>
+ <query-method>
+ <method-name>findByNullName</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name IS NULL</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>ejbSelectSports</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.league.sport
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.salary between ?1 and ?2</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p1)
+from Player p1, Player p2
+where p1.salary > p2.salary and
+p2.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the LIKE Expression</description>
+ <query-method>
+ <method-name>findByNameEndingWithON</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name LIKE '%on'</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>ejbSelectLeagues</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct t.league
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the SQRT function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league = ?1</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <ejb-name>LeagueEJB</ejb-name>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-class>team.LeagueBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>League</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>leagueId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>sport</field-name>
+ </cmp-field>
+ <primkey-field>leagueId</primkey-field>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(l) from League l</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String</description>
+ <query-method>
+ <method-name>ejbSelectTeamsNameByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.name from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET</description>
+ <query-method>
+ <method-name>ejbSelectTeamsCity</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.city from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations with remote params</description>
+ <query-method>
+ <method-name>ejbSelectRemotePlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </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>
+ <description>Selector single object LocalInterface</description>
+ <query-method>
+ <method-name>ejbSelectTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET Remote Interfaces</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeams</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select object(t) from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object RemoteInterface</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(l) from League l where l.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations</description>
+ <query-method>
+ <method-name>ejbSelectPlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</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>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <ejb-relation>
+ <description>Team To Player</description>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>players</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>PlayerEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>PlayerEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <description>League-Team</description>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>LeagueEJB</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>LeagueEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>league</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked/>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamNameWithStringfunctionTests1</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalaryOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSalaryOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamNameWithStringfunctionTests3</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getEJBMetaData</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamId</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getCity</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamNameWithStringfunctionTests2</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked/>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPosition</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByNullName</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByNameEndingWithON</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getEJBMetaData</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSalary</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayerId</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
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
new file mode 100644
index 0000000..715f43f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team2.xml
@@ -0,0 +1,1547 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar version="2.1" 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/ejb-jar_2_1.xsd">
+ <description>League-Team</description>
+ <display-name>TeamJAR2</display-name>
+ <enterprise-beans>
+ <entity>
+ <ejb-name>TeamEJB2</ejb-name>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-class>team.TeamBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Team</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>teamId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>city</field-name>
+ </cmp-field>
+ <primkey-field>teamId</primkey-field>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ <query>
+ <description>Selector single object int</description>
+ <query-method>
+ <method-name>ejbSelectSalaryOfPlayerInTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select p.salary from Team t, in(t.players) as p where t = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(t) from Team t</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with LOCATE</description>
+ <query-method>
+ <method-name>ejbSelectNameLocate</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </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>
+ <description>Remote finder</description>
+ <query-method>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with SUBSTRING</description>
+ <query-method>
+ <method-name>ejbSelectByNameSubstring</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = SUBSTRING(?1, 5, 5)</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with CONCAT</description>
+ <query-method>
+ <method-name>ejbSelectByNameWithCONCAT</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = CONCAT(?1, ?2)</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-class>team.PlayerBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Player</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>position</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>playerId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>salary</field-name>
+ </cmp-field>
+ <primkey-field>playerId</primkey-field>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ <query>
+ <description>Finder using the IN Expression</description>
+ <query-method>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.position IN ('goalkeeper', 'defender')</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league.sport = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the ABS function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = ABS(?1)</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the MEMBER OF Expression</description>
+ <query-method>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where ?1 MEMBER p.teams</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findNotOnTeam</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p
+where p.teams is empty</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IS NULL Expression</description>
+ <query-method>
+ <method-name>findByNullName</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name IS NULL</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>ejbSelectSports</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.league.sport
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.salary between ?1 and ?2</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p1)
+from Player p1, Player p2
+where p1.salary > p2.salary and
+p2.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the LIKE Expression</description>
+ <query-method>
+ <method-name>findByNameEndingWithON</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name LIKE '%on'</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>ejbSelectLeagues</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct t.league
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the SQRT function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league = ?1</ejb-ql>
+ </query>
+ </entity>
+ <entity>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-class>team.LeagueBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>false</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>League</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>leagueId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>sport</field-name>
+ </cmp-field>
+ <primkey-field>leagueId</primkey-field>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ <query>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(l) from League l</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String</description>
+ <query-method>
+ <method-name>ejbSelectTeamsNameByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.name from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET</description>
+ <query-method>
+ <method-name>ejbSelectTeamsCity</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.city from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations with remote params</description>
+ <query-method>
+ <method-name>ejbSelectRemotePlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </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>
+ <description>Selector single object LocalInterface</description>
+ <query-method>
+ <method-name>ejbSelectTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET Remote Interfaces</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeams</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select object(t) from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object RemoteInterface</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <query-method>
+ <method-name>findByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(l) from League l where l.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations</description>
+ <query-method>
+ <method-name>ejbSelectPlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</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>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <ejb-relation>
+ <description>Team To Player</description>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB2</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>TeamEJB2</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>players</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>PlayerEJB2</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>PlayerEJB2</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <description>League-Team</description>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>LeagueEJB2</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>LeagueEJB2</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB2</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete/>
+ <relationship-role-source>
+ <ejb-name>TeamEJB2</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>league</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked/>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamNameWithStringfunctionTests1</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalaryOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSalaryOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamNameWithStringfunctionTests3</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getEJBMetaData</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamId</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getCity</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamNameWithStringfunctionTests2</method-name>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked/>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPosition</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByNullName</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByNameEndingWithON</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getEJBMetaData</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSalary</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayerId</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..9ebfec5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-application.xml
new file mode 100644
index 0000000..9606a69
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-application.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application>
+ <pass-by-reference>false</pass-by-reference>
+ <unique-id>1161983007</unique-id>
+</sun-application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-cmp-mappings-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-cmp-mappings-team.xml
new file mode 100644
index 0000000..5c98a0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-cmp-mappings-team.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>RosterSchema</schema>
+ <entity-mapping>
+ <ejb-name>LeagueEJB</ejb-name>
+ <table-name>LEAGUE</table-name>
+ <cmp-field-mapping>
+ <field-name>leagueId</field-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>LEAGUE.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>sport</field-name>
+ <column-name>LEAGUE.SPORT</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PlayerEJB</ejb-name>
+ <table-name>PLAYER</table-name>
+ <cmp-field-mapping>
+ <field-name>position</field-name>
+ <column-name>PLAYER.POSITION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>playerId</field-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>PLAYER.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>salary</field-name>
+ <column-name>PLAYER.SALARY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>TeamEJB</ejb-name>
+ <table-name>TEAM</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>TEAM.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>city</field-name>
+ <column-name>TEAM.CITY</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>teamId</field-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>league</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>players</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.TEAM_ID</column-name>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-roster.xml
new file mode 100644
index 0000000..cce2d2c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-roster.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>RosterJAR</name>
+ <unique-id>787878</unique-id>
+ <ejb>
+ <ejb-name>RosterEJB</ejb-name>
+ <jndi-name>SimpleRosterExt</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>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-team.xml
new file mode 100644
index 0000000..2083219
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-team.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>TeamJAR</name>
+ <unique-id>973984282</unique-id>
+ <ejb>
+ <ejb-name>LeagueEJB</ejb-name>
+ <jndi-name>LeagueEJB1Ext</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>PlayerEJB</ejb-name>
+ <jndi-name>PlayerEJB1Ext</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>TeamEJB</ejb-name>
+ <jndi-name>TeamEJB1Ext</jndi-name>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <create-tables-at-deploy>true</create-tables-at-deploy>
+ <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
+ <schema-generator-properties>
+ <!-- Test that unique names can be generated. -->
+ <property>
+ <name>use-unique-table-names</name>
+ <value>true</value>
+ </property>
+ <!-- This is setting the PK field to be null, but the resulting -->
+ <!-- column must NOT be nullable. -->
+ <property>
+ <name>TeamEJB.teamId.jdbc-nullable</name>
+ <value>true</value>
+ </property>
+ <!-- Map TeamEJB.city to a 'char(30) not null' column. -->
+ <property>
+ <name>TeamEJB.city.jdbc-type</name>
+ <value>char</value>
+ </property>
+ <property>
+ <name>TeamEJB.city.jdbc-maximum-length</name>
+ <value>30</value>
+ </property>
+ <property>
+ <name>TeamEJB.city.jdbc-nullable</name>
+ <value>false</value>
+ </property>
+ <!-- Map TeamEJB.name to a 'varchar(120)' column. -->
+ <!-- Capitalization should not matter; VARCHAR is same as varchar -->
+ <property>
+ <name>TeamEJB.name.jdbc-type</name>
+ <value>VARCHAR</value>
+ </property>
+ <property>
+ <name>TeamEJB.name.jdbc-maximum-length</name>
+ <value>120</value>
+ </property>
+ <!-- Map PlayerEJB.position to a 'varchar(15) null' column. -->
+ <property>
+ <name>PlayerEJB.position.jdbc-type</name>
+ <value>varchar</value>
+ </property>
+ <property>
+ <name>PlayerEJB.position.jdbc-maximum-length</name>
+ <value>15</value>
+ </property>
+ <property>
+ <name>PlayerEJB.position.jdbc-nullable</name>
+ <value>true</value>
+ </property>
+ <!-- Even strange capitalization should not matter! -->
+ <property>
+ <name>PlayerEJB.name.jdbc-type</name>
+ <value>cHaR</value>
+ </property>
+ <property>
+ <name>PlayerEJB.name.jdbc-maximum-length</name>
+ <value>64</value>
+ </property>
+ <!-- Ensure that precision & scale work. -->
+ <!-- Even strange capitalization should not matter! -->
+ <property>
+ <name>PlayerEJB.salary.jdbc-type</name>
+ <value>decIMAL</value>
+ </property>
+ <property>
+ <name>PlayerEJB.salary.jdbc-precision</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>PlayerEJB.salary.jdbc-scale</name>
+ <value>2</value>
+ </property>
+ </schema-generator-properties>
+ </cmp-resource>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-team2.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-team2.xml
new file mode 100644
index 0000000..9919751
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-ejb-jar-team2.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>TeamJAR</name>
+ <unique-id>973984282</unique-id>
+ <ejb>
+ <ejb-name>LeagueEJB2</ejb-name>
+ <jndi-name>LeagueEJB2Ext</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>PlayerEJB2</ejb-name>
+ <jndi-name>PlayerEJB2Ext</jndi-name>
+ </ejb>
+ <ejb>
+ <ejb-name>TeamEJB2</ejb-name>
+ <jndi-name>TeamEJB2Ext</jndi-name>
+ </ejb>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ <create-tables-at-deploy>true</create-tables-at-deploy>
+ <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
+ <schema-generator-properties>
+ <!-- Test that unique names can be generated. -->
+ <property>
+ <name>use-unique-table-names</name>
+ <value>true</value>
+ </property>
+ <!-- This is setting the PK field to be null, but the resulting -->
+ <!-- column must NOT be nullable. -->
+ <property>
+ <name>TeamEJB2.teamId.jdbc-nullable</name>
+ <value>true</value>
+ </property>
+ <!-- Map TeamEJB2.city to a 'char(30) not null' column. -->
+ <property>
+ <name>TeamEJB2.city.jdbc-type</name>
+ <value>char</value>
+ </property>
+ <property>
+ <name>TeamEJB2.city.jdbc-maximum-length</name>
+ <value>30</value>
+ </property>
+ <property>
+ <name>TeamEJB2.city.jdbc-nullable</name>
+ <value>false</value>
+ </property>
+ <!-- Map TeamEJB2.name to a 'varchar(120)' column. -->
+ <!-- Capitalization should not matter; VARCHAR is same as varchar -->
+ <property>
+ <name>TeamEJB2.name.jdbc-type</name>
+ <value>VARCHAR</value>
+ </property>
+ <property>
+ <name>TeamEJB2.name.jdbc-maximum-length</name>
+ <value>120</value>
+ </property>
+ <!-- Map PlayerEJB2.position to a 'varchar(15) null' column. -->
+ <property>
+ <name>PlayerEJB2.position.jdbc-type</name>
+ <value>varchar</value>
+ </property>
+ <property>
+ <name>PlayerEJB2.position.jdbc-maximum-length</name>
+ <value>15</value>
+ </property>
+ <property>
+ <name>PlayerEJB2.position.jdbc-nullable</name>
+ <value>true</value>
+ </property>
+ <!-- Even strange capitalization should not matter! -->
+ <property>
+ <name>PlayerEJB2.name.jdbc-type</name>
+ <value>cHaR</value>
+ </property>
+ <property>
+ <name>PlayerEJB2.name.jdbc-maximum-length</name>
+ <value>64</value>
+ </property>
+ <!-- Ensure that precision & scale work. -->
+ <!-- Even strange capitalization should not matter! -->
+ <property>
+ <name>PlayerEJB2.salary.jdbc-type</name>
+ <value>decIMAL</value>
+ </property>
+ <property>
+ <name>PlayerEJB2.salary.jdbc-precision</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>PlayerEJB2.salary.jdbc-scale</name>
+ <value>2</value>
+ </property>
+ </schema-generator-properties>
+ </cmp-resource>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-web.xml
new file mode 100644
index 0000000..eed9769
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/web.xml
new file mode 100644
index 0000000..d4a4833
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>RosterClient</display-name>
+ <servlet>
+ <servlet-name>RosterServlet</servlet-name>
+ <display-name>RosterServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.RosterServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RosterServlet</servlet-name>
+ <url-pattern>/Roster</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..ecbb11f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/Roster.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import javax.ejb.FinderException;
+import javax.ejb.RemoveException;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Set;
+
+public interface Roster extends EJBObject {
+
+ // Players
+
+ public void createPlayer(PlayerDetails details)
+ throws RemoteException;
+
+ public void addPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public void removePlayer(String playerId)
+ throws RemoteException;
+
+ public void dropPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public PlayerDetails getPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeamCopy(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersByPosition(String position)
+ throws RemoteException;
+
+ public ArrayList getPlayersByHigherSalary(String name)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySalaryRange(double low, double high)
+ throws RemoteException;
+
+ public ArrayList getPlayersByLeagueId(String leagueId)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySport(String sport)
+ throws RemoteException;
+
+ public ArrayList getPlayersByCity(String city)
+ throws RemoteException;
+
+ public ArrayList getAllPlayers()
+ throws RemoteException;
+
+ public ArrayList getPlayersNotOnTeam()
+ throws RemoteException;
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) throws RemoteException;
+
+ public ArrayList getLeaguesOfPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getSportsOfPlayer(String playerId)
+ throws RemoteException;
+
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfLeague(String leagueId)
+ throws RemoteException;
+
+
+ public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNameEndingWithON()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNullName()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
+ // Teams
+
+ public ArrayList getTeamsOfLeague(String leagueId)
+ throws RemoteException;
+
+ public void createTeamInLeague(TeamDetails details, String leagueId)
+ throws RemoteException;
+
+ public void removeTeam(String teamId)
+ throws RemoteException;
+
+ public TeamDetails getTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+
+ public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
+
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamNameVariations(String teamId) throws RemoteException;
+
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+
+ // Leagues
+
+ public void createLeague(LeagueDetails details)
+ throws RemoteException;
+
+ public void removeLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeagueByName(String name)
+ throws RemoteException;
+
+ // Test
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
+ public ArrayList getRemotePlayersOfLeague(String leagueId) throws RemoteException;
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) throws RemoteException;
+
+ 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
new file mode 100755
index 0000000..b56aff0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterBean.java
@@ -0,0 +1,1033 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.*;
+import team.*;
+import java.rmi.RemoteException;
+
+public class RosterBean implements SessionBean {
+
+ private LocalPlayerHome playerHome = null;
+ private LocalTeamHome teamHome = null;
+ private LocalLeagueHome leagueHome = null;
+
+ private PlayerHome remPlayerHome = null;
+ private TeamHome remTeamHome = null;
+ private LeagueHome remLeagueHome = null;
+
+
+ // Player business methods
+
+ public ArrayList testFinder(String parm1, String parm2,
+ String parm3) {
+
+ Debug.print("RosterBean testFinder");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByTest(parm1, parm2, parm3);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }
+
+ public void createPlayer(PlayerDetails details) {
+
+ Debug.print("RosterBean createPlayer");
+ try {
+ 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) {
+
+ Debug.print("RosterBean addPlayer");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ team.addPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removePlayer(String playerId) {
+
+ Debug.print("RosterBean removePlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ player.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(String playerId, String teamId) {
+
+ Debug.print("RosterBean dropPlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.dropPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public PlayerDetails getPlayer(String playerId) {
+
+ Debug.print("RosterBean getPlayer");
+ PlayerDetails playerDetails = null;
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ playerDetails = new PlayerDetails(playerId,
+ player.getName(), player.getPosition(), player.getSalary());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return playerDetails;
+ } // getPlayer
+
+
+ public ArrayList getPlayersOfTeam(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeam");
+ Collection players = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ players = team.getPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersOfTeam
+
+
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeamCopy");
+ ArrayList playersList = null;
+
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ playersList = team.getCopyOfPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return playersList;
+
+ } // getPlayersOfTeamCopy
+
+
+ public ArrayList getTeamsOfLeague(String leagueId) {
+
+ Debug.print("RosterBean getTeamsOfLeague");
+
+ ArrayList detailsList = new ArrayList();
+ Collection teams = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ teams = league.getTeams();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = teams.iterator();
+ while (i.hasNext()) {
+ LocalTeam team = (LocalTeam) i.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // getTeamsOfLeague
+
+
+ public ArrayList getPlayersByPosition(String position) {
+
+ Debug.print("RosterBean getPlayersByPosition");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPosition(position);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPosition
+
+
+ public ArrayList getPlayersByHigherSalary(String name) {
+
+ Debug.print("RosterBean getPlayersByByHigherSalary");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByHigherSalary(name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByHigherSalary
+
+ public ArrayList getPlayersBySalaryRange(double low, double high) {
+
+ Debug.print("RosterBean getPlayersBySalaryRange");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySalaryRange(low, high);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySalaryRange
+
+ public ArrayList getPlayersByLeagueId(String leagueId) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+ public ArrayList getPlayersBySport(String sport) {
+
+ Debug.print("RosterBean getPlayersBySport");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySport(sport);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySport
+
+ public ArrayList getPlayersByCity(String city) {
+
+ Debug.print("RosterBean getPlayersByCity");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByCity(city);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByCity
+
+ public ArrayList getAllPlayers() {
+
+ Debug.print("RosterBean getAllPlayers");
+ Collection players = null;
+
+ try {
+ players = playerHome.findAll();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getAllPlayers
+
+ public ArrayList getPlayersNotOnTeam() {
+
+ Debug.print("RosterBean getPlayersNotOnTeam");
+ Collection players = null;
+
+ try {
+ players = playerHome.findNotOnTeam();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersNotOnTeam
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) {
+
+ Debug.print("RosterBean getPlayersByPositionAndName");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPositionAndName(position, name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPositionAndName
+
+ public ArrayList getLeaguesOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getLeaguesOfPlayer");
+ ArrayList detailsList = new ArrayList();
+ Collection leagues = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ leagues = player.getLeagues();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = leagues.iterator();
+ while (i.hasNext()) {
+ LocalLeague league = (LocalLeague) i.next();
+ LeagueDetails details = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ detailsList.add(details);
+ }
+ return detailsList;
+ } // getLeaguesOfPlayer
+
+ public ArrayList getSportsOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getSportsOfPlayer");
+ ArrayList sportsList = new ArrayList();
+ Collection sports = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ sports = player.getSports();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = sports.iterator();
+ while (i.hasNext()) {
+ String sport = (String) i.next();
+ sportsList.add(sport);
+ }
+ return sportsList;
+ } // getSportsOfPlayer
+
+ // Team business methods
+
+ public void createTeamInLeague(TeamDetails details, String leagueId) {
+
+ Debug.print("RosterBean createTeamInLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ LocalTeam team = teamHome.create(details.getId(),
+ details.getName(), details.getCity());
+ league.addTeam(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeTeam(String teamId) {
+
+ Debug.print("RosterBean removeTeam");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public TeamDetails getTeam(String teamId) {
+
+ Debug.print("RosterBean getTeam");
+ TeamDetails teamDetails = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ teamDetails = new TeamDetails(teamId,
+ team.getName(), team.getCity());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return teamDetails;
+ }
+
+
+ // League business methods
+
+ public void createLeague(LeagueDetails details) {
+
+ Debug.print("RosterBean createLeague");
+ try {
+ LocalLeague league = leagueHome.create(details.getId(),
+ details.getName(), details.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeLeague(String leagueId) {
+
+ Debug.print("RosterBean removeLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ league.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public LeagueDetails getLeague(String leagueId) {
+
+ Debug.print("RosterBean getLeague");
+ LeagueDetails leagueDetails = null;
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ leagueDetails = new LeagueDetails(leagueId,
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return leagueDetails;
+ }
+
+ // SessionBean methods
+
+ public void ejbCreate() throws CreateException {
+
+ Debug.print("RosterBean ejbCreate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+ } catch (NamingException ex) {
+ throw new CreateException(ex.getMessage());
+ }
+ }
+
+ public void ejbActivate() {
+
+ Debug.print("RosterBean ejbActivate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+
+ } catch (NamingException ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void ejbPassivate() {
+
+ playerHome = null;
+ teamHome = null;
+ leagueHome = null;
+ remPlayerHome = null;
+ remTeamHome = null;
+ remLeagueHome = null;
+
+ }
+
+ 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();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ private ArrayList copyRemotePlayersToDetails(Collection players) throws RemoteException {
+
+ ArrayList detailsList = new ArrayList();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ Player player = (Player) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ /**
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ */
+ public void cleanUp() {
+ Debug.print("Cleaning up the database");
+ Collection toClean = null;
+ Iterator it = null;
+
+ try {
+ //removing the player EJBs
+ toClean = playerHome.findAll();
+ it = toClean.iterator();
+ 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!");
+ } 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 {
+ LocalLeague league = leagueHome.findByName(name);
+ leagueDetails = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return leagueDetails;
+ }
+ // getLeagueByName()
+
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeague");
+ ArrayList detailsList = new ArrayList();
+ Collection teamsColl = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ LocalTeam team = (LocalTeam) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
+ 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);
+ Debug.print(" ----- League found");
+ teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
+ Debug.print(" ----- Team found");
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ try {
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param city
+ * @return
+ */
+ public Set getCitiesOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
+ LocalLeague league;
+ Set cities;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ cities = league.getCitiesOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return cities;
+ }// getCitiesOfLeague()
+
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
+ ArrayList detailsList = new ArrayList();
+ League league;
+ Set teams;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ teams = league.getRemoteTeamsOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ try {
+ Iterator it = teams.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ LocalTeam team;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ team = league.getTeamByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ }// getTeamOfLeagueByCity()
+
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ String teamName;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ teamName = league.getTeamsNameByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return teamName;
+
+ }// getTeamsNameOfLeagueByCity()
+
+
+ /**
+ *
+ * @param teamID
+ * @param playerName
+ * @return
+ */
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName) {
+ Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
+ LocalTeam team;
+ double salary;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return salary;
+ }// getSalaryOfPlayerFromTeam()
+
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getPlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getPlayersOfLeague(leagueId)");
+ LocalLeague league;
+ Set players;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueId);
+ players = league.getPlayersFromLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersOfLeague()
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getRemotePlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getRemotePlayersOfLeague(leagueId)");
+ League league;
+ Collection players;
+ ArrayList result;
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueId);
+ players = league.getRemotePlayersFromLeague();
+ result = copyRemotePlayersToDetails(players);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ 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
+ */
+ public ArrayList getPlayersWithTeam(String teamId) {
+ Debug.print("RosterBean getPlayersWithTeam(teamId)");
+ LocalTeam team;
+ Collection players = null;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ players = playerHome.findByTeam(team);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersWithTeam()
+
+
+ /**
+ *
+ * @param teamId
+ * @return
+ */
+ public String getTeamNameVariations(String teamId) {
+ Debug.print("RosterBean getTeamNameVariations(teamId)");
+ LocalTeam team;
+ StringBuffer out = new StringBuffer();
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ Debug.print("--- CONCAT");
+ out.append(team.getTeamNameWithStringfunctionTests1());
+ Debug.print("--- SUBSTRING");
+ out.append(team.getTeamNameWithStringfunctionTests2());
+ Debug.print("--- LOCATE AND LENGTH");
+ out.append(team.getTeamNameWithStringfunctionTests3());
+ }
+ catch (Exception ex) {
+ 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
+ */
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getRemoteTeamOfLeagueByCity(leagueKey, city)");
+ League league;
+ Team team;
+ TeamDetails teamDetails;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ team = league.getRemoteTeamByCity(city);
+ 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) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = null; //leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+
+} // 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
new file mode 100755
index 0000000..6dfcc41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.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
new file mode 100755
index 0000000..caa955e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/League.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.Set;
+import javax.ejb.FinderException;
+
+
+public interface League extends javax.ejb.EJBObject {
+
+ public String getLeagueId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getSport() throws RemoteException;
+ public Collection getTeams() throws RemoteException;
+
+ public Team getRemoteTeamByCity(String city) throws FinderException,
+ RemoteException;
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
+ RemoteException;
+
+ public Collection getRemotePlayersFromLeague() throws FinderException,
+ RemoteException;
+
+// public void addTeam(Team team) throws RemoteException;
+// public void dropTeam(Team team) throws RemoteException;
+
+// public Set getCitiesOfThisLeague() throws FinderException;
+// public String getTeamsNameByCity(String city) throws FinderException;
+}
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
new file mode 100755
index 0000000..d9f348a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueBean.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class LeagueBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getLeagueId();
+ public abstract void setLeagueId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getSport();
+ public abstract void setSport(String sport);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Set ejbSelectTeamsCity(LocalLeague league)
+ throws FinderException;
+
+ public abstract Set ejbSelectRemoteTeams(League league)
+ throws FinderException;
+
+
+ public abstract LocalTeam ejbSelectTeamByCity(String city)
+ throws FinderException;
+
+ public abstract Team ejbSelectRemoteTeamByCity(String city)
+ throws FinderException;
+
+ 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 =
+ (team.LocalLeague)context.getEJBLocalObject();
+
+ return ejbSelectTeamsCity(league);
+ }
+
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException {
+
+ League league = (team.League)context.getEJBObject();
+
+ 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");
+ try {
+ Collection teams = getTeams();
+ teams.add(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropTeam(LocalTeam team) {
+
+ Debug.print("TeamBean dropTeam");
+ try {
+ Collection teams = getTeams();
+ teams.remove(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String sport)
+ throws CreateException {
+
+ Debug.print("LeagueBean ejbCreate");
+ setLeagueId(id);
+ setName(name);
+ 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
new file mode 100755
index 0000000..e8809e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface LeagueHome extends javax.ejb.EJBHome {
+
+ public League create (String id, String name, String sport)
+ throws CreateException, RemoteException;
+
+ public League findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public League findByName(String name)
+ 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
new file mode 100755
index 0000000..3f93dd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeague.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalLeague extends EJBLocalObject {
+
+ public String getLeagueId();
+ public String getName();
+ public String getSport();
+ public Collection getTeams();
+
+ public void addTeam(LocalTeam team);
+ public void dropTeam(LocalTeam team);
+
+ public Set getCitiesOfThisLeague() throws FinderException;
+ 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
new file mode 100755
index 0000000..c467a5e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeagueHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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()
+ throws FinderException;
+
+ public LocalLeague findByName(String name)
+ throws FinderException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayer.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayer.java
new file mode 100755
index 0000000..e8846dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayer.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalPlayer extends EJBLocalObject {
+
+ public String getPlayerId();
+ public String getName();
+ public String getPosition();
+ public double getSalary();
+ public Collection getTeams();
+ public Collection getLeagues() throws FinderException;
+ public Collection getSports() 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
new file mode 100755
index 0000000..d858503
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayerHome.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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)
+ throws FinderException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException;
+
+ public Collection findByLeague(LocalLeague league)
+ throws FinderException;
+
+ public Collection findBySport(String sport)
+ throws FinderException;
+
+ public Collection findByCity(String city)
+ throws FinderException;
+
+ public Collection findAll()
+ throws FinderException;
+
+ public Collection findNotOnTeam()
+ throws FinderException;
+
+ 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;
+
+ public Collection findByNameEndingWithON()
+ throws FinderException;
+
+ public Collection findByNullName()
+ throws FinderException;
+
+ public Collection findByTeam(LocalTeam team)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
+ 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
new file mode 100755
index 0000000..f8ad6c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeam.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalTeam extends EJBLocalObject {
+
+ public String getTeamId();
+ public String getName();
+ public String getCity();
+ public Collection getPlayers();
+ public LocalLeague getLeague();
+
+ public ArrayList getCopyOfPlayers();
+ public void addPlayer(LocalPlayer player);
+ public void dropPlayer(LocalPlayer player);
+ public double getSalaryOfPlayer(String playerName);
+ 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
new file mode 100755
index 0000000..ac2f66c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeamHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.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()
+ throws FinderException;
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
+ LocalLeague league)
+ throws FinderException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/Player.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/Player.java
new file mode 100755
index 0000000..a35d838
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/Player.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.FinderException;
+
+public interface Player extends javax.ejb.EJBObject {
+
+ public String getPlayerId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getPosition() throws RemoteException;
+ public double getSalary() throws RemoteException;
+// public Collection getTeams() throws RemoteException;
+// public Collection getLeagues() throws FinderException, RemoteException;
+// public Collection getSports() throws FinderException, RemoteException;
+
+}
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
new file mode 100755
index 0000000..2e2d79a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerBean.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class PlayerBean implements EntityBean {
+
+ private EntityContext context;
+
+ // 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);
+
+ public abstract String getPosition();
+ public abstract void setPosition(String position);
+
+ public abstract double getSalary();
+ public abstract void setSalary(double salary);
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Collection ejbSelectLeagues(LocalPlayer player)
+ throws FinderException;
+
+ public abstract Collection ejbSelectSports(LocalPlayer player)
+ throws FinderException;
+
+
+
+ // Business methods
+
+ public Collection getLeagues() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectLeagues(player);
+ }
+
+ public Collection getSports() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectSports(player);
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String position,
+ double salary) throws CreateException {
+
+ Debug.print("PlayerBean ejbCreate");
+ setPlayerId(id);
+ setName(name);
+ setPosition(position);
+ 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
new file mode 100755
index 0000000..1608787
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerHome.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface PlayerHome extends javax.ejb.EJBHome {
+
+ 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)
+ throws FinderException, RemoteException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException, RemoteException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException, RemoteException;
+
+// public Collection findByLeague(League league)
+// throws FinderException, RemoteException;
+
+ public Collection findBySport(String sport)
+ throws FinderException, RemoteException;
+
+ public Collection findByCity(String city)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findNotOnTeam()
+ throws FinderException, RemoteException;
+
+ public Collection findByPositionAndName(String position,
+ String name) throws FinderException, RemoteException;
+
+ public Collection findByTest (String parm1, String parm2, String parm3)
+ throws FinderException, RemoteException;
+
+
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/RosterSchema.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/RosterSchema.dbschema
new file mode 100644
index 0000000..7e90bea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/RosterSchema.dbschema
@@ -0,0 +1,1234 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement335787804">
+ <versionNo>2</versionNo>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl4508150">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement335787804"/>
+ </element>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2574618">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <_username>IASCTS</_username>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_url>jdbc:oracle:thin:@petruccio:1521:ORCL1</_url>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3179125">
+ <name>DatabaseSchema</name>
+ </OBJECT>
+ </_name>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15799662">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1296776513">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316">
+ <table>LEAGUE</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5649494">
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13029737">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
+ <value>255</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14572800">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-758477032">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11255404">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-758477032"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6470099">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2032884633">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl9826764">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2032884633"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3511340">
+ <name>SPORT</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9638098">
+ <name>LEAGUE</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection4353506">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-573464718">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-573464718">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl3494782">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection692735">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-573464718"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16550222">
+ <name>SYS_C0056942</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl10121027">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection347201">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl10121027"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-573464718"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16691100">
+ <name>SYS_C0056942</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection8786660">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-573464718"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1417774579">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987">
+ <table>PLAYER</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16190401">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl12912375">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4999735">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-369105498">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10258960">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-369105498"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2900371">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement899610308">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8736201">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement899610308"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11920937">
+ <name>POSITION</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1915016741">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1685678">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer126">
+ <value>126</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1915016741"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11259399">
+ <name>SALARY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>8</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer126"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6500473">
+ <name>PLAYER</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection597588">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement726042623">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement726042623">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl229936">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2010459">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement726042623"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5789117">
+ <name>SYS_C0056941</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6619132">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11327826">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6619132"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement726042623"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14817767">
+ <name>SYS_C0056941</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2412752">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement726042623"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1865272815">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456">
+ <table>TEAM</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection472061">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10814618">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13712942">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1894275594">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4811138">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1894275594"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11407862">
+ <name>CITY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1894595370">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1917264">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1894595370"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11215786">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement355764204">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11702295">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement355764204"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1183826">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15562893">
+ <name>TEAM</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6648045">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1588061818">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl8759907">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16684370">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-47380209">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement355764204"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl7696990">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-47380209"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10986134">
+ <name>LEAGUE_ID;LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl8759907"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1588061818"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10702385">
+ <name>SYS_C0056944</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1588061819">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl6464516">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection4674651">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16658680">
+ <name>SYS_C0056943</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl4254413">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16599651">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl4254413"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1588061819"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16213371">
+ <name>SYS_C0056943</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15087611">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-425529968">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644">
+ <table>TEAMPLAYER</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15938414">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement435745883">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4302978">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10352157">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8988616">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9626034">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2074594">
+ <name>TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5629266">
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327672">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl4647707">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16091662">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1595789890">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl16087518">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1595789890"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1309711">
+ <name>PLAYER_ID;PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl4647707"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327672"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier615111">
+ <name>SYS_C0056947</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327673">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl3418918">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection3848924">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement1218289538">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl16582237">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement1218289538"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11330553">
+ <name>TEAM_ID;TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl3418918"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327673"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11213920">
+ <name>SYS_C0056946</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-445985692">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-445985692">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl13895785">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5337256">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-445985692"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7611883">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6658245">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12703139">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6658245"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-445985692"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1106834">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11904202">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-445985692"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl4508150"/>
+ </owner>
+ </OBJECT>
+ </tables>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.6.0.0 - Production</_databaseProductVersion>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13405425">
+ <name>IASCTS</name>
+ </OBJECT>
+ </_schema>
+ <_databaseProductName>Oracle</_databaseProductName>
+ </OBJECT>
+ </impl>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/Team.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/Team.java
new file mode 100755
index 0000000..8935cf1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/Team.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+
+public interface Team extends javax.ejb.EJBObject {
+
+ public String getTeamId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getCity() throws RemoteException;
+// public Collection getPlayers() throws RemoteException;
+// public League getLeague() throws RemoteException;
+
+ public ArrayList getCopyOfPlayers() throws RemoteException;
+// public void addPlayer(Player player) throws RemoteException;
+// public void dropPlayer(Player player) throws RemoteException;
+ public double getSalaryOfPlayer(String playerName) throws RemoteException;
+}
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
new file mode 100755
index 0000000..4f6e907
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamBean.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+import util.PlayerDetails;
+
+public abstract class TeamBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getTeamId();
+ public abstract void setTeamId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getCity();
+ public abstract void setCity(String city);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getPlayers();
+ public abstract void setPlayers(Collection players);
+
+ public abstract LocalLeague getLeague();
+ public abstract void setLeague(LocalLeague league);
+
+ // Select methods
+
+ public abstract double ejbSelectSalaryOfPlayerInTeam(LocalTeam team, String playerName)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameSubstring(String substring)
+ throws FinderException;
+
+ public abstract String ejbSelectNameLocate(String substring)
+ 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(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");
+ ArrayList playerList = new ArrayList();
+ Collection players = getPlayers();
+
+ Iterator i = players.iterator();
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), 0.00);
+ playerList.add(details);
+ }
+
+ return playerList;
+ }
+
+ public void addPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean addPlayer");
+ try {
+ Collection players = getPlayers();
+ players.add(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean dropPlayer");
+ try {
+ Collection players = getPlayers();
+ players.remove(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String city)
+ throws CreateException {
+
+ Debug.print("TeamBean ejbCreate");
+ setTeamId(id);
+ setName(name);
+ 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() { }
+
+
+} // TeamBean class
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
new file mode 100755
index 0000000..6ac99d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamHome.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface TeamHome extends javax.ejb.EJBHome {
+
+ public Team create (String id, String name, String city)
+ throws CreateException, RemoteException;
+
+ public Team findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
+ League league)
+ throws FinderException, RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/Debug.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/Debug.java
new file mode 100644
index 0000000..a914914
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/Debug.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * This class makes it easier to print out debug statements.
+ * The Debug.print statements are printed to System.err
+ * if debuggingOn = true.
+ */
+
+package util;
+
+public final class Debug {
+
+ public static final boolean debuggingOn = true;
+
+ public static final void print(String msg) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ }
+ }
+
+ public static final void print(String msg, Object object) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ System.err.println(" " + object.getClass().getName());
+ }
+ }
+
+} // Debug
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/LeagueDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/LeagueDetails.java
new file mode 100644
index 0000000..2e0a4f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/LeagueDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class LeagueDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String sport;
+
+ public LeagueDetails (String id, String name, String sport) {
+
+ this.id = id;
+ this.name = name;
+ this.sport = sport;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSport() {
+ return sport;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + sport;
+ return s;
+ }
+
+} // LeagueDetails
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
new file mode 100644
index 0000000..81041c2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/PlayerDetails.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class PlayerDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String position;
+ private double salary;
+
+ public PlayerDetails (String id, String name, String position,
+ double salary) {
+
+ this.id = id;
+ this.name = name;
+ this.position = position;
+ this.salary = salary;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPosition() {
+ return position;
+ }
+
+ public double getSalary() {
+ return salary;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + position + " " + salary;
+ return s;
+ }
+
+
+} // PlayerDetails
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/TeamDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/TeamDetails.java
new file mode 100644
index 0000000..486aa4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/TeamDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class TeamDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String city;
+
+ public TeamDetails (String id, String name, String city) {
+
+ this.id = id;
+ this.name = name;
+ this.city = city;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + city;
+ return s;
+ }
+
+} // TeamDetails
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
new file mode 100644
index 0000000..4fe3dc3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/servlet/RosterServlet.java
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+public class RosterServlet extends HttpServlet{
+
+ private PrintWriter out = null;
+
+ /** Handles the HTTP <code>GET</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /**
+ *
+ * @param req
+ * @param res
+ * @throws ServletException
+ * @throws IOException
+ */
+ private void processRequest(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.setContentType("text/html");
+ out = res.getWriter();
+
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>RosterApp Servlet-Client</title>");
+ out.println("</head>");
+ out.println("<body>");
+
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleRoster");
+
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome.class);
+
+ Roster myRoster = home.create();
+
+ // deleting all exisiting DB-entries
+ myRoster.cleanUp();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ } catch (Exception ex) {
+ out.println("Caught an exception:");
+ ex.printStackTrace(out);
+ ex.printStackTrace();
+ }
+
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList, out);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // getSomeInfo
+
+
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamDetails = myRoster.getTeam("T3");
+ out.println("<BR>" + teamDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerDetails = myRoster.getPlayer("P20");
+ out.println("<BR>" + playerDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ out.println("<BR>/////////////////////////////////////////////");
+ printDetailsList(playerList, out);
+ out.println("<BR>/////////////////////////////////////////////");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList, out);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList, out);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ out.println("<BR>" + it.next());
+ }
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList, out);
+
+ out.println("<BR>" + myRoster.getTeamNameVariations("T5"));
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList, out);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList, out);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList, out);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+
+
+ } // getMoreInfo
+
+
+ /**
+ *
+ * @param list
+ * @param out
+ */
+ private void printDetailsList(ArrayList list, PrintWriter out) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ out.println("<BR>" + details.toString());
+ }
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+ } // printDetailsList
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // insertInfo
+
+
+}
+
+
+
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
new file mode 100644
index 0000000..788a537
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.properties
@@ -0,0 +1,53 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="rosterGenDBSchema"/>
+<property name="appname" value="${module}"/>
+
+<property name="test.client"
+ value="RosterClient"/>
+
+<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"/>
+<property name="sun-ejb-jar-team.xml" value="descriptor/sun-ejb-jar-team.xml"/>
+
+<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="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="appclientjar.files" value="${build.classes.dir}"/>
+
+<property name="appclient.jar" value="${assemble.dir}/rosterextAppClient.jar"/>
+<property name="war.file" value="${assemble.dir}/rosterext-web.war"/>
+<property name="app.type" value="application"/>
+<property name="hasWebclient" value="true"/>
+
+<property name="web.xml"
+ value="descriptor/web.xml"/>
+<property name="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
new file mode 100644
index 0000000..0fd7888
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+
+<project name="rosterGenDBSchema" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build, create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <delete file="${sun-ejb-jar.xml}"/>
+ <delete file="${ejb-jar.xml}"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <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"
+ 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="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"
+ 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>
+
+ <target name="package-webclient-war" >
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ <param name="war.classes"
+ value="**/RosterServlet.class" />
+ </antcall>
+
+ </target>
+
+ <target name="package-appclient" >
+ <mkdir dir="${assemble.dir}"/>
+
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.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}/rosterextAppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
+
+ </antcall>
+ </target>
+
+
+ <target name="package-ear">
+
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <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="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+ </target>
+
+
+
+ <target name="build" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-team-jar" />
+ <antcall target="package-roster-jar" />
+ <antcall target="package-webclient-war" />
+ <antcall target="package-appclient" />
+
+ <antcall target="package-ear" />
+
+
+ </target>
+
+
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="${basedir}/sql/RosterApp_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/MANIFEST.MF
new file mode 100644
index 0000000..bca2971
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: client.RosterClient
+
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
new file mode 100644
index 0000000..c3a1097
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/RosterClient.java
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.util.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import util.*;
+import roster.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class RosterClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ try {
+ 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.class);
+
+ Roster myRoster = home.create();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ // getMoreInfo(myRoster);
+
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.PASS);
+ stat.printSummary("RosterGenDBSchema");
+ System.exit(0);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ }
+ stat.printSummary("RosterGenDBSchema");
+ } // main
+
+
+ private static void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ }
+
+ } // getSomeInfo
+
+ private static void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamDetails = myRoster.getTeam("T3");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ playerDetails = myRoster.getPlayer("P20");
+ System.out.println(playerDetails.toString());
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ }
+
+ } // getMoreInfo
+
+ private static void printDetailsList(ArrayList list) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ System.out.println(details.toString());
+ }
+ System.out.println();
+ } // printDetailsList
+
+
+ private static void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ }
+
+ } // insertInfo
+
+
+} // class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/INDEX.LIST b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/INDEX.LIST
new file mode 100644
index 0000000..41895d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/INDEX.LIST
@@ -0,0 +1,13 @@
+JarIndex-Version: 1.0
+
+RosterAppBerlin.ear
+roster-ac.jar
+team-ejb.jar
+roster-ejb.jar
+RosterClient.war
+src
+src/client
+src/roster
+src/team
+src/util
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/application-client.xml
new file mode 100644
index 0000000..2263938
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>RosterClientExt</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/application.xml
new file mode 100644
index 0000000..5e13ce9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/application.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>RosterAppExt</display-name>
+ <description>Application description</description>
+ <module>
+ <ejb>roster-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>rosterextAppClient.jar</java>
+ </module>
+ <module>
+ <ejb>team-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>rosterGenDBSchema-web.war</web-uri>
+ <context-root>rosterext</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-roster.xml
new file mode 100644
index 0000000..84f24b2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-roster.xml
@@ -0,0 +1,646 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>RosterJAR</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>RosterEJB</display-name>
+ <ejb-name>RosterEJB</ejb-name>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ <ejb-class>roster.RosterBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemotePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-local-ref>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
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
new file mode 100644
index 0000000..03099f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-team.xml
@@ -0,0 +1,1346 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>TeamJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>LeagueEJB</display-name>
+ <ejb-name>LeagueEJB</ejb-name>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-class>team.LeagueBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>League</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>leagueId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>sport</field-name>
+ </cmp-field>
+ <primkey-field>leagueId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(l) from League l</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(l) from League l where l.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET</description>
+ <query-method>
+ <method-name>ejbSelectTeamsCity</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.city from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET Remote Interfaces</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeams</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select object(t) from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object LocalInterface</description>
+ <query-method>
+ <method-name>ejbSelectTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object RemoteInterface</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String</description>
+ <query-method>
+ <method-name>ejbSelectTeamsNameByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.name from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations</description>
+ <query-method>
+ <method-name>ejbSelectPlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</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>
+ <description>Selector returning Set using multiple collection declarations with remote params</description>
+ <query-method>
+ <method-name>ejbSelectRemotePlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </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>
+ </entity>
+ <entity>
+ <display-name>TeamEJB</display-name>
+ <ejb-name>TeamEJB</ejb-name>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-class>team.TeamBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Team</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>teamId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>city</field-name>
+ </cmp-field>
+ <primkey-field>teamId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(t) from Team t</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Remote finder</description>
+ <query-method>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object int</description>
+ <query-method>
+ <method-name>ejbSelectSalaryOfPlayerInTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select p.salary from Team t, in(t.players) as p where t = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with CONCAT</description>
+ <query-method>
+ <method-name>ejbSelectByNameWithCONCAT</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = CONCAT(?1, ?2) </ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with SUBSTRING</description>
+ <query-method>
+ <method-name>ejbSelectByNameSubstring</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = SUBSTRING(?1, 5, 5)</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with LOCATE</description>
+ <query-method>
+ <method-name>ejbSelectNameLocate</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </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>
+ </entity>
+ <entity>
+ <display-name>PlayerEJB</display-name>
+ <ejb-name>PlayerEJB</ejb-name>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-class>team.PlayerBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Player</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>position</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>playerId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>salary</field-name>
+ </cmp-field>
+ <primkey-field>playerId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p
+where p.teams is empty</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league.sport = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectSports</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.league.sport
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.salary between ?1 and ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p1)
+from Player p1, Player p2
+where p1.salary > p2.salary and
+p2.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectLeagues</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct t.league
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IN Expression</description>
+ <query-method>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.position IN ('goalkeeper', 'defender')</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the LIKE Expression</description>
+ <query-method>
+ <method-name>findByNameEndingWithON</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name LIKE '%on'</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IS NULL Expression</description>
+ <query-method>
+ <method-name>findByNullName</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name IS NULL</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the MEMBER OF Expression</description>
+ <query-method>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where ?1 MEMBER p.teams</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the ABS function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = ABS(?1)</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the SQRT function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <description>League-Team</description>
+ <ejb-relation>
+ <description>Team To Player</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>players</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>PlayerEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>PlayerEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <description>League-Team</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>LeagueEJB</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>LeagueEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete />
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>league</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..9ebfec5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-application-client>
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
new file mode 100644
index 0000000..6a5a110
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-cmp-mappings-team.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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). -->
+ <!-- schema>RosterSchema</schema-->
+ <!-- Or, it could be an empty element (passing validation). -->
+ <schema/>
+ <entity-mapping>
+ <ejb-name>LeagueEJB</ejb-name>
+ <table-name>LEAGUE</table-name>
+ <cmp-field-mapping>
+ <field-name>leagueId</field-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>LEAGUE.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>sport</field-name>
+ <column-name>LEAGUE.SPORT</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PlayerEJB</ejb-name>
+ <table-name>PLAYER</table-name>
+ <cmp-field-mapping>
+ <field-name>position</field-name>
+ <column-name>PLAYER.POSITION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>playerId</field-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>PLAYER.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>salary</field-name>
+ <column-name>PLAYER.SALARY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>TeamEJB</ejb-name>
+ <table-name>TEAM</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>TEAM.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>city</field-name>
+ <column-name>TEAM.CITY</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>teamId</field-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>league</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>players</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.TEAM_ID</column-name>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-ejb-jar-roster.xml
new file mode 100644
index 0000000..2005d29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-ejb-jar-roster.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>787878</unique-id>
+ <ejb>
+ <ejb-name>RosterEJB</ejb-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/LeagueEJB0</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/TeamEJB2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/PlayerEJB1</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>
+ </ejb>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-ejb-jar-team.xml
new file mode 100644
index 0000000..ec54aa0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-ejb-jar-team.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>656565</unique-id>
+ <ejb>
+ <ejb-name>LeagueEJB</ejb-name>
+ <jndi-name>MyLeague</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>
+</ejb>
+<ejb>
+<ejb-name>PlayerEJB</ejb-name>
+<jndi-name>MyPlayer</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>
+</ejb>
+<ejb>
+<ejb-name>TeamEJB</ejb-name>
+<jndi-name>MyTeam</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>
+</ejb>
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-web.xml
new file mode 100644
index 0000000..eed9769
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/web.xml
new file mode 100644
index 0000000..d4a4833
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>RosterClient</display-name>
+ <servlet>
+ <servlet-name>RosterServlet</servlet-name>
+ <display-name>RosterServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.RosterServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RosterServlet</servlet-name>
+ <url-pattern>/Roster</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..ecbb11f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/Roster.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import javax.ejb.FinderException;
+import javax.ejb.RemoveException;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Set;
+
+public interface Roster extends EJBObject {
+
+ // Players
+
+ public void createPlayer(PlayerDetails details)
+ throws RemoteException;
+
+ public void addPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public void removePlayer(String playerId)
+ throws RemoteException;
+
+ public void dropPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public PlayerDetails getPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeamCopy(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersByPosition(String position)
+ throws RemoteException;
+
+ public ArrayList getPlayersByHigherSalary(String name)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySalaryRange(double low, double high)
+ throws RemoteException;
+
+ public ArrayList getPlayersByLeagueId(String leagueId)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySport(String sport)
+ throws RemoteException;
+
+ public ArrayList getPlayersByCity(String city)
+ throws RemoteException;
+
+ public ArrayList getAllPlayers()
+ throws RemoteException;
+
+ public ArrayList getPlayersNotOnTeam()
+ throws RemoteException;
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) throws RemoteException;
+
+ public ArrayList getLeaguesOfPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getSportsOfPlayer(String playerId)
+ throws RemoteException;
+
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfLeague(String leagueId)
+ throws RemoteException;
+
+
+ public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNameEndingWithON()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNullName()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
+ // Teams
+
+ public ArrayList getTeamsOfLeague(String leagueId)
+ throws RemoteException;
+
+ public void createTeamInLeague(TeamDetails details, String leagueId)
+ throws RemoteException;
+
+ public void removeTeam(String teamId)
+ throws RemoteException;
+
+ public TeamDetails getTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+
+ public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
+
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamNameVariations(String teamId) throws RemoteException;
+
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+
+ // Leagues
+
+ public void createLeague(LeagueDetails details)
+ throws RemoteException;
+
+ public void removeLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeagueByName(String name)
+ throws RemoteException;
+
+ // Test
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
+ public ArrayList getRemotePlayersOfLeague(String leagueId) throws RemoteException;
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) throws RemoteException;
+
+ 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
new file mode 100755
index 0000000..b56aff0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterBean.java
@@ -0,0 +1,1033 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.*;
+import team.*;
+import java.rmi.RemoteException;
+
+public class RosterBean implements SessionBean {
+
+ private LocalPlayerHome playerHome = null;
+ private LocalTeamHome teamHome = null;
+ private LocalLeagueHome leagueHome = null;
+
+ private PlayerHome remPlayerHome = null;
+ private TeamHome remTeamHome = null;
+ private LeagueHome remLeagueHome = null;
+
+
+ // Player business methods
+
+ public ArrayList testFinder(String parm1, String parm2,
+ String parm3) {
+
+ Debug.print("RosterBean testFinder");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByTest(parm1, parm2, parm3);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }
+
+ public void createPlayer(PlayerDetails details) {
+
+ Debug.print("RosterBean createPlayer");
+ try {
+ 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) {
+
+ Debug.print("RosterBean addPlayer");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ team.addPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removePlayer(String playerId) {
+
+ Debug.print("RosterBean removePlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ player.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(String playerId, String teamId) {
+
+ Debug.print("RosterBean dropPlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.dropPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public PlayerDetails getPlayer(String playerId) {
+
+ Debug.print("RosterBean getPlayer");
+ PlayerDetails playerDetails = null;
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ playerDetails = new PlayerDetails(playerId,
+ player.getName(), player.getPosition(), player.getSalary());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return playerDetails;
+ } // getPlayer
+
+
+ public ArrayList getPlayersOfTeam(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeam");
+ Collection players = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ players = team.getPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersOfTeam
+
+
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeamCopy");
+ ArrayList playersList = null;
+
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ playersList = team.getCopyOfPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return playersList;
+
+ } // getPlayersOfTeamCopy
+
+
+ public ArrayList getTeamsOfLeague(String leagueId) {
+
+ Debug.print("RosterBean getTeamsOfLeague");
+
+ ArrayList detailsList = new ArrayList();
+ Collection teams = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ teams = league.getTeams();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = teams.iterator();
+ while (i.hasNext()) {
+ LocalTeam team = (LocalTeam) i.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // getTeamsOfLeague
+
+
+ public ArrayList getPlayersByPosition(String position) {
+
+ Debug.print("RosterBean getPlayersByPosition");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPosition(position);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPosition
+
+
+ public ArrayList getPlayersByHigherSalary(String name) {
+
+ Debug.print("RosterBean getPlayersByByHigherSalary");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByHigherSalary(name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByHigherSalary
+
+ public ArrayList getPlayersBySalaryRange(double low, double high) {
+
+ Debug.print("RosterBean getPlayersBySalaryRange");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySalaryRange(low, high);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySalaryRange
+
+ public ArrayList getPlayersByLeagueId(String leagueId) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+ public ArrayList getPlayersBySport(String sport) {
+
+ Debug.print("RosterBean getPlayersBySport");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySport(sport);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySport
+
+ public ArrayList getPlayersByCity(String city) {
+
+ Debug.print("RosterBean getPlayersByCity");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByCity(city);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByCity
+
+ public ArrayList getAllPlayers() {
+
+ Debug.print("RosterBean getAllPlayers");
+ Collection players = null;
+
+ try {
+ players = playerHome.findAll();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getAllPlayers
+
+ public ArrayList getPlayersNotOnTeam() {
+
+ Debug.print("RosterBean getPlayersNotOnTeam");
+ Collection players = null;
+
+ try {
+ players = playerHome.findNotOnTeam();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersNotOnTeam
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) {
+
+ Debug.print("RosterBean getPlayersByPositionAndName");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPositionAndName(position, name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPositionAndName
+
+ public ArrayList getLeaguesOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getLeaguesOfPlayer");
+ ArrayList detailsList = new ArrayList();
+ Collection leagues = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ leagues = player.getLeagues();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = leagues.iterator();
+ while (i.hasNext()) {
+ LocalLeague league = (LocalLeague) i.next();
+ LeagueDetails details = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ detailsList.add(details);
+ }
+ return detailsList;
+ } // getLeaguesOfPlayer
+
+ public ArrayList getSportsOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getSportsOfPlayer");
+ ArrayList sportsList = new ArrayList();
+ Collection sports = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ sports = player.getSports();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = sports.iterator();
+ while (i.hasNext()) {
+ String sport = (String) i.next();
+ sportsList.add(sport);
+ }
+ return sportsList;
+ } // getSportsOfPlayer
+
+ // Team business methods
+
+ public void createTeamInLeague(TeamDetails details, String leagueId) {
+
+ Debug.print("RosterBean createTeamInLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ LocalTeam team = teamHome.create(details.getId(),
+ details.getName(), details.getCity());
+ league.addTeam(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeTeam(String teamId) {
+
+ Debug.print("RosterBean removeTeam");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public TeamDetails getTeam(String teamId) {
+
+ Debug.print("RosterBean getTeam");
+ TeamDetails teamDetails = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ teamDetails = new TeamDetails(teamId,
+ team.getName(), team.getCity());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return teamDetails;
+ }
+
+
+ // League business methods
+
+ public void createLeague(LeagueDetails details) {
+
+ Debug.print("RosterBean createLeague");
+ try {
+ LocalLeague league = leagueHome.create(details.getId(),
+ details.getName(), details.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeLeague(String leagueId) {
+
+ Debug.print("RosterBean removeLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ league.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public LeagueDetails getLeague(String leagueId) {
+
+ Debug.print("RosterBean getLeague");
+ LeagueDetails leagueDetails = null;
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ leagueDetails = new LeagueDetails(leagueId,
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return leagueDetails;
+ }
+
+ // SessionBean methods
+
+ public void ejbCreate() throws CreateException {
+
+ Debug.print("RosterBean ejbCreate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+ } catch (NamingException ex) {
+ throw new CreateException(ex.getMessage());
+ }
+ }
+
+ public void ejbActivate() {
+
+ Debug.print("RosterBean ejbActivate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+
+ } catch (NamingException ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void ejbPassivate() {
+
+ playerHome = null;
+ teamHome = null;
+ leagueHome = null;
+ remPlayerHome = null;
+ remTeamHome = null;
+ remLeagueHome = null;
+
+ }
+
+ 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();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ private ArrayList copyRemotePlayersToDetails(Collection players) throws RemoteException {
+
+ ArrayList detailsList = new ArrayList();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ Player player = (Player) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ /**
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ */
+ public void cleanUp() {
+ Debug.print("Cleaning up the database");
+ Collection toClean = null;
+ Iterator it = null;
+
+ try {
+ //removing the player EJBs
+ toClean = playerHome.findAll();
+ it = toClean.iterator();
+ 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!");
+ } 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 {
+ LocalLeague league = leagueHome.findByName(name);
+ leagueDetails = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return leagueDetails;
+ }
+ // getLeagueByName()
+
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeague");
+ ArrayList detailsList = new ArrayList();
+ Collection teamsColl = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ LocalTeam team = (LocalTeam) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
+ 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);
+ Debug.print(" ----- League found");
+ teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
+ Debug.print(" ----- Team found");
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ try {
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param city
+ * @return
+ */
+ public Set getCitiesOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
+ LocalLeague league;
+ Set cities;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ cities = league.getCitiesOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return cities;
+ }// getCitiesOfLeague()
+
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
+ ArrayList detailsList = new ArrayList();
+ League league;
+ Set teams;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ teams = league.getRemoteTeamsOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ try {
+ Iterator it = teams.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ LocalTeam team;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ team = league.getTeamByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ }// getTeamOfLeagueByCity()
+
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ String teamName;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ teamName = league.getTeamsNameByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return teamName;
+
+ }// getTeamsNameOfLeagueByCity()
+
+
+ /**
+ *
+ * @param teamID
+ * @param playerName
+ * @return
+ */
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName) {
+ Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
+ LocalTeam team;
+ double salary;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return salary;
+ }// getSalaryOfPlayerFromTeam()
+
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getPlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getPlayersOfLeague(leagueId)");
+ LocalLeague league;
+ Set players;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueId);
+ players = league.getPlayersFromLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersOfLeague()
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getRemotePlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getRemotePlayersOfLeague(leagueId)");
+ League league;
+ Collection players;
+ ArrayList result;
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueId);
+ players = league.getRemotePlayersFromLeague();
+ result = copyRemotePlayersToDetails(players);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ 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
+ */
+ public ArrayList getPlayersWithTeam(String teamId) {
+ Debug.print("RosterBean getPlayersWithTeam(teamId)");
+ LocalTeam team;
+ Collection players = null;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ players = playerHome.findByTeam(team);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersWithTeam()
+
+
+ /**
+ *
+ * @param teamId
+ * @return
+ */
+ public String getTeamNameVariations(String teamId) {
+ Debug.print("RosterBean getTeamNameVariations(teamId)");
+ LocalTeam team;
+ StringBuffer out = new StringBuffer();
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ Debug.print("--- CONCAT");
+ out.append(team.getTeamNameWithStringfunctionTests1());
+ Debug.print("--- SUBSTRING");
+ out.append(team.getTeamNameWithStringfunctionTests2());
+ Debug.print("--- LOCATE AND LENGTH");
+ out.append(team.getTeamNameWithStringfunctionTests3());
+ }
+ catch (Exception ex) {
+ 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
+ */
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getRemoteTeamOfLeagueByCity(leagueKey, city)");
+ League league;
+ Team team;
+ TeamDetails teamDetails;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ team = league.getRemoteTeamByCity(city);
+ 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) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = null; //leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+
+} // 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
new file mode 100755
index 0000000..6dfcc41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.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
new file mode 100755
index 0000000..caa955e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/League.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.Set;
+import javax.ejb.FinderException;
+
+
+public interface League extends javax.ejb.EJBObject {
+
+ public String getLeagueId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getSport() throws RemoteException;
+ public Collection getTeams() throws RemoteException;
+
+ public Team getRemoteTeamByCity(String city) throws FinderException,
+ RemoteException;
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
+ RemoteException;
+
+ public Collection getRemotePlayersFromLeague() throws FinderException,
+ RemoteException;
+
+// public void addTeam(Team team) throws RemoteException;
+// public void dropTeam(Team team) throws RemoteException;
+
+// public Set getCitiesOfThisLeague() throws FinderException;
+// public String getTeamsNameByCity(String city) throws FinderException;
+}
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
new file mode 100755
index 0000000..d9f348a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueBean.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class LeagueBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getLeagueId();
+ public abstract void setLeagueId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getSport();
+ public abstract void setSport(String sport);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Set ejbSelectTeamsCity(LocalLeague league)
+ throws FinderException;
+
+ public abstract Set ejbSelectRemoteTeams(League league)
+ throws FinderException;
+
+
+ public abstract LocalTeam ejbSelectTeamByCity(String city)
+ throws FinderException;
+
+ public abstract Team ejbSelectRemoteTeamByCity(String city)
+ throws FinderException;
+
+ 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 =
+ (team.LocalLeague)context.getEJBLocalObject();
+
+ return ejbSelectTeamsCity(league);
+ }
+
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException {
+
+ League league = (team.League)context.getEJBObject();
+
+ 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");
+ try {
+ Collection teams = getTeams();
+ teams.add(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropTeam(LocalTeam team) {
+
+ Debug.print("TeamBean dropTeam");
+ try {
+ Collection teams = getTeams();
+ teams.remove(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String sport)
+ throws CreateException {
+
+ Debug.print("LeagueBean ejbCreate");
+ setLeagueId(id);
+ setName(name);
+ 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
new file mode 100755
index 0000000..e8809e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface LeagueHome extends javax.ejb.EJBHome {
+
+ public League create (String id, String name, String sport)
+ throws CreateException, RemoteException;
+
+ public League findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public League findByName(String name)
+ 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
new file mode 100755
index 0000000..3f93dd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeague.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalLeague extends EJBLocalObject {
+
+ public String getLeagueId();
+ public String getName();
+ public String getSport();
+ public Collection getTeams();
+
+ public void addTeam(LocalTeam team);
+ public void dropTeam(LocalTeam team);
+
+ public Set getCitiesOfThisLeague() throws FinderException;
+ 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
new file mode 100755
index 0000000..c467a5e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeagueHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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()
+ throws FinderException;
+
+ public LocalLeague findByName(String name)
+ throws FinderException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayer.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayer.java
new file mode 100755
index 0000000..e8846dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayer.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalPlayer extends EJBLocalObject {
+
+ public String getPlayerId();
+ public String getName();
+ public String getPosition();
+ public double getSalary();
+ public Collection getTeams();
+ public Collection getLeagues() throws FinderException;
+ public Collection getSports() 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
new file mode 100755
index 0000000..d858503
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayerHome.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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)
+ throws FinderException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException;
+
+ public Collection findByLeague(LocalLeague league)
+ throws FinderException;
+
+ public Collection findBySport(String sport)
+ throws FinderException;
+
+ public Collection findByCity(String city)
+ throws FinderException;
+
+ public Collection findAll()
+ throws FinderException;
+
+ public Collection findNotOnTeam()
+ throws FinderException;
+
+ 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;
+
+ public Collection findByNameEndingWithON()
+ throws FinderException;
+
+ public Collection findByNullName()
+ throws FinderException;
+
+ public Collection findByTeam(LocalTeam team)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
+ 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
new file mode 100755
index 0000000..f8ad6c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeam.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalTeam extends EJBLocalObject {
+
+ public String getTeamId();
+ public String getName();
+ public String getCity();
+ public Collection getPlayers();
+ public LocalLeague getLeague();
+
+ public ArrayList getCopyOfPlayers();
+ public void addPlayer(LocalPlayer player);
+ public void dropPlayer(LocalPlayer player);
+ public double getSalaryOfPlayer(String playerName);
+ 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
new file mode 100755
index 0000000..ac2f66c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeamHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.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()
+ throws FinderException;
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
+ LocalLeague league)
+ throws FinderException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/Player.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/Player.java
new file mode 100755
index 0000000..a35d838
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/Player.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.FinderException;
+
+public interface Player extends javax.ejb.EJBObject {
+
+ public String getPlayerId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getPosition() throws RemoteException;
+ public double getSalary() throws RemoteException;
+// public Collection getTeams() throws RemoteException;
+// public Collection getLeagues() throws FinderException, RemoteException;
+// public Collection getSports() throws FinderException, RemoteException;
+
+}
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
new file mode 100755
index 0000000..2e2d79a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerBean.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class PlayerBean implements EntityBean {
+
+ private EntityContext context;
+
+ // 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);
+
+ public abstract String getPosition();
+ public abstract void setPosition(String position);
+
+ public abstract double getSalary();
+ public abstract void setSalary(double salary);
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Collection ejbSelectLeagues(LocalPlayer player)
+ throws FinderException;
+
+ public abstract Collection ejbSelectSports(LocalPlayer player)
+ throws FinderException;
+
+
+
+ // Business methods
+
+ public Collection getLeagues() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectLeagues(player);
+ }
+
+ public Collection getSports() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectSports(player);
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String position,
+ double salary) throws CreateException {
+
+ Debug.print("PlayerBean ejbCreate");
+ setPlayerId(id);
+ setName(name);
+ setPosition(position);
+ 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
new file mode 100755
index 0000000..1608787
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerHome.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface PlayerHome extends javax.ejb.EJBHome {
+
+ 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)
+ throws FinderException, RemoteException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException, RemoteException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException, RemoteException;
+
+// public Collection findByLeague(League league)
+// throws FinderException, RemoteException;
+
+ public Collection findBySport(String sport)
+ throws FinderException, RemoteException;
+
+ public Collection findByCity(String city)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findNotOnTeam()
+ throws FinderException, RemoteException;
+
+ public Collection findByPositionAndName(String position,
+ String name) throws FinderException, RemoteException;
+
+ public Collection findByTest (String parm1, String parm2, String parm3)
+ throws FinderException, RemoteException;
+
+
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/Team.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/Team.java
new file mode 100755
index 0000000..8935cf1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/Team.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+
+public interface Team extends javax.ejb.EJBObject {
+
+ public String getTeamId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getCity() throws RemoteException;
+// public Collection getPlayers() throws RemoteException;
+// public League getLeague() throws RemoteException;
+
+ public ArrayList getCopyOfPlayers() throws RemoteException;
+// public void addPlayer(Player player) throws RemoteException;
+// public void dropPlayer(Player player) throws RemoteException;
+ public double getSalaryOfPlayer(String playerName) throws RemoteException;
+}
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
new file mode 100755
index 0000000..4f6e907
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamBean.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+import util.PlayerDetails;
+
+public abstract class TeamBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getTeamId();
+ public abstract void setTeamId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getCity();
+ public abstract void setCity(String city);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getPlayers();
+ public abstract void setPlayers(Collection players);
+
+ public abstract LocalLeague getLeague();
+ public abstract void setLeague(LocalLeague league);
+
+ // Select methods
+
+ public abstract double ejbSelectSalaryOfPlayerInTeam(LocalTeam team, String playerName)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameSubstring(String substring)
+ throws FinderException;
+
+ public abstract String ejbSelectNameLocate(String substring)
+ 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(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");
+ ArrayList playerList = new ArrayList();
+ Collection players = getPlayers();
+
+ Iterator i = players.iterator();
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), 0.00);
+ playerList.add(details);
+ }
+
+ return playerList;
+ }
+
+ public void addPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean addPlayer");
+ try {
+ Collection players = getPlayers();
+ players.add(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean dropPlayer");
+ try {
+ Collection players = getPlayers();
+ players.remove(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String city)
+ throws CreateException {
+
+ Debug.print("TeamBean ejbCreate");
+ setTeamId(id);
+ setName(name);
+ 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() { }
+
+
+} // TeamBean class
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
new file mode 100755
index 0000000..6ac99d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamHome.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface TeamHome extends javax.ejb.EJBHome {
+
+ public Team create (String id, String name, String city)
+ throws CreateException, RemoteException;
+
+ public Team findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
+ League league)
+ throws FinderException, RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/Debug.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/Debug.java
new file mode 100644
index 0000000..a914914
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/Debug.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * This class makes it easier to print out debug statements.
+ * The Debug.print statements are printed to System.err
+ * if debuggingOn = true.
+ */
+
+package util;
+
+public final class Debug {
+
+ public static final boolean debuggingOn = true;
+
+ public static final void print(String msg) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ }
+ }
+
+ public static final void print(String msg, Object object) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ System.err.println(" " + object.getClass().getName());
+ }
+ }
+
+} // Debug
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/LeagueDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/LeagueDetails.java
new file mode 100644
index 0000000..2e0a4f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/LeagueDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class LeagueDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String sport;
+
+ public LeagueDetails (String id, String name, String sport) {
+
+ this.id = id;
+ this.name = name;
+ this.sport = sport;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSport() {
+ return sport;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + sport;
+ return s;
+ }
+
+} // LeagueDetails
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
new file mode 100644
index 0000000..81041c2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/PlayerDetails.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class PlayerDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String position;
+ private double salary;
+
+ public PlayerDetails (String id, String name, String position,
+ double salary) {
+
+ this.id = id;
+ this.name = name;
+ this.position = position;
+ this.salary = salary;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPosition() {
+ return position;
+ }
+
+ public double getSalary() {
+ return salary;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + position + " " + salary;
+ return s;
+ }
+
+
+} // PlayerDetails
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/TeamDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/TeamDetails.java
new file mode 100644
index 0000000..486aa4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/TeamDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class TeamDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String city;
+
+ public TeamDetails (String id, String name, String city) {
+
+ this.id = id;
+ this.name = name;
+ this.city = city;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + city;
+ return s;
+ }
+
+} // TeamDetails
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
new file mode 100644
index 0000000..4fe3dc3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/servlet/RosterServlet.java
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+public class RosterServlet extends HttpServlet{
+
+ private PrintWriter out = null;
+
+ /** Handles the HTTP <code>GET</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /**
+ *
+ * @param req
+ * @param res
+ * @throws ServletException
+ * @throws IOException
+ */
+ private void processRequest(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.setContentType("text/html");
+ out = res.getWriter();
+
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>RosterApp Servlet-Client</title>");
+ out.println("</head>");
+ out.println("<body>");
+
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleRoster");
+
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome.class);
+
+ Roster myRoster = home.create();
+
+ // deleting all exisiting DB-entries
+ myRoster.cleanUp();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ } catch (Exception ex) {
+ out.println("Caught an exception:");
+ ex.printStackTrace(out);
+ ex.printStackTrace();
+ }
+
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList, out);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // getSomeInfo
+
+
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamDetails = myRoster.getTeam("T3");
+ out.println("<BR>" + teamDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerDetails = myRoster.getPlayer("P20");
+ out.println("<BR>" + playerDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ out.println("<BR>/////////////////////////////////////////////");
+ printDetailsList(playerList, out);
+ out.println("<BR>/////////////////////////////////////////////");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList, out);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList, out);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ out.println("<BR>" + it.next());
+ }
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList, out);
+
+ out.println("<BR>" + myRoster.getTeamNameVariations("T5"));
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList, out);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList, out);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList, out);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+
+
+ } // getMoreInfo
+
+
+ /**
+ *
+ * @param list
+ * @param out
+ */
+ private void printDetailsList(ArrayList list, PrintWriter out) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ out.println("<BR>" + details.toString());
+ }
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+ } // printDetailsList
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // insertInfo
+
+
+}
+
+
+
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
new file mode 100755
index 0000000..be0c918
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_db2.sql
@@ -0,0 +1,41 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+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)
+);
+
+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)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..5ece60e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_derby.sql
@@ -0,0 +1,37 @@
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+CREATE TABLE PLAYER
+(
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE LEAGUE
+(
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+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)
+);
+
+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)
+);
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
new file mode 100755
index 0000000..bb4d86c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ifx.sql
@@ -0,0 +1,41 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ position VARCHAR(127),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ sport VARCHAR(127)
+);
+
+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)
+);
+
+CREATE TABLE TeamPlayer
+(
+ 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)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..787488f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mssql.sql
@@ -0,0 +1,40 @@
+drop table TEAMPLAYER
+drop table PLAYER
+drop table TEAM
+drop TABLE LEAGUE
+go
+
+create table PLAYER
+(
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
+)
+
+create table LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+)
+
+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)
+)
+
+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)
+)
+
+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
new file mode 100755
index 0000000..d763757
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mysql.sql
@@ -0,0 +1,38 @@
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+CREATE TABLE PLAYER
+(
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL
+) ENGINE=INNODB;
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE TEAM
+(
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE TEAMPLAYER
+(
+ PLAYER_ID VARCHAR(255),
+ TEAM_ID VARCHAR(255),
+ CONSTRAINT PK_TEAMPLAYER PRIMARY KEY (PLAYER_ID, TEAM_ID)
+) ENGINE=INNODB;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..4b4a547
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ora.sql
@@ -0,0 +1,41 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+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)
+);
+
+CREATE TABLE TeamPlayer
+(
+ 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)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..3f6f5d2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_pbs.sql
@@ -0,0 +1,48 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+commit;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+commit;
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+commit;
+
+CREATE TABLE Team
+(
+ 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
+(
+ 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;
+
+quit;
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
new file mode 100755
index 0000000..a6baf3e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_psql.sql
@@ -0,0 +1,45 @@
+DROP TABLE TEAMPLAYER cascade;
+DROP TABLE PLAYER cascade;
+DROP TABLE TEAM cascade;
+DROP TABLE LEAGUE cascade;
+
+CREATE TABLE PLAYER
+(
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL
+);
+#);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+) ;
+#);
+
+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)
+);
+#);
+
+CREATE TABLE TEAMPLAYER
+(
+ 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)
+);
+#);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..0c73ef3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_syb.sql
@@ -0,0 +1,40 @@
+drop table TEAMPLAYER
+drop table PLAYER
+drop table TEAM
+drop TABLE LEAGUE
+go
+
+create table PLAYER
+(
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
+)
+
+create table LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+)
+
+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)
+)
+
+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)
+)
+
+go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/drop_RosterApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/drop_RosterApp_derby.sql
new file mode 100755
index 0000000..9cb0bd7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/drop_RosterApp_derby.sql
@@ -0,0 +1,4 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
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
new file mode 100644
index 0000000..7f7f23c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.properties
@@ -0,0 +1,53 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="rosterJava2DB"/>
+<property name="appname" value="${module}"/>
+
+<property name="test.client"
+ value="RosterClient"/>
+
+<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"/>
+<property name="sun-ejb-jar-team.xml" value="descriptor/sun-ejb-jar-team.xml"/>
+
+<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="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="appclientjar.files" value="${build.classes.dir}"/>
+
+<property name="appclient.jar" value="${assemble.dir}/rosterextAppClient.jar"/>
+<property name="war.file" value="${assemble.dir}/rosterext-web.war"/>
+<property name="app.type" value="application"/>
+<property name="hasWebclient" value="true"/>
+
+<property name="web.xml"
+ value="descriptor/web.xml"/>
+<property name="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
new file mode 100644
index 0000000..443c8a0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+
+<project name="rosterJava2DB" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build, create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <delete file="${sun-ejb-jar.xml}"/>
+ <delete file="${ejb-jar.xml}"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="package-team-jar" >
+
+ <antcall target="package-ejbjar-common">
+
+ <param name="dbschema" value="${basedir}/ejb/team/RosterSchema.dbschema" />
+ <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"
+ 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>
+
+ <target name="package-webclient-war" >
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ <param name="war.classes"
+ value="**/RosterServlet.class" />
+ </antcall>
+
+ </target>
+
+ <target name="package-appclient" >
+ <mkdir dir="${assemble.dir}"/>
+
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.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}/rosterextAppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
+
+ </antcall>
+ </target>
+
+
+ <target name="package-ear">
+
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <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="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+ </target>
+
+
+
+ <target name="build" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-team-jar" />
+ <antcall target="package-roster-jar" />
+ <antcall target="package-webclient-war" />
+ <antcall target="package-appclient" />
+
+ <antcall target="package-ear" />
+
+
+ </target>
+
+
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common">
+ <param name="extra-params"
+ value="--uniquetablenames=true --dropandcreatetables=true"/>
+ </antcall>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/MANIFEST.MF
new file mode 100644
index 0000000..bca2971
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: client.RosterClient
+
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
new file mode 100644
index 0000000..8d111aa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/RosterClient.java
@@ -0,0 +1,425 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import util.*;
+import roster.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class RosterClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ try {
+ 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.class);
+
+ Roster myRoster = home.create();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ 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);
+ stat.printSummary("rosterJava2DB");
+ }
+ stat.printSummary("rosterJava2DB");
+ } // main
+
+
+ private static void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ }
+
+ } // getSomeInfo
+
+ private static void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamDetails = myRoster.getTeam("T3");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ playerDetails = myRoster.getPlayer("P20");
+ System.out.println(playerDetails.toString());
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ 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");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ System.out.println(it.next());
+ }
+ System.out.println();
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ System.out.println(myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ System.out.println();
+
+ System.out.println(myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList);
+
+ System.out.println(myRoster.getTeamNameVariations("T5"));
+ System.out.println();
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ }
+
+ } // getMoreInfo
+
+ private static void printDetailsList(ArrayList list) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ System.out.println(details.toString());
+ }
+ System.out.println();
+ } // printDetailsList
+
+
+ private static void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ }
+
+ } // insertInfo
+
+
+} // class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/INDEX.LIST b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/INDEX.LIST
new file mode 100644
index 0000000..41895d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/INDEX.LIST
@@ -0,0 +1,13 @@
+JarIndex-Version: 1.0
+
+RosterAppBerlin.ear
+roster-ac.jar
+team-ejb.jar
+roster-ejb.jar
+RosterClient.war
+src
+src/client
+src/roster
+src/team
+src/util
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/application-client.xml
new file mode 100644
index 0000000..2263938
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>RosterClientExt</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/application.xml
new file mode 100644
index 0000000..12dd581
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/application.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>RosterAppExt</display-name>
+ <description>Application description</description>
+ <module>
+ <ejb>roster-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>rosterextAppClient.jar</java>
+ </module>
+ <module>
+ <ejb>team-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>rosterJava2DB-web.war</web-uri>
+ <context-root>rosterext</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-roster.xml
new file mode 100644
index 0000000..84f24b2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-roster.xml
@@ -0,0 +1,646 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>RosterJAR</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>RosterEJB</display-name>
+ <ejb-name>RosterEJB</ejb-name>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ <ejb-class>roster.RosterBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemotePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-local-ref>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
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
new file mode 100644
index 0000000..03099f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-team.xml
@@ -0,0 +1,1346 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>TeamJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>LeagueEJB</display-name>
+ <ejb-name>LeagueEJB</ejb-name>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-class>team.LeagueBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>League</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>leagueId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>sport</field-name>
+ </cmp-field>
+ <primkey-field>leagueId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(l) from League l</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(l) from League l where l.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET</description>
+ <query-method>
+ <method-name>ejbSelectTeamsCity</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.city from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET Remote Interfaces</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeams</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select object(t) from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object LocalInterface</description>
+ <query-method>
+ <method-name>ejbSelectTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object RemoteInterface</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String</description>
+ <query-method>
+ <method-name>ejbSelectTeamsNameByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.name from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations</description>
+ <query-method>
+ <method-name>ejbSelectPlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</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>
+ <description>Selector returning Set using multiple collection declarations with remote params</description>
+ <query-method>
+ <method-name>ejbSelectRemotePlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </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>
+ </entity>
+ <entity>
+ <display-name>TeamEJB</display-name>
+ <ejb-name>TeamEJB</ejb-name>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-class>team.TeamBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Team</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>teamId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>city</field-name>
+ </cmp-field>
+ <primkey-field>teamId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(t) from Team t</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Remote finder</description>
+ <query-method>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object int</description>
+ <query-method>
+ <method-name>ejbSelectSalaryOfPlayerInTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select p.salary from Team t, in(t.players) as p where t = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with CONCAT</description>
+ <query-method>
+ <method-name>ejbSelectByNameWithCONCAT</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = CONCAT(?1, ?2) </ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with SUBSTRING</description>
+ <query-method>
+ <method-name>ejbSelectByNameSubstring</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = SUBSTRING(?1, 5, 5)</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with LOCATE</description>
+ <query-method>
+ <method-name>ejbSelectNameLocate</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </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>
+ </entity>
+ <entity>
+ <display-name>PlayerEJB</display-name>
+ <ejb-name>PlayerEJB</ejb-name>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-class>team.PlayerBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Player</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>position</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>playerId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>salary</field-name>
+ </cmp-field>
+ <primkey-field>playerId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p
+where p.teams is empty</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league.sport = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectSports</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.league.sport
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.salary between ?1 and ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p1)
+from Player p1, Player p2
+where p1.salary > p2.salary and
+p2.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectLeagues</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct t.league
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IN Expression</description>
+ <query-method>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.position IN ('goalkeeper', 'defender')</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the LIKE Expression</description>
+ <query-method>
+ <method-name>findByNameEndingWithON</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name LIKE '%on'</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IS NULL Expression</description>
+ <query-method>
+ <method-name>findByNullName</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name IS NULL</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the MEMBER OF Expression</description>
+ <query-method>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where ?1 MEMBER p.teams</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the ABS function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = ABS(?1)</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the SQRT function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <description>League-Team</description>
+ <ejb-relation>
+ <description>Team To Player</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>players</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>PlayerEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>PlayerEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <description>League-Team</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>LeagueEJB</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>LeagueEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete />
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>league</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..9ebfec5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-cmp-mappings-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-cmp-mappings-team.xml
new file mode 100644
index 0000000..5c98a0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-cmp-mappings-team.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>RosterSchema</schema>
+ <entity-mapping>
+ <ejb-name>LeagueEJB</ejb-name>
+ <table-name>LEAGUE</table-name>
+ <cmp-field-mapping>
+ <field-name>leagueId</field-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>LEAGUE.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>sport</field-name>
+ <column-name>LEAGUE.SPORT</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PlayerEJB</ejb-name>
+ <table-name>PLAYER</table-name>
+ <cmp-field-mapping>
+ <field-name>position</field-name>
+ <column-name>PLAYER.POSITION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>playerId</field-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>PLAYER.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>salary</field-name>
+ <column-name>PLAYER.SALARY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>TeamEJB</ejb-name>
+ <table-name>TEAM</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>TEAM.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>city</field-name>
+ <column-name>TEAM.CITY</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>teamId</field-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>league</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>players</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.TEAM_ID</column-name>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-ejb-jar-roster.xml
new file mode 100644
index 0000000..2005d29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-ejb-jar-roster.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>787878</unique-id>
+ <ejb>
+ <ejb-name>RosterEJB</ejb-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/LeagueEJB0</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/TeamEJB2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/PlayerEJB1</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>
+ </ejb>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-ejb-jar-team.xml
new file mode 100644
index 0000000..ec54aa0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-ejb-jar-team.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>656565</unique-id>
+ <ejb>
+ <ejb-name>LeagueEJB</ejb-name>
+ <jndi-name>MyLeague</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>
+</ejb>
+<ejb>
+<ejb-name>PlayerEJB</ejb-name>
+<jndi-name>MyPlayer</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>
+</ejb>
+<ejb>
+<ejb-name>TeamEJB</ejb-name>
+<jndi-name>MyTeam</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>
+</ejb>
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-web.xml
new file mode 100644
index 0000000..eed9769
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/web.xml
new file mode 100644
index 0000000..d4a4833
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>RosterClient</display-name>
+ <servlet>
+ <servlet-name>RosterServlet</servlet-name>
+ <display-name>RosterServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.RosterServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RosterServlet</servlet-name>
+ <url-pattern>/Roster</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..ecbb11f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/Roster.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import javax.ejb.FinderException;
+import javax.ejb.RemoveException;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Set;
+
+public interface Roster extends EJBObject {
+
+ // Players
+
+ public void createPlayer(PlayerDetails details)
+ throws RemoteException;
+
+ public void addPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public void removePlayer(String playerId)
+ throws RemoteException;
+
+ public void dropPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public PlayerDetails getPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeamCopy(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersByPosition(String position)
+ throws RemoteException;
+
+ public ArrayList getPlayersByHigherSalary(String name)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySalaryRange(double low, double high)
+ throws RemoteException;
+
+ public ArrayList getPlayersByLeagueId(String leagueId)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySport(String sport)
+ throws RemoteException;
+
+ public ArrayList getPlayersByCity(String city)
+ throws RemoteException;
+
+ public ArrayList getAllPlayers()
+ throws RemoteException;
+
+ public ArrayList getPlayersNotOnTeam()
+ throws RemoteException;
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) throws RemoteException;
+
+ public ArrayList getLeaguesOfPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getSportsOfPlayer(String playerId)
+ throws RemoteException;
+
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfLeague(String leagueId)
+ throws RemoteException;
+
+
+ public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNameEndingWithON()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNullName()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
+ // Teams
+
+ public ArrayList getTeamsOfLeague(String leagueId)
+ throws RemoteException;
+
+ public void createTeamInLeague(TeamDetails details, String leagueId)
+ throws RemoteException;
+
+ public void removeTeam(String teamId)
+ throws RemoteException;
+
+ public TeamDetails getTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+
+ public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
+
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamNameVariations(String teamId) throws RemoteException;
+
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+
+ // Leagues
+
+ public void createLeague(LeagueDetails details)
+ throws RemoteException;
+
+ public void removeLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeagueByName(String name)
+ throws RemoteException;
+
+ // Test
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
+ public ArrayList getRemotePlayersOfLeague(String leagueId) throws RemoteException;
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) throws RemoteException;
+
+ 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
new file mode 100755
index 0000000..b56aff0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterBean.java
@@ -0,0 +1,1033 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.*;
+import team.*;
+import java.rmi.RemoteException;
+
+public class RosterBean implements SessionBean {
+
+ private LocalPlayerHome playerHome = null;
+ private LocalTeamHome teamHome = null;
+ private LocalLeagueHome leagueHome = null;
+
+ private PlayerHome remPlayerHome = null;
+ private TeamHome remTeamHome = null;
+ private LeagueHome remLeagueHome = null;
+
+
+ // Player business methods
+
+ public ArrayList testFinder(String parm1, String parm2,
+ String parm3) {
+
+ Debug.print("RosterBean testFinder");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByTest(parm1, parm2, parm3);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }
+
+ public void createPlayer(PlayerDetails details) {
+
+ Debug.print("RosterBean createPlayer");
+ try {
+ 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) {
+
+ Debug.print("RosterBean addPlayer");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ team.addPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removePlayer(String playerId) {
+
+ Debug.print("RosterBean removePlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ player.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(String playerId, String teamId) {
+
+ Debug.print("RosterBean dropPlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.dropPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public PlayerDetails getPlayer(String playerId) {
+
+ Debug.print("RosterBean getPlayer");
+ PlayerDetails playerDetails = null;
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ playerDetails = new PlayerDetails(playerId,
+ player.getName(), player.getPosition(), player.getSalary());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return playerDetails;
+ } // getPlayer
+
+
+ public ArrayList getPlayersOfTeam(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeam");
+ Collection players = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ players = team.getPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersOfTeam
+
+
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeamCopy");
+ ArrayList playersList = null;
+
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ playersList = team.getCopyOfPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return playersList;
+
+ } // getPlayersOfTeamCopy
+
+
+ public ArrayList getTeamsOfLeague(String leagueId) {
+
+ Debug.print("RosterBean getTeamsOfLeague");
+
+ ArrayList detailsList = new ArrayList();
+ Collection teams = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ teams = league.getTeams();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = teams.iterator();
+ while (i.hasNext()) {
+ LocalTeam team = (LocalTeam) i.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // getTeamsOfLeague
+
+
+ public ArrayList getPlayersByPosition(String position) {
+
+ Debug.print("RosterBean getPlayersByPosition");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPosition(position);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPosition
+
+
+ public ArrayList getPlayersByHigherSalary(String name) {
+
+ Debug.print("RosterBean getPlayersByByHigherSalary");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByHigherSalary(name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByHigherSalary
+
+ public ArrayList getPlayersBySalaryRange(double low, double high) {
+
+ Debug.print("RosterBean getPlayersBySalaryRange");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySalaryRange(low, high);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySalaryRange
+
+ public ArrayList getPlayersByLeagueId(String leagueId) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+ public ArrayList getPlayersBySport(String sport) {
+
+ Debug.print("RosterBean getPlayersBySport");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySport(sport);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySport
+
+ public ArrayList getPlayersByCity(String city) {
+
+ Debug.print("RosterBean getPlayersByCity");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByCity(city);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByCity
+
+ public ArrayList getAllPlayers() {
+
+ Debug.print("RosterBean getAllPlayers");
+ Collection players = null;
+
+ try {
+ players = playerHome.findAll();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getAllPlayers
+
+ public ArrayList getPlayersNotOnTeam() {
+
+ Debug.print("RosterBean getPlayersNotOnTeam");
+ Collection players = null;
+
+ try {
+ players = playerHome.findNotOnTeam();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersNotOnTeam
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) {
+
+ Debug.print("RosterBean getPlayersByPositionAndName");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPositionAndName(position, name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPositionAndName
+
+ public ArrayList getLeaguesOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getLeaguesOfPlayer");
+ ArrayList detailsList = new ArrayList();
+ Collection leagues = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ leagues = player.getLeagues();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = leagues.iterator();
+ while (i.hasNext()) {
+ LocalLeague league = (LocalLeague) i.next();
+ LeagueDetails details = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ detailsList.add(details);
+ }
+ return detailsList;
+ } // getLeaguesOfPlayer
+
+ public ArrayList getSportsOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getSportsOfPlayer");
+ ArrayList sportsList = new ArrayList();
+ Collection sports = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ sports = player.getSports();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = sports.iterator();
+ while (i.hasNext()) {
+ String sport = (String) i.next();
+ sportsList.add(sport);
+ }
+ return sportsList;
+ } // getSportsOfPlayer
+
+ // Team business methods
+
+ public void createTeamInLeague(TeamDetails details, String leagueId) {
+
+ Debug.print("RosterBean createTeamInLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ LocalTeam team = teamHome.create(details.getId(),
+ details.getName(), details.getCity());
+ league.addTeam(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeTeam(String teamId) {
+
+ Debug.print("RosterBean removeTeam");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public TeamDetails getTeam(String teamId) {
+
+ Debug.print("RosterBean getTeam");
+ TeamDetails teamDetails = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ teamDetails = new TeamDetails(teamId,
+ team.getName(), team.getCity());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return teamDetails;
+ }
+
+
+ // League business methods
+
+ public void createLeague(LeagueDetails details) {
+
+ Debug.print("RosterBean createLeague");
+ try {
+ LocalLeague league = leagueHome.create(details.getId(),
+ details.getName(), details.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeLeague(String leagueId) {
+
+ Debug.print("RosterBean removeLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ league.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public LeagueDetails getLeague(String leagueId) {
+
+ Debug.print("RosterBean getLeague");
+ LeagueDetails leagueDetails = null;
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ leagueDetails = new LeagueDetails(leagueId,
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return leagueDetails;
+ }
+
+ // SessionBean methods
+
+ public void ejbCreate() throws CreateException {
+
+ Debug.print("RosterBean ejbCreate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+ } catch (NamingException ex) {
+ throw new CreateException(ex.getMessage());
+ }
+ }
+
+ public void ejbActivate() {
+
+ Debug.print("RosterBean ejbActivate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+
+ } catch (NamingException ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void ejbPassivate() {
+
+ playerHome = null;
+ teamHome = null;
+ leagueHome = null;
+ remPlayerHome = null;
+ remTeamHome = null;
+ remLeagueHome = null;
+
+ }
+
+ 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();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ private ArrayList copyRemotePlayersToDetails(Collection players) throws RemoteException {
+
+ ArrayList detailsList = new ArrayList();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ Player player = (Player) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ /**
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ */
+ public void cleanUp() {
+ Debug.print("Cleaning up the database");
+ Collection toClean = null;
+ Iterator it = null;
+
+ try {
+ //removing the player EJBs
+ toClean = playerHome.findAll();
+ it = toClean.iterator();
+ 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!");
+ } 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 {
+ LocalLeague league = leagueHome.findByName(name);
+ leagueDetails = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return leagueDetails;
+ }
+ // getLeagueByName()
+
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeague");
+ ArrayList detailsList = new ArrayList();
+ Collection teamsColl = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ LocalTeam team = (LocalTeam) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
+ 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);
+ Debug.print(" ----- League found");
+ teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
+ Debug.print(" ----- Team found");
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ try {
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param city
+ * @return
+ */
+ public Set getCitiesOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
+ LocalLeague league;
+ Set cities;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ cities = league.getCitiesOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return cities;
+ }// getCitiesOfLeague()
+
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
+ ArrayList detailsList = new ArrayList();
+ League league;
+ Set teams;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ teams = league.getRemoteTeamsOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ try {
+ Iterator it = teams.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ LocalTeam team;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ team = league.getTeamByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ }// getTeamOfLeagueByCity()
+
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ String teamName;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ teamName = league.getTeamsNameByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return teamName;
+
+ }// getTeamsNameOfLeagueByCity()
+
+
+ /**
+ *
+ * @param teamID
+ * @param playerName
+ * @return
+ */
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName) {
+ Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
+ LocalTeam team;
+ double salary;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return salary;
+ }// getSalaryOfPlayerFromTeam()
+
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getPlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getPlayersOfLeague(leagueId)");
+ LocalLeague league;
+ Set players;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueId);
+ players = league.getPlayersFromLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersOfLeague()
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getRemotePlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getRemotePlayersOfLeague(leagueId)");
+ League league;
+ Collection players;
+ ArrayList result;
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueId);
+ players = league.getRemotePlayersFromLeague();
+ result = copyRemotePlayersToDetails(players);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ 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
+ */
+ public ArrayList getPlayersWithTeam(String teamId) {
+ Debug.print("RosterBean getPlayersWithTeam(teamId)");
+ LocalTeam team;
+ Collection players = null;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ players = playerHome.findByTeam(team);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersWithTeam()
+
+
+ /**
+ *
+ * @param teamId
+ * @return
+ */
+ public String getTeamNameVariations(String teamId) {
+ Debug.print("RosterBean getTeamNameVariations(teamId)");
+ LocalTeam team;
+ StringBuffer out = new StringBuffer();
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ Debug.print("--- CONCAT");
+ out.append(team.getTeamNameWithStringfunctionTests1());
+ Debug.print("--- SUBSTRING");
+ out.append(team.getTeamNameWithStringfunctionTests2());
+ Debug.print("--- LOCATE AND LENGTH");
+ out.append(team.getTeamNameWithStringfunctionTests3());
+ }
+ catch (Exception ex) {
+ 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
+ */
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getRemoteTeamOfLeagueByCity(leagueKey, city)");
+ League league;
+ Team team;
+ TeamDetails teamDetails;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ team = league.getRemoteTeamByCity(city);
+ 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) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = null; //leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+
+} // 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
new file mode 100755
index 0000000..6dfcc41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.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
new file mode 100755
index 0000000..caa955e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/League.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.Set;
+import javax.ejb.FinderException;
+
+
+public interface League extends javax.ejb.EJBObject {
+
+ public String getLeagueId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getSport() throws RemoteException;
+ public Collection getTeams() throws RemoteException;
+
+ public Team getRemoteTeamByCity(String city) throws FinderException,
+ RemoteException;
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
+ RemoteException;
+
+ public Collection getRemotePlayersFromLeague() throws FinderException,
+ RemoteException;
+
+// public void addTeam(Team team) throws RemoteException;
+// public void dropTeam(Team team) throws RemoteException;
+
+// public Set getCitiesOfThisLeague() throws FinderException;
+// public String getTeamsNameByCity(String city) throws FinderException;
+}
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
new file mode 100755
index 0000000..d9f348a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueBean.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class LeagueBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getLeagueId();
+ public abstract void setLeagueId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getSport();
+ public abstract void setSport(String sport);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Set ejbSelectTeamsCity(LocalLeague league)
+ throws FinderException;
+
+ public abstract Set ejbSelectRemoteTeams(League league)
+ throws FinderException;
+
+
+ public abstract LocalTeam ejbSelectTeamByCity(String city)
+ throws FinderException;
+
+ public abstract Team ejbSelectRemoteTeamByCity(String city)
+ throws FinderException;
+
+ 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 =
+ (team.LocalLeague)context.getEJBLocalObject();
+
+ return ejbSelectTeamsCity(league);
+ }
+
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException {
+
+ League league = (team.League)context.getEJBObject();
+
+ 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");
+ try {
+ Collection teams = getTeams();
+ teams.add(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropTeam(LocalTeam team) {
+
+ Debug.print("TeamBean dropTeam");
+ try {
+ Collection teams = getTeams();
+ teams.remove(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String sport)
+ throws CreateException {
+
+ Debug.print("LeagueBean ejbCreate");
+ setLeagueId(id);
+ setName(name);
+ 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
new file mode 100755
index 0000000..e8809e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface LeagueHome extends javax.ejb.EJBHome {
+
+ public League create (String id, String name, String sport)
+ throws CreateException, RemoteException;
+
+ public League findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public League findByName(String name)
+ 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
new file mode 100755
index 0000000..3f93dd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeague.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalLeague extends EJBLocalObject {
+
+ public String getLeagueId();
+ public String getName();
+ public String getSport();
+ public Collection getTeams();
+
+ public void addTeam(LocalTeam team);
+ public void dropTeam(LocalTeam team);
+
+ public Set getCitiesOfThisLeague() throws FinderException;
+ 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
new file mode 100755
index 0000000..c467a5e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeagueHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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()
+ throws FinderException;
+
+ public LocalLeague findByName(String name)
+ throws FinderException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayer.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayer.java
new file mode 100755
index 0000000..e8846dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayer.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalPlayer extends EJBLocalObject {
+
+ public String getPlayerId();
+ public String getName();
+ public String getPosition();
+ public double getSalary();
+ public Collection getTeams();
+ public Collection getLeagues() throws FinderException;
+ public Collection getSports() 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
new file mode 100755
index 0000000..d858503
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayerHome.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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)
+ throws FinderException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException;
+
+ public Collection findByLeague(LocalLeague league)
+ throws FinderException;
+
+ public Collection findBySport(String sport)
+ throws FinderException;
+
+ public Collection findByCity(String city)
+ throws FinderException;
+
+ public Collection findAll()
+ throws FinderException;
+
+ public Collection findNotOnTeam()
+ throws FinderException;
+
+ 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;
+
+ public Collection findByNameEndingWithON()
+ throws FinderException;
+
+ public Collection findByNullName()
+ throws FinderException;
+
+ public Collection findByTeam(LocalTeam team)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
+ 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
new file mode 100755
index 0000000..f8ad6c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeam.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalTeam extends EJBLocalObject {
+
+ public String getTeamId();
+ public String getName();
+ public String getCity();
+ public Collection getPlayers();
+ public LocalLeague getLeague();
+
+ public ArrayList getCopyOfPlayers();
+ public void addPlayer(LocalPlayer player);
+ public void dropPlayer(LocalPlayer player);
+ public double getSalaryOfPlayer(String playerName);
+ 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
new file mode 100755
index 0000000..ac2f66c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeamHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.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()
+ throws FinderException;
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
+ LocalLeague league)
+ throws FinderException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/Player.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/Player.java
new file mode 100755
index 0000000..a35d838
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/Player.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.FinderException;
+
+public interface Player extends javax.ejb.EJBObject {
+
+ public String getPlayerId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getPosition() throws RemoteException;
+ public double getSalary() throws RemoteException;
+// public Collection getTeams() throws RemoteException;
+// public Collection getLeagues() throws FinderException, RemoteException;
+// public Collection getSports() throws FinderException, RemoteException;
+
+}
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
new file mode 100755
index 0000000..2e2d79a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerBean.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class PlayerBean implements EntityBean {
+
+ private EntityContext context;
+
+ // 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);
+
+ public abstract String getPosition();
+ public abstract void setPosition(String position);
+
+ public abstract double getSalary();
+ public abstract void setSalary(double salary);
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Collection ejbSelectLeagues(LocalPlayer player)
+ throws FinderException;
+
+ public abstract Collection ejbSelectSports(LocalPlayer player)
+ throws FinderException;
+
+
+
+ // Business methods
+
+ public Collection getLeagues() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectLeagues(player);
+ }
+
+ public Collection getSports() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectSports(player);
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String position,
+ double salary) throws CreateException {
+
+ Debug.print("PlayerBean ejbCreate");
+ setPlayerId(id);
+ setName(name);
+ setPosition(position);
+ 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
new file mode 100755
index 0000000..1608787
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerHome.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface PlayerHome extends javax.ejb.EJBHome {
+
+ 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)
+ throws FinderException, RemoteException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException, RemoteException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException, RemoteException;
+
+// public Collection findByLeague(League league)
+// throws FinderException, RemoteException;
+
+ public Collection findBySport(String sport)
+ throws FinderException, RemoteException;
+
+ public Collection findByCity(String city)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findNotOnTeam()
+ throws FinderException, RemoteException;
+
+ public Collection findByPositionAndName(String position,
+ String name) throws FinderException, RemoteException;
+
+ public Collection findByTest (String parm1, String parm2, String parm3)
+ throws FinderException, RemoteException;
+
+
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/RosterSchema.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/RosterSchema.dbschema
new file mode 100644
index 0000000..7e90bea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/RosterSchema.dbschema
@@ -0,0 +1,1234 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement335787804">
+ <versionNo>2</versionNo>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl4508150">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement335787804"/>
+ </element>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2574618">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <_username>IASCTS</_username>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_url>jdbc:oracle:thin:@petruccio:1521:ORCL1</_url>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3179125">
+ <name>DatabaseSchema</name>
+ </OBJECT>
+ </_name>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15799662">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1296776513">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316">
+ <table>LEAGUE</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5649494">
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13029737">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
+ <value>255</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14572800">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-758477032">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11255404">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-758477032"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6470099">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2032884633">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl9826764">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2032884633"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3511340">
+ <name>SPORT</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9638098">
+ <name>LEAGUE</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection4353506">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-573464718">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-573464718">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl3494782">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection692735">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-573464718"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16550222">
+ <name>SYS_C0056942</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl10121027">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection347201">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl10121027"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-573464718"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16691100">
+ <name>SYS_C0056942</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection8786660">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-573464718"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1417774579">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987">
+ <table>PLAYER</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16190401">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl12912375">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4999735">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-369105498">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10258960">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-369105498"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2900371">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement899610308">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8736201">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement899610308"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11920937">
+ <name>POSITION</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1915016741">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1685678">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer126">
+ <value>126</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1915016741"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11259399">
+ <name>SALARY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>8</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer126"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6500473">
+ <name>PLAYER</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection597588">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement726042623">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement726042623">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl229936">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2010459">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement726042623"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5789117">
+ <name>SYS_C0056941</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6619132">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11327826">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6619132"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement726042623"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14817767">
+ <name>SYS_C0056941</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2412752">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement726042623"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1865272815">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456">
+ <table>TEAM</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection472061">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10814618">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13712942">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1894275594">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4811138">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1894275594"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11407862">
+ <name>CITY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1894595370">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1917264">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1894595370"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11215786">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement355764204">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11702295">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement355764204"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1183826">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15562893">
+ <name>TEAM</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6648045">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1588061818">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl8759907">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16684370">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-47380209">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement355764204"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl7696990">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-47380209"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10986134">
+ <name>LEAGUE_ID;LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl8759907"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1588061818"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10702385">
+ <name>SYS_C0056944</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1588061819">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl6464516">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection4674651">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16658680">
+ <name>SYS_C0056943</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl4254413">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16599651">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl4254413"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1588061819"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16213371">
+ <name>SYS_C0056943</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15087611">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-425529968">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644">
+ <table>TEAMPLAYER</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15938414">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement435745883">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4302978">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10352157">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8988616">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9626034">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2074594">
+ <name>TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5629266">
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327672">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl4647707">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16091662">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1595789890">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl16087518">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1595789890"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1309711">
+ <name>PLAYER_ID;PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl4647707"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327672"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier615111">
+ <name>SYS_C0056947</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327673">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl3418918">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection3848924">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement1218289538">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl16582237">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement1218289538"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11330553">
+ <name>TEAM_ID;TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl3418918"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327673"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11213920">
+ <name>SYS_C0056946</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-445985692">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-445985692">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl13895785">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5337256">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-445985692"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7611883">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6658245">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12703139">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6658245"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-445985692"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1106834">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11904202">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-445985692"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl4508150"/>
+ </owner>
+ </OBJECT>
+ </tables>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.6.0.0 - Production</_databaseProductVersion>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13405425">
+ <name>IASCTS</name>
+ </OBJECT>
+ </_schema>
+ <_databaseProductName>Oracle</_databaseProductName>
+ </OBJECT>
+ </impl>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/Team.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/Team.java
new file mode 100755
index 0000000..8935cf1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/Team.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+
+public interface Team extends javax.ejb.EJBObject {
+
+ public String getTeamId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getCity() throws RemoteException;
+// public Collection getPlayers() throws RemoteException;
+// public League getLeague() throws RemoteException;
+
+ public ArrayList getCopyOfPlayers() throws RemoteException;
+// public void addPlayer(Player player) throws RemoteException;
+// public void dropPlayer(Player player) throws RemoteException;
+ public double getSalaryOfPlayer(String playerName) throws RemoteException;
+}
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
new file mode 100755
index 0000000..4f6e907
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamBean.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+import util.PlayerDetails;
+
+public abstract class TeamBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getTeamId();
+ public abstract void setTeamId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getCity();
+ public abstract void setCity(String city);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getPlayers();
+ public abstract void setPlayers(Collection players);
+
+ public abstract LocalLeague getLeague();
+ public abstract void setLeague(LocalLeague league);
+
+ // Select methods
+
+ public abstract double ejbSelectSalaryOfPlayerInTeam(LocalTeam team, String playerName)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameSubstring(String substring)
+ throws FinderException;
+
+ public abstract String ejbSelectNameLocate(String substring)
+ 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(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");
+ ArrayList playerList = new ArrayList();
+ Collection players = getPlayers();
+
+ Iterator i = players.iterator();
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), 0.00);
+ playerList.add(details);
+ }
+
+ return playerList;
+ }
+
+ public void addPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean addPlayer");
+ try {
+ Collection players = getPlayers();
+ players.add(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean dropPlayer");
+ try {
+ Collection players = getPlayers();
+ players.remove(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String city)
+ throws CreateException {
+
+ Debug.print("TeamBean ejbCreate");
+ setTeamId(id);
+ setName(name);
+ 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() { }
+
+
+} // TeamBean class
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
new file mode 100755
index 0000000..6ac99d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamHome.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface TeamHome extends javax.ejb.EJBHome {
+
+ public Team create (String id, String name, String city)
+ throws CreateException, RemoteException;
+
+ public Team findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
+ League league)
+ throws FinderException, RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/Debug.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/Debug.java
new file mode 100644
index 0000000..a914914
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/Debug.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * This class makes it easier to print out debug statements.
+ * The Debug.print statements are printed to System.err
+ * if debuggingOn = true.
+ */
+
+package util;
+
+public final class Debug {
+
+ public static final boolean debuggingOn = true;
+
+ public static final void print(String msg) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ }
+ }
+
+ public static final void print(String msg, Object object) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ System.err.println(" " + object.getClass().getName());
+ }
+ }
+
+} // Debug
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/LeagueDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/LeagueDetails.java
new file mode 100644
index 0000000..2e0a4f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/LeagueDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class LeagueDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String sport;
+
+ public LeagueDetails (String id, String name, String sport) {
+
+ this.id = id;
+ this.name = name;
+ this.sport = sport;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSport() {
+ return sport;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + sport;
+ return s;
+ }
+
+} // LeagueDetails
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
new file mode 100644
index 0000000..81041c2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/PlayerDetails.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class PlayerDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String position;
+ private double salary;
+
+ public PlayerDetails (String id, String name, String position,
+ double salary) {
+
+ this.id = id;
+ this.name = name;
+ this.position = position;
+ this.salary = salary;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPosition() {
+ return position;
+ }
+
+ public double getSalary() {
+ return salary;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + position + " " + salary;
+ return s;
+ }
+
+
+} // PlayerDetails
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/TeamDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/TeamDetails.java
new file mode 100644
index 0000000..486aa4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/TeamDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class TeamDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String city;
+
+ public TeamDetails (String id, String name, String city) {
+
+ this.id = id;
+ this.name = name;
+ this.city = city;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + city;
+ return s;
+ }
+
+} // TeamDetails
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
new file mode 100644
index 0000000..4fe3dc3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/servlet/RosterServlet.java
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+public class RosterServlet extends HttpServlet{
+
+ private PrintWriter out = null;
+
+ /** Handles the HTTP <code>GET</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /**
+ *
+ * @param req
+ * @param res
+ * @throws ServletException
+ * @throws IOException
+ */
+ private void processRequest(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.setContentType("text/html");
+ out = res.getWriter();
+
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>RosterApp Servlet-Client</title>");
+ out.println("</head>");
+ out.println("<body>");
+
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleRoster");
+
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome.class);
+
+ Roster myRoster = home.create();
+
+ // deleting all exisiting DB-entries
+ myRoster.cleanUp();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ } catch (Exception ex) {
+ out.println("Caught an exception:");
+ ex.printStackTrace(out);
+ ex.printStackTrace();
+ }
+
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList, out);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // getSomeInfo
+
+
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamDetails = myRoster.getTeam("T3");
+ out.println("<BR>" + teamDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerDetails = myRoster.getPlayer("P20");
+ out.println("<BR>" + playerDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ out.println("<BR>/////////////////////////////////////////////");
+ printDetailsList(playerList, out);
+ out.println("<BR>/////////////////////////////////////////////");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList, out);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList, out);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ out.println("<BR>" + it.next());
+ }
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList, out);
+
+ out.println("<BR>" + myRoster.getTeamNameVariations("T5"));
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList, out);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList, out);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList, out);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+
+
+ } // getMoreInfo
+
+
+ /**
+ *
+ * @param list
+ * @param out
+ */
+ private void printDetailsList(ArrayList list, PrintWriter out) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ out.println("<BR>" + details.toString());
+ }
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+ } // printDetailsList
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // insertInfo
+
+
+}
+
+
+
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
new file mode 100644
index 0000000..26c78ce
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.properties
@@ -0,0 +1,53 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="rosterVC"/>
+<property name="appname" value="${module}"/>
+
+<property name="test.client"
+ value="RosterClient"/>
+
+<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"/>
+<property name="sun-ejb-jar-team.xml" value="descriptor/sun-ejb-jar-team.xml"/>
+
+<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="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="appclientjar.files" value="${build.classes.dir}"/>
+
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+<property name="app.type" value="application"/>
+<property name="hasWebclient" value="true"/>
+
+<property name="web.xml"
+ value="descriptor/web.xml"/>
+<property name="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
new file mode 100644
index 0000000..50fc05c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+
+<project name="rosterextVC" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build, create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <delete file="${sun-ejb-jar.xml}"/>
+ <delete file="${ejb-jar.xml}"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="package-team-jar" >
+
+ <antcall target="package-ejbjar-common">
+
+ <param name="dbschema" value="${basedir}/ejb/team/RosterSchemaVC.dbschema" />
+ <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="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"
+ 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>
+
+ <target name="package-webclient-war" >
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ <param name="war.classes"
+ value="**/RosterServlet.class" />
+ </antcall>
+
+ </target>
+
+ <target name="package-appclient" >
+ <mkdir dir="${assemble.dir}"/>
+
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.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}/rosterVCAppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
+
+ </antcall>
+ </target>
+
+
+ <target name="package-ear">
+
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <mkdir dir="${TEMPDIR}/src" />
+ <copy todir="${TEMPDIR}/src" >
+ <fileset dir="${basedir}/ejb" />
+ </copy>
+ <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"/>
+
+ <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
+ <fileset dir="${TEMPDIR}" />
+
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+ </target>
+
+
+
+ <target name="build" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-team-jar" />
+ <antcall target="package-roster-jar" />
+ <antcall target="package-webclient-war" />
+ <antcall target="package-appclient" />
+ <antcall target="package-ear" />
+ </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>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="${basedir}/sql/drop_RosterVCApp_derby.sql"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/MANIFEST.MF
new file mode 100644
index 0000000..bca2971
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: client.RosterClient
+
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
new file mode 100644
index 0000000..f4cab5c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/RosterClient.java
@@ -0,0 +1,322 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.util.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import util.*;
+import roster.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class RosterClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ try {
+ stat.addDescription("RosterAppExt");
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleRosterExt");
+
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome.class);
+
+ Roster myRoster = home.create();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ // getMoreInfo(myRoster);
+
+ stat.addStatus("ejbclient RosterAppExt", stat.PASS);
+ stat.printSummary("RosterAppExt");
+ System.exit(0);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.printSummary("RosterAppExt");
+ }
+
+ } // main
+
+
+ private static void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // getSomeInfo
+
+ private static void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamDetails = myRoster.getTeam("T3");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ playerDetails = myRoster.getPlayer("P20");
+ System.out.println(playerDetails.toString());
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // getMoreInfo
+
+ private static void printDetailsList(ArrayList list) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ System.out.println(details.toString());
+ }
+ System.out.println();
+ } // printDetailsList
+
+
+ private static void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // insertInfo
+
+
+} // class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/INDEX.LIST b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/INDEX.LIST
new file mode 100644
index 0000000..41895d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/INDEX.LIST
@@ -0,0 +1,13 @@
+JarIndex-Version: 1.0
+
+RosterAppBerlin.ear
+roster-ac.jar
+team-ejb.jar
+roster-ejb.jar
+RosterClient.war
+src
+src/client
+src/roster
+src/team
+src/util
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/application-client.xml
new file mode 100644
index 0000000..2263938
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>RosterClientExt</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/application.xml
new file mode 100644
index 0000000..6ecdb6d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/application.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>RosterAppVC</display-name>
+ <description>Application description</description>
+ <module>
+ <ejb>roster-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>rosterVCAppClient.jar</java>
+ </module>
+ <module>
+ <ejb>team-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>rosterVC-web.war</web-uri>
+ <context-root>rostervc</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-roster.xml
new file mode 100644
index 0000000..84f24b2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-roster.xml
@@ -0,0 +1,646 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>RosterJAR</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>RosterEJB</display-name>
+ <ejb-name>RosterEJB</ejb-name>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ <ejb-class>roster.RosterBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemotePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-local-ref>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
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
new file mode 100644
index 0000000..03099f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-team.xml
@@ -0,0 +1,1346 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>TeamJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>LeagueEJB</display-name>
+ <ejb-name>LeagueEJB</ejb-name>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-class>team.LeagueBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>League</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>leagueId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>sport</field-name>
+ </cmp-field>
+ <primkey-field>leagueId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(l) from League l</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(l) from League l where l.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET</description>
+ <query-method>
+ <method-name>ejbSelectTeamsCity</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.city from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET Remote Interfaces</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeams</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select object(t) from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object LocalInterface</description>
+ <query-method>
+ <method-name>ejbSelectTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object RemoteInterface</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String</description>
+ <query-method>
+ <method-name>ejbSelectTeamsNameByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.name from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations</description>
+ <query-method>
+ <method-name>ejbSelectPlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</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>
+ <description>Selector returning Set using multiple collection declarations with remote params</description>
+ <query-method>
+ <method-name>ejbSelectRemotePlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </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>
+ </entity>
+ <entity>
+ <display-name>TeamEJB</display-name>
+ <ejb-name>TeamEJB</ejb-name>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-class>team.TeamBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Team</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>teamId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>city</field-name>
+ </cmp-field>
+ <primkey-field>teamId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(t) from Team t</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Remote finder</description>
+ <query-method>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object int</description>
+ <query-method>
+ <method-name>ejbSelectSalaryOfPlayerInTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select p.salary from Team t, in(t.players) as p where t = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with CONCAT</description>
+ <query-method>
+ <method-name>ejbSelectByNameWithCONCAT</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = CONCAT(?1, ?2) </ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with SUBSTRING</description>
+ <query-method>
+ <method-name>ejbSelectByNameSubstring</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = SUBSTRING(?1, 5, 5)</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with LOCATE</description>
+ <query-method>
+ <method-name>ejbSelectNameLocate</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </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>
+ </entity>
+ <entity>
+ <display-name>PlayerEJB</display-name>
+ <ejb-name>PlayerEJB</ejb-name>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-class>team.PlayerBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Player</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>position</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>playerId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>salary</field-name>
+ </cmp-field>
+ <primkey-field>playerId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p
+where p.teams is empty</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league.sport = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectSports</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.league.sport
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.salary between ?1 and ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p1)
+from Player p1, Player p2
+where p1.salary > p2.salary and
+p2.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectLeagues</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct t.league
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IN Expression</description>
+ <query-method>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.position IN ('goalkeeper', 'defender')</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the LIKE Expression</description>
+ <query-method>
+ <method-name>findByNameEndingWithON</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name LIKE '%on'</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IS NULL Expression</description>
+ <query-method>
+ <method-name>findByNullName</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name IS NULL</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the MEMBER OF Expression</description>
+ <query-method>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where ?1 MEMBER p.teams</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the ABS function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = ABS(?1)</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the SQRT function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <description>League-Team</description>
+ <ejb-relation>
+ <description>Team To Player</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>players</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>PlayerEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>PlayerEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <description>League-Team</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>LeagueEJB</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>LeagueEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete />
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>league</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..9ebfec5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-cmp-mappings-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-cmp-mappings-team.xml
new file mode 100644
index 0000000..760c972
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-cmp-mappings-team.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>RosterSchemaVC</schema>
+ <entity-mapping>
+ <ejb-name>LeagueEJB</ejb-name>
+ <table-name>LEAGUE</table-name>
+ <cmp-field-mapping>
+ <field-name>leagueId</field-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>LEAGUE.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>sport</field-name>
+ <column-name>LEAGUE.SPORT</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <consistency>
+ <check-version-of-accessed-instances>
+ <column-name>VERSION</column-name>
+ </check-version-of-accessed-instances>
+ </consistency>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PlayerEJB</ejb-name>
+ <table-name>PLAYER</table-name>
+ <cmp-field-mapping>
+ <field-name>position</field-name>
+ <column-name>PLAYER.POSITION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>playerId</field-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>PLAYER.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>salary</field-name>
+ <column-name>PLAYER.SALARY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <consistency>
+ <check-version-of-accessed-instances>
+ <column-name>VERSION</column-name>
+ </check-version-of-accessed-instances>
+ </consistency>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>TeamEJB</ejb-name>
+ <table-name>TEAM</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>TEAM.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>city</field-name>
+ <column-name>TEAM.CITY</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>teamId</field-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>league</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>players</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.TEAM_ID</column-name>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <consistency>
+ <check-version-of-accessed-instances>
+ <column-name>VERSION</column-name>
+ </check-version-of-accessed-instances>
+ </consistency>
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-ejb-jar-roster.xml
new file mode 100644
index 0000000..2005d29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-ejb-jar-roster.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>787878</unique-id>
+ <ejb>
+ <ejb-name>RosterEJB</ejb-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/LeagueEJB0</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/TeamEJB2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/PlayerEJB1</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>
+ </ejb>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-ejb-jar-team.xml
new file mode 100644
index 0000000..ec54aa0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-ejb-jar-team.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>656565</unique-id>
+ <ejb>
+ <ejb-name>LeagueEJB</ejb-name>
+ <jndi-name>MyLeague</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>
+</ejb>
+<ejb>
+<ejb-name>PlayerEJB</ejb-name>
+<jndi-name>MyPlayer</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>
+</ejb>
+<ejb>
+<ejb-name>TeamEJB</ejb-name>
+<jndi-name>MyTeam</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>
+</ejb>
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-web.xml
new file mode 100644
index 0000000..ef470f0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRoster</ejb-ref-name>
+ <jndi-name>SimpleRoster</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/web.xml
new file mode 100644
index 0000000..e6f887a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>RosterClient</display-name>
+ <servlet>
+ <servlet-name>RosterServlet</servlet-name>
+ <display-name>RosterServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.RosterServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RosterServlet</servlet-name>
+ <url-pattern>/Roster</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRoster</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..ecbb11f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/Roster.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import javax.ejb.FinderException;
+import javax.ejb.RemoveException;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Set;
+
+public interface Roster extends EJBObject {
+
+ // Players
+
+ public void createPlayer(PlayerDetails details)
+ throws RemoteException;
+
+ public void addPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public void removePlayer(String playerId)
+ throws RemoteException;
+
+ public void dropPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public PlayerDetails getPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeamCopy(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersByPosition(String position)
+ throws RemoteException;
+
+ public ArrayList getPlayersByHigherSalary(String name)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySalaryRange(double low, double high)
+ throws RemoteException;
+
+ public ArrayList getPlayersByLeagueId(String leagueId)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySport(String sport)
+ throws RemoteException;
+
+ public ArrayList getPlayersByCity(String city)
+ throws RemoteException;
+
+ public ArrayList getAllPlayers()
+ throws RemoteException;
+
+ public ArrayList getPlayersNotOnTeam()
+ throws RemoteException;
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) throws RemoteException;
+
+ public ArrayList getLeaguesOfPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getSportsOfPlayer(String playerId)
+ throws RemoteException;
+
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfLeague(String leagueId)
+ throws RemoteException;
+
+
+ public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNameEndingWithON()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNullName()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
+ // Teams
+
+ public ArrayList getTeamsOfLeague(String leagueId)
+ throws RemoteException;
+
+ public void createTeamInLeague(TeamDetails details, String leagueId)
+ throws RemoteException;
+
+ public void removeTeam(String teamId)
+ throws RemoteException;
+
+ public TeamDetails getTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+
+ public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
+
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamNameVariations(String teamId) throws RemoteException;
+
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+
+ // Leagues
+
+ public void createLeague(LeagueDetails details)
+ throws RemoteException;
+
+ public void removeLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeagueByName(String name)
+ throws RemoteException;
+
+ // Test
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
+ public ArrayList getRemotePlayersOfLeague(String leagueId) throws RemoteException;
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) throws RemoteException;
+
+ 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
new file mode 100755
index 0000000..b56aff0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterBean.java
@@ -0,0 +1,1033 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.*;
+import team.*;
+import java.rmi.RemoteException;
+
+public class RosterBean implements SessionBean {
+
+ private LocalPlayerHome playerHome = null;
+ private LocalTeamHome teamHome = null;
+ private LocalLeagueHome leagueHome = null;
+
+ private PlayerHome remPlayerHome = null;
+ private TeamHome remTeamHome = null;
+ private LeagueHome remLeagueHome = null;
+
+
+ // Player business methods
+
+ public ArrayList testFinder(String parm1, String parm2,
+ String parm3) {
+
+ Debug.print("RosterBean testFinder");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByTest(parm1, parm2, parm3);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }
+
+ public void createPlayer(PlayerDetails details) {
+
+ Debug.print("RosterBean createPlayer");
+ try {
+ 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) {
+
+ Debug.print("RosterBean addPlayer");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ team.addPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removePlayer(String playerId) {
+
+ Debug.print("RosterBean removePlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ player.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(String playerId, String teamId) {
+
+ Debug.print("RosterBean dropPlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.dropPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public PlayerDetails getPlayer(String playerId) {
+
+ Debug.print("RosterBean getPlayer");
+ PlayerDetails playerDetails = null;
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ playerDetails = new PlayerDetails(playerId,
+ player.getName(), player.getPosition(), player.getSalary());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return playerDetails;
+ } // getPlayer
+
+
+ public ArrayList getPlayersOfTeam(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeam");
+ Collection players = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ players = team.getPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersOfTeam
+
+
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeamCopy");
+ ArrayList playersList = null;
+
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ playersList = team.getCopyOfPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return playersList;
+
+ } // getPlayersOfTeamCopy
+
+
+ public ArrayList getTeamsOfLeague(String leagueId) {
+
+ Debug.print("RosterBean getTeamsOfLeague");
+
+ ArrayList detailsList = new ArrayList();
+ Collection teams = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ teams = league.getTeams();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = teams.iterator();
+ while (i.hasNext()) {
+ LocalTeam team = (LocalTeam) i.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // getTeamsOfLeague
+
+
+ public ArrayList getPlayersByPosition(String position) {
+
+ Debug.print("RosterBean getPlayersByPosition");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPosition(position);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPosition
+
+
+ public ArrayList getPlayersByHigherSalary(String name) {
+
+ Debug.print("RosterBean getPlayersByByHigherSalary");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByHigherSalary(name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByHigherSalary
+
+ public ArrayList getPlayersBySalaryRange(double low, double high) {
+
+ Debug.print("RosterBean getPlayersBySalaryRange");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySalaryRange(low, high);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySalaryRange
+
+ public ArrayList getPlayersByLeagueId(String leagueId) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+ public ArrayList getPlayersBySport(String sport) {
+
+ Debug.print("RosterBean getPlayersBySport");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySport(sport);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySport
+
+ public ArrayList getPlayersByCity(String city) {
+
+ Debug.print("RosterBean getPlayersByCity");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByCity(city);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByCity
+
+ public ArrayList getAllPlayers() {
+
+ Debug.print("RosterBean getAllPlayers");
+ Collection players = null;
+
+ try {
+ players = playerHome.findAll();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getAllPlayers
+
+ public ArrayList getPlayersNotOnTeam() {
+
+ Debug.print("RosterBean getPlayersNotOnTeam");
+ Collection players = null;
+
+ try {
+ players = playerHome.findNotOnTeam();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersNotOnTeam
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) {
+
+ Debug.print("RosterBean getPlayersByPositionAndName");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPositionAndName(position, name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPositionAndName
+
+ public ArrayList getLeaguesOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getLeaguesOfPlayer");
+ ArrayList detailsList = new ArrayList();
+ Collection leagues = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ leagues = player.getLeagues();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = leagues.iterator();
+ while (i.hasNext()) {
+ LocalLeague league = (LocalLeague) i.next();
+ LeagueDetails details = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ detailsList.add(details);
+ }
+ return detailsList;
+ } // getLeaguesOfPlayer
+
+ public ArrayList getSportsOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getSportsOfPlayer");
+ ArrayList sportsList = new ArrayList();
+ Collection sports = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ sports = player.getSports();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = sports.iterator();
+ while (i.hasNext()) {
+ String sport = (String) i.next();
+ sportsList.add(sport);
+ }
+ return sportsList;
+ } // getSportsOfPlayer
+
+ // Team business methods
+
+ public void createTeamInLeague(TeamDetails details, String leagueId) {
+
+ Debug.print("RosterBean createTeamInLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ LocalTeam team = teamHome.create(details.getId(),
+ details.getName(), details.getCity());
+ league.addTeam(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeTeam(String teamId) {
+
+ Debug.print("RosterBean removeTeam");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public TeamDetails getTeam(String teamId) {
+
+ Debug.print("RosterBean getTeam");
+ TeamDetails teamDetails = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ teamDetails = new TeamDetails(teamId,
+ team.getName(), team.getCity());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return teamDetails;
+ }
+
+
+ // League business methods
+
+ public void createLeague(LeagueDetails details) {
+
+ Debug.print("RosterBean createLeague");
+ try {
+ LocalLeague league = leagueHome.create(details.getId(),
+ details.getName(), details.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeLeague(String leagueId) {
+
+ Debug.print("RosterBean removeLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ league.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public LeagueDetails getLeague(String leagueId) {
+
+ Debug.print("RosterBean getLeague");
+ LeagueDetails leagueDetails = null;
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ leagueDetails = new LeagueDetails(leagueId,
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return leagueDetails;
+ }
+
+ // SessionBean methods
+
+ public void ejbCreate() throws CreateException {
+
+ Debug.print("RosterBean ejbCreate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+ } catch (NamingException ex) {
+ throw new CreateException(ex.getMessage());
+ }
+ }
+
+ public void ejbActivate() {
+
+ Debug.print("RosterBean ejbActivate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+
+ } catch (NamingException ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void ejbPassivate() {
+
+ playerHome = null;
+ teamHome = null;
+ leagueHome = null;
+ remPlayerHome = null;
+ remTeamHome = null;
+ remLeagueHome = null;
+
+ }
+
+ 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();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ private ArrayList copyRemotePlayersToDetails(Collection players) throws RemoteException {
+
+ ArrayList detailsList = new ArrayList();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ Player player = (Player) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ /**
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ */
+ public void cleanUp() {
+ Debug.print("Cleaning up the database");
+ Collection toClean = null;
+ Iterator it = null;
+
+ try {
+ //removing the player EJBs
+ toClean = playerHome.findAll();
+ it = toClean.iterator();
+ 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!");
+ } 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 {
+ LocalLeague league = leagueHome.findByName(name);
+ leagueDetails = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return leagueDetails;
+ }
+ // getLeagueByName()
+
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeague");
+ ArrayList detailsList = new ArrayList();
+ Collection teamsColl = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ LocalTeam team = (LocalTeam) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
+ 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);
+ Debug.print(" ----- League found");
+ teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
+ Debug.print(" ----- Team found");
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ try {
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param city
+ * @return
+ */
+ public Set getCitiesOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
+ LocalLeague league;
+ Set cities;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ cities = league.getCitiesOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return cities;
+ }// getCitiesOfLeague()
+
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
+ ArrayList detailsList = new ArrayList();
+ League league;
+ Set teams;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ teams = league.getRemoteTeamsOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ try {
+ Iterator it = teams.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ LocalTeam team;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ team = league.getTeamByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ }// getTeamOfLeagueByCity()
+
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ String teamName;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ teamName = league.getTeamsNameByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return teamName;
+
+ }// getTeamsNameOfLeagueByCity()
+
+
+ /**
+ *
+ * @param teamID
+ * @param playerName
+ * @return
+ */
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName) {
+ Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
+ LocalTeam team;
+ double salary;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return salary;
+ }// getSalaryOfPlayerFromTeam()
+
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getPlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getPlayersOfLeague(leagueId)");
+ LocalLeague league;
+ Set players;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueId);
+ players = league.getPlayersFromLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersOfLeague()
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getRemotePlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getRemotePlayersOfLeague(leagueId)");
+ League league;
+ Collection players;
+ ArrayList result;
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueId);
+ players = league.getRemotePlayersFromLeague();
+ result = copyRemotePlayersToDetails(players);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ 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
+ */
+ public ArrayList getPlayersWithTeam(String teamId) {
+ Debug.print("RosterBean getPlayersWithTeam(teamId)");
+ LocalTeam team;
+ Collection players = null;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ players = playerHome.findByTeam(team);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersWithTeam()
+
+
+ /**
+ *
+ * @param teamId
+ * @return
+ */
+ public String getTeamNameVariations(String teamId) {
+ Debug.print("RosterBean getTeamNameVariations(teamId)");
+ LocalTeam team;
+ StringBuffer out = new StringBuffer();
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ Debug.print("--- CONCAT");
+ out.append(team.getTeamNameWithStringfunctionTests1());
+ Debug.print("--- SUBSTRING");
+ out.append(team.getTeamNameWithStringfunctionTests2());
+ Debug.print("--- LOCATE AND LENGTH");
+ out.append(team.getTeamNameWithStringfunctionTests3());
+ }
+ catch (Exception ex) {
+ 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
+ */
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getRemoteTeamOfLeagueByCity(leagueKey, city)");
+ League league;
+ Team team;
+ TeamDetails teamDetails;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ team = league.getRemoteTeamByCity(city);
+ 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) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = null; //leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+
+} // 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
new file mode 100755
index 0000000..6dfcc41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.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
new file mode 100755
index 0000000..caa955e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/League.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.Set;
+import javax.ejb.FinderException;
+
+
+public interface League extends javax.ejb.EJBObject {
+
+ public String getLeagueId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getSport() throws RemoteException;
+ public Collection getTeams() throws RemoteException;
+
+ public Team getRemoteTeamByCity(String city) throws FinderException,
+ RemoteException;
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
+ RemoteException;
+
+ public Collection getRemotePlayersFromLeague() throws FinderException,
+ RemoteException;
+
+// public void addTeam(Team team) throws RemoteException;
+// public void dropTeam(Team team) throws RemoteException;
+
+// public Set getCitiesOfThisLeague() throws FinderException;
+// public String getTeamsNameByCity(String city) throws FinderException;
+}
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
new file mode 100755
index 0000000..d9f348a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueBean.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class LeagueBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getLeagueId();
+ public abstract void setLeagueId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getSport();
+ public abstract void setSport(String sport);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Set ejbSelectTeamsCity(LocalLeague league)
+ throws FinderException;
+
+ public abstract Set ejbSelectRemoteTeams(League league)
+ throws FinderException;
+
+
+ public abstract LocalTeam ejbSelectTeamByCity(String city)
+ throws FinderException;
+
+ public abstract Team ejbSelectRemoteTeamByCity(String city)
+ throws FinderException;
+
+ 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 =
+ (team.LocalLeague)context.getEJBLocalObject();
+
+ return ejbSelectTeamsCity(league);
+ }
+
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException {
+
+ League league = (team.League)context.getEJBObject();
+
+ 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");
+ try {
+ Collection teams = getTeams();
+ teams.add(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropTeam(LocalTeam team) {
+
+ Debug.print("TeamBean dropTeam");
+ try {
+ Collection teams = getTeams();
+ teams.remove(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String sport)
+ throws CreateException {
+
+ Debug.print("LeagueBean ejbCreate");
+ setLeagueId(id);
+ setName(name);
+ 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
new file mode 100755
index 0000000..e8809e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface LeagueHome extends javax.ejb.EJBHome {
+
+ public League create (String id, String name, String sport)
+ throws CreateException, RemoteException;
+
+ public League findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public League findByName(String name)
+ 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
new file mode 100755
index 0000000..3f93dd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeague.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalLeague extends EJBLocalObject {
+
+ public String getLeagueId();
+ public String getName();
+ public String getSport();
+ public Collection getTeams();
+
+ public void addTeam(LocalTeam team);
+ public void dropTeam(LocalTeam team);
+
+ public Set getCitiesOfThisLeague() throws FinderException;
+ 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
new file mode 100755
index 0000000..c467a5e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeagueHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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()
+ throws FinderException;
+
+ public LocalLeague findByName(String name)
+ throws FinderException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayer.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayer.java
new file mode 100755
index 0000000..e8846dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayer.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalPlayer extends EJBLocalObject {
+
+ public String getPlayerId();
+ public String getName();
+ public String getPosition();
+ public double getSalary();
+ public Collection getTeams();
+ public Collection getLeagues() throws FinderException;
+ public Collection getSports() 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
new file mode 100755
index 0000000..d858503
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayerHome.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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)
+ throws FinderException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException;
+
+ public Collection findByLeague(LocalLeague league)
+ throws FinderException;
+
+ public Collection findBySport(String sport)
+ throws FinderException;
+
+ public Collection findByCity(String city)
+ throws FinderException;
+
+ public Collection findAll()
+ throws FinderException;
+
+ public Collection findNotOnTeam()
+ throws FinderException;
+
+ 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;
+
+ public Collection findByNameEndingWithON()
+ throws FinderException;
+
+ public Collection findByNullName()
+ throws FinderException;
+
+ public Collection findByTeam(LocalTeam team)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
+ 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
new file mode 100755
index 0000000..f8ad6c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeam.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalTeam extends EJBLocalObject {
+
+ public String getTeamId();
+ public String getName();
+ public String getCity();
+ public Collection getPlayers();
+ public LocalLeague getLeague();
+
+ public ArrayList getCopyOfPlayers();
+ public void addPlayer(LocalPlayer player);
+ public void dropPlayer(LocalPlayer player);
+ public double getSalaryOfPlayer(String playerName);
+ 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
new file mode 100755
index 0000000..ac2f66c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeamHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.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()
+ throws FinderException;
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
+ LocalLeague league)
+ throws FinderException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/Player.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/Player.java
new file mode 100755
index 0000000..a35d838
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/Player.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.FinderException;
+
+public interface Player extends javax.ejb.EJBObject {
+
+ public String getPlayerId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getPosition() throws RemoteException;
+ public double getSalary() throws RemoteException;
+// public Collection getTeams() throws RemoteException;
+// public Collection getLeagues() throws FinderException, RemoteException;
+// public Collection getSports() throws FinderException, RemoteException;
+
+}
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
new file mode 100755
index 0000000..2e2d79a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerBean.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class PlayerBean implements EntityBean {
+
+ private EntityContext context;
+
+ // 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);
+
+ public abstract String getPosition();
+ public abstract void setPosition(String position);
+
+ public abstract double getSalary();
+ public abstract void setSalary(double salary);
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Collection ejbSelectLeagues(LocalPlayer player)
+ throws FinderException;
+
+ public abstract Collection ejbSelectSports(LocalPlayer player)
+ throws FinderException;
+
+
+
+ // Business methods
+
+ public Collection getLeagues() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectLeagues(player);
+ }
+
+ public Collection getSports() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectSports(player);
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String position,
+ double salary) throws CreateException {
+
+ Debug.print("PlayerBean ejbCreate");
+ setPlayerId(id);
+ setName(name);
+ setPosition(position);
+ 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
new file mode 100755
index 0000000..1608787
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerHome.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface PlayerHome extends javax.ejb.EJBHome {
+
+ 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)
+ throws FinderException, RemoteException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException, RemoteException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException, RemoteException;
+
+// public Collection findByLeague(League league)
+// throws FinderException, RemoteException;
+
+ public Collection findBySport(String sport)
+ throws FinderException, RemoteException;
+
+ public Collection findByCity(String city)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findNotOnTeam()
+ throws FinderException, RemoteException;
+
+ public Collection findByPositionAndName(String position,
+ String name) throws FinderException, RemoteException;
+
+ public Collection findByTest (String parm1, String parm2, String parm3)
+ throws FinderException, RemoteException;
+
+
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/RosterSchemaVC.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/RosterSchemaVC.dbschema
new file mode 100644
index 0000000..f8ca354
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/RosterSchemaVC.dbschema
@@ -0,0 +1,1328 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl19058102">
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection20812788">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl19058102"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-824107209">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl32477527">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </element>
+ <table>LEAGUE</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection970341">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl32477527"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1337095799">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19859865">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1337095799"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier18820833">
+ <name>SYS_C0059830</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection19526581">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19859865"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-301408460">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl6662015">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-301408460"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
+ <value>255</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10883428">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1337095799">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl18680399">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1337095799"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier26204548">
+ <name>SYS_C0059830</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12159142">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl32477527"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-301408460"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl32477527"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17934197">
+ <name>LEAGUE</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6744085">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl32477527"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1337095799"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection23710309">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl32477527"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-301408460"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1669237022">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl597230">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1669237022"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4875224">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-201673251">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl31522607">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-201673251"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9532399">
+ <name>SPORT</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1815916801">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl22201561">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1815916801"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer19">
+ <value>19</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16359413">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-824107209"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-979389083">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </element>
+ <table>TEAM</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2704014">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement1202838284">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl31063377">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement1202838284"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8785225">
+ <name>SYS_C0059833</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection14158819">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl31063377"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement600760059">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl13783459">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement600760059"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32358515">
+ <name>LEAGUE_ID;LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-786689054">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl32887686">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-786689054"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier27756227">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-301408460"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1202838283">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl25200832">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1202838283"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier26354209">
+ <name>SYS_C0059832</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection32794782">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl25200832"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement395496116">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl16695559">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement395496116"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20111677">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1202838283">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl23163273">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1202838283"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6616781">
+ <name>SYS_C0059832</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12122157">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement395496116"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8856448">
+ <name>TEAM</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection19537476">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1202838283"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12217475">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl7652266"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="5" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement395496116"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1911204948">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl2864404">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1911204948"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier24993066">
+ <name>CITY</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1911524724">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl24093812">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1911524724"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9814147">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-786689054"/>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2108606161">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl26335425">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2108606161"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2989062">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-979389083"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-703109143">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl25488452">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </element>
+ <table>PLAYER</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection10923757">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl25488452"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1658364178">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl28541929">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1658364178"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10053659">
+ <name>SYS_C0059828</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection26083064">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl28541929"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement153031540">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl25292276">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement153031540"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19739141">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1658364178">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl3086625">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1658364178"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1760304">
+ <name>SYS_C0059828</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection19327071">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl25488452"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement153031540"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl25488452"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier23984203">
+ <name>PLAYER</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection25864734">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl25488452"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1658364178"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28145575">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl25488452"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="5" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement153031540"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1279865488">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13120210">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1279865488"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier25199001">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-156702322">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl29132923">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-156702322"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10774273">
+ <name>POSITION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1446972561">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl23503403">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1446972561"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer126">
+ <value>126</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier18926678">
+ <name>SALARY</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer126"/>
+ </_precision>
+ <_type>8</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement876619699">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4667711">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement876619699"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier33520158">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-703109143"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement99280006">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </element>
+ <table>TEAMPLAYER</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection8984226">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-287176306">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl7749469">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-287176306"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20590970">
+ <name>SYS_C0059836</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12285029">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl7749469"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-620625238">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl25589390">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-620625238"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13736904">
+ <name>PLAYER_ID;PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-469159983">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl21662929">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-469159983"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier23268025">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement153031540"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-287176307">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl22355808">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-287176307"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier25094328">
+ <name>SYS_C0059835</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection14074220">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl22355808"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement1691881966">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl14726901">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement1691881966"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17548445">
+ <name>TEAM_ID;TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1978578731">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl26828160">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1978578731"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier29997514">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement395496116"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1835293914">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl12888787">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1835293914"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier27994366">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection20233936">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl12888787"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-469159983"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1978578731"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1835293914">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl1070904">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1835293914"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13523740">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection18262862">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-469159983"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1978578731"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement99280006"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7219514">
+ <name>TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection18429817">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1835293914"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection23195919">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl27940859"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-469159983"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1978578731"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5546792">
+ <name>MV</name>
+ </OBJECT>
+ </_name>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10736847">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722"/>
+ </element>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.7.0.0 - Production</_databaseProductVersion>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <_databaseProductName>Oracle</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32023030">
+ <name>MV</name>
+ </OBJECT>
+ </_schema>
+ <_url>jdbc:oracle:thin:@bsqe-giant.sfbay.sun.com:1521:ora817nw</_url>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_username>MV</_username>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/Team.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/Team.java
new file mode 100755
index 0000000..8935cf1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/Team.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+
+public interface Team extends javax.ejb.EJBObject {
+
+ public String getTeamId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getCity() throws RemoteException;
+// public Collection getPlayers() throws RemoteException;
+// public League getLeague() throws RemoteException;
+
+ public ArrayList getCopyOfPlayers() throws RemoteException;
+// public void addPlayer(Player player) throws RemoteException;
+// public void dropPlayer(Player player) throws RemoteException;
+ public double getSalaryOfPlayer(String playerName) throws RemoteException;
+}
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
new file mode 100755
index 0000000..4f6e907
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamBean.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+import util.PlayerDetails;
+
+public abstract class TeamBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getTeamId();
+ public abstract void setTeamId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getCity();
+ public abstract void setCity(String city);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getPlayers();
+ public abstract void setPlayers(Collection players);
+
+ public abstract LocalLeague getLeague();
+ public abstract void setLeague(LocalLeague league);
+
+ // Select methods
+
+ public abstract double ejbSelectSalaryOfPlayerInTeam(LocalTeam team, String playerName)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameSubstring(String substring)
+ throws FinderException;
+
+ public abstract String ejbSelectNameLocate(String substring)
+ 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(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");
+ ArrayList playerList = new ArrayList();
+ Collection players = getPlayers();
+
+ Iterator i = players.iterator();
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), 0.00);
+ playerList.add(details);
+ }
+
+ return playerList;
+ }
+
+ public void addPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean addPlayer");
+ try {
+ Collection players = getPlayers();
+ players.add(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean dropPlayer");
+ try {
+ Collection players = getPlayers();
+ players.remove(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String city)
+ throws CreateException {
+
+ Debug.print("TeamBean ejbCreate");
+ setTeamId(id);
+ setName(name);
+ 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() { }
+
+
+} // TeamBean class
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
new file mode 100755
index 0000000..6ac99d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamHome.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface TeamHome extends javax.ejb.EJBHome {
+
+ public Team create (String id, String name, String city)
+ throws CreateException, RemoteException;
+
+ public Team findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
+ League league)
+ throws FinderException, RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/Debug.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/Debug.java
new file mode 100644
index 0000000..a914914
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/Debug.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * This class makes it easier to print out debug statements.
+ * The Debug.print statements are printed to System.err
+ * if debuggingOn = true.
+ */
+
+package util;
+
+public final class Debug {
+
+ public static final boolean debuggingOn = true;
+
+ public static final void print(String msg) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ }
+ }
+
+ public static final void print(String msg, Object object) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ System.err.println(" " + object.getClass().getName());
+ }
+ }
+
+} // Debug
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/LeagueDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/LeagueDetails.java
new file mode 100644
index 0000000..2e0a4f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/LeagueDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class LeagueDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String sport;
+
+ public LeagueDetails (String id, String name, String sport) {
+
+ this.id = id;
+ this.name = name;
+ this.sport = sport;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSport() {
+ return sport;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + sport;
+ return s;
+ }
+
+} // LeagueDetails
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
new file mode 100644
index 0000000..81041c2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/PlayerDetails.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class PlayerDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String position;
+ private double salary;
+
+ public PlayerDetails (String id, String name, String position,
+ double salary) {
+
+ this.id = id;
+ this.name = name;
+ this.position = position;
+ this.salary = salary;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPosition() {
+ return position;
+ }
+
+ public double getSalary() {
+ return salary;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + position + " " + salary;
+ return s;
+ }
+
+
+} // PlayerDetails
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/TeamDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/TeamDetails.java
new file mode 100644
index 0000000..486aa4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/TeamDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class TeamDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String city;
+
+ public TeamDetails (String id, String name, String city) {
+
+ this.id = id;
+ this.name = name;
+ this.city = city;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + city;
+ return s;
+ }
+
+} // TeamDetails
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
new file mode 100644
index 0000000..4fe3dc3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/servlet/RosterServlet.java
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+public class RosterServlet extends HttpServlet{
+
+ private PrintWriter out = null;
+
+ /** Handles the HTTP <code>GET</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /**
+ *
+ * @param req
+ * @param res
+ * @throws ServletException
+ * @throws IOException
+ */
+ private void processRequest(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.setContentType("text/html");
+ out = res.getWriter();
+
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>RosterApp Servlet-Client</title>");
+ out.println("</head>");
+ out.println("<body>");
+
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleRoster");
+
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome.class);
+
+ Roster myRoster = home.create();
+
+ // deleting all exisiting DB-entries
+ myRoster.cleanUp();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ } catch (Exception ex) {
+ out.println("Caught an exception:");
+ ex.printStackTrace(out);
+ ex.printStackTrace();
+ }
+
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList, out);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // getSomeInfo
+
+
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamDetails = myRoster.getTeam("T3");
+ out.println("<BR>" + teamDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerDetails = myRoster.getPlayer("P20");
+ out.println("<BR>" + playerDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ out.println("<BR>/////////////////////////////////////////////");
+ printDetailsList(playerList, out);
+ out.println("<BR>/////////////////////////////////////////////");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList, out);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList, out);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ out.println("<BR>" + it.next());
+ }
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList, out);
+
+ out.println("<BR>" + myRoster.getTeamNameVariations("T5"));
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList, out);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList, out);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList, out);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+
+
+ } // getMoreInfo
+
+
+ /**
+ *
+ * @param list
+ * @param out
+ */
+ private void printDetailsList(ArrayList list, PrintWriter out) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ out.println("<BR>" + details.toString());
+ }
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+ } // printDetailsList
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // insertInfo
+
+
+}
+
+
+
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
new file mode 100755
index 0000000..7759ed1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_db2.sql
@@ -0,0 +1,83 @@
+DROP TRIGGER T_LEAGUE;
+DROP TRIGGER T_PLAYER;
+DROP TRIGGER T_TEAM;
+
+DROP TABLE TEAMPLAYER;
+DROP TABLE PLAYER;
+DROP TABLE TEAM;
+DROP TABLE LEAGUE;
+
+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
+);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) NOT NULL
+);
+
+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)
+);
+
+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)
+);
+
+commit;
+
+CREATE TRIGGER T_LEAGUE
+ NO CASCADE
+ BEFORE UPDATE ON LEAGUE
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+CREATE TRIGGER T_PLAYER
+ NO CASCADE
+ BEFORE UPDATE ON PLAYER
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+CREATE TRIGGER T_TEAM
+ NO CASCADE
+ BEFORE UPDATE ON TEAM
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..9017a72
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_derby.sql
@@ -0,0 +1,72 @@
+DROP TRIGGER T_LEAGUE;
+DROP TRIGGER T_PLAYER;
+DROP TRIGGER T_TEAM;
+
+DROP TABLE TEAMPLAYER;
+DROP TABLE PLAYER;
+DROP TABLE TEAM;
+DROP TABLE LEAGUE;
+
+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
+);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) NOT NULL
+);
+
+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)
+);
+
+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)
+);
+
+CREATE TRIGGER T_LEAGUE
+ AFTER UPDATE ON LEAGUE
+ REFERENCING
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ UPDATE LEAGUE SET version = O_ROW.version + 1
+ WHERE LEAGUE_ID = O_ROW.LEAGUE_ID
+;
+
+
+CREATE TRIGGER T_PLAYER
+ AFTER UPDATE ON PLAYER
+ REFERENCING
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ UPDATE PLAYER SET version = O_ROW.version + 1
+ WHERE PLAYER_ID = O_ROW.PLAYER_ID
+;
+
+CREATE TRIGGER T_TEAM
+ AFTER UPDATE ON TEAM
+ REFERENCING
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ UPDATE TEAM SET version = O_ROW.version + 1
+ 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
new file mode 100755
index 0000000..3b31d5a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ifx.sql
@@ -0,0 +1,80 @@
+DROP TRIGGER T_LEAGUE ;
+DROP TRIGGER T_PLAYER ;
+DROP TRIGGER T_TEAM ;
+
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+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
+);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(127) PRIMARY KEY,
+ NAME VARCHAR(127),
+ SPORT VARCHAR(127),
+ VERSION DECIMAL(19) NOT NULL
+);
+
+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)
+);
+
+CREATE TABLE TEAMPLAYER
+(
+ 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)
+);
+
+commit;
+
+CREATE TRIGGER T_LEAGUE
+ UPDATE ON LEAGUE
+ REFERENCING OLD AS old NEW AS new
+ FOR EACH ROW
+ WHEN (new.VERSION = old.VERSION)
+ (
+ UPDATE LEAGUE SET VERSION = old.VERSION + 1
+ );
+/
+
+CREATE TRIGGER T_PLAYER
+ UPDATE ON PLAYER
+ REFERENCING OLD AS old NEW AS new
+ FOR EACH ROW
+ WHEN (new.VERSION = old.VERSION)
+ (
+ UPDATE PLAYER SET VERSION = old.VERSION + 1
+ );
+/
+
+CREATE TRIGGER T_TEAM
+ UPDATE ON TEAM
+ REFERENCING OLD AS old NEW AS new
+ FOR EACH ROW
+ WHEN (new.VERSION = old.VERSION)
+ (
+ UPDATE TEAM SET VERSION = old.VERSION + 1
+ );
+/
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..f7183dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mssql.sql
@@ -0,0 +1,84 @@
+DROP TRIGGER T_LEAGUE
+DROP TRIGGER T_PLAYER
+DROP TRIGGER T_TEAM
+go
+
+DROP TABLE TEAMPLAYER
+DROP TABLE PLAYER
+DROP TABLE TEAM
+DROP TABLE LEAGUE
+go
+
+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
+)
+
+create table LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) not null
+)
+
+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)
+)
+
+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)
+)
+
+go
+
+CREATE TRIGGER T_LEAGUE
+ ON LEAGUE
+ FOR UPDATE as
+ begin
+ UPDATE LEAGUE
+ SET LEAGUE.VERSION = LEAGUE.VERSION + 1
+ FROM inserted
+ WHERE LEAGUE.LEAGUE_ID = inserted.LEAGUE_ID
+ AND LEAGUE.VERSION = inserted.VERSION
+ end
+go
+
+CREATE TRIGGER T_PLAYER
+ ON PLAYER
+ FOR UPDATE as
+ begin
+ UPDATE PLAYER
+ SET PLAYER.VERSION = PLAYER.VERSION + 1
+ FROM inserted
+ WHERE PLAYER.PLAYER_ID = inserted.PLAYER_ID
+ AND PLAYER.VERSION = inserted.VERSION
+ end
+go
+
+CREATE TRIGGER T_TEAM
+ ON TEAM
+ FOR UPDATE as
+ begin
+ UPDATE TEAM
+ SET TEAM.VERSION = TEAM.VERSION + 1
+ FROM inserted
+ WHERE TEAM.TEAM_ID = inserted.TEAM_ID
+ AND TEAM.VERSION = inserted.VERSION
+ end
+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
new file mode 100755
index 0000000..789dbea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mysql.sql
@@ -0,0 +1,68 @@
+DROP TRIGGER T_LEAGUE ;
+DROP TRIGGER T_PLAYER ;
+DROP TRIGGER T_TEAM ;
+
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+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
+) engine=InnoDB;
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION DECIMAL(19) NOT NULL
+) engine=InnoDB;
+
+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)
+) engine=InnoDB;
+
+CREATE TABLE TEAMPLAYER
+(
+ 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)
+) engine=InnoDB;
+
+commit;
+
+CREATE TRIGGER T_LEAGUE
+ BEFORE UPDATE ON LEAGUE
+ FOR EACH ROW
+ SET NEW.VERSION = OLD.VERSION + 1
+;
+
+CREATE TRIGGER T_PLAYER
+ BEFORE UPDATE ON PLAYER
+ FOR EACH ROW
+ SET NEW.VERSION = OLD.VERSION + 1
+;
+
+CREATE TRIGGER T_TEAM
+ BEFORE UPDATE ON TEAM
+ FOR EACH ROW
+ SET NEW.VERSION = OLD.VERSION + 1
+;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..22262c1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ora.sql
@@ -0,0 +1,77 @@
+DROP TRIGGER T_LEAGUE ;
+DROP TRIGGER T_PLAYER ;
+DROP TRIGGER T_TEAM ;
+
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+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
+);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMBER(19) NOT NULL
+);
+
+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)
+);
+
+CREATE TABLE TEAMPLAYER
+(
+ 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)
+);
+
+commit;
+
+CREATE TRIGGER T_LEAGUE
+ BEFORE UPDATE ON LEAGUE
+ FOR EACH ROW
+ WHEN (NEW.VERSION = OLD.VERSION)
+ BEGIN
+ :NEW.VERSION := :OLD.VERSION + 1;
+ END;
+/
+
+CREATE TRIGGER T_PLAYER
+ BEFORE UPDATE ON PLAYER
+ FOR EACH ROW
+ WHEN (NEW.VERSION = OLD.VERSION)
+ BEGIN
+ :NEW.VERSION := :OLD.VERSION + 1;
+ END;
+/
+
+CREATE TRIGGER T_TEAM
+ BEFORE UPDATE ON TEAM
+ FOR EACH ROW
+ WHEN (NEW.VERSION = OLD.VERSION)
+ BEGIN
+ :NEW.VERSION := :OLD.VERSION + 1;
+ END;
+/
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..b243325
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_pbs.sql
@@ -0,0 +1,88 @@
+/* "cascade" will drop the triggers */
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER cascade ;
+DROP TABLE TEAM cascade ;
+DROP TABLE LEAGUE cascade ;
+
+commit;
+
+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
+);
+
+commit;
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMBER(19) NOT NULL
+);
+
+commit;
+
+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)
+);
+
+commit;
+
+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)
+);
+
+commit;
+
+CREATE TRIGGER T_LEAGUE
+ BEFORE UPDATE ON LEAGUE
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+CREATE TRIGGER T_PLAYER
+ BEFORE UPDATE ON PLAYER
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+CREATE TRIGGER T_TEAM
+ BEFORE UPDATE ON TEAM
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..6ee6ba8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_psql.sql
@@ -0,0 +1,42 @@
+DROP TABLE TEAMPLAYER cascade;
+DROP TABLE PLAYER cascade;
+DROP TABLE TEAM cascade;
+DROP TABLE LEAGUE cascade;
+
+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
+);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION DECIMAL(19) NOT NULL
+);
+
+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)
+);
+
+CREATE TABLE TEAMPLAYER
+(
+ 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)
+);
+
+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
new file mode 100755
index 0000000..b32e2f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_syb.sql
@@ -0,0 +1,85 @@
+DROP TRIGGER T_LEAGUE
+DROP TRIGGER T_PLAYER
+DROP TRIGGER T_TEAM
+go
+
+DROP TABLE TEAMPLAYER
+DROP TABLE PLAYER
+DROP TABLE TEAM
+DROP TABLE LEAGUE
+go
+
+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
+)
+
+create table LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) not null
+)
+
+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)
+)
+
+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)
+)
+
+go
+
+CREATE TRIGGER T_LEAGUE
+ ON LEAGUE
+ FOR UPDATE as
+ begin
+ UPDATE LEAGUE
+ SET LEAGUE.VERSION = LEAGUE.VERSION + 1
+ FROM inserted
+ WHERE LEAGUE.LEAGUE_ID = inserted.LEAGUE_ID
+ AND LEAGUE.VERSION = inserted.VERSION
+ end
+go
+
+CREATE TRIGGER T_PLAYER
+ ON PLAYER
+ FOR UPDATE as
+ begin
+ UPDATE PLAYER
+ SET PLAYER.VERSION = PLAYER.VERSION + 1
+ FROM inserted
+ WHERE PLAYER.PLAYER_ID = inserted.PLAYER_ID
+ AND PLAYER.VERSION = inserted.VERSION
+ end
+go
+
+CREATE TRIGGER T_TEAM
+ ON TEAM
+ FOR UPDATE as
+ begin
+ UPDATE TEAM
+ SET TEAM.VERSION = TEAM.VERSION + 1
+ FROM inserted
+ WHERE TEAM.TEAM_ID = inserted.TEAM_ID
+ AND TEAM.VERSION = inserted.VERSION
+ end
+go
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/drop_RosterVCApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/drop_RosterVCApp_derby.sql
new file mode 100755
index 0000000..83ac497
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/drop_RosterVCApp_derby.sql
@@ -0,0 +1,8 @@
+DROP TRIGGER T_LEAGUE;
+DROP TRIGGER T_PLAYER;
+DROP TRIGGER T_TEAM;
+
+DROP TABLE TEAMPLAYER;
+DROP TABLE PLAYER;
+DROP TABLE TEAM;
+DROP TABLE LEAGUE;
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
new file mode 100644
index 0000000..0ac7e21
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.properties
@@ -0,0 +1,53 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="rosterext"/>
+<property name="appname" value="${module}"/>
+
+<property name="test.client"
+ value="RosterClient"/>
+
+<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"/>
+<property name="sun-ejb-jar-team.xml" value="descriptor/sun-ejb-jar-team.xml"/>
+
+<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="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="appclientjar.files" value="${build.classes.dir}"/>
+
+<property name="appclient.jar" value="${assemble.dir}/rosterextAppClient.jar"/>
+<property name="war.file" value="${assemble.dir}/rosterext-web.war"/>
+<property name="app.type" value="application"/>
+<property name="hasWebclient" value="true"/>
+
+<property name="web.xml"
+ value="descriptor/web.xml"/>
+<property name="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
new file mode 100644
index 0000000..a868a54
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+
+<project name="rosterext" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build, create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <delete file="${sun-ejb-jar.xml}"/>
+ <delete file="${ejb-jar.xml}"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="package-team-jar" >
+
+ <antcall target="package-ejbjar-common">
+
+ <param name="dbschema" value="${basedir}/ejb/team/RosterSchema.dbschema" />
+ <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="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"
+ 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>
+
+ <target name="package-webclient-war" >
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ <param name="war.classes"
+ value="**/RosterServlet.class" />
+ </antcall>
+
+ </target>
+
+ <target name="package-appclient" >
+ <mkdir dir="${assemble.dir}"/>
+
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.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}/rosterextAppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
+
+ </antcall>
+ </target>
+
+
+ <target name="package-ear">
+
+ <delete file="${assemble.dir}/${appname}.ear"/>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+
+ <property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
+
+ <mkdir dir="${TEMPDIR}/src" />
+ <copy todir="${TEMPDIR}/src" >
+ <fileset dir="${basedir}/ejb" />
+ </copy>
+ <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"/>
+
+ <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
+ <fileset dir="${TEMPDIR}" />
+
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ </ear>
+ </target>
+
+
+
+ <target name="build" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-team-jar" />
+ <antcall target="package-roster-jar" />
+ <antcall target="package-webclient-war" />
+ <antcall target="package-appclient" />
+
+ <antcall target="package-ear" />
+
+
+ </target>
+
+
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="${basedir}/sql/RosterApp_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/MANIFEST.MF
new file mode 100644
index 0000000..bca2971
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: client.RosterClient
+
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
new file mode 100644
index 0000000..274a190
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/RosterClient.java
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.util.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import util.*;
+import roster.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class RosterClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ try {
+ 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.class);
+
+ Roster myRoster = home.create();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ // getMoreInfo(myRoster);
+
+ stat.addStatus("ejbclient RosterAppExt", stat.PASS);
+ stat.printSummary("RosterAppExt");
+ System.exit(0);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // main
+
+
+ private static void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // getSomeInfo
+
+ private static void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ System.out.println(leagueDetails.toString());
+ System.out.println();
+
+ teamDetails = myRoster.getTeam("T3");
+ System.out.println(teamDetails.toString());
+ System.out.println();
+
+ playerDetails = myRoster.getPlayer("P20");
+ System.out.println(playerDetails.toString());
+ System.out.println();
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // getMoreInfo
+
+ private static void printDetailsList(ArrayList list) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ System.out.println(details.toString());
+ }
+ System.out.println();
+ } // printDetailsList
+
+
+ private static void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ }
+
+ } // insertInfo
+
+
+} // class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/INDEX.LIST b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/INDEX.LIST
new file mode 100644
index 0000000..41895d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/INDEX.LIST
@@ -0,0 +1,13 @@
+JarIndex-Version: 1.0
+
+RosterAppBerlin.ear
+roster-ac.jar
+team-ejb.jar
+roster-ejb.jar
+RosterClient.war
+src
+src/client
+src/roster
+src/team
+src/util
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/application-client.xml
new file mode 100644
index 0000000..2263938
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>RosterClientExt</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/application.xml
new file mode 100644
index 0000000..4b7f02c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/application.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>RosterAppExt</display-name>
+ <description>Application description</description>
+ <module>
+ <ejb>roster-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>rosterextAppClient.jar</java>
+ </module>
+ <module>
+ <ejb>team-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>rosterext-web.war</web-uri>
+ <context-root>rosterext</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-roster.xml
new file mode 100644
index 0000000..84f24b2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-roster.xml
@@ -0,0 +1,646 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>RosterJAR</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>RosterEJB</display-name>
+ <ejb-name>RosterEJB</ejb-name>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ <ejb-class>roster.RosterBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemoteTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/RemotePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-link>LeagueEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-link>TeamEJB</ejb-link>
+ </ejb-local-ref>
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-link>PlayerEJB</ejb-link>
+ </ejb-local-ref>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getEJBHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>getHomeHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>create</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Home</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>javax.ejb.Handle</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getHandle</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createTeamInLeague</method-name>
+ <method-params>
+ <method-param>util.TeamDetails</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getAllPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>testFinder</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createPlayer</method-name>
+ <method-params>
+ <method-param>util.PlayerDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getSportsOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getTeamsOfLeague</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersOfTeamCopy</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removePlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>createLeague</method-name>
+ <method-params>
+ <method-param>util.LeagueDetails</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getPlayersByLeagueId</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>getLeaguesOfPlayer</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>RosterEJB</ejb-name>
+ <method-intf>Remote</method-intf>
+ <method-name>removeTeam</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
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
new file mode 100644
index 0000000..03099f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-team.xml
@@ -0,0 +1,1346 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>TeamJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>LeagueEJB</display-name>
+ <ejb-name>LeagueEJB</ejb-name>
+ <home>team.LeagueHome</home>
+ <remote>team.League</remote>
+ <local-home>team.LocalLeagueHome</local-home>
+ <local>team.LocalLeague</local>
+ <ejb-class>team.LeagueBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>League</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>leagueId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>sport</field-name>
+ </cmp-field>
+ <primkey-field>leagueId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(l) from League l</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(l) from League l where l.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET</description>
+ <query-method>
+ <method-name>ejbSelectTeamsCity</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.city from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning SET Remote Interfaces</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeams</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select object(t) from Team t where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object LocalInterface</description>
+ <query-method>
+ <method-name>ejbSelectTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object RemoteInterface</description>
+ <query-method>
+ <method-name>ejbSelectRemoteTeamByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Remote</result-type-mapping>
+ <ejb-ql>select distinct Object(t) from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String</description>
+ <query-method>
+ <method-name>ejbSelectTeamsNameByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.name from League l, in(l.teams) as t where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Selector returning Set using multiple collection declarations</description>
+ <query-method>
+ <method-name>ejbSelectPlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</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>
+ <description>Selector returning Set using multiple collection declarations with remote params</description>
+ <query-method>
+ <method-name>ejbSelectRemotePlayersByLeague</method-name>
+ <method-params>
+ <method-param>team.League</method-param>
+ </method-params>
+ </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>
+ </entity>
+ <entity>
+ <display-name>TeamEJB</display-name>
+ <ejb-name>TeamEJB</ejb-name>
+ <home>team.TeamHome</home>
+ <remote>team.Team</remote>
+ <local-home>team.LocalTeamHome</local-home>
+ <local>team.LocalTeam</local>
+ <ejb-class>team.TeamBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Team</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>teamId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>city</field-name>
+ </cmp-field>
+ <primkey-field>teamId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(t) from Team t</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPlayerAndLeague</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Remote finder</description>
+ <query-method>
+ <method-name>findByPlayerAndLeagueViaRemote</method-name>
+ <method-params>
+ <method-param>team.Player</method-param>
+ <method-param>team.League</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(t) from Team t, in(t.players) as p where p = ?1 and t.league = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object int</description>
+ <query-method>
+ <method-name>ejbSelectSalaryOfPlayerInTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select p.salary from Team t, in(t.players) as p where t = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with CONCAT</description>
+ <query-method>
+ <method-name>ejbSelectByNameWithCONCAT</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = CONCAT(?1, ?2) </ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with SUBSTRING</description>
+ <query-method>
+ <method-name>ejbSelectByNameSubstring</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select t.name from Team t where t.name = SUBSTRING(?1, 5, 5)</ejb-ql>
+ </query>
+ <query>
+ <description>Selector single object String with LOCATE</description>
+ <query-method>
+ <method-name>ejbSelectNameLocate</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </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>
+ </entity>
+ <entity>
+ <display-name>PlayerEJB</display-name>
+ <ejb-name>PlayerEJB</ejb-name>
+ <home>team.PlayerHome</home>
+ <remote>team.Player</remote>
+ <local-home>team.LocalPlayerHome</local-home>
+ <local>team.LocalPlayer</local>
+ <ejb-class>team.PlayerBean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Player</abstract-schema-name>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>position</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>playerId</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>name</field-name>
+ </cmp-field>
+ <cmp-field>
+ <description>no description</description>
+ <field-name>salary</field-name>
+ </cmp-field>
+ <primkey-field>playerId</primkey-field>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p
+where p.teams is empty</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findAll</method-name>
+ <method-params />
+ </query-method>
+ <ejb-ql>select object(p) from Player p</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league.sport = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectSports</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct t.league.sport
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.salary between ?1 and ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p1)
+from Player p1, Player p2
+where p1.salary > p2.salary and
+p2.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.city = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1 and p.name = ?2</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p,
+in (p.teams) as t
+where t.league = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>ejbSelectLeagues</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </query-method>
+ <result-type-mapping>Local</result-type-mapping>
+ <ejb-ql>select distinct t.league
+from Player p, in (p.teams) as t
+where p = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.position = ?1</ejb-ql>
+ </query>
+ <query>
+ <description></description>
+ <query-method>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select distinct object(p) from Player p
+where p.name = ?1</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IN Expression</description>
+ <query-method>
+ <method-name>findByPositionsGoalkeeperOrDefender</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.position IN ('goalkeeper', 'defender')</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the LIKE Expression</description>
+ <query-method>
+ <method-name>findByNameEndingWithON</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name LIKE '%on'</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the IS NULL Expression</description>
+ <query-method>
+ <method-name>findByNullName</method-name>
+ <method-params/>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.name IS NULL</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the MEMBER OF Expression</description>
+ <query-method>
+ <method-name>findByTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where ?1 MEMBER p.teams</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the ABS function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionABS</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = ABS(?1)</ejb-ql>
+ </query>
+ <query>
+ <description>Finder using the SQRT function</description>
+ <query-method>
+ <method-name>findBySalarayWithArithmeticFunctionSQRT</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ </method-params>
+ </query-method>
+ <ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
+ </query>
+ </entity>
+ </enterprise-beans>
+ <relationships>
+ <description>League-Team</description>
+ <ejb-relation>
+ <description>Team To Player</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>players</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>PlayerEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <relationship-role-source>
+ <ejb-name>PlayerEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ <ejb-relation>
+ <description>League-Team</description>
+ <ejb-relation-name></ejb-relation-name>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>LeagueEJB</ejb-relationship-role-name>
+ <multiplicity>One</multiplicity>
+ <relationship-role-source>
+ <ejb-name>LeagueEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>teams</cmr-field-name>
+ <cmr-field-type>java.util.Collection</cmr-field-type>
+ </cmr-field>
+ </ejb-relationship-role>
+ <ejb-relationship-role>
+ <ejb-relationship-role-name>TeamEJB</ejb-relationship-role-name>
+ <multiplicity>Many</multiplicity>
+ <cascade-delete />
+ <relationship-role-source>
+ <ejb-name>TeamEJB</ejb-name>
+ </relationship-role-source>
+ <cmr-field>
+ <cmr-field-name>league</cmr-field-name>
+ </cmr-field>
+ </ejb-relationship-role>
+ </ejb-relation>
+ </relationships>
+ <assembly-descriptor>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <method-permission>
+ <unchecked />
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPrimaryKey</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getEJBLocalHome</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>isIdentical</method-name>
+ <method-params>
+ <method-param>javax.ejb.EJBLocalObject</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSport</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addTeam</method-name>
+ <method-params>
+ <method-param>team.LocalTeam</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagueId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>LeagueEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCopyOfPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeague</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>dropPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeamId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>addPlayer</method-name>
+ <method-params>
+ <method-param>team.LocalPlayer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayers</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getCity</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TeamEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getTeams</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>remove</method-name>
+ <method-params>
+ <method-param>java.lang.Object</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPosition</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySport</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findAll</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPositionAndName</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getName</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByPrimaryKey</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findNotOnTeam</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>create</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPlayerId</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSports</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getSalary</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getLeagues</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findBySalaryRange</method-name>
+ <method-params>
+ <method-param>double</method-param>
+ <method-param>double</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>getPosition</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByCity</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByHigherSalary</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>Local</method-intf>
+ <method-name>remove</method-name>
+ <method-params />
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByTest</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>PlayerEJB</ejb-name>
+ <method-intf>LocalHome</method-intf>
+ <method-name>findByLeague</method-name>
+ <method-params>
+ <method-param>team.LocalLeague</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..9ebfec5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-cmp-mappings-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-cmp-mappings-team.xml
new file mode 100644
index 0000000..5c98a0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-cmp-mappings-team.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>RosterSchema</schema>
+ <entity-mapping>
+ <ejb-name>LeagueEJB</ejb-name>
+ <table-name>LEAGUE</table-name>
+ <cmp-field-mapping>
+ <field-name>leagueId</field-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>LEAGUE.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>sport</field-name>
+ <column-name>LEAGUE.SPORT</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>PlayerEJB</ejb-name>
+ <table-name>PLAYER</table-name>
+ <cmp-field-mapping>
+ <field-name>position</field-name>
+ <column-name>PLAYER.POSITION</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>playerId</field-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>PLAYER.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>salary</field-name>
+ <column-name>PLAYER.SALARY</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>teams</cmr-field-name>
+ <column-pair>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ </entity-mapping>
+
+ <entity-mapping>
+ <ejb-name>TeamEJB</ejb-name>
+ <table-name>TEAM</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>TEAM.NAME</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>city</field-name>
+ <column-name>TEAM.CITY</column-name>
+ </cmp-field-mapping>
+ <cmp-field-mapping>
+ <field-name>teamId</field-name>
+ <column-name>TEAM.TEAM_ID</column-name>
+ </cmp-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>league</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.LEAGUE_ID</column-name>
+ <column-name>LEAGUE.LEAGUE_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+ <cmr-field-mapping>
+ <cmr-field-name>players</cmr-field-name>
+ <column-pair>
+ <column-name>TEAM.TEAM_ID</column-name>
+ <column-name>TEAMPLAYER.TEAM_ID</column-name>
+ </column-pair>
+ <column-pair>
+ <column-name>TEAMPLAYER.PLAYER_ID</column-name>
+ <column-name>PLAYER.PLAYER_ID</column-name>
+ </column-pair>
+ </cmr-field-mapping>
+
+ </entity-mapping>
+
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-ejb-jar-roster.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-ejb-jar-roster.xml
new file mode 100644
index 0000000..2005d29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-ejb-jar-roster.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>787878</unique-id>
+ <ejb>
+ <ejb-name>RosterEJB</ejb-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleLeagueExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/LeagueEJB0</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleTeamExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/TeamEJB2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimplePlayerExt</ejb-ref-name>
+ <jndi-name>localejbs/RosterApp/PlayerEJB1</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>
+ </ejb>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-ejb-jar-team.xml
new file mode 100644
index 0000000..ec54aa0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-ejb-jar-team.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <unique-id>656565</unique-id>
+ <ejb>
+ <ejb-name>LeagueEJB</ejb-name>
+ <jndi-name>MyLeague</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>
+</ejb>
+<ejb>
+<ejb-name>PlayerEJB</ejb-name>
+<jndi-name>MyPlayer</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>
+</ejb>
+<ejb>
+<ejb-name>TeamEJB</ejb-name>
+<jndi-name>MyTeam</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>
+</ejb>
+<pm-descriptors>
+<pm-descriptor>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
+<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
+</pm-descriptor>
+<pm-inuse>
+<pm-identifier>IPLANET</pm-identifier>
+<pm-version>1.0</pm-version>
+</pm-inuse>
+</pm-descriptors>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-web.xml
new file mode 100644
index 0000000..eed9769
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <jndi-name>SimpleRosterExt</jndi-name>
+ </ejb-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/web.xml
new file mode 100644
index 0000000..d4a4833
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>RosterClient</display-name>
+ <servlet>
+ <servlet-name>RosterServlet</servlet-name>
+ <display-name>RosterServlet</display-name>
+ <description>Default configuration created for servlet.</description>
+ <servlet-class>client.RosterServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RosterServlet</servlet-name>
+ <url-pattern>/Roster</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleRosterExt</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>roster.RosterHome</home>
+ <remote>roster.Roster</remote>
+ </ejb-ref>
+</web-app>
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
new file mode 100755
index 0000000..ecbb11f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/Roster.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import javax.ejb.EJBObject;
+import javax.ejb.FinderException;
+import javax.ejb.RemoveException;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Set;
+
+public interface Roster extends EJBObject {
+
+ // Players
+
+ public void createPlayer(PlayerDetails details)
+ throws RemoteException;
+
+ public void addPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public void removePlayer(String playerId)
+ throws RemoteException;
+
+ public void dropPlayer(String playerId, String teamId)
+ throws RemoteException;
+
+ public PlayerDetails getPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfTeamCopy(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersByPosition(String position)
+ throws RemoteException;
+
+ public ArrayList getPlayersByHigherSalary(String name)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySalaryRange(double low, double high)
+ throws RemoteException;
+
+ public ArrayList getPlayersByLeagueId(String leagueId)
+ throws RemoteException;
+
+ public ArrayList getPlayersBySport(String sport)
+ throws RemoteException;
+
+ public ArrayList getPlayersByCity(String city)
+ throws RemoteException;
+
+ public ArrayList getAllPlayers()
+ throws RemoteException;
+
+ public ArrayList getPlayersNotOnTeam()
+ throws RemoteException;
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) throws RemoteException;
+
+ public ArrayList getLeaguesOfPlayer(String playerId)
+ throws RemoteException;
+
+ public ArrayList getSportsOfPlayer(String playerId)
+ throws RemoteException;
+
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
+ throws RemoteException;
+
+ public ArrayList getPlayersOfLeague(String leagueId)
+ throws RemoteException;
+
+
+ public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNameEndingWithON()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithNullName()
+ throws RemoteException;
+
+ public ArrayList getPlayersWithTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
+ throws RemoteException;
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
+ // Teams
+
+ public ArrayList getTeamsOfLeague(String leagueId)
+ throws RemoteException;
+
+ public void createTeamInLeague(TeamDetails details, String leagueId)
+ throws RemoteException;
+
+ public void removeTeam(String teamId)
+ throws RemoteException;
+
+ public TeamDetails getTeam(String teamId)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey)
+ throws RemoteException;
+
+
+ public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
+
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+ public String getTeamNameVariations(String teamId) throws RemoteException;
+
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
+ throws RemoteException;
+
+
+ // Leagues
+
+ public void createLeague(LeagueDetails details)
+ throws RemoteException;
+
+ public void removeLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeague(String leagueId)
+ throws RemoteException;
+
+ public LeagueDetails getLeagueByName(String name)
+ throws RemoteException;
+
+ // Test
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
+ public ArrayList getRemotePlayersOfLeague(String leagueId) throws RemoteException;
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) throws RemoteException;
+
+ 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
new file mode 100755
index 0000000..b56aff0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterBean.java
@@ -0,0 +1,1033 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.*;
+import team.*;
+import java.rmi.RemoteException;
+
+public class RosterBean implements SessionBean {
+
+ private LocalPlayerHome playerHome = null;
+ private LocalTeamHome teamHome = null;
+ private LocalLeagueHome leagueHome = null;
+
+ private PlayerHome remPlayerHome = null;
+ private TeamHome remTeamHome = null;
+ private LeagueHome remLeagueHome = null;
+
+
+ // Player business methods
+
+ public ArrayList testFinder(String parm1, String parm2,
+ String parm3) {
+
+ Debug.print("RosterBean testFinder");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByTest(parm1, parm2, parm3);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }
+
+ public void createPlayer(PlayerDetails details) {
+
+ Debug.print("RosterBean createPlayer");
+ try {
+ 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) {
+
+ Debug.print("RosterBean addPlayer");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ team.addPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removePlayer(String playerId) {
+
+ Debug.print("RosterBean removePlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ player.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(String playerId, String teamId) {
+
+ Debug.print("RosterBean dropPlayer");
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.dropPlayer(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public PlayerDetails getPlayer(String playerId) {
+
+ Debug.print("RosterBean getPlayer");
+ PlayerDetails playerDetails = null;
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ playerDetails = new PlayerDetails(playerId,
+ player.getName(), player.getPosition(), player.getSalary());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return playerDetails;
+ } // getPlayer
+
+
+ public ArrayList getPlayersOfTeam(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeam");
+ Collection players = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ players = team.getPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersOfTeam
+
+
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
+
+ Debug.print("RosterBean getPlayersOfTeamCopy");
+ ArrayList playersList = null;
+
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ playersList = team.getCopyOfPlayers();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return playersList;
+
+ } // getPlayersOfTeamCopy
+
+
+ public ArrayList getTeamsOfLeague(String leagueId) {
+
+ Debug.print("RosterBean getTeamsOfLeague");
+
+ ArrayList detailsList = new ArrayList();
+ Collection teams = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ teams = league.getTeams();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = teams.iterator();
+ while (i.hasNext()) {
+ LocalTeam team = (LocalTeam) i.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // getTeamsOfLeague
+
+
+ public ArrayList getPlayersByPosition(String position) {
+
+ Debug.print("RosterBean getPlayersByPosition");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPosition(position);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPosition
+
+
+ public ArrayList getPlayersByHigherSalary(String name) {
+
+ Debug.print("RosterBean getPlayersByByHigherSalary");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByHigherSalary(name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByHigherSalary
+
+ public ArrayList getPlayersBySalaryRange(double low, double high) {
+
+ Debug.print("RosterBean getPlayersBySalaryRange");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySalaryRange(low, high);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySalaryRange
+
+ public ArrayList getPlayersByLeagueId(String leagueId) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+ public ArrayList getPlayersBySport(String sport) {
+
+ Debug.print("RosterBean getPlayersBySport");
+ Collection players = null;
+
+ try {
+ players = playerHome.findBySport(sport);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersBySport
+
+ public ArrayList getPlayersByCity(String city) {
+
+ Debug.print("RosterBean getPlayersByCity");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByCity(city);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByCity
+
+ public ArrayList getAllPlayers() {
+
+ Debug.print("RosterBean getAllPlayers");
+ Collection players = null;
+
+ try {
+ players = playerHome.findAll();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getAllPlayers
+
+ public ArrayList getPlayersNotOnTeam() {
+
+ Debug.print("RosterBean getPlayersNotOnTeam");
+ Collection players = null;
+
+ try {
+ players = playerHome.findNotOnTeam();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersNotOnTeam
+
+ public ArrayList getPlayersByPositionAndName(String position,
+ String name) {
+
+ Debug.print("RosterBean getPlayersByPositionAndName");
+ Collection players = null;
+
+ try {
+ players = playerHome.findByPositionAndName(position, name);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByPositionAndName
+
+ public ArrayList getLeaguesOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getLeaguesOfPlayer");
+ ArrayList detailsList = new ArrayList();
+ Collection leagues = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ leagues = player.getLeagues();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = leagues.iterator();
+ while (i.hasNext()) {
+ LocalLeague league = (LocalLeague) i.next();
+ LeagueDetails details = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ detailsList.add(details);
+ }
+ return detailsList;
+ } // getLeaguesOfPlayer
+
+ public ArrayList getSportsOfPlayer(String playerId) {
+
+ Debug.print("RosterBean getSportsOfPlayer");
+ ArrayList sportsList = new ArrayList();
+ Collection sports = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerId);
+ sports = player.getSports();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator i = sports.iterator();
+ while (i.hasNext()) {
+ String sport = (String) i.next();
+ sportsList.add(sport);
+ }
+ return sportsList;
+ } // getSportsOfPlayer
+
+ // Team business methods
+
+ public void createTeamInLeague(TeamDetails details, String leagueId) {
+
+ Debug.print("RosterBean createTeamInLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ LocalTeam team = teamHome.create(details.getId(),
+ details.getName(), details.getCity());
+ league.addTeam(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeTeam(String teamId) {
+
+ Debug.print("RosterBean removeTeam");
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ team.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public TeamDetails getTeam(String teamId) {
+
+ Debug.print("RosterBean getTeam");
+ TeamDetails teamDetails = null;
+ try {
+ LocalTeam team = teamHome.findByPrimaryKey(teamId);
+ teamDetails = new TeamDetails(teamId,
+ team.getName(), team.getCity());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return teamDetails;
+ }
+
+
+ // League business methods
+
+ public void createLeague(LeagueDetails details) {
+
+ Debug.print("RosterBean createLeague");
+ try {
+ LocalLeague league = leagueHome.create(details.getId(),
+ details.getName(), details.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void removeLeague(String leagueId) {
+
+ Debug.print("RosterBean removeLeague");
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ league.remove();
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public LeagueDetails getLeague(String leagueId) {
+
+ Debug.print("RosterBean getLeague");
+ LeagueDetails leagueDetails = null;
+ try {
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueId);
+ leagueDetails = new LeagueDetails(leagueId,
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ return leagueDetails;
+ }
+
+ // SessionBean methods
+
+ public void ejbCreate() throws CreateException {
+
+ Debug.print("RosterBean ejbCreate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+ } catch (NamingException ex) {
+ throw new CreateException(ex.getMessage());
+ }
+ }
+
+ public void ejbActivate() {
+
+ Debug.print("RosterBean ejbActivate");
+ try {
+ playerHome = lookupPlayer();
+ teamHome = lookupTeam();
+ leagueHome = lookupLeague();
+ remPlayerHome = lookupRemotePlayer();
+ remTeamHome = lookupRemoteTeam();
+ remLeagueHome = lookupRemoteLeague();
+
+ } catch (NamingException ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void ejbPassivate() {
+
+ playerHome = null;
+ teamHome = null;
+ leagueHome = null;
+ remPlayerHome = null;
+ remTeamHome = null;
+ remLeagueHome = null;
+
+ }
+
+ 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();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ private ArrayList copyRemotePlayersToDetails(Collection players) throws RemoteException {
+
+ ArrayList detailsList = new ArrayList();
+ Iterator i = players.iterator();
+
+ while (i.hasNext()) {
+ Player player = (Player) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), player.getSalary());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ } // copyPlayersToDetails
+
+ /**
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ */
+ public void cleanUp() {
+ Debug.print("Cleaning up the database");
+ Collection toClean = null;
+ Iterator it = null;
+
+ try {
+ //removing the player EJBs
+ toClean = playerHome.findAll();
+ it = toClean.iterator();
+ 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!");
+ } 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 {
+ LocalLeague league = leagueHome.findByName(name);
+ leagueDetails = new LeagueDetails(league.getLeagueId(),
+ league.getName(), league.getSport());
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return leagueDetails;
+ }
+ // getLeagueByName()
+
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeague(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeague");
+ ArrayList detailsList = new ArrayList();
+ Collection teamsColl = null;
+
+ try {
+ LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ LocalTeam team = (LocalTeam) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param playerKey
+ * @param leagueKey
+ * @return
+ */
+ public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
+ String leagueKey) {
+
+ Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
+ 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);
+ Debug.print(" ----- League found");
+ teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
+ Debug.print(" ----- Team found");
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ try {
+ Iterator it = teamsColl.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param city
+ * @return
+ */
+ public Set getCitiesOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
+ LocalLeague league;
+ Set cities;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ cities = league.getCitiesOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return cities;
+ }// getCitiesOfLeague()
+
+
+ public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
+
+ Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
+ ArrayList detailsList = new ArrayList();
+ League league;
+ Set teams;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ teams = league.getRemoteTeamsOfThisLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ try {
+ Iterator it = teams.iterator();
+ while (it.hasNext()) {
+ Team team = (Team) it.next();
+ TeamDetails details = new TeamDetails(team.getTeamId(),
+ team.getName(), team.getCity());
+ detailsList.add(details);
+ }
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return detailsList;
+ }
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ LocalTeam team;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ team = league.getTeamByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ }// getTeamOfLeagueByCity()
+
+
+ /**
+ *
+ * @param leagueKey
+ * @param city
+ * @return
+ */
+ public String getTeamsNameOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
+ LocalLeague league;
+ String teamName;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueKey);
+ teamName = league.getTeamsNameByCity(city);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return teamName;
+
+ }// getTeamsNameOfLeagueByCity()
+
+
+ /**
+ *
+ * @param teamID
+ * @param playerName
+ * @return
+ */
+ public double getSalaryOfPlayerFromTeam(String teamID, String playerName) {
+ Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
+ LocalTeam team;
+ double salary;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return salary;
+ }// getSalaryOfPlayerFromTeam()
+
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getPlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getPlayersOfLeague(leagueId)");
+ LocalLeague league;
+ Set players;
+
+ try {
+ league = leagueHome.findByPrimaryKey(leagueId);
+ players = league.getPlayersFromLeague();
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersOfLeague()
+
+ /**
+ *
+ * @param leagueId
+ * @return
+ */
+ public ArrayList getRemotePlayersOfLeague(String leagueId) {
+ Debug.print("RosterBean getRemotePlayersOfLeague(leagueId)");
+ League league;
+ Collection players;
+ ArrayList result;
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueId);
+ players = league.getRemotePlayersFromLeague();
+ result = copyRemotePlayersToDetails(players);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ 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
+ */
+ public ArrayList getPlayersWithTeam(String teamId) {
+ Debug.print("RosterBean getPlayersWithTeam(teamId)");
+ LocalTeam team;
+ Collection players = null;
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ players = playerHome.findByTeam(team);
+ }
+ catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ }// getPlayersWithTeam()
+
+
+ /**
+ *
+ * @param teamId
+ * @return
+ */
+ public String getTeamNameVariations(String teamId) {
+ Debug.print("RosterBean getTeamNameVariations(teamId)");
+ LocalTeam team;
+ StringBuffer out = new StringBuffer();
+
+ try {
+ team = teamHome.findByPrimaryKey(teamId);
+ Debug.print("--- CONCAT");
+ out.append(team.getTeamNameWithStringfunctionTests1());
+ Debug.print("--- SUBSTRING");
+ out.append(team.getTeamNameWithStringfunctionTests2());
+ Debug.print("--- LOCATE AND LENGTH");
+ out.append(team.getTeamNameWithStringfunctionTests3());
+ }
+ catch (Exception ex) {
+ 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
+ */
+ public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city) {
+ Debug.print("RosterBean getRemoteTeamOfLeagueByCity(leagueKey, city)");
+ League league;
+ Team team;
+ TeamDetails teamDetails;
+
+ try {
+ league = remLeagueHome.findByPrimaryKey(leagueKey);
+ team = league.getRemoteTeamByCity(city);
+ 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) {
+
+ Debug.print("RosterBean getPlayersByLeagueId");
+ Collection players = null;
+
+ try {
+ LocalLeague league = null; //leagueHome.findByPrimaryKey(leagueId);
+ players = playerHome.findByLeague(league);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+
+ return copyPlayersToDetails(players);
+ } // getPlayersByLeagueId
+
+
+} // 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
new file mode 100755
index 0000000..6dfcc41
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package roster;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.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
new file mode 100755
index 0000000..caa955e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/League.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.Set;
+import javax.ejb.FinderException;
+
+
+public interface League extends javax.ejb.EJBObject {
+
+ public String getLeagueId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getSport() throws RemoteException;
+ public Collection getTeams() throws RemoteException;
+
+ public Team getRemoteTeamByCity(String city) throws FinderException,
+ RemoteException;
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
+ RemoteException;
+
+ public Collection getRemotePlayersFromLeague() throws FinderException,
+ RemoteException;
+
+// public void addTeam(Team team) throws RemoteException;
+// public void dropTeam(Team team) throws RemoteException;
+
+// public Set getCitiesOfThisLeague() throws FinderException;
+// public String getTeamsNameByCity(String city) throws FinderException;
+}
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
new file mode 100755
index 0000000..d9f348a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueBean.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class LeagueBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getLeagueId();
+ public abstract void setLeagueId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getSport();
+ public abstract void setSport(String sport);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Set ejbSelectTeamsCity(LocalLeague league)
+ throws FinderException;
+
+ public abstract Set ejbSelectRemoteTeams(League league)
+ throws FinderException;
+
+
+ public abstract LocalTeam ejbSelectTeamByCity(String city)
+ throws FinderException;
+
+ public abstract Team ejbSelectRemoteTeamByCity(String city)
+ throws FinderException;
+
+ 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 =
+ (team.LocalLeague)context.getEJBLocalObject();
+
+ return ejbSelectTeamsCity(league);
+ }
+
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException {
+
+ League league = (team.League)context.getEJBObject();
+
+ 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");
+ try {
+ Collection teams = getTeams();
+ teams.add(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropTeam(LocalTeam team) {
+
+ Debug.print("TeamBean dropTeam");
+ try {
+ Collection teams = getTeams();
+ teams.remove(team);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String sport)
+ throws CreateException {
+
+ Debug.print("LeagueBean ejbCreate");
+ setLeagueId(id);
+ setName(name);
+ 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
new file mode 100755
index 0000000..e8809e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface LeagueHome extends javax.ejb.EJBHome {
+
+ public League create (String id, String name, String sport)
+ throws CreateException, RemoteException;
+
+ public League findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public League findByName(String name)
+ 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
new file mode 100755
index 0000000..3f93dd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeague.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalLeague extends EJBLocalObject {
+
+ public String getLeagueId();
+ public String getName();
+ public String getSport();
+ public Collection getTeams();
+
+ public void addTeam(LocalTeam team);
+ public void dropTeam(LocalTeam team);
+
+ public Set getCitiesOfThisLeague() throws FinderException;
+ 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
new file mode 100755
index 0000000..c467a5e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeagueHome.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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()
+ throws FinderException;
+
+ public LocalLeague findByName(String name)
+ throws FinderException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayer.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayer.java
new file mode 100755
index 0000000..e8846dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayer.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalPlayer extends EJBLocalObject {
+
+ public String getPlayerId();
+ public String getName();
+ public String getPosition();
+ public double getSalary();
+ public Collection getTeams();
+ public Collection getLeagues() throws FinderException;
+ public Collection getSports() 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
new file mode 100755
index 0000000..d858503
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayerHome.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.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)
+ throws FinderException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException;
+
+ public Collection findByLeague(LocalLeague league)
+ throws FinderException;
+
+ public Collection findBySport(String sport)
+ throws FinderException;
+
+ public Collection findByCity(String city)
+ throws FinderException;
+
+ public Collection findAll()
+ throws FinderException;
+
+ public Collection findNotOnTeam()
+ throws FinderException;
+
+ 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;
+
+ public Collection findByNameEndingWithON()
+ throws FinderException;
+
+ public Collection findByNullName()
+ throws FinderException;
+
+ public Collection findByTeam(LocalTeam team)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
+ throws FinderException;
+
+ public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
+ 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
new file mode 100755
index 0000000..f8ad6c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeam.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+
+public interface LocalTeam extends EJBLocalObject {
+
+ public String getTeamId();
+ public String getName();
+ public String getCity();
+ public Collection getPlayers();
+ public LocalLeague getLeague();
+
+ public ArrayList getCopyOfPlayers();
+ public void addPlayer(LocalPlayer player);
+ public void dropPlayer(LocalPlayer player);
+ public double getSalaryOfPlayer(String playerName);
+ 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
new file mode 100755
index 0000000..ac2f66c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeamHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.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()
+ throws FinderException;
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
+ LocalLeague league)
+ throws FinderException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/Player.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/Player.java
new file mode 100755
index 0000000..a35d838
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/Player.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.FinderException;
+
+public interface Player extends javax.ejb.EJBObject {
+
+ public String getPlayerId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getPosition() throws RemoteException;
+ public double getSalary() throws RemoteException;
+// public Collection getTeams() throws RemoteException;
+// public Collection getLeagues() throws FinderException, RemoteException;
+// public Collection getSports() throws FinderException, RemoteException;
+
+}
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
new file mode 100755
index 0000000..2e2d79a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerBean.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+
+public abstract class PlayerBean implements EntityBean {
+
+ private EntityContext context;
+
+ // 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);
+
+ public abstract String getPosition();
+ public abstract void setPosition(String position);
+
+ public abstract double getSalary();
+ public abstract void setSalary(double salary);
+
+ // Access methods for relationship fields
+
+ public abstract Collection getTeams();
+ public abstract void setTeams(Collection teams);
+
+ // Select methods
+
+ public abstract Collection ejbSelectLeagues(LocalPlayer player)
+ throws FinderException;
+
+ public abstract Collection ejbSelectSports(LocalPlayer player)
+ throws FinderException;
+
+
+
+ // Business methods
+
+ public Collection getLeagues() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectLeagues(player);
+ }
+
+ public Collection getSports() throws FinderException {
+
+ LocalPlayer player =
+ (team.LocalPlayer)context.getEJBLocalObject();
+ return ejbSelectSports(player);
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String position,
+ double salary) throws CreateException {
+
+ Debug.print("PlayerBean ejbCreate");
+ setPlayerId(id);
+ setName(name);
+ setPosition(position);
+ 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
new file mode 100755
index 0000000..1608787
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerHome.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface PlayerHome extends javax.ejb.EJBHome {
+
+ 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)
+ throws FinderException, RemoteException;
+
+ public Collection findByHigherSalary(String name)
+ throws FinderException, RemoteException;
+
+ public Collection findBySalaryRange(double low, double high)
+ throws FinderException, RemoteException;
+
+// public Collection findByLeague(League league)
+// throws FinderException, RemoteException;
+
+ public Collection findBySport(String sport)
+ throws FinderException, RemoteException;
+
+ public Collection findByCity(String city)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findNotOnTeam()
+ throws FinderException, RemoteException;
+
+ public Collection findByPositionAndName(String position,
+ String name) throws FinderException, RemoteException;
+
+ public Collection findByTest (String parm1, String parm2, String parm3)
+ throws FinderException, RemoteException;
+
+
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/RosterSchema.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/RosterSchema.dbschema
new file mode 100644
index 0000000..7e90bea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/RosterSchema.dbschema
@@ -0,0 +1,1234 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement335787804">
+ <versionNo>2</versionNo>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl4508150">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement335787804"/>
+ </element>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2574618">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <_username>IASCTS</_username>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_url>jdbc:oracle:thin:@petruccio:1521:ORCL1</_url>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3179125">
+ <name>DatabaseSchema</name>
+ </OBJECT>
+ </_name>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15799662">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1296776513">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316">
+ <table>LEAGUE</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5649494">
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13029737">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
+ <value>255</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14572800">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-758477032">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11255404">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-758477032"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6470099">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2032884633">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl9826764">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2032884633"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3511340">
+ <name>SPORT</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9638098">
+ <name>LEAGUE</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection4353506">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-573464718">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-573464718">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl3494782">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection692735">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-573464718"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16550222">
+ <name>SYS_C0056942</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1296776513"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl10121027">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection347201">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl10121027"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-573464718"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16691100">
+ <name>SYS_C0056942</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection8786660">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-573464718"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12909316"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1417774579">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987">
+ <table>PLAYER</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16190401">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl12912375">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4999735">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-369105498">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10258960">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-369105498"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2900371">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement899610308">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8736201">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement899610308"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11920937">
+ <name>POSITION</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1915016741">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1685678">
+ <_precision>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer126">
+ <value>126</value>
+ </OBJECT>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1915016741"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11259399">
+ <name>SALARY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>8</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer126"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6500473">
+ <name>PLAYER</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection597588">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement726042623">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement726042623">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl229936">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2010459">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement726042623"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5789117">
+ <name>SYS_C0056941</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1417774579"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6619132">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11327826">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6619132"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement726042623"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14817767">
+ <name>SYS_C0056941</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2412752">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement726042623"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl12269987"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1865272815">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456">
+ <table>TEAM</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection472061">
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10814618">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13712942">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1894275594">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4811138">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1894275594"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11407862">
+ <name>CITY</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1894595370">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1917264">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1894595370"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11215786">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement355764204">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11702295">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement355764204"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1183826">
+ <name>LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>true</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15562893">
+ <name>TEAM</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6648045">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1588061818">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl8759907">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16684370">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-47380209">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1915455298"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement355764204"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl7696990">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-47380209"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10986134">
+ <name>LEAGUE_ID;LEAGUE_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl8759907"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1588061818"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10702385">
+ <name>SYS_C0056944</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1588061819">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl6464516">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection4674651">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16658680">
+ <name>SYS_C0056943</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1865272815"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl4254413">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16599651">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl4254413"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1588061819"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16213371">
+ <name>SYS_C0056943</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15087611">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1588061819"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl1232456"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-425529968">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644">
+ <table>TEAMPLAYER</table>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15938414">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement435745883">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4302978">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10352157">
+ <name>PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl8988616">
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </element>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9626034">
+ <name>TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ <_isNullable>false</_isNullable>
+ <_type>12</_type>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_length>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier2074594">
+ <name>TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <isTable>true</isTable>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5629266">
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327672">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl4647707">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16091662">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1595789890">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1461015298"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl16087518">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1595789890"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1309711">
+ <name>PLAYER_ID;PLAYER_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl4647707"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327672"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier615111">
+ <name>SYS_C0056947</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327673">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl3418918">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection3848924">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement1218289538">
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1435715266"/>
+ </_referencedColumn>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </_localColumn>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl16582237">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement1218289538"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11330553">
+ <name>TEAM_ID;TEAM_ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl3418918"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1746327673"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11213920">
+ <name>SYS_C0056946</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-445985692">
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-445985692">
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl13895785">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5337256">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-445985692"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7611883">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </tei>
+ <_unique>true</_unique>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </_associatedIndex>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-425529968"/>
+ </declaringTable>
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6658245">
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12703139">
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement435745883"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1700571103"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl6658245"/>
+ </owner>
+ </OBJECT>
+ </columns>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-445985692"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1106834">
+ <name>PK_TEAMPLAYER</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </keys>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11904202">
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-445985692"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl2597644"/>
+ </owner>
+ </OBJECT>
+ </indexes>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl4508150"/>
+ </owner>
+ </OBJECT>
+ </tables>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.6.0.0 - Production</_databaseProductVersion>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13405425">
+ <name>IASCTS</name>
+ </OBJECT>
+ </_schema>
+ <_databaseProductName>Oracle</_databaseProductName>
+ </OBJECT>
+ </impl>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/Team.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/Team.java
new file mode 100755
index 0000000..8935cf1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/Team.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+
+public interface Team extends javax.ejb.EJBObject {
+
+ public String getTeamId() throws RemoteException;
+ public String getName() throws RemoteException;
+ public String getCity() throws RemoteException;
+// public Collection getPlayers() throws RemoteException;
+// public League getLeague() throws RemoteException;
+
+ public ArrayList getCopyOfPlayers() throws RemoteException;
+// public void addPlayer(Player player) throws RemoteException;
+// public void dropPlayer(Player player) throws RemoteException;
+ public double getSalaryOfPlayer(String playerName) throws RemoteException;
+}
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
new file mode 100755
index 0000000..4f6e907
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamBean.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.util.*;
+import javax.ejb.*;
+import javax.naming.*;
+import util.Debug;
+import util.PlayerDetails;
+
+public abstract class TeamBean implements EntityBean {
+
+ private EntityContext context;
+
+ // Access methods for persistent fields
+
+ public abstract String getTeamId();
+ public abstract void setTeamId(String id);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ public abstract String getCity();
+ public abstract void setCity(String city);
+
+
+ // Access methods for relationship fields
+
+ public abstract Collection getPlayers();
+ public abstract void setPlayers(Collection players);
+
+ public abstract LocalLeague getLeague();
+ public abstract void setLeague(LocalLeague league);
+
+ // Select methods
+
+ public abstract double ejbSelectSalaryOfPlayerInTeam(LocalTeam team, String playerName)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
+ throws FinderException;
+
+ public abstract String ejbSelectByNameSubstring(String substring)
+ throws FinderException;
+
+ public abstract String ejbSelectNameLocate(String substring)
+ 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(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");
+ ArrayList playerList = new ArrayList();
+ Collection players = getPlayers();
+
+ Iterator i = players.iterator();
+ while (i.hasNext()) {
+ LocalPlayer player = (LocalPlayer) i.next();
+ PlayerDetails details = new PlayerDetails(player.getPlayerId(),
+ player.getName(), player.getPosition(), 0.00);
+ playerList.add(details);
+ }
+
+ return playerList;
+ }
+
+ public void addPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean addPlayer");
+ try {
+ Collection players = getPlayers();
+ players.add(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ public void dropPlayer(LocalPlayer player) {
+
+ Debug.print("TeamBean dropPlayer");
+ try {
+ Collection players = getPlayers();
+ players.remove(player);
+ } catch (Exception ex) {
+ throw new EJBException(ex.getMessage());
+ }
+ }
+
+ // EntityBean methods
+
+ public String ejbCreate (String id, String name, String city)
+ throws CreateException {
+
+ Debug.print("TeamBean ejbCreate");
+ setTeamId(id);
+ setName(name);
+ 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() { }
+
+
+} // TeamBean class
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
new file mode 100755
index 0000000..6ac99d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamHome.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package team;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+
+public interface TeamHome extends javax.ejb.EJBHome {
+
+ public Team create (String id, String name, String city)
+ throws CreateException, RemoteException;
+
+ public Team findByPrimaryKey (String id)
+ throws FinderException, RemoteException;
+
+ public Collection findAll()
+ throws FinderException, RemoteException;
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
+ League league)
+ throws FinderException, RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/Debug.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/Debug.java
new file mode 100644
index 0000000..a914914
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/Debug.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * This class makes it easier to print out debug statements.
+ * The Debug.print statements are printed to System.err
+ * if debuggingOn = true.
+ */
+
+package util;
+
+public final class Debug {
+
+ public static final boolean debuggingOn = true;
+
+ public static final void print(String msg) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ }
+ }
+
+ public static final void print(String msg, Object object) {
+
+ if (debuggingOn) {
+ System.err.println("Debug: " + msg);
+ System.err.println(" " + object.getClass().getName());
+ }
+ }
+
+} // Debug
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/LeagueDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/LeagueDetails.java
new file mode 100644
index 0000000..2e0a4f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/LeagueDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class LeagueDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String sport;
+
+ public LeagueDetails (String id, String name, String sport) {
+
+ this.id = id;
+ this.name = name;
+ this.sport = sport;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSport() {
+ return sport;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + sport;
+ return s;
+ }
+
+} // LeagueDetails
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
new file mode 100644
index 0000000..81041c2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/PlayerDetails.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class PlayerDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String position;
+ private double salary;
+
+ public PlayerDetails (String id, String name, String position,
+ double salary) {
+
+ this.id = id;
+ this.name = name;
+ this.position = position;
+ this.salary = salary;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPosition() {
+ return position;
+ }
+
+ public double getSalary() {
+ return salary;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + position + " " + salary;
+ return s;
+ }
+
+
+} // PlayerDetails
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/TeamDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/TeamDetails.java
new file mode 100644
index 0000000..486aa4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/TeamDetails.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package util;
+
+public class TeamDetails implements java.io.Serializable {
+
+ private String id;
+ private String name;
+ private String city;
+
+ public TeamDetails (String id, String name, String city) {
+
+ this.id = id;
+ this.name = name;
+ this.city = city;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public String toString() {
+ String s = id + " " + name + " " + city;
+ return s;
+ }
+
+} // TeamDetails
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
new file mode 100644
index 0000000..4fe3dc3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/servlet/RosterServlet.java
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package client;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import roster.Roster;
+import roster.RosterHome;
+import util.LeagueDetails;
+import util.PlayerDetails;
+import util.TeamDetails;
+import java.util.Iterator;
+import java.util.Set;
+
+public class RosterServlet extends HttpServlet{
+
+ private PrintWriter out = null;
+
+ /** Handles the HTTP <code>GET</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /** Handles the HTTP <code>POST</code> method.
+ * @param request servlet request
+ * @param response servlet response
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, java.io.IOException {
+ processRequest(request, response);
+ }
+
+ /**
+ *
+ * @param req
+ * @param res
+ * @throws ServletException
+ * @throws IOException
+ */
+ private void processRequest(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException {
+
+ res.setContentType("text/html");
+ out = res.getWriter();
+
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>RosterApp Servlet-Client</title>");
+ out.println("</head>");
+ out.println("<body>");
+
+ try {
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/SimpleRoster");
+
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome.class);
+
+ Roster myRoster = home.create();
+
+ // deleting all exisiting DB-entries
+ myRoster.cleanUp();
+
+ insertInfo(myRoster);
+ getSomeInfo(myRoster);
+
+ getMoreInfo(myRoster);
+
+ } catch (Exception ex) {
+ out.println("Caught an exception:");
+ ex.printStackTrace(out);
+ ex.printStackTrace();
+ }
+
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getSomeInfo(Roster myRoster) {
+
+ try {
+
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ printDetailsList(playerList, out);
+
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // getSomeInfo
+
+
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void getMoreInfo(Roster myRoster) {
+
+ try {
+
+ LeagueDetails leagueDetails;
+ TeamDetails teamDetails;
+ PlayerDetails playerDetails;
+ ArrayList playerList;
+ ArrayList teamList;
+ ArrayList leagueList;
+ ArrayList sportList;
+
+ leagueDetails = myRoster.getLeague("L1");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamDetails = myRoster.getTeam("T3");
+ out.println("<BR>" + teamDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerDetails = myRoster.getPlayer("P20");
+ out.println("<BR>" + playerDetails.toString());
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfTeam("T2");
+ printDetailsList(playerList, out);
+
+ teamList = myRoster.getTeamsOfLeague("L1");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getPlayersByPosition("defender");
+ playerList = myRoster.getAllPlayers();
+ playerList = myRoster.getPlayersNotOnTeam();
+ playerList = myRoster.getPlayersByPositionAndName("power forward",
+ "Jack Patterson");
+ playerList = myRoster.getPlayersByCity("Truckee");
+ playerList = myRoster.getPlayersBySport("Soccer");
+ playerList = myRoster.getPlayersByLeagueId("L1");
+
+ playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
+ out.println("<BR>/////////////////////////////////////////////");
+ printDetailsList(playerList, out);
+ out.println("<BR>/////////////////////////////////////////////");
+ playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
+ playerList = myRoster.getPlayersOfTeamCopy("T5");
+
+ leagueList = myRoster.getLeaguesOfPlayer("P28");
+ printDetailsList(leagueList, out);
+
+ sportList = myRoster.getSportsOfPlayer("P28");
+ printDetailsList(sportList, out);
+
+ /****************************************************************
+ *
+ * new additions!!!!
+ *
+ ****************************************************************/
+ leagueDetails = myRoster.getLeagueByName("Valley");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ leagueDetails = myRoster.getLeagueByName("Mountain");
+ out.println("<BR>" + leagueDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ teamList = myRoster.getTeamsByPlayerAndLeague("P1", "L1");
+ printDetailsList(teamList, out);
+
+ Set cities = myRoster.getCitiesOfLeague("L2");
+ Iterator it = cities.iterator();
+ while (it.hasNext()) {
+ out.println("<BR>" + it.next());
+ }
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ teamDetails = myRoster.getTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getTeamsNameOfLeagueByCity("L2", "Truckee"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ out.println("<BR>" + myRoster.getSalaryOfPlayerFromTeam("T3", "Ben Shore"));
+ out.println("<BR> ----------------------------------------------------------");
+
+ playerList = myRoster.getPlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithPositionsGoalkeeperOrDefender();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNameEndingWithON();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithNullName();
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithTeam("T5");
+ printDetailsList(playerList, out);
+
+ out.println("<BR>" + myRoster.getTeamNameVariations("T5"));
+ out.println("<BR> ----------------------------------------------------------");
+
+
+ playerList = myRoster.getPlayersWithSalaryUsingABS(100.1212121);
+ printDetailsList(playerList, out);
+
+ playerList = myRoster.getPlayersWithSalaryUsingSQRT(10000);
+ printDetailsList(playerList, out);
+
+
+ //remote calls
+ teamList = myRoster.getTeamsByPlayerAndLeagueViaRemote("P1", "L1");
+ printDetailsList(teamList, out);
+
+ teamDetails = myRoster.getRemoteTeamOfLeagueByCity("L2", "Truckee");
+ out.println("<BR>" + teamDetails.toString());
+ out.println("<BR> ----------------------------------------------------------");
+
+
+
+ teamList = myRoster.getRemoteTeamsOfLeague("L2");
+ printDetailsList(teamList, out);
+
+ playerList = myRoster.getRemotePlayersOfLeague("L2");
+ printDetailsList(playerList, out);
+
+
+ // internal NULL - parameter for finder
+ playerList = myRoster.getPlayersByLeagueIdWithNULL("L1");
+ printDetailsList(playerList, out);
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+
+
+ } // getMoreInfo
+
+
+ /**
+ *
+ * @param list
+ * @param out
+ */
+ private void printDetailsList(ArrayList list, PrintWriter out) {
+
+ Iterator i = list.iterator();
+ while (i.hasNext()) {
+ Object details = (Object)i.next();
+ out.println("<BR>" + details.toString());
+ }
+ out.println();
+ out.println("<BR> ----------------------------------------------------------");
+ } // printDetailsList
+
+
+ /**
+ *
+ * @param myRoster
+ */
+ private void insertInfo(Roster myRoster) {
+
+ try {
+ // Leagues
+
+ myRoster.createLeague(new LeagueDetails(
+ "L1", "Mountain", "Soccer"));
+
+ myRoster.createLeague(new LeagueDetails(
+ "L2", "Valley", "Basketball"));
+
+ // Teams
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T1", "Honey Bees", "Visalia"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T2", "Gophers", "Manteca"), "L1");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T3", "Deer", "Bodie"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T4", "Trout", "Truckee"), "L2");
+
+ myRoster.createTeamInLeague(new TeamDetails(
+ "T5", "Crows", "Orland"), "L1");
+
+ // Players, Team T1
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P1", "Phil Jones", "goalkeeper", 100.00));
+ myRoster.addPlayer("P1", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P2", "Alice Smith", "defender", 505.00));
+ myRoster.addPlayer("P2", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P3", "Bob Roberts", "midfielder", 65.00));
+ myRoster.addPlayer("P3", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P4", "Grace Phillips", "forward", 100.00));
+ myRoster.addPlayer("P4", "T1");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P5", "Barney Bold", "defender", 100.00));
+ myRoster.addPlayer("P5", "T1");
+
+ // Players, Team T2
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P6", "Ian Carlyle", "goalkeeper", 555.00));
+ myRoster.addPlayer("P6", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P7", "Rebecca Struthers", "midfielder", 777.00));
+ myRoster.addPlayer("P7", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P8", "Anne Anderson", "forward", 65.00));
+ myRoster.addPlayer("P8", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P9", "Jan Wesley", "defender", 100.00));
+ myRoster.addPlayer("P9", "T2");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P10", "Terry Smithson", "midfielder", 100.00));
+ myRoster.addPlayer("P10", "T2");
+
+ // Players, Team T3
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P11", "Ben Shore", "point guard", 188.00));
+ myRoster.addPlayer("P11", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P12", "Chris Farley", "shooting guard", 577.00));
+ myRoster.addPlayer("P12", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P13", "Audrey Brown", "small forward", 995.00));
+ myRoster.addPlayer("P13", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P14", "Jack Patterson", "power forward", 100.00));
+ myRoster.addPlayer("P14", "T3");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P15", "Candace Lewis", "point guard", 100.00));
+ myRoster.addPlayer("P15", "T3");
+
+ // Players, Team T4
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P16", "Linda Berringer", "point guard", 844.00));
+ myRoster.addPlayer("P16", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P17", "Bertrand Morris", "shooting guard", 452.00));
+ myRoster.addPlayer("P17", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P18", "Nancy White", "small forward", 833.00));
+ myRoster.addPlayer("P18", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P19", "Billy Black", "power forward", 444.00));
+ myRoster.addPlayer("P19", "T4");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P20", "Jodie James", "point guard", 100.00));
+ myRoster.addPlayer("P20", "T4");
+
+ // Players, Team T5
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P21", "Henry Shute", "goalkeeper", 205.00));
+ myRoster.addPlayer("P21", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P22", "Janice Walker", "defender", 857.00));
+ myRoster.addPlayer("P22", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P23", "Wally Hendricks", "midfielder", 748.00));
+ myRoster.addPlayer("P23", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P24", "Gloria Garber", "forward", 777.00));
+ myRoster.addPlayer("P24", "T5");
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P25", "Frank Fletcher", "defender", 399.00));
+ myRoster.addPlayer("P25", "T5");
+
+ // Players, no team
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P26", "Hobie Jackson", "pitcher", 582.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P27", "Melinda Kendall", "catcher", 677.00));
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P99", null, "_", 666.66));
+
+ // Players, multiple teams
+
+ myRoster.createPlayer(new PlayerDetails(
+ "P28", "Constance Adams", "substitue", 966.00));
+ myRoster.addPlayer("P28", "T1");
+ myRoster.addPlayer("P28", "T3");
+
+
+
+
+ } catch (Exception ex) {
+ System.err.println("Caught an exception:");
+ ex.printStackTrace();
+ }
+
+ } // insertInfo
+
+
+}
+
+
+
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
new file mode 100755
index 0000000..be0c918
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_db2.sql
@@ -0,0 +1,41 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+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)
+);
+
+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)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..5ece60e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_derby.sql
@@ -0,0 +1,37 @@
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+CREATE TABLE PLAYER
+(
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE LEAGUE
+(
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+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)
+);
+
+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)
+);
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
new file mode 100755
index 0000000..bb4d86c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ifx.sql
@@ -0,0 +1,41 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ position VARCHAR(127),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ sport VARCHAR(127)
+);
+
+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)
+);
+
+CREATE TABLE TeamPlayer
+(
+ 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)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..787488f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mssql.sql
@@ -0,0 +1,40 @@
+drop table TEAMPLAYER
+drop table PLAYER
+drop table TEAM
+drop TABLE LEAGUE
+go
+
+create table PLAYER
+(
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
+)
+
+create table LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+)
+
+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)
+)
+
+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)
+)
+
+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
new file mode 100755
index 0000000..d763757
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mysql.sql
@@ -0,0 +1,38 @@
+DROP TABLE TEAMPLAYER ;
+DROP TABLE PLAYER ;
+DROP TABLE TEAM ;
+DROP TABLE LEAGUE ;
+
+CREATE TABLE PLAYER
+(
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL
+) ENGINE=INNODB;
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE TEAM
+(
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE TEAMPLAYER
+(
+ PLAYER_ID VARCHAR(255),
+ TEAM_ID VARCHAR(255),
+ CONSTRAINT PK_TEAMPLAYER PRIMARY KEY (PLAYER_ID, TEAM_ID)
+) ENGINE=INNODB;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..4b4a547
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ora.sql
@@ -0,0 +1,41 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+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)
+);
+
+CREATE TABLE TeamPlayer
+(
+ 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)
+);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..3f6f5d2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_pbs.sql
@@ -0,0 +1,48 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
+
+commit;
+
+CREATE TABLE Player
+(
+ player_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
+);
+
+commit;
+
+CREATE TABLE League
+(
+ league_Id VARCHAR(255) PRIMARY KEY,
+ name VARCHAR(255),
+ sport VARCHAR(255)
+);
+
+commit;
+
+CREATE TABLE Team
+(
+ 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
+(
+ 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;
+
+quit;
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
new file mode 100755
index 0000000..a6baf3e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_psql.sql
@@ -0,0 +1,45 @@
+DROP TABLE TEAMPLAYER cascade;
+DROP TABLE PLAYER cascade;
+DROP TABLE TEAM cascade;
+DROP TABLE LEAGUE cascade;
+
+CREATE TABLE PLAYER
+(
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL
+);
+#);
+
+CREATE TABLE LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+) ;
+#);
+
+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)
+);
+#);
+
+CREATE TABLE TEAMPLAYER
+(
+ 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)
+);
+#);
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..0c73ef3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_syb.sql
@@ -0,0 +1,40 @@
+drop table TEAMPLAYER
+drop table PLAYER
+drop table TEAM
+drop TABLE LEAGUE
+go
+
+create table PLAYER
+(
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
+)
+
+create table LEAGUE
+(
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
+)
+
+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)
+)
+
+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)
+)
+
+go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/drop_RosterApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/drop_RosterApp_derby.sql
new file mode 100755
index 0000000..9cb0bd7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/drop_RosterApp_derby.sql
@@ -0,0 +1,4 @@
+DROP TABLE TeamPlayer ;
+DROP TABLE Player ;
+DROP TABLE Team ;
+DROP TABLE League ;
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
new file mode 100644
index 0000000..610f246
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="SampleWeb"/>
+<property name="appname" value="${module}"/>
+<!-- <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="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
new file mode 100644
index 0000000..7107dd1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="sampleapp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="assemble.dir => ${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>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="deleteRows" depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/delete_tables.sql"/>
+ </antcall>
+ </target>
+-->
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..996f81d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp.sql
@@ -0,0 +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)
+);
+
+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
new file mode 100755
index 0000000..2098795
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_db2.sql
@@ -0,0 +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)
+);
+
+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
new file mode 100755
index 0000000..e10d262
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_derby.sql
@@ -0,0 +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)
+);
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
new file mode 100755
index 0000000..e27f7f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ifx.sql
@@ -0,0 +1,10 @@
+DROP TABLE CompositeIntStringBeanTable;
+
+CREATE TABLE CompositeIntStringBeanTable (
+ 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
new file mode 100755
index 0000000..c3431d2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mssql.sql
@@ -0,0 +1,12 @@
+DROP TABLE COMPOSITEINTSTRINGBEANTABLE
+go
+
+CREATE TABLE COMPOSITEINTSTRINGBEANTABLE (
+ 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
new file mode 100755
index 0000000..707c802
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mysql.sql
@@ -0,0 +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)
+) 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
new file mode 100755
index 0000000..0b73178
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ora.sql
@@ -0,0 +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)
+);
+
+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
new file mode 100755
index 0000000..0b73178
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_pbs.sql
@@ -0,0 +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)
+);
+
+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
new file mode 100755
index 0000000..f0eb56f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_psql.sql
@@ -0,0 +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)
+);
+
+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
new file mode 100755
index 0000000..f9b3b32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_syb.sql
@@ -0,0 +1,11 @@
+drop table COMPOSITEINTSTRINGBEANTABLE
+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)
+)
+
+go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/drop_SampleWebApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/drop_SampleWebApp_derby.sql
new file mode 100755
index 0000000..c72aa54
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/drop_SampleWebApp_derby.sql
@@ -0,0 +1 @@
+DROP TABLE CompositeIntStringBeanTable;
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
new file mode 100644
index 0000000..3c7880a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="Unknownpk"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..7e673fd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="unknownpk" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <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">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A**.class, **/unknownpk.dbschema" />
+ <param name="appclientjar.classes"
+ value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/unknownpk_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..beb7a1b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/Client.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/UNPK2");
+ unknownpk.A2Home a2home = (unknownpk.A2Home)PortableRemoteObject.narrow(objref, unknownpk.A2Home.class);
+
+ unknownpk.A2 a2bean = a2home.create("A2");
+ Object pk2 = a2bean.getPrimaryKey();
+ System.out.println("CREATED 2.x WITH PK: " + pk2);
+ System.out.println("CREATED 2.x: " + a2bean.getName());
+
+ a2bean = a2home.findByPrimaryKey(pk2);
+ System.out.println("FOUND 2.x: " + a2bean.getName());
+
+ objref = initial.lookup("java:comp/env/ejb/UNPK1");
+ unknownpk.A1Home a1home = (unknownpk.A1Home)PortableRemoteObject.narrow(objref, unknownpk.A1Home.class);
+
+ unknownpk.A1 a1bean = a1home.create("A1");
+ Object pk1 = a1bean.getPrimaryKey();
+ System.out.println("CREATED 1.1 WITH PK: " + pk1);
+ System.out.println("CREATED 1.1: " + a1bean.getName());
+
+ a1bean = a1home.findByPrimaryKey(pk1);
+ System.out.println("FOUND 1.1: " + a1bean.getName());
+
+ 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.printSummary("unknownpk");
+
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/application-client.xml
new file mode 100644
index 0000000..1b78e74
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/application-client.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>UNPK</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK2</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>unknownpk.A2Home</home>
+ <remote>unknownpk.A2</remote>
+ <ejb-link>UNPK2</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK1</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>unknownpk.A1Home</home>
+ <remote>unknownpk.A1</remote>
+ <ejb-link>UNPK1</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/application.xml
new file mode 100644
index 0000000..4d3f1a9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>UNPK</display-name>
+ <description>J2EE Application UNPK</description>
+ <module>
+ <ejb>Unknownpk-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>Unknownpk-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..d668aaa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/ejb-jar.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>UNPK2</display-name>
+ <ejb-name>UNPK2</ejb-name>
+ <home>unknownpk.A2Home</home>
+ <remote>unknownpk.A2</remote>
+ <ejb-class>unknownpk.A2Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Object</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>UNPK2</abstract-schema-name>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ </entity>
+ <entity>
+ <display-name>UNPK1</display-name>
+ <ejb-name>UNPK1</ejb-name>
+ <home>unknownpk.A1Home</home>
+ <remote>unknownpk.A1</remote>
+ <ejb-class>unknownpk.A1Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Object</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>UNPK2</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..8079d16
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK2</ejb-ref-name>
+ <jndi-name>UNPK2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK1</ejb-ref-name>
+ <jndi-name>UNPK1</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..3a4e39e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>unknownpk/unknownpk</schema>
+ <entity-mapping>
+ <ejb-name>UNPK2</ejb-name>
+ <table-name>UNKNOWNPK2</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>NAME</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>UNPK1</ejb-name>
+ <table-name>UNKNOWNPK1</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>NAME</column-name>
+ </cmp-field-mapping>
+ </entity-mapping>
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..48f8085
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <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>
+ </ejb>
+ <ejb>
+ <ejb-name>UNPK1</ejb-name>
+ <jndi-name>UNPK1</jndi-name>
+ <cmp>
+ <is-one-one-cmp>true</is-one-one-cmp>
+ </cmp>
+ <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>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..99508d9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1 extends javax.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
new file mode 100755
index 0000000..f65f047
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Bean.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 1.1 bean.
+ * @author mvatkina
+ */
+
+
+public class A1Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A1Bean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public java.lang.String getName() {
+ return name;
+ }
+
+ public java.lang.String name;
+
+ public Object ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ this.name = name;
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name)
+ throws javax.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
new file mode 100755
index 0000000..e624b21
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Home.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1Home extends javax.ejb.EJBHome {
+
+ public A1 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A1 create(java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..55f1c4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2 extends javax.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
new file mode 100755
index 0000000..e2448c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Bean.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 2.0 bean.
+ * @author mvatkina
+ */
+
+
+public abstract class A2Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A2Bean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ public Object ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ setName(name);
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name)
+ throws javax.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
new file mode 100755
index 0000000..43bf7a1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Home.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2Home extends javax.ejb.EJBHome {
+
+ public A2 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A2 create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/unknownpk.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/unknownpk.dbschema
new file mode 100644
index 0000000..d92281b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/unknownpk.dbschema
@@ -0,0 +1,484 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl26867996">
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection14651230">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl26867996"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1933191732">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </element>
+ <table>UNKNOWNPK1</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28061596">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1750295403">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19526581">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1750295403"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20918341">
+ <name>SYS_C00375032</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28145575">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19526581"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement498462485">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11502424">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498462485"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer38">
+ <value>38</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32794782">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1750295403">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl17977639">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1750295403"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier26083064">
+ <name>SYS_C00375032</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11423854">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498462485"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier22971385">
+ <name>UNKNOWNPK1</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30541453">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1750295403"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13549765">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498462485"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2013740539">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl2773808">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2013740539"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer32">
+ <value>32</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier12285029">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1933191733">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </element>
+ <table>UNKNOWNPK2</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30817849">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-242743593">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl31149935">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-242743593"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20716290">
+ <name>SYS_C00375033</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection31406333">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl31149935"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement498492276">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl17900022">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498492276"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30199356">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-242743593">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl16250176">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-242743593"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17192413">
+ <name>SYS_C00375033</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13673945">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498492276"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15684866">
+ <name>UNKNOWNPK2</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection26392982">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-242743593"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2263554">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498492276"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1985111388">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13170424">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1985111388"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30289364">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19058102">
+ <name>MV</name>
+ </OBJECT>
+ </_name>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32477527">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722"/>
+ </element>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.7.0.0 - Production</_databaseProductVersion>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <_databaseProductName>Oracle</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19859865">
+ <name>MV</name>
+ </OBJECT>
+ </_schema>
+ <_url>jdbc:oracle:thin:@bsqe-giant.sfbay.sun.com:1521:ora817nw</_url>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_username>MV</_username>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/drop_unknownpk_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/drop_unknownpk_derby.sql
new file mode 100755
index 0000000..4684b42
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/drop_unknownpk_derby.sql
@@ -0,0 +1,2 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_db2.sql
new file mode 100755
index 0000000..1f1e065
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_db2.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
+
+CREATE TABLE UNKNOWNPK1
+(
+ id NUMERIC(30) PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+CREATE TABLE UNKNOWNPK2
+(
+ id NUMERIC(30) PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_derby.sql
new file mode 100755
index 0000000..7797c1b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_derby.sql
@@ -0,0 +1,14 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
+
+CREATE TABLE UNKNOWNPK1
+(
+ id NUMERIC(30) PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
+
+CREATE TABLE UNKNOWNPK2
+(
+ id NUMERIC(30) PRIMARY KEY NOT NULL,
+ name VARCHAR(32)
+);
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
new file mode 100755
index 0000000..d05ab12
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ifx.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
+
+CREATE TABLE UNKNOWNPK1
+(
+ id DECIMAL(32) PRIMARY KEY,
+ name VARCHAR(32)
+);
+
+CREATE TABLE UNKNOWNPK2
+(
+ id DECIMAL(32) PRIMARY KEY,
+ name VARCHAR(32)
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_mssql.sql
new file mode 100755
index 0000000..77db99b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_mssql.sql
@@ -0,0 +1,16 @@
+DROP TABLE UNKNOWNPK1
+DROP TABLE UNKNOWNPK2
+go
+
+CREATE TABLE UNKNOWNPK1
+(
+ ID NUMERIC(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+)
+
+CREATE TABLE UNKNOWNPK2
+(
+ ID NUMERIC(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+)
+go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_mysql.sql
new file mode 100755
index 0000000..596666c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_mysql.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
+
+CREATE TABLE UNKNOWNPK1
+(
+ id DECIMAL(38) PRIMARY KEY,
+ name VARCHAR(32) NULL
+) engine=InnoDB;
+
+CREATE TABLE UNKNOWNPK2
+(
+ id DECIMAL(38) PRIMARY KEY,
+ name VARCHAR(32) NULL
+) engine=InnoDB;
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ora.sql
new file mode 100755
index 0000000..b2a6346
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ora.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
+
+CREATE TABLE UNKNOWNPK1
+(
+ id NUMBER(38) PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+CREATE TABLE UNKNOWNPK2
+(
+ id NUMBER(38) PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_pbs.sql
new file mode 100755
index 0000000..b2a6346
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_pbs.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPK1;
+DROP TABLE UNKNOWNPK2;
+
+CREATE TABLE UNKNOWNPK1
+(
+ id NUMBER(38) PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+CREATE TABLE UNKNOWNPK2
+(
+ id NUMBER(38) PRIMARY KEY,
+ name VARCHAR2(32) NULL
+);
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_psql.sql
new file mode 100755
index 0000000..d791e7f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_psql.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPK1 cascade;
+DROP TABLE UNKNOWNPK2 cascade;
+
+CREATE TABLE UNKNOWNPK1
+(
+ ID DECIMAL(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+) ;
+
+CREATE TABLE UNKNOWNPK2
+(
+ ID DECIMAL(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL
+) ;
+
+commit;
+
+quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_syb.sql
new file mode 100755
index 0000000..9ad6073
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_syb.sql
@@ -0,0 +1,16 @@
+DROP TABLE UNKNOWNPK1
+DROP TABLE UNKNOWNPK2
+go
+
+CREATE TABLE UNKNOWNPK1
+(
+ ID NUMERIC(38) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL
+)
+
+CREATE TABLE UNKNOWNPK2
+(
+ ID NUMERIC(38) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32) NULL
+)
+go
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
new file mode 100644
index 0000000..ede5b75
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="UnknownpkVC"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..5f41f54
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="unknownpkVC" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <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">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/A**.class, **/unknownpkVC.dbschema" />
+ <param name="appclientjar.classes"
+ value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="execute-ejb-sql-common">
+ <param name="sql.file" value="sql/unknownpkVC_derby.sql"/>
+ </antcall>
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
+ </antcall>
+ </target>
+
+ <target name="delete-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant all
+ </echo>
+ </target>
+</project>
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
new file mode 100755
index 0000000..81e84f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/Client.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Client.java
+ *
+ * Created on February 21, 2003, 3:20 PM
+ */
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author mvatkina
+ * @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");
+
+ Context initial = new InitialContext();
+ Object objref = initial.lookup("java:comp/env/ejb/UNPK2");
+ unknownpk.A2Home a2home = (unknownpk.A2Home)PortableRemoteObject.narrow(objref, unknownpk.A2Home.class);
+
+ unknownpk.A2 a2bean = a2home.create("A2");
+ Object pk2 = a2bean.getPrimaryKey();
+ System.out.println("CREATED 2.x WITH PK: " + pk2);
+ System.out.println("CREATED 2.x: " + a2bean.getName());
+
+ a2bean = a2home.findByPrimaryKey(pk2);
+ System.out.println("FOUND 2.x: " + a2bean.getName());
+
+ objref = initial.lookup("java:comp/env/ejb/UNPK1");
+ unknownpk.A1Home a1home = (unknownpk.A1Home)PortableRemoteObject.narrow(objref, unknownpk.A1Home.class);
+
+ unknownpk.A1 a1bean = a1home.create("A1");
+ Object pk1 = a1bean.getPrimaryKey();
+ System.out.println("CREATED 1.1 WITH PK: " + pk1);
+ System.out.println("CREATED 1.1: " + a1bean.getName());
+
+ a1bean = a1home.findByPrimaryKey(pk1);
+ System.out.println("FOUND 1.1: " + a1bean.getName());
+
+ 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.printSummary("unknownpkVC");
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/MANIFEST.MF
new file mode 100644
index 0000000..99fe365
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.3.1_01 (Sun Microsystems Inc.)
+Main-Class: Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/application-client.xml
new file mode 100644
index 0000000..1b78e74
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/application-client.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>UNPK</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK2</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>unknownpk.A2Home</home>
+ <remote>unknownpk.A2</remote>
+ <ejb-link>UNPK2</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK1</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>unknownpk.A1Home</home>
+ <remote>unknownpk.A1</remote>
+ <ejb-link>UNPK1</ejb-link>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/application.xml
new file mode 100644
index 0000000..6163f34
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>UNPK</display-name>
+ <description>J2EE Application UNPK</description>
+ <module>
+ <ejb>UnknownpkVC-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>UnknownpkVC-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..d668aaa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/ejb-jar.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>ejb</display-name>
+ <enterprise-beans>
+ <entity>
+ <display-name>UNPK2</display-name>
+ <ejb-name>UNPK2</ejb-name>
+ <home>unknownpk.A2Home</home>
+ <remote>unknownpk.A2</remote>
+ <ejb-class>unknownpk.A2Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Object</prim-key-class>
+ <reentrant>False</reentrant>
+ <abstract-schema-name>UNPK2</abstract-schema-name>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ </entity>
+ <entity>
+ <display-name>UNPK1</display-name>
+ <ejb-name>UNPK1</ejb-name>
+ <home>unknownpk.A1Home</home>
+ <remote>unknownpk.A1</remote>
+ <ejb-class>unknownpk.A1Bean</ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.Object</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>1.x</cmp-version>
+ <cmp-field>
+ <field-name>name</field-name>
+ </cmp-field>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <description>This value was set as a default by Forte For Java.</description>
+ <method>
+ <ejb-name>UNPK2</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..8079d16
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK2</ejb-ref-name>
+ <jndi-name>UNPK2</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/UNPK1</ejb-ref-name>
+ <jndi-name>UNPK1</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-cmp-mappings.xml
new file mode 100644
index 0000000..e943696
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-cmp-mappings.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp_mapping_1_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-cmp-mappings>
+ <sun-cmp-mapping>
+ <schema>unknownpk/unknownpkVC</schema>
+ <entity-mapping>
+ <ejb-name>UNPK2</ejb-name>
+ <table-name>UNKNOWNPKVC2</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>NAME</column-name>
+ </cmp-field-mapping>
+ <consistency>
+ <check-version-of-accessed-instances>
+ <column-name>VERSION</column-name>
+ </check-version-of-accessed-instances>
+ </consistency>
+ </entity-mapping>
+ <entity-mapping>
+ <ejb-name>UNPK1</ejb-name>
+ <table-name>UNKNOWNPKVC1</table-name>
+ <cmp-field-mapping>
+ <field-name>name</field-name>
+ <column-name>NAME</column-name>
+ </cmp-field-mapping>
+ <consistency>
+ <check-version-of-accessed-instances>
+ <column-name>VERSION</column-name>
+ </check-version-of-accessed-instances>
+ </consistency>
+ </entity-mapping>
+ </sun-cmp-mapping>
+</sun-cmp-mappings>
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
new file mode 100644
index 0000000..48f8085
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+ <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>
+ </ejb>
+ <ejb>
+ <ejb-name>UNPK1</ejb-name>
+ <jndi-name>UNPK1</jndi-name>
+ <cmp>
+ <is-one-one-cmp>true</is-one-one-cmp>
+ </cmp>
+ <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>
+ <jndi-name>jdo/pmf</jndi-name>
+ </cmp-resource>
+</enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100755
index 0000000..99508d9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1 extends javax.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
new file mode 100755
index 0000000..f65f047
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Bean.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 1.1 bean.
+ * @author mvatkina
+ */
+
+
+public class A1Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A1Bean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public java.lang.String getName() {
+ return name;
+ }
+
+ public java.lang.String name;
+
+ public Object ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ this.name = name;
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name)
+ throws javax.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
new file mode 100755
index 0000000..e624b21
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Home.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A1Home extends javax.ejb.EJBHome {
+
+ public A1 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A1 create(java.lang.String name) throws java.rmi.RemoteException, javax.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
new file mode 100755
index 0000000..55f1c4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2 extends javax.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
new file mode 100755
index 0000000..e2448c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Bean.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import javax.naming.*;
+
+/**
+ * 2.0 bean.
+ * @author mvatkina
+ */
+
+
+public abstract class A2Bean implements javax.ejb.EntityBean {
+
+ private javax.ejb.EntityContext context;
+
+
+ /**
+ * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
+ */
+ public void setEntityContext(javax.ejb.EntityContext aContext) {
+ context=aContext;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbActivate()
+ */
+ public void ejbActivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbPassivate()
+ */
+ public void ejbPassivate() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbRemove()
+ */
+ public void ejbRemove() {
+ System.out.println("Debug: A2Bean ejbRemove");
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#unsetEntityContext()
+ */
+ public void unsetEntityContext() {
+ context=null;
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbLoad()
+ */
+ public void ejbLoad() {
+
+ }
+
+
+ /**
+ * @see javax.ejb.EntityBean#ejbStore()
+ */
+ public void ejbStore() {
+
+ }
+
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String name);
+
+ public Object ejbCreate(java.lang.String name) throws javax.ejb.CreateException {
+
+ setName(name);
+
+ return null;
+ }
+
+ public void ejbPostCreate(java.lang.String name)
+ throws javax.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
new file mode 100755
index 0000000..43bf7a1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Home.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package unknownpk;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * @author mvatkina
+ */
+
+public interface A2Home extends javax.ejb.EJBHome {
+
+ public A2 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, javax.ejb.FinderException;
+
+ public A2 create(java.lang.String name) throws java.rmi.RemoteException, javax.ejb.CreateException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/unknownpk.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/unknownpk.dbschema
new file mode 100644
index 0000000..d92281b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/unknownpk.dbschema
@@ -0,0 +1,484 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl26867996">
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection14651230">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl26867996"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1933191732">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </element>
+ <table>UNKNOWNPK1</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28061596">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1750295403">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19526581">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1750295403"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20918341">
+ <name>SYS_C00375032</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28145575">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19526581"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement498462485">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11502424">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498462485"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer38">
+ <value>38</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32794782">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1750295403">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl17977639">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1750295403"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier26083064">
+ <name>SYS_C00375032</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11423854">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498462485"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier22971385">
+ <name>UNKNOWNPK1</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30541453">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1750295403"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13549765">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498462485"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-2013740539">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl2773808">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-2013740539"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer32">
+ <value>32</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier12285029">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191732"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement1933191733">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </element>
+ <table>UNKNOWNPK2</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30817849">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-242743593">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl31149935">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-242743593"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20716290">
+ <name>SYS_C00375033</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection31406333">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl31149935"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement498492276">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl17900022">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498492276"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30199356">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-242743593">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl16250176">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-242743593"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17192413">
+ <name>SYS_C00375033</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13673945">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498492276"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15684866">
+ <name>UNKNOWNPK2</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection26392982">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-242743593"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2263554">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14074220"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement498492276"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1985111388">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl13170424">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1985111388"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30289364">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement1933191733"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19058102">
+ <name>MV</name>
+ </OBJECT>
+ </_name>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32477527">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722"/>
+ </element>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.7.0.0 - Production</_databaseProductVersion>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <_databaseProductName>Oracle</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19859865">
+ <name>MV</name>
+ </OBJECT>
+ </_schema>
+ <_url>jdbc:oracle:thin:@bsqe-giant.sfbay.sun.com:1521:ora817nw</_url>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_username>MV</_username>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/unknownpkVC.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/unknownpkVC.dbschema
new file mode 100644
index 0000000..e5782eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/unknownpkVC.dbschema
@@ -0,0 +1,546 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl26867996">
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection14651230">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl26867996"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-1923547033">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547033"/>
+ </element>
+ <table>UNKNOWNPKVC1</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28061596">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-153936501">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19526581">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-153936501"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier20918341">
+ <name>SYS_C00375035</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28145575">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl19526581"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-935950334">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11502424">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-935950334"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer38">
+ <value>38</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32794782">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547033"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547033"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-153936501">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl17977639">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-153936501"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier26083064">
+ <name>SYS_C00375035</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11423854">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-935950334"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547033"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier22971385">
+ <name>UNKNOWNPKVC1</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30541453">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-153936501"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13549765">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl28420709"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-935950334"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1799957582">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl2773808">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1799957582"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer32">
+ <value>32</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier12285029">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547033"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1239915983">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl14074220">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1239915983"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer19">
+ <value>19</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier31149935">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547033"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-1923547032">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547032"/>
+ </element>
+ <table>UNKNOWNPKVC2</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30817849">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1353615310">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl17900022">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1353615310"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30199356">
+ <name>SYS_C00375037</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection31406333">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl17900022"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-935920543">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl16250176">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-935920543"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17192413">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer38"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547032"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547032"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1353615310">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl15684866">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1353615310"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier11935697">
+ <name>SYS_C00375037</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection13673945">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-935920543"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547032"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30289364">
+ <name>UNKNOWNPKVC2</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection26392982">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1353615310"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection2263554">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl20716290"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-935920543"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1771328431">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl19058102">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1771328431"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32477527">
+ <name>NAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer32"/>
+ </_precision>
+ <_type>12</_type>
+ <_scale>
+ <OBJECT/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547032"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1247596850">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl19859865">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1247596850"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier18820833">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer19"/>
+ </_precision>
+ <_type>3</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1923547032"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4116479">
+ <name>MV</name>
+ </OBJECT>
+ </_name>
+ <_driverVersion>8.1.6.0.0</_driverVersion>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier29987161">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-447709722"/>
+ </element>
+ <_databaseProductVersion>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
+With the Partitioning option
+JServer Release 8.1.7.0.0 - Production</_databaseProductVersion>
+ <_driver>oracle.jdbc.driver.OracleDriver</_driver>
+ <_databaseProductName>Oracle</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6662015">
+ <name>MV</name>
+ </OBJECT>
+ </_schema>
+ <_url>jdbc:oracle:thin:@bsqe-giant.sfbay.sun.com:1521:ora817nw</_url>
+ <_driverName>Oracle JDBC driver</_driverName>
+ <_username>MV</_username>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/drop_unknownpkVC_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/drop_unknownpkVC_derby.sql
new file mode 100755
index 0000000..e6b78a3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/drop_unknownpkVC_derby.sql
@@ -0,0 +1,5 @@
+DROP TRIGGER T_UNKNOWNPKVC1;
+DROP TRIGGER T_UNKNOWNPKVC2;
+
+DROP TABLE UNKNOWNPKVC1;
+DROP TABLE UNKNOWNPKVC2;
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
new file mode 100755
index 0000000..656b7b5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_db2.sql
@@ -0,0 +1,47 @@
+DROP TRIGGER T_UNKNOWNPKVC1;
+DROP TRIGGER T_UNKNOWNPKVC2;
+
+DROP TABLE UNKNOWNPKVC1;
+DROP TABLE UNKNOWNPKVC2;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ ID NUMERIC(30) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32),
+ VERSION NUMERIC(19) NOT NULL
+);
+
+CREATE TABLE UNKNOWNPKVC2
+(
+ ID NUMERIC(30) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32),
+ VERSION NUMERIC(19) NOT NULL
+);
+
+commit;
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ NO CASCADE
+ BEFORE UPDATE ON UNKNOWNPKVC1
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ NO CASCADE
+ BEFORE UPDATE ON UNKNOWNPKVC2
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..dd7bc65
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_derby.sql
@@ -0,0 +1,37 @@
+DROP TRIGGER T_UNKNOWNPKVC1;
+DROP TRIGGER T_UNKNOWNPKVC2;
+
+DROP TABLE UNKNOWNPKVC1;
+DROP TABLE UNKNOWNPKVC2;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ ID NUMERIC(30) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32),
+ VERSION NUMERIC(19) NOT NULL
+);
+
+CREATE TABLE UNKNOWNPKVC2
+(
+ ID NUMERIC(30) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(32),
+ VERSION NUMERIC(19) NOT NULL
+);
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ AFTER UPDATE ON UNKNOWNPKVC1
+ REFERENCING
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ UPDATE UNKNOWNPKVC1 SET version = O_ROW.version + 1
+ WHERE ID = O_ROW.ID
+;
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ AFTER UPDATE ON UNKNOWNPKVC2
+ REFERENCING
+ OLD AS O_ROW
+ FOR EACH ROW MODE DB2SQL
+ UPDATE UNKNOWNPKVC2 SET version = O_ROW.version + 1
+ 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
new file mode 100755
index 0000000..554b23d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ifx.sql
@@ -0,0 +1,45 @@
+DROP TRIGGER T_UNKNOWNPKVC1;
+DROP TRIGGER T_UNKNOWNPKVC2;
+
+DROP TABLE UNKNOWNPKVC1;
+DROP TABLE UNKNOWNPKVC2;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ 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
+);
+
+commit;
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ UPDATE ON UNKNOWNPKVC1
+ REFERENCING OLD AS old NEW AS new
+ FOR EACH ROW
+ WHEN (new.VERSION = old.VERSION)
+ (
+ UPDATE UNKNOWNPKVC1 SET VERSION = old.VERSION + 1
+ );
+/
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ UPDATE ON UNKNOWNPKVC2
+ REFERENCING OLD AS old NEW AS new
+ FOR EACH Row
+ WHEN (new.VERSION = old.VERSION)
+ (
+ UPDATE UNKNOWNPKVC2 SET VERSION = old.VERSION + 1
+ );
+/
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..235f9bd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mssql.sql
@@ -0,0 +1,46 @@
+DROP TRIGGER T_UNKNOWNPKVC1
+DROP TRIGGER T_UNKNOWNPKVC2
+go
+
+DROP TABLE UNKNOWNPKVC1
+DROP TABLE UNKNOWNPKVC2
+go
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ ID NUMERIC(38) PRIMARY KEY,
+ 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
+)
+go
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ ON UNKNOWNPKVC1
+ FOR UPDATE as
+ begin
+ UPDATE UNKNOWNPKVC1
+ SET UNKNOWNPKVC1.VERSION = UNKNOWNPKVC1.VERSION + 1
+ FROM inserted
+ WHERE UNKNOWNPKVC1.ID = inserted.ID
+ AND UNKNOWNPKVC1.VERSION = inserted.VERSION
+ end
+go
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ ON UNKNOWNPKVC2
+ FOR UPDATE as
+ begin
+ UPDATE UNKNOWNPKVC2
+ SET UNKNOWNPKVC2.VERSION = UNKNOWNPKVC2.VERSION + 1
+ FROM inserted
+ WHERE UNKNOWNPKVC2.ID = inserted.ID
+ AND UNKNOWNPKVC2.VERSION = inserted.VERSION
+ end
+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
new file mode 100755
index 0000000..bb2b595
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mysql.sql
@@ -0,0 +1,37 @@
+DROP TRIGGER T_UNKNOWNPKVC1;
+DROP TRIGGER T_UNKNOWNPKVC2;
+
+DROP TABLE UNKNOWNPKVC1;
+DROP TABLE UNKNOWNPKVC2;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ 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
+) engine=InnoDB;
+
+commit;
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ BEFORE UPDATE ON UNKNOWNPKVC1
+ FOR EACH ROW
+ SET NEW.VERSION = OLD.VERSION + 1
+;
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ BEFORE UPDATE ON UNKNOWNPKVC2
+ FOR EACH ROW
+ SET NEW.VERSION = OLD.VERSION + 1
+;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..4ae7469
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ora.sql
@@ -0,0 +1,43 @@
+DROP TRIGGER T_UNKNOWNPKVC1;
+DROP TRIGGER T_UNKNOWNPKVC2;
+
+DROP TABLE UNKNOWNPKVC1;
+DROP TABLE UNKNOWNPKVC2;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ 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
+);
+
+commit;
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ BEFORE UPDATE ON UNKNOWNPKVC1
+ FOR EACH ROW
+ WHEN (NEW.VERSION = OLD.VERSION)
+ BEGIN
+ :NEW.VERSION := :OLD.VERSION + 1;
+ END;
+/
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ BEFORE UPDATE ON UNKNOWNPKVC2
+ FOR EACH ROW
+ WHEN (NEW.VERSION = OLD.VERSION)
+ BEGIN
+ :NEW.VERSION := :OLD.VERSION + 1;
+ END;
+/
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..6e9819c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_pbs.sql
@@ -0,0 +1,45 @@
+/* "cascade" will also drop the triggers */
+DROP TABLE UNKNOWNPKVC1 cascade;
+DROP TABLE UNKNOWNPKVC2 cascade;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ 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
+);
+
+commit;
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ BEFORE UPDATE ON UNKNOWNPKVC1
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ BEFORE UPDATE ON UNKNOWNPKVC2
+ REFERENCING
+ NEW AS N_ROW
+ OLD AS O_ROW
+ FOR EACH ROW
+ WHEN (N_ROW.VERSION = O_ROW.VERSION)
+ SET N_ROW.VERSION = O_ROW.VERSION + 1
+;
+
+commit;
+
+quit;
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
new file mode 100755
index 0000000..05eda06
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_psql.sql
@@ -0,0 +1,18 @@
+DROP TABLE UNKNOWNPKVC1 cascade;
+DROP TABLE UNKNOWNPKVC2 cascade;
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ 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
+);
+
+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
new file mode 100755
index 0000000..685da7b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_syb.sql
@@ -0,0 +1,47 @@
+DROP TRIGGER T_UNKNOWNPKVC1
+DROP TRIGGER T_UNKNOWNPKVC2
+go
+
+DROP TABLE UNKNOWNPKVC1
+DROP TABLE UNKNOWNPKVC2
+go
+
+CREATE TABLE UNKNOWNPKVC1
+(
+ ID NUMERIC(38) PRIMARY KEY 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
+)
+go
+
+CREATE TRIGGER T_UNKNOWNPKVC1
+ ON UNKNOWNPKVC1
+ FOR UPDATE as
+ begin
+ UPDATE UNKNOWNPKVC1
+ SET UNKNOWNPKVC1.VERSION = UNKNOWNPKVC1.VERSION + 1
+ FROM inserted
+ WHERE UNKNOWNPKVC1.ID = inserted.ID
+ AND UNKNOWNPKVC1.VERSION = inserted.VERSION
+ end
+go
+
+CREATE TRIGGER T_UNKNOWNPKVC2
+ ON UNKNOWNPKVC2
+ FOR UPDATE as
+ begin
+ UPDATE UNKNOWNPKVC2
+ SET UNKNOWNPKVC2.VERSION = UNKNOWNPKVC2.VERSION + 1
+ FROM inserted
+ WHERE UNKNOWNPKVC2.ID = inserted.ID
+ AND UNKNOWNPKVC2.VERSION = inserted.VERSION
+ end
+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
new file mode 100644
index 0000000..93372fb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/config/com/sun/enterprise/config/impl/ConfigContextImplTest.java
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * $Id: ConfigContextImplTest.java,v 1.1 2004/04/30 00:07:57 ramakant Exp $
+ */
+
+package com.sun.enterprise.config.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Iterator;
+
+//junit imports
+import junit.framework.*;
+import junit.textui.TestRunner;
+
+import com.sun.logging.LogDomains;
+import com.sun.logging.ee.EELogDomains;
+
+import com.sun.enterprise.config.ConfigBean;
+import com.sun.enterprise.config.ConfigContext;
+import com.sun.enterprise.config.ConfigContextFactory;
+import com.sun.enterprise.config.pluggable.ConfigEnvironment;
+import com.sun.enterprise.config.pluggable.ConfigBeanInterceptor;
+import com.sun.enterprise.config.serverbeans.Domain;
+import com.sun.enterprise.config.serverbeans.Server;
+import com.sun.enterprise.config.serverbeans.Ssl;
+import com.sun.enterprise.config.serverbeans.IiopListener;
+import com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory;
+import com.sun.enterprise.util.SystemPropertyConstants;
+
+import com.sun.enterprise.config.impl.ConfigContextImpl;
+
+public class ConfigContextImplTest extends TestCase
+{
+ /** Creates a new instance of ConfigContextImplTest */
+ public ConfigContextImplTest(String name)
+ {
+ super(name);
+ }
+
+ 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 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 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 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 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 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());
+ }
+
+ 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 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();
+ }
+
+ boolean isResolve(ConfigContext cc)
+ {
+ return ((ConfigContextImpl)cc).getConfigBeanInterceptor().isResolvingPaths();
+ }
+
+ ConfigBeanInterceptor getInterceptor(ConfigContext cc)
+ {
+ return ((ConfigContextImpl)cc).getConfigBeanInterceptor();
+ }
+
+ protected void setUp()
+ {
+ LogDomains.getLogger(EELogDomains.EE_ADMIN_LOGGER);
+ }
+
+ protected void tearDown()
+ {
+ }
+
+ public static junit.framework.Test suite()
+ {
+ TestSuite suite = new TestSuite(ConfigContextImplTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception
+ {
+ System.setProperty("SSL-port", "1060");
+
+ 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;
+ private static void initRuntimeContext() throws Exception
+ {
+ ConfigEnvironment ce = getConfigEnvironment();
+ runtimeCtx = ConfigContextFactory.createConfigContext(ce);
+ }
+
+ static ConfigContext adminCtx = null;
+ private static void initAdminContext() throws Exception
+ {
+ ConfigEnvironment ce = getConfigEnvironment();
+ ce.getConfigBeanInterceptor().setResolvingPaths(false);
+ adminCtx = ConfigContextFactory.createConfigContext(ce);
+ }
+
+ 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;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/README b/appserver/tests/v2-tests/appserv-tests/devtests/corba/README
new file mode 100644
index 0000000..dd62d97
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/README
@@ -0,0 +1 @@
+unit tests on corba
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
new file mode 100644
index 0000000..b3dec7b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="corba"/>
+<property name="appname" value="timer"/>
+<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
new file mode 100644
index 0000000..79407b8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="corba_unittest" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+
+ <target name="all" depends="build,run-java-testng-xml,report"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${build.dir}"/>
+ <delete dir="gen"/>
+ <delete dir="test-output"/>
+ <delete dir="test-report"/>
+ <delete file="stats.html"/>
+ </target>
+
+ <path id="compile.classpath">
+ <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"/>
+ <javac srcdir="src" destdir="${build.dir}/classes"
+ debug="true" source="1.5">
+ <classpath>
+ <path refid="compile.classpath" />
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="build" depends="compile">
+ </target>
+
+ <path id="run.classpath">
+ <pathelement location="${build.dir}/classes"/>
+ <path refid="compile.classpath"/>
+ </path>
+
+ <!-- a few ways to invoke tests -->
+ <target name="run-java-client" depends="compile">
+ <echo message="1. run-java-client"/>
+ <java fork="yes"
+ classpathref="run.classpath"
+ classname="corba.timer.Client">
+ <jvmarg value="-ea"/>
+ </java>
+ </target>
+
+ <target name="run-java-testng-noxml" depends="compile">
+ <echo message="2. run-java-testng-noxml with -testclass"/>
+ <java fork="yes"
+ classpathref="run.classpath"
+ classname="org.testng.TestNG">
+ <arg value="-d"/>
+ <arg value="test-output"/>
+ <arg value="-testclass"/>
+ <arg value="corba.timer.Client"/>
+ <jvmarg value="-ea"/>
+ </java>
+ </target>
+
+ <target name="run-java-testng-xml" depends="compile">
+ <echo message="3. run-java-testng-xml"/>
+ <java fork="yes"
+ classpathref="run.classpath"
+ classname="org.testng.TestNG">
+ <arg value="src/testng.xml"/>
+ <jvmarg value="-ea"/>
+ </java>
+ </target>
+
+ <!-- not work -->
+ <target name="run-ant-noxml" depends="compile">
+ <echo message="4. run-ant-noxml"/>
+ <echo message="build.dir=${build.dir}"/>
+ <fileset id="run.fileset" dir="${build.dir}/classes">
+ <include name="*/Client.class"/>
+ </fileset>
+ <taskdef
+ classpathref="run.classpath"
+ name="testng"
+ classname="org.testng.TestNGAntTask"/>
+ <testng
+ classpathref="run.classpath"
+ outputdir="test-output"
+ target="1.5"
+ classfilesetref="run.fileset">
+ </testng>
+ </target>
+
+ <target name="run-ant-xml" depends="compile">
+ <echo message="5. run-ant-xml"/>
+ <taskdef
+ classpathref="run.classpath"
+ name="testng"
+ classname="org.testng.TestNGAntTask"/>
+ <testng
+ classpathref="run.classpath"
+ outputdir="test-output">
+ <xmlfileset dir="src" includes="testng.xml"/>
+ </testng>
+ </target>
+
+
+ <target name="report">
+ <mkdir dir="test-report"/>
+ <junitreport todir="test-report">
+ <fileset dir="test-output">
+ <include name="*.xml"/>
+ </fileset>
+ <report format="noframes" todir="test-report"/>
+ </junitreport>
+ </target>
+</project>
+
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
new file mode 100644
index 0000000..1880a3d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ActivationSuite.java
@@ -0,0 +1,447 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.timer ;
+
+import java.util.List ;
+import java.util.Iterator ;
+import java.util.Map ;
+import java.util.ArrayList ;
+import java.util.Set ;
+import java.util.HashSet ;
+
+import org.testng.TestNG ;
+import org.testng.Assert ;
+import org.testng.annotations.Test ;
+import org.testng.annotations.Configuration ;
+import org.testng.annotations.ExpectedExceptions ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.NamedBase ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Controllable ;
+import com.sun.corba.ee.spi.orbutil.newtimer.LogEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Named ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics ;
+import com.sun.corba.ee.spi.orbutil.newtimer.StatsEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.NamedBase ;
+
+import com.sun.corba.ee.spi.orbutil.generic.Pair ;
+
+import static java.util.Arrays.asList ;
+
+public class ActivationSuite {
+ // Test set up:
+ //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
+ // 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" ) ) ;
+
+ private List<String> t1_t8 = asList(
+ "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
+ private List<String> t2_t8 = asList(
+ "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
+ private List<String> t4_t8 = asList(
+ "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 )) ;
+
+ 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 String controllerName = "TestController" ;
+
+ private TimerFactory tf ;
+ private List<Timer> timers ;
+ private List<TimerGroup> timerGroups ;
+
+ 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 ) ) ;
+ }
+
+ private Pair<List<String>,List<String>> mkPList( List<String> first,
+ 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 ;
+ }
+
+ 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 ;
+ }
+ }
+
+ 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 ;
+ }
+ }
+
+ @Configuration( beforeTest = true )
+ public void setUp() {
+
+ 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 ) ;
+ }
+ }
+
+ 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 ) {
+
+ 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() ) ;
+
+ 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 ;
+ }
+
+ private void enableControllables( Set<Controllable> cons ) {
+ for (Controllable c : cons)
+ c.enable() ;
+ }
+
+ private void disableAllControllables() {
+ 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() ;
+ }
+
+ private class MyTimerEventHandler extends NamedBase implements TimerEventHandler {
+ 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 ;
+ }
+ }
+
+ private Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> parseEventDescription(
+ String str ) {
+
+ 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 ;
+
+ 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() ) ;
+ }
+ }
+ }
+
+ // 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() ) ;
+ }
+
+
+ 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() ) ;
+ }
+
+ private void displayStatsMap( Map<Timer,Statistics> smap ) {
+ 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 ) ;
+
+ 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 ) ;
+
+ // 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 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 ) ;
+
+ validateEvents( h1.events(), evOut ) ;
+
+ // clean up
+ controller.deregister( h1 ) ;
+ controller.deregister( h2 ) ;
+ disableAllControllables() ;
+ }
+
+ @Configuration( afterTest = true )
+ public void tearDown() {
+ 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
new file mode 100644
index 0000000..33df2e7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/Client.java
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.timer ;
+
+import java.util.Iterator ;
+import java.util.Properties ;
+import java.util.Map ;
+import java.util.List ;
+import java.util.ArrayList ;
+
+import java.io.PrintWriter ;
+
+import org.testng.TestNG ;
+import org.testng.Assert ;
+import org.testng.annotations.Test ;
+import org.testng.annotations.Configuration ;
+import org.testng.annotations.ExpectedExceptions ;
+
+import com.sun.corba.ee.spi.orb.ORB ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics ;
+import com.sun.corba.ee.spi.orbutil.newtimer.StatsEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerManager ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+
+import com.sun.corba.ee.impl.orbutil.newtimer.VersionedHashSet ;
+import com.sun.corba.ee.impl.orbutil.newtimer.TimingPoints ;
+
+import corba.framework.TimerUtils ;
+
+import static java.util.Arrays.asList ;
+
+public class Client {
+ // 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 ) ;
+ }
+
+ @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 ) ;
+ }
+ }
+
+ @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 ) ;
+ }
+
+ @Test()
+ public void testVersionedHashSet() {
+ 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() ;
+
+ // 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() ;
+
+ // Remove that does not change set does not change version
+ tset.remove( toRemove1 ) ;
+ Assert.assertEquals( version, tset.version() ) ;
+
+ // test iterator without remove
+ String rainbow = "" ;
+ for (String str : tset)
+ rainbow += " " + str ;
+
+ Assert.assertEquals( 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
+ }
+ }
+
+ private void recordCall( TimingPoints tp, Timer top,
+ TimerEventController controller, int transportDelay ) {
+
+ controller.enter( top ) ;
+
+ tp.enter_hasNextNext() ;
+ sleep( 1 ) ;
+ tp.exit_hasNextNext() ;
+
+ tp.enter_connectionSetup() ;
+ sleep( 4 ) ;
+ tp.exit_connectionSetup() ;
+
+ tp.enter_clientEncoding() ;
+ sleep( 100 ) ;
+ tp.exit_clientEncoding() ;
+
+ tp.enter_clientTransportAndWait() ;
+ sleep( transportDelay ) ;
+ tp.exit_clientTransportAndWait() ;
+
+ tp.enter_clientDecoding() ;
+ sleep( 40 ) ;
+ tp.exit_clientDecoding() ;
+
+ 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 ) ;
+
+ 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 ) ;
+
+ return handler.stats() ;
+ } finally {
+ orb.destroy() ;
+ }
+ }
+
+ @Test()
+ void generateStatsTable() {
+ Map<Timer, Statistics> data = makeData() ;
+
+ TimerUtils.writeHtmlTable( data, "stats.html",
+ "Client Test Timing Data" ) ;
+ }
+
+ public static void main( String[] args ) {
+ TestNG tng = new TestNG() ;
+
+ Class<?> cls = null ;
+
+ 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 ) ) ;
+
+ if (cls != null)
+ classes.add( cls ) ;
+
+ Class[] tngClasses = classes.toArray( new Class<?>[ classes.size() ] ) ;
+
+ tng.setTestClasses( tngClasses ) ;
+
+ tng.run() ;
+ System.out.println("tng.hasFailure="+tng.hasFailure());
+ 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
new file mode 100644
index 0000000..0975eb1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ControllableBaseSuite.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.timer ;
+
+import org.testng.TestNG ;
+import org.testng.Assert ;
+import org.testng.annotations.Test ;
+import org.testng.annotations.Configuration ;
+import org.testng.annotations.ExpectedExceptions ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Controllable ;
+import com.sun.corba.ee.spi.orbutil.newtimer.LogEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Named ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics ;
+import com.sun.corba.ee.spi.orbutil.newtimer.StatsEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+
+import com.sun.corba.ee.impl.orbutil.newtimer.ControllableBase ;
+import com.sun.corba.ee.impl.orbutil.newtimer.TimerFactoryImpl ;
+
+// Test NamedBase
+public class ControllableBaseSuite {
+ private String name = "MyName" ;
+ private int id = 26 ;
+ private String description = "Another simple test" ;
+ private TimerFactory factory ;
+ private ControllableTest ct ;
+
+ private static class ControllableTest extends ControllableBase {
+ public ControllableTest( int id, String name, String description,
+ TimerFactory 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 ) ;
+ }
+
+ @Configuration( afterTest = true )
+ public void tearDown() {
+ TimerFactoryBuilder.destroy( factory ) ;
+ }
+
+ @Test()
+ public void testId() {
+ Assert.assertEquals( id, ct.id() ) ;
+ }
+
+ @Test()
+ public void testDescription() {
+ 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() ) ;
+ }
+}
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
new file mode 100644
index 0000000..12da4ee
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/NamedBaseSuite.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.timer ;
+
+import org.testng.TestNG ;
+import org.testng.Assert ;
+import org.testng.annotations.Test ;
+import org.testng.annotations.Configuration ;
+import org.testng.annotations.ExpectedExceptions ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Controllable ;
+import com.sun.corba.ee.spi.orbutil.newtimer.LogEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Named ;
+import com.sun.corba.ee.spi.orbutil.newtimer.NamedBase ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics ;
+import com.sun.corba.ee.spi.orbutil.newtimer.StatsEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+
+// Test NamedBase
+public class NamedBaseSuite {
+ private String name = "MyName" ;
+ private TimerFactory factory ;
+ private NamedTest nb1 ;
+ private NamedTest nb2 ;
+
+ private static class NamedTest extends NamedBase {
+ public NamedTest( TimerFactory factory, String name ) {
+ super( factory, name ) ;
+ }
+
+ 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 ) ;
+ }
+
+ @Configuration( afterTest = true )
+ public void tearDown() {
+ TimerFactoryBuilder.destroy( factory ) ;
+ }
+
+ @Test()
+ public void name1() {
+ Assert.assertEquals( name, nb1.name() ) ;
+ }
+
+ @Test()
+ public void name2() {
+ Assert.assertEquals( name, nb2.name() ) ;
+ }
+
+ @Test()
+ public void factory1() {
+ Assert.assertEquals( factory, nb1.factory() ) ;
+ }
+
+ @Test()
+ @ExpectedExceptions( { IllegalStateException.class } )
+ public void factory2() {
+ TimerFactory tf = nb2.factory() ;
+ }
+
+ @Test()
+ public void equals() {
+ Assert.assertEquals( nb1, nb2 ) ;
+ }
+
+ @Test()
+ public void hashCode1() {
+ Assert.assertEquals( nb1.hashCode(), name.hashCode() ) ;
+ }
+
+ @Test()
+ public void hashCode2() {
+ Assert.assertEquals( nb2.hashCode(), name.hashCode() ) ;
+ }
+
+ @Test()
+ public void toString1() {
+ Assert.assertEquals( factory.name() + ":" +
+ name, nb1.toString() ) ;
+ }
+
+ @Test()
+ @ExpectedExceptions( { IllegalStateException.class } )
+ public void toString2() {
+ String ts = nb2.toString() ;
+ }
+
+ @Test()
+ @ExpectedExceptions( { IllegalStateException.class } )
+ public void setFactory1() {
+ nb1.finish( factory ) ;
+ }
+
+ @Test( dependsOnMethods = { "toString2", "factory2" } )
+ public void setFactory2() {
+ nb2.finish( factory ) ;
+ }
+
+ @Test( dependsOnMethods = { "setFactory2" } )
+ public void factory2Post() {
+ Assert.assertEquals( factory, nb2.factory() ) ;
+ }
+
+ @Test( dependsOnMethods = { "setFactory2" } )
+ 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
new file mode 100644
index 0000000..223ac91
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerFactorySuite.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.timer ;
+
+import java.util.Map ;
+
+import org.testng.TestNG ;
+import org.testng.Assert ;
+import org.testng.annotations.Test ;
+import org.testng.annotations.Configuration ;
+import org.testng.annotations.ExpectedExceptions ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Controllable ;
+import com.sun.corba.ee.spi.orbutil.newtimer.LogEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Named ;
+import com.sun.corba.ee.spi.orbutil.newtimer.NamedBase ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics ;
+import com.sun.corba.ee.spi.orbutil.newtimer.StatsEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+
+public class TimerFactorySuite {
+ private String tfName = "TFTF" ;
+ private String tfDescription = "The TimerFactorySuite TimerFactory" ;
+ private TimerFactory tf ;
+
+ private String timer1Name = "t1" ;
+ private String timer1Description = "Timer one" ;
+ private Timer t1 ;
+
+ private String timer2Name = "t2" ;
+ private String timer2Description = "Timer two" ;
+ private Timer t2 ;
+
+ private String timerGroup1Name = "tg1" ;
+ private String timerGroup1Description = "TimerGroup one" ;
+ 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 ;
+
+
+ @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 ) ;
+ }
+
+ @Configuration( afterTest = true )
+ public void tearDown() {
+ TimerFactoryBuilder.destroy( tf ) ;
+ }
+
+ @Test()
+ public void testNumberOfIds() {
+ 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 ) ;
+ }
+
+ @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 ) ;
+ }
+
+ @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 ) ;
+ }
+
+ @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 ) ;
+ }
+
+ @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 ) ;
+ }
+
+ @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 ) ;
+ }
+
+ @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 ) ;
+ }
+
+ // 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
new file mode 100644
index 0000000..a961d7c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerPointsSuite.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.timer ;
+
+import java.util.Iterator ;
+
+import java.io.IOException ;
+
+import org.testng.TestNG ;
+import org.testng.Assert ;
+import org.testng.annotations.Test ;
+import org.testng.annotations.Configuration ;
+import org.testng.annotations.ExpectedExceptions ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Controllable ;
+import com.sun.corba.ee.spi.orbutil.newtimer.LogEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Named ;
+import com.sun.corba.ee.spi.orbutil.newtimer.NamedBase ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics ;
+import com.sun.corba.ee.spi.orbutil.newtimer.StatsEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEventHandler ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+
+// source is in optional directory
+import com.sun.corba.ee.impl.orbutil.newtimer.TimerPointSourceGenerator ;
+
+import com.sun.corba.ee.spi.orbutil.generic.Pair ;
+
+public class TimerPointsSuite {
+ @Test()
+ public void testXMLParser() {
+ // 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 ) ;
+
+ // 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.dtd b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.dtd
new file mode 100644
index 0000000..f313a9e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.dtd
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ELEMENT timing (timer|timerGroup)+>
+<!ATTLIST timing
+ name CDATA #REQUIRED
+ package CDATA #REQUIRED>
+<!ELEMENT timer EMPTY>
+<!ATTLIST timer
+ name CDATA #REQUIRED
+ description CDATA #IMPLIED>
+<!ELEMENT timerGroup (contains)*>
+<!ATTLIST timerGroup
+ name CDATA #REQUIRED
+ description CDATA #IMPLIED>
+<!ELEMENT contains EMPTY>
+<!ATTLIST contains name CDATA #REQUIRED>
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
new file mode 100644
index 0000000..b7ee359
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!DOCTYPE timing SYSTEM "./timing.dtd">
+
+<timing name="TimingPoints" package="com.sun.corba.ee.impl.orbutil.newtimer">
+ <timer name="hasNextNext" description="Call to contactInfoListIterator hasNext and next in CorbaClientDelegateImpl"/>
+ <timer name="connectionSetup" description="Setting up connection in CorbaClientRequestDispatcherImpl"/>
+ <timer name="clientEncoding" description="Client side request marshalling in CorbaClientRequestDispatcherImpl"/>
+ <timer name="clientTransportAndWait" description="Client side transport and wait for response in CorbaClientRequestDispatcherImpl"/>
+ <timer name="clientDecoding" description="Client side response unmarshalling in CorbaClientRequestDispatcherImpl"/>
+
+ <timer name="test1" description="A test timer"/>
+ <timer name="test2" description="A test timer"/>
+ <timer name="test3" description="A test timer"/>
+ <timer name="test4" description="A test timer"/>
+ <timer name="test5" description="A test timer"/>
+ <timer name="test6" description="A test timer"/>
+ <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"/>
+ </timerGroup>
+
+ <timerGroup name="tg2" description="A test timer group">
+ <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"/>
+ </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"/>
+ </timerGroup>
+
+ <timerGroup name="transport" description="All transport activity">
+ <contains name="transportClient"/>
+ </timerGroup>
+</timing>
+
+
+
+
+
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/testng.xml b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/testng.xml
new file mode 100644
index 0000000..e0d6012
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/testng.xml
@@ -0,0 +1,31 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<suite name="corba-test" >
+ <test name="corba.timer" >
+ <classes>
+ <class name="corba.timer.ActivationSuite" />
+ <class name="corba.timer.Client" />
+ <class name="corba.timer.ControllableBaseSuite" />
+ <class name="corba.timer.NamedBaseSuite" />
+ <class name="corba.timer.TimerFactorySuite" />
+ <class name="corba.timer.TimerPointsSuite" />
+ </classes>
+ </test>
+</suite>
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
new file mode 100644
index 0000000..b21c262
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/LogProcessorAverager.java
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+//
+// Created : 2005 Apr 29 (Fri) 07:09:21 by Harold Carr.
+// Last Modified : 2005 Jun 09 (Thu) 14:09:51 by Harold Carr.
+//
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.text.NumberFormat;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Note: Although this source file lives in impl.orbutil.timer it
+ * does NOT contain a package declaration. Further, it makes has
+ * no dependencies on the CORBA codebase. Finally, it is not compiled
+ * as part of the CORBA build.
+ *
+ * If you want to use it, just compile it with nothing extra in the classpath.
+ *
+ * It assumes that named points come in pairs:
+ * BEGIN -point1-
+ * END -point1-
+ *
+ * It assumes that the point names and the data are separated by: #####
+ *
+ * It assumes the times given in the log file are in nanoseconds.
+ *
+ * Usage: give it the name of the log file.
+ *
+ * Prints the average of of BEGIN/END point to standard out.
+ *
+ * @author Harold Carr
+ */
+public class LogProcessorAverager
+{
+ static NumberFormat format = null;
+
+ static {
+ format = NumberFormat.getInstance();
+ format.setMaximumFractionDigits(10);
+ format.setMinimumFractionDigits(10);
+ }
+
+ static Map<Integer, Point> data;
+ static Map<String, Integer> beginPointNameToInt;
+
+ static String filename;
+
+ private static final long SCALE = 1000000000;
+
+ public static void main(String[] av)
+ {
+ 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) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void readPoints(BufferedReader br)
+ 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));
+ }
+ }
+ }
+
+ public static void readData(BufferedReader br)
+ 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);
+ }
+ }
+
+ 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("----------------------------------------");
+ }
+
+ public static String format(double d) {
+ return format.format(d);
+ }
+}
+
+class Point
+{
+ int intId;
+ String name;
+ long value;
+
+ Point(int intId, String name)
+ {
+ this.intId = intId;
+ this.name = name;
+ value = -1;
+ }
+ int getIntId() { return intId; }
+ String getName() { return name; }
+ long getValue() { return value; }
+ void setValue(long x) { value = x; }
+ double getAverage() { throw new RuntimeException("Not Implemented"); }
+ int getIterations() { throw new RuntimeException("Not Implemented"); }
+ String toStringString()
+ {
+ return intId + " " + name + " " + value;
+ }
+}
+
+class BeginPoint extends Point
+{
+ BeginPoint(int intId, String name)
+ {
+ super(intId, name);
+ }
+ public String toString()
+ {
+ return "BeginPoint[ " + toStringString() + " ]";
+ }
+}
+
+class EndPoint extends Point
+{
+ Map<Integer, Point> data;
+ Map<String, Integer> beginPointNameToInt;
+ int iterations;
+
+ EndPoint(int intId, String name, Map<Integer, Point> data,
+ Map<String, Integer> beginPointNameToInt)
+ {
+ 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++;
+ }
+ double getAverage()
+ {
+ return value / iterations;
+ }
+ int getIterations()
+ {
+ return iterations;
+ }
+ public String toString()
+ {
+ return "EndPoint[ " + toStringString() + " " + iterations + " ]";
+ }
+}
+
+// End of file.
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
new file mode 100644
index 0000000..deba67f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerPointSourceGenerator.java
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.corba.ee.impl.orbutil.newtimer ;
+
+import java.io.IOException ;
+import java.io.File ;
+import java.io.PrintStream ;
+
+import org.xml.sax.SAXException ;
+import org.xml.sax.Attributes ;
+
+import org.xml.sax.helpers.DefaultHandler ;
+
+import javax.xml.parsers.SAXParserFactory ;
+import javax.xml.parsers.ParserConfigurationException ;
+import javax.xml.parsers.SAXParser ;
+
+import java.util.List ;
+import java.util.ArrayList ;
+import java.util.Map ;
+import java.util.HashMap ;
+import java.util.Set ;
+import java.util.HashSet ;
+import java.util.Collections ;
+import java.util.Properties ;
+
+import java.io.IOException ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Controllable ;
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory ;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerFactoryBuilder ;
+
+import com.sun.corba.ee.spi.orbutil.generic.Pair ;
+
+import com.sun.corba.ee.impl.codegen.Identifier ;
+
+import com.sun.corba.ee.spi.codegen.Type ;
+import com.sun.corba.ee.spi.codegen.Expression ;
+import com.sun.corba.ee.spi.codegen.Signature ;
+
+import static java.lang.reflect.Modifier.* ;
+
+import static com.sun.corba.ee.spi.codegen.Wrapper.* ;
+
+/** Class used to compile an XML description of timer and timergroup
+ * information into a Java source file. Uses the codegen library
+ * to generate the source file.
+ *
+ * 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
+ * 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 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" ) ;
+ }
+
+ 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 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 ) ;
+ }
+
+ 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 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 ;
+ }
+ }
+
+ private static class Handler extends DefaultHandler {
+ 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" ;
+
+ 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 ;
+
+ 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 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 {
+
+ 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 ;
+ }
+
+ 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
+ * 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 {
+
+ _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") ) ;
+
+ // no static initializer needed
+
+ generateFields( tf ) ;
+ generateConstructor( tf ) ;
+ generateEnterExitMethods( tf ) ;
+
+ _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" ) ;
+
+ 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() ) ;
+ }
+ }
+
+ private static void generateConstructor( TimerFactory tf ) {
+ _constructor( PUBLIC ) ;
+ _arg( _t("TimerFactory"), "tf" ) ;
+ _arg( _t("TimerEventController"), "controller" ) ;
+ _body() ;
+
+ // 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()))) ;
+ }
+ }
+
+ _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() ) ;
+ }
+ }
+
+ // 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() ;
+ }
+
+ 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 ) ;
+ }
+ }
+ }
+}
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
new file mode 100644
index 0000000..d50c557
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerUtils.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package corba.framework ;
+
+import java.util.Map ;
+import java.util.ArrayList ;
+
+import java.io.File ;
+import java.io.PrintStream ;
+import java.io.PrintWriter ;
+
+import com.sun.corba.ee.spi.orbutil.newtimer.Timer;
+import com.sun.corba.ee.spi.orbutil.newtimer.Statistics;
+import com.sun.corba.ee.spi.orbutil.newtimer.TimerEvent;
+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.TimerEventController;
+import com.sun.corba.ee.spi.orbutil.newtimer.LogEventHandler;
+
+
+public class TimerUtils {
+ private TimerUtils() {}
+
+ public static void dumpLogToFile( TimerFactory tf, LogEventHandler log,
+ File file ) {
+
+ PrintStream ps = null ;
+ try {
+ ps = new PrintStream( 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() ) ;
+ }
+
+ 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 ) {
+
+ 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() ;
+ }
+
+ /** 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 ) {
+
+ // open a file and a printWriter here
+ PrintWriter pw = null ;
+ try {
+ pw = new PrintWriter( fname ) ;
+ pw.println(
+ "<html>"+
+ "<head>"+
+ " <title>" + title + "</title>"+
+ "</head>"+
+ "<body>"+
+ "<h1>"+ title +"</h1>"+
+ "<table border=1 cellpadding=2 cellspacing=2>"+
+ " <tr>"+
+ " <td>name</td>"+
+ " <td>count</td>"+
+ " <td>min</td>"+
+ " <td>max</td>"+
+ " <td>average</td>"+
+ " <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>");
+ }
+ pw.println(
+ "</table>"+
+ "</body>"+
+ "</html>");
+
+ } catch (Exception exc) {
+ throw new RuntimeException( exc ) ;
+ } finally {
+ if (pw != null)
+ pw.close() ;
+ }
+
+ }
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/README
new file mode 100644
index 0000000..5146b20
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/README
@@ -0,0 +1,3 @@
+Directory: appserv-tests/ee.
+Purpose: Checkin all the devtests that are required for AS 8.1 SE/EE functionality. It is not necessary that the tests are "specific" to SE/EE because an SE/EE installation has to work like a PE installation too. It is expected that all the tests are uniformly written and produce the reports properly.
+Date Created: 27 Feb 2004
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/README
new file mode 100644
index 0000000..e18a44b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/README
@@ -0,0 +1,7 @@
+Directory: appserv-tests/devtests/ee/admin
+Purpose: All the devtests pertaining to AS PE/SE/EE 8.1 administration. Various subdirectories here are supposed to test the specific feature described in its README. Note that these tests are slightly different than unit tests, because they test the feature when the server is started.
+
+
+UPDATE: date: 08/05/2005, by km105526
+
+The admin devtests are in <appserv-tests>/devtests/admin, not here.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/configmbeans/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/configmbeans/README
new file mode 100644
index 0000000..9689b14
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/configmbeans/README
@@ -0,0 +1,5 @@
+Directory: appserv-tests/devtests/ee/admin/configmbeans
+Purpose: Testing our configmbeans in a PE/SE/EE setup. Note that this is tricky because we have different semantics here. We have to apply judgement while testing a particular MBean.
+
+
+Contact Abhijit Kumar/ Kedar Mhaswade/ Ramakanth Kunapuli/ Kenneth Ebbs for details, enhancements.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/dottednames/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/dottednames/README
new file mode 100644
index 0000000..00f8666
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/dottednames/README
@@ -0,0 +1,4 @@
+Directory: appserv-tests/devtests/ee/admin/dottednames
+Purpose: Testing our entire suite of dotted names in both PE and SE/EE context. This is very important because (inadvertently) the dotted names become our exposed interface as users tend to use them heavily.
+
+Contact Lloyd Chambers for details, enhancements.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/jsr77/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/jsr77/README
new file mode 100644
index 0000000..e3943a2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/jsr77/README
@@ -0,0 +1,4 @@
+Directory: appserv-tests/devtests/ee/admin/jsr77
+Purpose: Testing our JSR 77 implementation in an SE/EE setup.
+
+Contact Sreenivas Munnangi/Abhijit Kumar for details, enhancements.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/README
new file mode 100644
index 0000000..0eff80f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/README
@@ -0,0 +1,4 @@
+Directory: appserv-tests/devtests/ee/admin/mbeanapi
+Purpose: Testing the MBeanAPI that we are planning to expose for external management clients. It is very critical that this is tested thoroughly as our internal tools (GUI/CLI) may not test them.
+
+Contact Lloyd Chambers/ Abhijit Kumar/ Kenneth Ebbs for details, enhancements.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/README
new file mode 100644
index 0000000..42256f1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/README
@@ -0,0 +1,41 @@
+This directory contains classes that can be reused for other
+tests. Examples using AMX include creating a connection to a DAS,
+creating an instance, creating a cluster, deleting an instance,
+deleting a cluster, starting an instance, stopping an instance,
+starting a cluster and stopping a cluster, etc.
+
+At some point a basic ant task that will set up a testing environment
+of instances and clusters will be written using these classes.
+
+To Build the common submodule run the following command in this sub
+directory:
+ant build
+
+To Run the AMXConnectionVerifier test,open build.xml and
+modify the values of sysproperty as per your for the appropriate
+target do the following:
+ant run-amx-connection-verifier
+
+To Run the StandaloneInstanceManager test, open build.xml and
+modify the values of sysproperty as per your for the appropriate
+target and do the following:
+ant run-standalone-instance-manager
+
+REMEMBER TO CLEAN UP (delete) the two instances created in the above
+test in order to be able to run the test again as is. If not, change
+the arg element's values in the appropriate target.
+
+More Info about classes:
+1. AMXConnector is a useful utility that provides you with a
+connection to DAS through the AppserverConnectionSource object (this
+is the entry point for AMX). It has useful methods that give you the DomainRoot
+object through which one can traverse other the AMX objects.
+
+2. StandaloneInstanceManager is a class that provides you with the
+ ability to create, start, stop and delete a standalone instance. It
+ uses AMX internally. You can use an instance of this class for
+ some setup operations.
+
+.... more to come.
+
+//Shreedhar
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/bootstrap.subcomponent.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/bootstrap.subcomponent.properties
new file mode 100644
index 0000000..3b4dbf4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/bootstrap.subcomponent.properties
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+publish.root.dir=../../../../../..
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
new file mode 100755
index 0000000..e0409f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.properties
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+src.dir=.
+mbeanapi.jar=${publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmxri.jar=${publish.home}/jmx/lib/jmxri.jar
+jmxremote.jar=${publish.home}/rjmx-ri/jmxremote.jar
+mgmtapi.jar=${publish.home}/management-api/lib/management-api.jar
+standalone.instance.one=st-One
+standalone.instance.two=st-Two
+standalone.instance.three=st-Three
+
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
new file mode 100755
index 0000000..5e83e33
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Config tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../appserv/build.properties"/>
+<property file="./../../../../../config.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${mgmtapi.jar}"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${build}"/>
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${jmxremote.jar}"/>
+ <pathelement location="${mgmtapi.jar}"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component" />
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <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}"/>
+ </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"/>
+ </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"/>
+ </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
new file mode 100755
index 0000000..859101e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnectionVerifier.java
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+
+
+import com.sun.appserv.management.base.AMX;
+import com.sun.appserv.management.base.XTypes;
+import com.sun.appserv.management.base.Util;
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.config.HTTPServiceConfig;
+import com.sun.appserv.management.config.ConfigConfig;
+import com.sun.appserv.management.base.QueryMgr;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+
+
+/**
+ * This test uses com.sun.enterprise.admin.mbeanapi.common.AMXConnector.java to get a connection to the MBean Server
+ * and then gets a bunch of ObjectNames and lists them.
+ * <b>Usage: java -DHOST=hostname -DPORT=port -DADMIN_USER=username
+ * -D ADMIN_PASSWORD=passwd -DUSE_TLS=false/true
+ * -classpath <should include mbean api jars and impls, jmxri and jmxremote.jar>
+ * com.sun.enterprise.admin.mbeanapi.common.AMXConnectionVerifier</B>
+ *
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 23, 2004
+ * @version $Revision: 1.2 $
+ */
+public class AMXConnectionVerifier {
+ private final DomainRoot mDomainRoot;
+
+ private DomainConfig getDomainConfig()
+ {
+ return( mDomainRoot.getDomainConfig() );
+ }
+
+ private QueryMgr getQueryMgr()
+ {
+ return( mDomainRoot.getQueryMgr() );
+ }
+
+ public void println( Object o )
+ {
+ System.out.println( toString( o ) );
+ }
+
+ public String toString( Object o )
+ {
+ return( SmartStringifier.toString( o ) );
+ }
+
+ private void listMap(final String msg, final Map m)
+ {
+ println( msg + ": " + toString( m.keySet() ) );
+ }
+
+ private void list()
+ {
+ final DomainConfig dcp = getDomainConfig();
+
+ // Top-level items
+ println( "\n--- Top-level --- \n" );
+
+ listMap( "ConfigConfig", dcp.getConfigConfigMap() );
+
+ listMap( "ServerConfig", dcp.getServerConfigMap() );
+
+ listMap( "StandaloneServerConfig", dcp.getStandaloneServerConfigMap() );
+
+ listMap( "ClusteredServerConfig", dcp.getClusteredServerConfigMap() );
+
+ listMap( "ClusterConfig", dcp.getClusterConfigMap() );
+
+
+ // deployed items
+ println( "\n--- DeployedItems --- \n" );
+ listMap( "J2EEApplicationConfig", dcp.getJ2EEApplicationConfigMap() );
+ listMap( "EJBModuleConfig", dcp.getEJBModuleConfigMap() );
+ listMap( "WebModuleConfig", dcp.getWebModuleConfigMap() );
+ //listMap( "RARModuleConfig", dcp.getRARModuleMap() );
+ listMap( "AppClientModuleConfig", dcp.getAppClientModuleConfigMap() );
+ listMap( "LifecycleModuleConfig", dcp.getLifecycleModuleConfigMap() );
+
+
+ // resources
+ println( "\n--- Resources --- \n" );
+
+ listMap( "CustomResourceConfig", dcp.getCustomResourceConfigMap() );
+ listMap( "PersistenceManagerFactoryResourceConfig",
+ dcp.getPersistenceManagerFactoryResourceConfigMap() );
+ listMap( "JNDIResourceConfig", dcp.getJNDIResourceConfigMap() );
+ listMap( "JMSResourceConfig", dcp.getJMSResourceConfigMap() );
+ listMap( "JDBCResourceConfig", dcp.getJDBCResourceConfigMap() );
+ listMap( "ConnectorResourceConfig", dcp.getConnectorResourceConfigMap() );
+ listMap( "JDBCConnectionPoolConfig", dcp.getJDBCConnectionPoolConfigMap() );
+ listMap( "PersistenceManagerFactoryResourceConfig",
+ dcp.getPersistenceManagerFactoryResourceConfigMap() );
+ listMap( "ConnectorConnectionPoolResourceConfig",
+ dcp.getConnectorConnectionPoolConfigMap() );
+ listMap( "AdminObjectResourceConfig", dcp.getAdminObjectResourceConfigMap() );
+ listMap( "ResourceAdapterConfig", dcp.getResourceAdapterConfigMap() );
+ listMap( "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();
+ listMap( "HTTPListeners", httpService.getHTTPListenerConfigMap() );
+ listMap( "VirtualServers", httpService.getVirtualServerConfigMap() );
+ }
+
+ /**
+ List all MBeans that have j2eeType=*ResourceConfig
+ */
+ private void queryWild(final String name, final String value)
+ {
+ final String[] propNames = new String[ 1 ];
+ propNames[ 0 ] = name;
+
+ final String[] propValues = new String[ 1 ];
+ propValues[ 0 ] = value;
+
+ final Set items = getQueryMgr().queryWildSet( propNames, propValues );
+
+ println( "\n--- Queried for " + propNames[ 0 ] + "=" + propValues[ 0 ] + " ---" );
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX item = (AMX)iter.next();
+
+ println( "j2eeType=" + item.getJ2EEType() + "," + "name=" + item.getName() );
+ }
+ }
+
+ /**
+ List all MBeans that have j2eeType=<j2eeType>
+ */
+ private void queryForJ2EEType( final String j2eeType )
+ {
+ final String prop = Util.makeJ2EETypeProp( j2eeType );
+ final Set items = getQueryMgr().queryPropsSet( prop );
+
+ println( "\n--- Queried for " + prop + " ---" );
+
+ 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( item.getFullType() );
+ }
+ }
+
+ private void proveConnection()
+ {
+ println("Listing.....");
+ list( );
+ /*println("querying Wild......");
+ queryWild( AMX.J2EE_TYPE_KEY, "*ResourceConfig" );*/
+ println("querying for j2ee type.....");
+ queryForJ2EEType( XTypes.SSL_CONFIG );
+ }
+
+ 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 );
+
+ mDomainRoot = ct.getDomainRoot();
+
+ proveConnection( );
+ }
+
+
+ public static void main( final String[] args )
+ {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try
+ {
+ new AMXConnectionVerifier(System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER", "admin"),
+ System.getProperty("ADMIN_PASSWORD", "adminadmin"),
+ Boolean.valueOf(System.getProperty("USE_TLS","false")).booleanValue());
+ }
+ catch( Throwable t )
+ {
+ ExceptionUtil.getRootCause( t ).printStackTrace();
+ }
+ }
+}
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
new file mode 100755
index 0000000..81b6b3e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnector.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+import java.io.File;
+import java.io.IOException;
+
+import com.sun.appserv.management.client.AppserverConnectionSource;
+import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.TrustStoreTrustManager;
+
+import com.sun.appserv.management.DomainRoot;
+
+/**
+ * Creates a connection to a specified DAS instance
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 23, 2004
+ * @version $Revision: 1.2 $
+ */
+public class AMXConnector {
+ 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";
+
+ // currently it defaults to using rmi transport.
+ public AMXConnector(
+ final String host,
+ final int port,
+ final String user,
+ final String password,
+ final boolean useTLS )
+ throws IOException
+ {
+ mHandshakeCompletedListener = null;
+
+ TLSParams tlsParams = null;
+
+ if ( useTLS )
+ {
+ tlsParams = createTLSParams( );
+ }
+
+ final String info = "host=" + host + ", port=" + port +
+ ", user=" + user + ", password=" + password +
+ ", tls=" + useTLS;
+
+ info( "Connecting: " + info );
+
+ mAppserverConnectionSource =
+ new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
+ host, port, user, password, tlsParams, null);
+
+
+ mDomainRoot = mAppserverConnectionSource.getDomainRoot();
+
+ info( "Connection established successfully: " + info );
+ if ( useTLS )
+ {
+ assert( mHandshakeCompletedListener.getLastEvent() != null );
+ info( "HandshakeCompletedEvent: " + mHandshakeCompletedListener.getLastEvent() );
+ }
+ }
+
+ private TLSParams createTLSParams()
+ {
+ final File trustStore = new File( TRUST_STORE_FILE );
+ final char[] trustStorePassword = TRUST_STORE_PASSWORD.toCharArray();
+
+ mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
+ final TrustStoreTrustManager trustMgr =
+ new TrustStoreTrustManager( trustStore, trustStorePassword);
+ trustMgr.setPrompt( true );
+
+ final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
+
+ return( tlsParams );
+ }
+
+ private static void info( final Object o )
+ {
+ System.out.println( o.toString() );
+ }
+
+ public DomainRoot getDomainRoot()
+ {
+ return( mDomainRoot );
+ }
+
+
+ public AppserverConnectionSource getAppserverConnectionSource()
+ {
+ return( mAppserverConnectionSource );
+ }
+}
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
new file mode 100644
index 0000000..4576a56
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXMonitoringTestBase.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.monitor.ApplicationMonitor;
+import com.sun.appserv.management.monitor.MonitoringRoot;
+import com.sun.appserv.management.monitor.MonitoringStats;
+import com.sun.appserv.management.monitor.ServerRootMonitor;
+import java.io.IOException;
+import javax.management.j2ee.statistics.Statistic;
+import javax.management.j2ee.statistics.Stats;
+
+/**
+ */
+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,
+ final String adminUser, final String adminPassword,
+ final boolean useTLS) throws IOException {
+
+ 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 =
+ (serverName != null || "".equals(serverName))
+ ? ( (ServerRootMonitor) getMonitoringRoot().
+ getServerRootMonitorMap().get(serverName) )
+ : ( (ServerRootMonitor) getMonitoringRoot().
+ getServerRootMonitorMap().get(SERVER_NAME) );
+ assert(svrRoot != null) : "Cannot find server with name " +
+ serverName + "!";
+ return svrRoot;
+ }
+
+
+ /**
+ *
+ */
+ public ApplicationMonitor getApplicationMonitor(
+ final String serverName, final String appName) {
+ 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 " +
+ appName + "!";
+ return app;
+ }
+
+
+ /**
+ *
+ */
+ 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()
+ + " doesn't exist!");
+ }
+ }
+
+
+ /**
+ *
+ */
+ public void printStats(Statistic[] stats) {
+ if (stats == null) {
+ return;
+ }
+
+ for ( int i=0; i < stats.length; i++) {
+ printStat(stats[i]);
+ }
+ }
+
+
+ /**
+ *
+ *
+ */
+ public void printStat(Statistic stat) {
+ if (stat == null) {
+ return;
+ } else {
+ System.out.println(" | ");
+ System.out.println(" | ");
+ System.out.println(" --- Stat [" + stat.getName() + "]");
+ System.out.println(" |");
+ System.out.println(" |");
+ System.out.println(" ---- Description: "
+ + stat.getDescription());
+ System.out.println(" ---- Start Time: "
+ + stat.getStartTime());
+ System.out.println(" ---- Last Sample Time: "
+ + stat.getLastSampleTime());
+ System.out.println(" ---- Unit: "
+ + stat.getUnit());
+ System.out.println("\n");
+ }
+ }
+
+ /**
+ *
+ */
+ public static void printArgs(final String [] args) {
+ System.out.println("Printing arguments......");
+ for(int i = 0; i < args.length; i++) {
+ System.out.println("Args[" + i + "]: " + args[i]);
+ }
+ }
+
+ /**
+ *
+ */
+ public void printBlock(final String title) {
+ System.out.println("\n*******************************************");
+ System.out.println("* *");
+ System.out.println("* " + title + " *");
+ System.out.println("* *");
+ System.out.println("*******************************************\n");
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ClusterManager.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ClusterManager.java
new file mode 100644
index 0000000..4518bc7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ClusterManager.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+import com.sun.appserv.management.config.*;
+import com.sun.appserv.management.j2ee.J2EEServer;
+import com.sun.appserv.management.j2ee.J2EECluster;
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Iterator;
+
+/**
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Sep 12, 2004
+ * @version $Revision: 1.2 $
+ */
+public class ClusterManager {
+ AMXConnector mAsapiConnector;
+ ClusterConfig mClusterCfg;
+ DomainConfig mDomainConfig;
+
+ public ClusterManager(
+ final String host,
+ final int port,
+ final String adminUser,
+ final String adminPassword,
+ final boolean useTLS )
+ throws IOException
+ {
+ mAsapiConnector = new AMXConnector(host, port, adminUser, adminPassword, useTLS);
+ mDomainConfig = mAsapiConnector.getDomainRoot().getDomainConfig();
+ }
+
+ public ClusterManager( final AMXConnector conn){
+ mAsapiConnector = conn;
+ mDomainConfig = mAsapiConnector.getDomainRoot().getDomainConfig();
+ }
+
+ /**
+ * creates a cluster
+ * @param clusterName
+ * @param configName
+ * @param optional
+ *
+ * @return ClusterConfig
+ */
+ public ClusterConfig createCluster(final String clusterName,
+ final String configName,
+ final java.util.Map optional ) throws Exception
+ {
+ mClusterCfg = mDomainConfig.createClusterConfig(clusterName, configName, optional);
+ return mClusterCfg;
+ }
+
+ /**
+ * removes a cluster
+ * @param name
+ */
+ public void deleteCluster(final String name) throws Exception{
+ mDomainConfig.removeClusterConfig(name);
+ }
+
+ /**
+ * Starts a cluster
+ * @param name
+ * @throws ObjectNotFoundException
+ */
+ public void startCluster(final String name) throws ObjectNotFoundException {
+ final J2EECluster cluster = getCluster(name);
+ if(cluster != null){
+ cluster.start();
+ return;
+ }
+ throw new ObjectNotFoundException("startInstance: instance "+
+ name+" was not found by the DAS");
+ }
+
+
+ /**
+ * stops a named standalone instance
+ * @param name
+ */
+ public void stopCluster(final String name) throws ObjectNotFoundException {
+ final J2EECluster cluster = getCluster(name);
+ if(cluster != null){
+ cluster.stop();
+ return;
+ }
+ throw new ObjectNotFoundException("stopInstance: instance "+
+ name + " was not found by the DAS");
+ }
+
+ private J2EECluster getCluster(final String name) {
+ final Map clusters = mAsapiConnector.getDomainRoot().getJ2EEDomain().getClusterMap();
+ final Iterator iter;
+ J2EECluster cluster=null;
+ String listName;
+ for(iter=clusters.keySet().iterator();iter.hasNext();){
+ if((listName = (String)iter.next()).equals(name)){
+ cluster = (J2EECluster)clusters.get(listName);
+ break;
+ }
+ }
+ return cluster;
+ }
+
+ public void listClusters() {
+ final Map clusters = mAsapiConnector.getDomainRoot().getJ2EEDomain().getClusterMap();
+ final Iterator iter;
+ for(iter=clusters.keySet().iterator();iter.hasNext();){
+ println(((J2EECluster)iter.next()).getName());
+ }
+ }
+
+ public boolean isCreated(final String name){
+ final J2EECluster cluster = getCluster(name);
+ if( cluster != null )
+ return true;
+ return false;
+ }
+ public static void println( final Object o )
+ {
+ System.out.println( toString( o ) );
+ }
+
+ private static String toString(final Object o )
+ {
+ return( SmartStringifier.toString( o ) );
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ClusteredInstanceManager.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ClusteredInstanceManager.java
new file mode 100644
index 0000000..d45b13d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ClusteredInstanceManager.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+import com.sun.appserv.management.config.*;
+import com.sun.appserv.management.j2ee.J2EEServer;
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Iterator;
+
+/**
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Sep 12, 2004
+ * @version $Revision: 1.6 $
+ */
+public class ClusteredInstanceManager {
+ AMXConnector mAsapiConnector;
+ ClusteredServerConfig mClusteredServerCfg;
+ DomainConfig mDomainConfig;
+
+ public ClusteredInstanceManager(
+ final String host,
+ final int port,
+ final String adminUser,
+ final String adminPassword,
+ final boolean useTLS)
+ throws IOException
+ {
+ mAsapiConnector = new AMXConnector(host, port, adminUser, adminPassword, useTLS);
+ mDomainConfig = mAsapiConnector.getDomainRoot().getDomainConfig();
+
+ }
+
+ public ClusteredInstanceManager(final AMXConnector conn)
+ {
+ mAsapiConnector = conn;
+ mDomainConfig = mAsapiConnector.getDomainRoot().getDomainConfig();
+ }
+
+ /**
+ * creates a standalone instance
+ * @param name
+ * @param nodeAgentName
+ * @param clusterName
+ * @param optional
+ *
+ * @return ClusteredServerConfig
+ */
+ public ClusteredServerConfig createInstance(
+ final String name,
+ final String nodeAgentName,
+ final String clusterName,
+ final java.util.Map optional) throws Exception
+ {
+ println("creating instance...");
+ mClusteredServerCfg = mDomainConfig.createClusteredServerConfig(name,
+ clusterName, nodeAgentName,
+ optional);
+ return mClusteredServerCfg;
+ }
+
+ /**
+ * removes a standalone instance
+ * @param name
+ */
+ public void deleteInstance(final String name){
+ mDomainConfig.removeClusteredServerConfig(name);
+ }
+
+ /**
+ * Starts a named standalone instance
+ * @param name
+ * @throws ObjectNotFoundException
+ */
+ public void startInstance(final String name) throws ObjectNotFoundException {
+ final J2EEServer instance = getInstance(name);
+ if(instance != null){
+ instance.start();
+ return;
+ }
+ throw new ObjectNotFoundException("startInstance: instance "+
+ name+" was not found by the DAS");
+ }
+
+
+ /**
+ * stops a named standalone instance
+ * @param name
+ */
+ public void stopInstance(final String name) throws ObjectNotFoundException {
+ final J2EEServer instance = getInstance(name);
+ if(instance != null){
+ instance.stop();
+ return;
+ }
+ throw new ObjectNotFoundException("stopInstance: instance "+
+ name + " was not found by the DAS");
+ }
+
+ private J2EEServer getInstance(final String name) {
+ final Map servers = mAsapiConnector.getDomainRoot().getJ2EEDomain().getServerMap();
+ final Iterator iter;
+ J2EEServer instance=null;
+ String listName;
+ for(iter=servers.keySet().iterator();iter.hasNext();){
+ if((listName = (String)iter.next()).equals(name)){
+ instance = (J2EEServer)servers.get(listName);
+ break;
+ }
+ }
+ return instance;
+ }
+
+ public void listInstances() {
+ final Map servers = mAsapiConnector.getDomainRoot().getJ2EEDomain().getServerMap();
+ final Iterator iter;
+ for(iter=servers.keySet().iterator();iter.hasNext();){
+ println(((J2EEServer)iter.next()).getName());
+ }
+ }
+
+ public boolean isCreated(final String name){
+ final J2EEServer instance = getInstance(name);
+ if( instance != null )
+ return true;
+ return false;
+ }
+
+ /* public static void main(final String [] args){
+
+ final ClusteredInstanceManager cim;
+ try {
+ cim = new ClusteredInstanceManager(System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER","admin"),
+ System.getProperty("ADMIN_PASSWORD","adminadmin"),
+ Boolean.valueOf(System.getProperty("USE_TLS","false")).booleanValue());
+ final String instanceName = args[0];
+ try{
+ println("*******Creating Instance "+instanceName+".");
+ cim.createInstance(instanceName, "testcluster", "iasengsol11.red.iplanet.com", null, null);
+ } catch(Exception e){
+ final Throwable ex = ExceptionUtil.getRootCause(e);
+ if((ex.getMessage()).indexOf("WARNING") < 0){
+ println(ex.getMessage());
+ }
+ }
+ if(cim.isCreated(instanceName)){
+ println("*******Instance "+instanceName+" creation verified.");
+ callStartInstance(instanceName, cim);
+ return;
+ }
+ } catch (IOException e) {
+ println(e.getMessage());
+ }
+ }
+
+ private static void callStartInstance(final String instanceName, final ClusteredInstanceManager cim) {
+ try {
+ println("*******Starting Instance "+instanceName+".");
+ cim.startInstance(instanceName);
+ println("*******Instance "+instanceName+" started.");
+
+ } catch (Exception e1) {
+ final Throwable t = ExceptionUtil.getRootCause(e1);
+ println("Exception Received:"+t.getClass().getName()+":"+t.getMessage());
+ }
+ }
+ */
+ public static void println( final Object o )
+ {
+ System.out.println( toString( o ) );
+ }
+
+ private static String toString(final Object o )
+ {
+ return( SmartStringifier.toString( o ) );
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ObjectNotFoundException.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ObjectNotFoundException.java
new file mode 100755
index 0000000..37e2929
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/ObjectNotFoundException.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+/**
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.1 $
+ */
+public class ObjectNotFoundException extends Exception{
+ public ObjectNotFoundException(String msg){
+ super(msg);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/StandaloneInstanceManager.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/StandaloneInstanceManager.java
new file mode 100755
index 0000000..7e53381
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/StandaloneInstanceManager.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.common;
+
+import com.sun.appserv.management.j2ee.J2EEServer;
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.config.StandaloneServerConfig;
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import java.io.IOException;
+import java.util.Set;
+import java.util.Map;
+import java.util.Iterator;
+
+/**
+ * Provides a handle to manage a standalone instance including
+ * creating one, removing it, starting it, stopping it.
+ *
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.6 $
+ */
+public class StandaloneInstanceManager {
+ AMXConnector mAmxConnector;
+ StandaloneServerConfig mServerCfg;
+ DomainConfig mDomainConfig;
+
+ public StandaloneInstanceManager(
+ final String host,
+ final int port,
+ final String adminUser,
+ final String adminPassword,
+ final boolean useTLS )
+ throws IOException
+ {
+ mAmxConnector = new AMXConnector(host, port, adminUser, adminPassword, useTLS);
+ mDomainConfig = mAmxConnector.getDomainRoot().getDomainConfig();
+ }
+
+ /**
+ * creates a standalone instance
+ * @param name
+ * @param nodeAgentName
+ * @param configName
+ * @param optional
+ *
+ * @return StandaloneServerConfig
+ */
+ public StandaloneServerConfig createInstance(
+ final String name,
+ final String nodeAgentName,
+ final String configName,
+ final java.util.Map optional ) throws Exception
+ {
+ mServerCfg = mDomainConfig.createStandaloneServerConfig(name,nodeAgentName, configName, optional);
+ return mServerCfg;
+ }
+
+ /**
+ * removes a standalone instance
+ * @param name
+ */
+ public void deleteInstance(final String name){
+ mDomainConfig.removeStandaloneServerConfig(name);
+ }
+
+ /**
+ * Starts a named standalone instance
+ * @param name
+ * @throws ObjectNotFoundException
+ */
+ public void startInstance(final String name) throws ObjectNotFoundException {
+ final J2EEServer instance = getInstance(name);
+ if(instance != null){
+ instance.start();
+ return;
+ }
+ throw new ObjectNotFoundException("startInstance: instance "+
+ name+" was not found by the DAS");
+ }
+
+
+ /**
+ * stops a named standalone instance
+ * @param name
+ */
+ public void stopInstance(final String name) throws ObjectNotFoundException {
+ final J2EEServer instance = getInstance(name);
+ if(instance != null){
+ instance.stop();
+ return;
+ }
+ throw new ObjectNotFoundException("stopInstance: instance "+
+ name + " was not found by the DAS");
+ }
+
+ private J2EEServer getInstance(final String name) {
+ return (J2EEServer)mAmxConnector.getDomainRoot().getJ2EEDomain().getServerMap().
+ get(name);
+ }
+
+ public void listInstances() {
+ final Map servers = mAmxConnector.getDomainRoot().getJ2EEDomain().getServerMap();
+ final Iterator iter;
+ for(iter=servers.keySet().iterator();iter.hasNext();){
+ final String key = (String)iter.next();
+ final J2EEServer server = (J2EEServer)servers.get(key);
+ println(server.getName());
+ }
+ }
+
+ public boolean isCreated(final String name){
+ final J2EEServer instance = getInstance(name);
+ if( instance != null )
+ return true;
+ return false;
+ }
+
+ public static void main(final String [] args){
+
+ final StandaloneInstanceManager sim;
+ try {
+ sim = new StandaloneInstanceManager(System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER","admin"),
+ System.getProperty("ADMIN_PASSWORD","adminadmin"),
+ Boolean.valueOf(System.getProperty("USE_TLS","false")).booleanValue());
+ final String instanceName = args[0];
+ try{
+ println("*******Creating Instance "+instanceName+".");
+ sim.createInstance(instanceName, "iasengsol11.red.iplanet.com", null, null);
+ } catch(Exception e){
+ final Throwable ex = ExceptionUtil.getRootCause(e);
+ if((ex.getMessage()).indexOf("WARNING") < 0){
+ println(ex.getMessage());
+ }
+ }
+ if(sim.isCreated(instanceName)){
+ println("*******Instance "+instanceName+" creation verified.");
+ callStartInstance(instanceName, sim);
+ return;
+ }
+ } catch (IOException e) {
+ println(e.getMessage());
+ }
+ }
+
+ private static void callStartInstance(final String instanceName, final StandaloneInstanceManager sim) {
+ try {
+ println("*******Starting Instance "+instanceName+".");
+ sim.startInstance(instanceName);
+ println("*******Instance "+instanceName+" started.");
+
+ } catch (Exception e1) {
+ final Throwable t = ExceptionUtil.getRootCause(e1);
+ println("Exception Received:"+t.getClass().getName()+":"+t.getMessage());
+ }
+ }
+
+ public static void println( final Object o )
+ {
+ System.out.println( toString( o ) );
+ }
+
+ private static String toString(final Object o )
+ {
+ return( SmartStringifier.toString( o ) );
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/README
new file mode 100644
index 0000000..74d8565
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/README
@@ -0,0 +1,23 @@
+This subdirectory contains tests for some config areas of the AMX API.
+Please make sure that "ant" is in your path environment.
+
+To Build this submodule run the following command in this sub
+directory:
+ant build
+
+To view all the tests see the run targets by doing :
+ant -projecthelp | grep run
+
+BEFORE RUNNING TESTS, Open the build.xml and build.properties (in
+needed) to change the values of admin user, password, port, host and
+other sysproperties as required for your environment.
+
+Many of these tests use asadmin (unix/linux version) client to verify the
+steps performed within the tests. So please make sure that asadmin is
+in your path environment. Such tests will not run on windows unless
+the devtest itself is modified to point to asadmin.bat
+
+IF A TEST FAILS, REMEMBER TO MANUALLY CLEAN UP (delete) whatever the
+test had already created.
+
+//Shreedhar
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/bootstrap.subcomponent.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/bootstrap.subcomponent.properties
new file mode 100644
index 0000000..3b4dbf4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/bootstrap.subcomponent.properties
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+publish.root.dir=../../../../../..
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
new file mode 100755
index 0000000..cb4e304
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.properties
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+src.dir=.
+mbeanapi.jar=${publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmxri.jar=${publish.home}/jmx/lib/jmxri.jar
+jmxremote.jar=${publish.home}/rjmx-ri/jmxremote.jar
+mgmtapi.jar=${publish.home}/management-api/lib/management-api.jar
+common=./../common/build
+http-list-1=48078
+http-list-2=44041
+orb-list-1=43698
+SSL=41051
+SSL_MUTUALAUTH=42052
+JMX_SYSTEM_CONNECTOR=48688
+
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
new file mode 100755
index 0000000..bf04e83
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.xml
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Config tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../appserv/build.properties"/>
+<property file="./../../../../../config.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${jmxremote.jar}"/>
+ <pathelement location="${common}"/>
+ <pathelement location="${mgmtapi.jar}"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${build}"/>
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${jmxremote.jar}"/>
+ <pathelement location="${mgmtapi.jar}"/>
+ <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>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component" />
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </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>
+ </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"/>-->
+ </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"/>-->
+ </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"/>-->
+ </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"/>
+ <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-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"/>-->
+ </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>
+ </target>
+
+</project>
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
new file mode 100755
index 0000000..b5e0770
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/AMXConfigVerifier.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.config.AMXConfig;
+import com.sun.appserv.management.config.ConfigConfig;
+import com.sun.appserv.management.config.IIOPServiceConfig;
+import com.sun.appserv.management.config.IIOPListenerConfig;
+
+import javax.management.MBeanServerConnection;
+
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+
+
+/**
+ *
+ * @author alexkrav
+ * Date: Aug 23, 2004
+ * @version $Revision: 1.3 $
+ */
+public class AMXConfigVerifier {
+ 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();
+ mMBeanServerConnection = ct.getAppserverConnectionSource().getMBeanServerConnection(false);
+
+ testDomainElements();
+ testHttpServiceElements();
+ }
+
+
+
+ public static void main( final String[] args )
+ {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try
+ {
+ new AMXConfigVerifier(System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER", "admin"),
+ System.getProperty("ADMIN_PASSWORD", "adminadmin"),
+ Boolean.getBoolean("USE_TLS"));
+ }
+ catch( Throwable t )
+ {
+ ExceptionUtil.getRootCause( t ).printStackTrace();
+ }
+ }
+
+ private ElemTester getElementTester( String str) throws Exception
+ {
+ return getElementTester(null,str);
+ }
+
+ private ElemTester getElementTester(AMXConfig master, String str) throws Exception
+ {
+ TestElement elem = new TestElement(str);
+ ElemTester tester;
+ if(master == null ){
+ tester = new ElemTester(mMBeanServerConnection, mDomainRoot, elem);
+ }
+ else {
+ tester = new ElemTester(mMBeanServerConnection, mDomainRoot, elem, master);
+ }
+ return tester;
+ }
+
+ private void runGenericTest(String str) throws Exception
+ {
+ runGenericTest(null, str);
+ }
+
+ private void runGenericTest(AMXConfig master, String str) throws Exception
+ {
+ getElementTester(master, str).runGenericTest();
+ }
+
+
+ private void testDomainElements() throws Exception
+ {
+ TestElemRegistry.initRegistry("server-config");
+
+ //custom-resource test
+ runGenericTest( "<custom-resource jndi-name=testCustomResource res-type=testType factory-class=java.lang.String>");
+ //external-jndi-resource test
+ runGenericTest( "<jndi-resource jndi-name=testExternalResource res-type=testType factory-class=java.lang.String jndi-lookup-name=testLookupName>");
+ //mail-resource test
+ runGenericTest( "<mail-resource jndi-name=testExternalResource host=localhost user=shmuser from=anotherUser>");
+ //persistence-manager-factory-resource test
+ runGenericTest( "<persistence-manager-factory-resource jndi-name=testPersistResource>");
+ //jdnc-connection-pool test
+ runGenericTest( "<jdbc-connection-pool name=testJdbcPool datasource-classname=java.lang.String>");
+ //connector-connection-pool test
+ runGenericTest( "<connector-connection-pool-resource name=testConnectorPool resource-adapter-name=testAdapterName connection-definition-name=testDefinitionName>");
+
+ //jdbc-resource test
+ ElemTester poolTester = getElementTester( "<jdbc-connection-pool name=testPool datasource-classname=java.lang.String>");
+ poolTester.createElement();
+ runGenericTest( "<jdbc-resource jndi-name=testJdbcResource pool-name=testPool description=testDescr>");
+ poolTester.deleteElement();
+
+ //connector-resource test
+ ElemTester poolTester2 = getElementTester( "<connector-connection-pool-resource name=testConnectorPool2 resource-adapter-name=testAdapterName2 connection-definition-name=testDefinitionName>");
+ poolTester2.createElement();
+ runGenericTest( "<connector-resource jndi-name=testConnectorResource pool-name=testConnectorPool description=testDescr>");
+ poolTester2.deleteElement();
+
+ // resource-adapter test
+ runGenericTest( "<resource-adapter resource-adapter-name=testResourceAdapterName2>");
+
+ // 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();
+
+ runGenericTest( "<http-listener id=testHttpListener address=localhost port=7171 default-virtual-server=testVirtualServer2 server-name=testServerName\"\">");
+ virtServer.deleteElement();
+ final AMXConfig iiopService = ((ConfigConfig)mDomainRoot.getDomainConfig().getConfigConfigMap().get("server-config")).getIIOPServiceConfig();
+ runGenericTest(iiopService, "<iiop-listener id=testIIOPListener address=localhost port=1234>");
+
+ ElemTester iiopListenerTester = getElementTester("<iiop-listener id=testIIOPListener address=localhost port=1234>");
+ iiopListenerTester.createElement();
+ final AMXConfig iiopListener = (AMXConfig) ((IIOPServiceConfig)iiopService).getIIOPListenerConfigMap().get("testIIOPListener");
+ runGenericTest(iiopListener, "<ssl cert-nickname=iiopCertNick>");
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ClusterLifecycleTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ClusterLifecycleTest.java
new file mode 100644
index 0000000..a445241
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ClusterLifecycleTest.java
@@ -0,0 +1,746 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+import com.sun.enterprise.admin.mbeanapi.common.ClusterManager;
+import com.sun.enterprise.admin.mbeanapi.common.ClusteredInstanceManager;
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+import com.sun.appserv.management.config.ClusterConfig;
+import com.sun.appserv.management.config.ServerConfigKeys;
+import com.sun.appserv.management.config.PropertiesAccess;
+
+import java.util.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+/**
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Sep 11, 2004
+ * @version $Revision: 1.5 $
+ */
+public class ClusterLifecycleTest {
+ private AMXConnector mAmxConnector;
+ private ClusterManager cm;
+ private ClusteredInstanceManager cim;
+ private Hashtable clusters = new Hashtable();
+
+ protected static final String LIST_INSTANCES_COMMAND = "asadmin list-instances";
+ protected static final String START_NODE_AGENT_COMMAND = "asadmin start-node-agent";
+ protected static final Object CREATE_NODE_AGENT_COMMAND = "asadmin create-node-agent";
+ protected static final Object LIST_NODE_AGENTS_COMMAND = "asadmin list-node-agents";
+ protected static final String STOP_NODE_AGENT_COMMAND = "asadmin stop-node-agent";
+ protected static final String DELETE_NODE_AGENT_COMMAND = "asadmin delete-node-agent";
+ protected static final String DELETE_NODE_AGENT_CONFIG_COMMAND = "asadmin delete-node-agent-config";
+ private static final String LIST_CLUSTERS_COMMAND = "asadmin list-clusters";
+ private SortedMap summary = new TreeMap();
+
+ public ClusterLifecycleTest(){
+ try {
+ mAmxConnector = new AMXConnector(getHost(),
+ getAMXPort(),
+ getAdminUser(),
+ getAdminPassword(),
+ getUseTLS());
+ } catch (IOException e) {
+ System.err.println(e.getMessage());
+ }
+ cm = new ClusterManager(mAmxConnector);
+ cim = new ClusteredInstanceManager(mAmxConnector );
+ summary.put("TOTAL AMX TESTS EXPECTED TO RUN", new Integer(getNumClusters()*4 + getNumInstances()*4));
+ }
+
+ public int runTest() throws TestFailedException{
+ int result;
+ /* final boolean newNodeAgent = Boolean.valueOf(System.getProperty("NEW_NODE_AGENT","true")).booleanValue();
+
+ if(newNodeAgent){
+ result = createNodeAgent();
+ if(result == 1){
+ throw new TestFailedException("Create Node Agent Operation Failed");
+ }
+ result = verifyNodeAgentCreation();
+ if(result == 1){
+ throw new TestFailedException("Verification of Create Node Agent Operation Failed");
+ }
+ }*/
+
+ result = createCluster();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Create Cluster test failed");
+ }
+
+ result = verifyClusterCreation();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Verification of Create Cluster failed");
+ }
+
+ result = createInstance();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Create Instance test failed");
+ }
+
+ result = verifyInstanceCreation();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Create Instance Verification failed");
+ }
+
+ result = startNodeAgent();
+ if(result == 1) {
+ printSummaryTestResults();
+ throw new TestFailedException("Start NodeAgent Operation failed");
+ }
+
+ result = startCluster();
+ if(result==1) {
+ printSummaryTestResults();
+ throw new TestFailedException("Start Cluster Operation failed");
+ }
+ result = verifyStartCluster();
+ if(result==1) {
+ printSummaryTestResults();
+ throw new TestFailedException("Verification of Start Cluster Operation failed");
+ }
+
+ result = stopCluster();
+ if(result==1) {
+ printSummaryTestResults();
+ throw new TestFailedException("Stop Cluster Operation failed");
+ }
+
+ result = verifyStopCluster();
+ if(result==1) {
+ printSummaryTestResults();
+ throw new TestFailedException("Verification of Stop Cluster Operation failed");
+ }
+
+ result = startInstance();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Start Instance test failed");
+ }
+
+ result = verifyStartInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Start Instance Verification failed");
+ }
+
+ result = stopInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Stop Instance test failed");
+ }
+
+ result = verifyStopInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Stop Instance Verification failed");
+ }
+
+ result = deleteInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Instance test failed");
+ }
+
+ result = verifyDeleteInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Instance Verification failed");
+ }
+
+ result = deleteCluster();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Cluster test failed");
+ }
+
+ result = verifyDeleteCluster();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Cluster Verification failed");
+ }
+
+
+ /*if(newNodeAgent){
+ result = stopNodeAgent();
+ if(result == 1){
+ throw new TestFailedException("Stop Node Agent Operation Failed");
+ }
+ result = deleteNodeAgent();
+ if(result == 1){
+ throw new TestFailedException("Delete Node Agent Operation Failed");
+ }
+ } */
+ printSummaryTestResults();
+ return 0;
+ }
+
+ private void printSummaryTestResults() {
+ for(Iterator i = summary.entrySet().iterator(); i.hasNext();){
+ System.out.println(i.next().toString());
+ }
+ }
+
+ protected int createNodeAgent() {
+ final String nodeAgentName = getNodeAgentName();
+ final String command = CREATE_NODE_AGENT_COMMAND +
+ " --host " + getHost() +
+ " --port " + getAdminPort() +
+ " --user " + getAdminUser() +
+ " --password " + getAdminPassword()+
+ " " + nodeAgentName;
+ System.out.println("running command: " +command);
+ final String sb = runCommand(command);
+ if(sb.indexOf("successfully")>=0){
+ System.out.println("Node Agent create operation for "+nodeAgentName+" completed.");
+ return 0;
+ }
+ return 1;
+ }
+
+ protected int verifyNodeAgentCreation() {
+ final String nodeAgentName = getNodeAgentName();
+ final String command = LIST_NODE_AGENTS_COMMAND +
+ " --host "+ getHost() +
+ " --port "+ getAdminPort() +
+ " --user "+ getAdminUser() +
+ " --password "+ getAdminPassword() +
+ " " + nodeAgentName;
+ System.out.println("running command: " +command);
+ final String sb = runCommand(command);
+ if(sb.indexOf(nodeAgentName)>=0){
+ System.out.println("Verification for Node Agent Create Operation for "+nodeAgentName+" completed.");
+ return 0;
+ }
+ return 1;
+ }
+
+ private int createCluster() {
+ ClusterConfig clusterConfig ;
+ String clusterName;
+ for(int i = 0; i< getNumClusters(); i++){
+ clusterName = getClusterNames()[i];
+ try {
+ clusterConfig = cm.createCluster(clusterName,
+ getConfigName(),
+ null );
+ clusters.put(clusterName, clusterConfig);
+ } catch (Exception e){
+ final Throwable t = ExceptionUtil.getRootCause(e);
+ System.out.println(t.getMessage());
+ return 1;
+ }
+ System.out.println("Cluster Creation for "+ getClusterNames()[i] + " completed.");
+ }
+ return 0;
+ }
+
+ private int verifyClusterCreation(){
+ int retval=1;
+ final int numClusters = getNumClusters();
+ for(int i = 0; i< numClusters; i++){
+ final String clusterName = getClusterNames()[i];
+ final String sb = getListClustersCommandOutput(clusterName);
+ if(sb.indexOf(clusterName)>=0){
+ System.out.println("Cluster Creation Verification for "+getClusterNames()[i] + " successful.");
+ summary.put("CLUSTER CREATION TEST", i+1 +" out of "+numClusters+" PASS");
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", new Integer(i+1));
+ retval=0;
+ }
+ else
+ retval = 1;
+ }
+ return retval;
+ }
+
+ protected int createInstance(){
+ String clusterName;
+ for(int i=0; i<getNumClusters(); i++){
+ clusterName = getClusterNames()[i];
+ for(int j = 0; j< getNumInstances(); j++){
+ try {
+ cim.createInstance(getInstanceNames()[j],
+ getNodeAgentName(),
+ clusterName,
+ getOptionalParameters(j+1)
+ );
+ } catch (Exception e){
+ final Throwable t = ExceptionUtil.getRootCause(e);
+ if(t.getMessage() != null){
+ if(t.getMessage().indexOf("WARNING")<0){
+ System.out.println(t.getMessage());
+ return 1;
+ }
+ }else{
+ e.printStackTrace();
+ }
+
+ }
+ System.out.println("Instance Creation for "+ getInstanceNames()[j] + " completed.");
+ }
+ }
+ return 0;
+ }
+
+ protected int verifyInstanceCreation() {
+ int retval=1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(instanceName);
+ if(sb.indexOf(instanceName)>=0){
+ System.out.println("Instance Creation Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE CREATION TEST", i+1 +" out of "+numInst+" PASS");
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", new Integer(i+1));
+ retval=0;
+ }
+ else
+ retval = 1;
+ }
+ return retval;
+ }
+
+ protected String getListInstancesCommandOutput(final String instanceName) {
+ //this assumes asadmin is somewhere in the path
+ String command = LIST_INSTANCES_COMMAND+
+ " --host "+ getHost()+
+ " --port "+ getAdminPort()+
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword();
+ if(instanceName != null)
+ command += " " + instanceName;
+ System.out.println("running command: " +command);
+ return runCommand(command);
+ }
+
+ private String getListClustersCommandOutput(final String clusterName) {
+ //this assumes asadmin is somewhere in the path
+ String command = LIST_CLUSTERS_COMMAND+
+ " --host "+ getHost()+
+ " --port "+ getAdminPort()+
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword();
+ if(clusterName != null)
+ command += " " + clusterName;
+ System.out.println("running command: " +command);
+ return runCommand(command);
+ }
+
+ protected String runCommand(final String command) {
+ String sb = null;
+ try {
+ final Process p = Runtime.getRuntime().exec(command);
+ sb = convertToString(p.getInputStream());
+ System.out.println("Received Process Output String: |" +sb+"|");
+ if(sb.length() == 0 ){
+ sb = convertToString(p.getErrorStream());
+ System.out.println("Received Process Error String: |" +sb+"|");
+ }
+ } catch (Exception e) {
+ //System.out.println(e.getMessage());
+ e.printStackTrace();
+ }
+ return sb;
+ }
+
+
+ protected String convertToString(final InputStream in) {
+ final BufferedReader br = new BufferedReader
+ (new InputStreamReader(in));
+ String line;
+ final StringBuffer sb = new StringBuffer();
+ try {
+ while ((line = br.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(" ");
+ }
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return sb.toString();
+ }
+
+ protected int startNodeAgent() {
+ final String command = START_NODE_AGENT_COMMAND +
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword()+
+ " --startinstances=false"+
+ " " +getNodeAgentName() ;
+ System.out.println("running command: " +command);
+ final String result = runCommand(command);
+ if(result.indexOf("successfully")>=0 ||
+ result.indexOf("running")>=0)
+ {
+ return 0;
+ }
+ return 1;
+ }
+
+ private int startCluster() {
+ for(int i = 0; i< getNumClusters(); i++){
+ final String clusterName = getClusterNames()[i];
+ try {
+ cm.startCluster(clusterName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Starting of cluster " + clusterName +" completed.");
+ }
+ return 0;
+ }
+
+ private int verifyStartCluster() {
+ int retval=1;
+ final int numClusters = getNumClusters();
+ for(int i = 0; i< numClusters; i++){
+ final String clusterName = getClusterNames()[i];
+ final String sb = getListClustersCommandOutput(clusterName);
+ if(sb.indexOf(clusterName+" running")>=0){
+ System.out.println("Cluster Start Verification for "+getClusterNames()[i] + " successful.");
+ summary.put("CLUSTER START TEST", i+1 +" out of "+numClusters+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval=1;
+ }
+ return retval;
+ }
+
+ private int stopCluster() {
+ for(int i = 0; i< getNumClusters(); i++){
+ final String clusterName = getClusterNames()[i];
+ try {
+ cm.stopCluster(clusterName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Stopping of cluster " + clusterName +" completed.");
+ }
+ return 0;
+ }
+
+ private int verifyStopCluster() {
+ int retval = 1;
+ final int numClusters = getNumClusters();
+ for(int i = 0; i< numClusters; i++){
+ final String clusterName = getClusterNames()[i];
+ final String sb = getListClustersCommandOutput(clusterName);
+ if(sb.indexOf(clusterName+" not running")>=0){
+ System.out.println("Cluster Stop Verification for "+getClusterNames()[i] + " successful.");
+ summary.put("CLUSTER STOP TEST", i+1 +" out of "+numClusters+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval =1;
+ }
+ return retval;
+ }
+
+ protected int startInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ cim.startInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Starting of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int verifyStartInstance() {
+ int retval=1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(instanceName);
+ if(sb.indexOf(instanceName+" running")>=0){
+ System.out.println("Instance Start Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE START TEST", i+1 +" out of "+numInst+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval=1;
+ }
+ return retval;
+ }
+
+ protected int stopInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ cim.stopInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Stopping of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int verifyStopInstance() {
+ int retval = 1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(instanceName);
+ if(sb.indexOf(instanceName+" not running")>=0){
+ System.out.println("Instance Stop Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE STOP TEST", i+1 +" out of "+numInst+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval =1;
+ }
+ return retval;
+ }
+
+ protected int deleteInstance() {
+ for(int i=0; i<getNumClusters(); i++){
+ for(int j = 0; j< getNumInstances(); j++){
+ final String instanceName = getInstanceNames()[j];
+ try {
+ cim.deleteInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Deleting of instance " + instanceName +" completed.");
+ }
+ }
+ return 0;
+ }
+
+ protected int verifyDeleteInstance() {
+ int retval = 1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(null);
+ if(sb.indexOf(instanceName)<0){
+ System.out.println("Instance Delete Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE DELETE TEST", i+1 +" out of "+numInst+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval =1;
+ }
+ return retval;
+ }
+
+ private int deleteCluster() {
+ for(int i = 0; i< getNumClusters(); i++){
+ final String clusterName = getClusterNames()[i];
+ try {
+ cm.deleteCluster(clusterName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Deleting of cluster " + clusterName +" completed.");
+ }
+ return 0;
+ }
+
+ private int verifyDeleteCluster() {
+ int retval = 1;
+ final int numClusters = getNumClusters();
+ for(int i = 0; i< numClusters; i++){
+ final String clusterName = getClusterNames()[i];
+ final String sb = getListClustersCommandOutput(null);
+ if(sb.indexOf(clusterName)<0){
+ System.out.println("Cluster Delete Verification for "+getClusterNames()[i] + " successful.");
+ summary.put("CLUSTER DELETE TEST", i+1 +" out of "+numClusters+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval =1;
+ }
+ return retval;
+ }
+
+ protected int stopNodeAgent() {
+ final String command = STOP_NODE_AGENT_COMMAND +
+ " " +getNodeAgentName() ;
+ System.out.println("running command: " +command);
+ final String result = runCommand(command);
+ if(result.indexOf("successfully")>=0){
+ return 0;
+ }
+ return 1;
+ }
+
+ private int deleteNodeAgent() {
+ String command = DELETE_NODE_AGENT_COMMAND +
+ " " +getNodeAgentName() ;
+ System.out.println("running command: " +command);
+ String result = runCommand(command);
+ if(result.indexOf("succesfully")>=0){
+ command = DELETE_NODE_AGENT_CONFIG_COMMAND +
+ " --host "+ getHost()+
+ " --port "+ getAdminPort()+
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword()+
+ " " +getNodeAgentName();
+ System.out.println("running command: " +command);
+ result = runCommand(command);
+ if(result.indexOf("successfully")>=0){
+ return 0;
+ }
+ }
+ return 1;
+
+ }
+
+ protected String getHost() {
+ return System.getProperty("HOST", "localhost");
+ }
+
+ protected int getAMXPort() {
+ return Integer.parseInt(System.getProperty("AMX_PORT","8686"));
+ }
+
+ protected int getAdminPort() {
+ return Integer.parseInt(System.getProperty("ADMIN_PORT","4848"));
+ }
+
+ protected String getAdminUser() {
+ return System.getProperty("ADMIN_USER", "admin");
+ }
+
+ protected String getAdminPassword() {
+ return System.getProperty("ADMIN_PASSWORD", "adminadmin");
+ }
+
+ protected boolean getUseTLS() {
+ return Boolean.valueOf(System.getProperty("USE_TLS", "false")).booleanValue();
+ }
+
+ protected String[] getInstanceNames() {
+ final int num = getNumInstances();
+ final String[] instances = new String[num];
+ for (int i = 0; i < num; i++){
+ instances[i] = "instance"+(1+i);
+ }
+ return instances;
+ }
+
+ private String[] getClusterNames() {
+ final int num = getNumClusters();
+ final String[] clusters = new String[num];
+ for (int i = 0; i < num; i++){
+ clusters[i] = "cluster"+(1+i);
+ }
+ return clusters;
+ }
+
+ protected int getNumInstances() {
+ return Integer.parseInt(System.getProperty("NUM_INSTANCES", "1"));
+ }
+
+ private int getNumClusters() {
+ return Integer.parseInt(System.getProperty("NUM_CLUSTERS", "1"));
+ }
+
+ protected String getNodeAgentName() {
+ return System.getProperty("NODE_AGENT");
+ }
+
+ protected String getConfigName() {
+ return System.getProperty("CONFIG_NAME");
+ }
+
+ //Properties should be specified as a SystemProperty "PROPERTIES" with its
+ // values following the pattern "key=value:key=value......"
+ //For each instance number passed in to this method, the port values will be incremented by
+ //that number here for each value provided through PROPERTIES system prop
+ protected Map getOptionalParameters(final int instanceNum) throws Exception {
+ final Map properties = new HashMap();
+ final String props = System.getProperty("PROPERTIES");
+ if(props == null)
+ return null;
+ final String[] specs = props.split(":");
+ String key, value;
+ for(int i=0; i<specs.length;i++){
+ key = specs[i].substring(0, specs[i].indexOf("=",0));
+ value = specs[i].substring(specs[i].indexOf("=")+1,specs[i].length());
+ key = getLegalKey(key);
+ if(key!=null){
+ properties.put(key, ""+(Integer.parseInt(value)+instanceNum));
+ }
+ else{
+ throw new Exception("PROPERTIES:property key did not match legal key");
+ }
+ }
+ System.out.println(properties.toString());
+ return properties;
+ }
+
+ private String getLegalKey(String key) {
+ String[] legalKeys = {
+ ServerConfigKeys.HTTP_LISTENER_1_PORT_KEY,
+ ServerConfigKeys.HTTP_LISTENER_2_PORT_KEY,
+ ServerConfigKeys.ORB_LISTENER_1_PORT_KEY,
+ ServerConfigKeys.SSL_PORT_KEY,
+ ServerConfigKeys.SSL_MUTUALAUTH_PORT_KEY,
+ ServerConfigKeys.JMX_SYSTEM_CONNECTOR_PORT_KEY,
+ };
+
+ for(int i=0; i<legalKeys.length;i++){
+ if(legalKeys[i].matches(PropertiesAccess.PROPERTY_PREFIX+key ))
+ return legalKeys[i];
+ }
+ return null;
+ }
+
+ public static void main(final String[] args){
+ final ClusterLifecycleTest test = new ClusterLifecycleTest();
+ try {
+ test.runTest();
+ } catch (TestFailedException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
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
new file mode 100755
index 0000000..9109a29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ConfigTestHelper.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import java.lang.reflect.Method;
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+
+
+/**
+ * @author alexkrav
+ * @version $Revision: 1.5 $
+ */
+public class ConfigTestHelper {
+
+ static public String toString(Object o)
+ {
+ return SmartStringifier.toString(o);
+ }
+
+ static public void printObj(String title, Object o)
+ {
+ if(title==null)
+ title="";
+ System.out.println(title+ toString(o));
+ }
+
+ static public Object invokeInMgr(Object mgr, String operation) throws Exception
+ {
+ 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);
+ Class[] classes = new Class[params.length];
+ for(int i=0; i<params.length; i++)
+ if(params[i]!=null)
+ classes[i] = params[i].getClass();
+ else
+ classes[i] = null;
+ 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);
+ }
+
+ static public Object invokeInMgr(Object mgr, String operation, Object[] params, Class[] classes, boolean bHideException) throws Exception
+ {
+ try
+ {
+ _lastException = null;
+ _lastOperation = operation;
+ _lastParams = params;
+
+ Object res = null;
+ Method method =null;
+ Class cl = mgr.getClass();
+ method = cl.getMethod(operation, classes);
+ res = method.invoke(mgr, params);
+ _lastResult = res;
+ return res;
+ }
+ catch (Exception e)
+ {
+ _lastException = e;
+ _lastResult = null;
+ String msg = getLastExceptionShortMsg();
+ if(!bHideException)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ return null;
+ }
+ }
+ static void printStackTrace(Throwable t)
+ {
+ ExceptionUtil.getRootCause(t).printStackTrace();
+ }
+ static String getLastExceptionShortMsg()
+ {
+ String msg = null;
+ if(_lastException!=null)
+ msg = ExceptionUtil.getRootCause(_lastException).getMessage();
+ int idx = msg!=null?msg.indexOf('\n'):-1;
+ if(idx>=0)
+ {
+ int idx2 = msg.indexOf('\n', idx+1);
+ 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;
+ int lenOld = strOld.length();
+ int lenNew = strNew.length();
+ while((idx=buf.indexOf(strOld, idx))>=0)
+ {
+ buf.replace(idx, idx+lenOld, strNew);
+ idx+=lenNew;
+ }
+ }
+
+ static public String camelize(String str)
+ {
+ if(str.length()==0)
+ return str;
+ StringBuffer buf = new StringBuffer();
+ buf.append(Character.toUpperCase(str.charAt(0)));
+ for(int i=1; i<str.length(); i++)
+ {
+ if(str.charAt(i)=='-')
+ {
+ i++;
+ buf.append(Character.toUpperCase(str.charAt(i)));
+ }
+ else
+ buf.append(str.charAt(i));
+ }
+ replaceStr(buf, "Jdbc","JDBC");
+ replaceStr(buf, "Jndi","JNDI");
+ replaceStr(buf, "Http","HTTP");
+ replaceStr(buf, "Iiop","IIOP");
+ replaceStr(buf, "Ssl", "SSL");
+ //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;
+ public static String _lastOperation;
+ public static Object[] _lastParams;
+}
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
new file mode 100755
index 0000000..f4d644d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ElemTester.java
@@ -0,0 +1,340 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.management.MBeanInfo;
+import javax.management.MBeanAttributeInfo;
+import javax.management.ObjectName;
+import javax.management.AttributeList;
+import javax.management.Attribute;
+import javax.management.MBeanServerConnection;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.config.AMXConfig;
+
+
+/**
+ * generic named config element tester
+ * @author alexkrav
+ * Date: Aug 23, 2004
+ * @version $Revision: 1.11 $
+ */
+public class ElemTester {
+ private final AMXConfig mMasterConfig;
+ private final TestElement mElement;
+ private final MBeanServerConnection mConnection;
+ static final String REPORT_PREFIX = " ";
+ static final String CHECK_OK_PREFIX = " check-ok:";
+ static final String CHECK_FAILURE_PREFIX = "CHECK-FAILED:";
+
+ public ElemTester(MBeanServerConnection connection, DomainRoot domainRoot, TestElement element) throws Exception
+ {
+ mConnection = connection;
+ mElement = element;
+ mMasterConfig = mElement.getMasterAMXConfigForElement(domainRoot);
+ String msg = "\n\n------- tester created for "+mElement.getElementName();
+ printObj(msg, mElement.getAttributesMapCopy());
+ }
+
+ public ElemTester(final MBeanServerConnection connection, final DomainRoot domainRoot, final TestElement element,
+ final AMXConfig masterConfig ) throws Exception
+ {
+ mConnection = connection;
+ mElement = element;
+ mMasterConfig = masterConfig;
+ String msg = "\n\n------- tester created for "+mElement.getElementName();
+ printObj(msg, mElement.getAttributesMapCopy());
+ }
+
+ void println(String str)
+ {
+ 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;
+
+ if( isNamedElement ){
+ ret = ConfigTestHelper.invokeInMgr(mMasterConfig, "create",
+ mElement.getCreationParams(),
+ mElement.getCreationClasses());
+ println(REPORT_PREFIX +"create(...)");
+ }
+ else {
+ ret = ConfigTestHelper.invokeInMgr(mMasterConfig, "create"+
+ ConfigTestHelper.camelize(mElement.getElementName())+"Config",
+ mElement.getCreationParams(),
+ mElement.getCreationClasses());
+ println(REPORT_PREFIX +"createXXXConfig(...)");
+ }
+
+ return ret;
+ }
+ public void deleteElement() throws Exception
+ {
+ String key = mElement.getElementKey();
+
+ final boolean isNamedElement = key != null;
+
+ if( isNamedElement ){
+ ConfigTestHelper.invokeInMgr(mMasterConfig, "remove",
+ new Object[] {key});
+ println(REPORT_PREFIX +"remove()");
+ }
+ else{
+ ConfigTestHelper.invokeInMgr(mMasterConfig, "remove"+
+ ConfigTestHelper.camelize(mElement.getElementName())+"Config",
+ null);
+ println(REPORT_PREFIX +"removeXXXConfig()");
+ }
+
+ }
+
+ public ObjectName getElemMBeanObjectName() throws Exception
+ {
+ return mElement.getElemMBeanObjectName();
+ }
+
+
+
+ public Map list()
+ {
+ try{
+ println(REPORT_PREFIX +"list()");
+ return (Map)ConfigTestHelper.invokeInMgr(mMasterConfig, "get"+
+ ConfigTestHelper.camelize(mElement.getElementName())+"ConfigMap");
+ } catch(Exception e)
+ {
+ println("Exception during list() operation");
+ return null;
+ }
+ }
+
+ public void cleanExceptionIfMatched(String parseStr)
+ {
+ if(ConfigTestHelper._lastException!=null &&
+ (parseStr==null ||
+ ((String)(""+ConfigTestHelper.getLastExceptionShortMsg())).indexOf(parseStr)>=0))
+ {
+ ConfigTestHelper._lastException = null;
+ }
+ }
+
+ public boolean checkNoException(String description)
+ {
+ if(ConfigTestHelper._lastException!=null)
+ {
+ println(CHECK_FAILURE_PREFIX + "("+description+") " + ConfigTestHelper.getLastExceptionShortMsg());
+ return false;
+ }
+ return true;
+ }
+
+
+ public boolean checkList(String description) throws Exception
+ {
+ Map map = list();
+ if(!checkNoException(description+ "[during list operation]"))
+ return false;
+ boolean bOk = true;
+ String keyName = mElement.getElementKeyName();
+ Set objectNamesSet = mConnection.queryNames(mElement.getElemMBeanObjectNamePattern(), null);
+ Iterator iter = objectNamesSet.iterator();
+ while(iter.hasNext())
+ {
+ String keyValue = ((ObjectName)iter.next()).getKeyProperty(keyName);
+ if(map.get(keyValue)==null)
+ {
+ println(CHECK_FAILURE_PREFIX + "("+description+") element "+ mElement.getElementName() +"."+keyValue +
+ " not found by list command");
+ bOk = false;
+ }
+ else
+ {
+ map.remove(keyValue);
+ println(REPORT_PREFIX +"check list element \"" + keyValue + "\" OK");
+ }
+
+ }
+ iter = map.keySet().iterator();
+ while(iter.hasNext())
+ {
+ println(CHECK_FAILURE_PREFIX + "("+description+") element "+ mElement.getElementName() +
+ "."+ iter.next() + "reported by list command but not found by queryNames()");
+ bOk = false;
+ }
+ if(bOk)
+ {
+ println(CHECK_OK_PREFIX + "("+description+") element "+ mElement.getElementName() + " list() is checked");
+ }
+ return bOk;
+ }
+
+ private ArrayList getAttributesNamesFromMBeanInfo() throws Exception
+ {
+ ArrayList list = new ArrayList();
+ MBeanInfo mbInfo = mConnection.getMBeanInfo(getElemMBeanObjectName());
+ MBeanAttributeInfo[] attrInfos = mbInfo.getAttributes();
+ for(int i=0; i<attrInfos.length; i++)
+ {
+ list.add(attrInfos[i].getName());
+ }
+ 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[]{""});
+ HashMap elemAttrsFromConfig = new HashMap();
+ for(int i=0; i<attrsInConfig.size(); i++)
+ {
+ Attribute attr = (Attribute)attrsInConfig.get(i);
+ elemAttrsFromConfig.put(attr.getName(), attr.getValue());
+ }
+
+ Map elemAttrsFromAMXAttrMap = mElement.getAttributesMapCopy();
+ boolean bOk = true;
+ for(int i=0; i<attrNames.size(); i++)
+ {
+ String attrName = (String)attrNames.get(i);
+ Object valueInConfig = elemAttrsFromConfig.get(attrName);
+ Object valueInElem = elemAttrsFromAMXAttrMap.get(attrName);
+ if( (valueInConfig==null && valueInElem!=null) ||
+ (valueInElem!=null && valueInConfig!=null && !valueInElem.equals(valueInConfig) ) )
+ { //FIRST - check EXPECTED with RECEIVED_FROM MBeanServer.GetAttributes()
+ println(CHECK_FAILURE_PREFIX + "("+description+") element "+ mElement.getElementName() +" attribute: "+attrName+
+ ": value \"" + valueInElem + "\"(expected) differs from \""+
+ valueInConfig + "\"(in config MBean)");
+ bOk = false;
+ }
+ else
+ { //THEN - check EXPECTED with the result of AMX...getXXX()
+ if(amxBean!=null)
+ {
+ valueInConfig = ConfigTestHelper.getBeanAttribute(amxBean, attrName);
+ if(checkNoException("get \"" + attrName + "\""))
+ {
+ if( (valueInConfig==null && valueInElem!=null) ||
+ (valueInElem!=null && valueInConfig!=null && !valueInElem.equals(valueInConfig) ) )
+ {
+ println(CHECK_FAILURE_PREFIX + "("+description+") element "+ mElement.getElementName() +" attribute: "+attrName+
+ ": value \"" + valueInElem + "\"(expected) differs from \""+
+ valueInConfig + "\"(in AMX MBean)");
+ bOk = false;
+ }
+ else
+ {
+ println(REPORT_PREFIX +"check attribute \"" + attrName + "="+valueInConfig+"\" OK");
+ }
+ }
+ }
+ else
+ {
+ println(REPORT_PREFIX +"check attribute \"" + attrName + "="+valueInConfig+"\" OK");
+ }
+ }
+ }
+ if(bOk)
+ {
+ println(CHECK_OK_PREFIX + "("+description+") element "+ mElement.getElementName() + " attributes checked");
+ }
+ return bOk;
+ }
+
+ public boolean checkExist(String description)
+ {
+ if(!checkNoException(description))
+ return false;
+ String key = mElement.getElementKey();
+ Map list = list();
+ if(list!=null && (list.get(key))!=null)
+ {
+ println(CHECK_OK_PREFIX + "("+description+")"+ mElement.getElementName() + "." + key + " exists");
+ return true;
+ }
+ println(CHECK_FAILURE_PREFIX + "("+description+")"+ mElement.getElementName() + "." + key + " is not exist");
+ return false;
+ }
+
+ public boolean checkNotExist(String description)
+ {
+ if(!checkNoException(description))
+ return false;
+ String key = mElement.getElementKey();
+ Map list = list();
+ if(list!=null && (list.get(key))!=null)
+ {
+ println(CHECK_FAILURE_PREFIX + "("+description+")"+ mElement.getElementName() + "." + key + " exists");
+ return true;
+ }
+ println(CHECK_OK_PREFIX + "("+description+")"+ mElement.getElementName() + "." + key + " is not exist");
+ return false;
+ }
+
+ public void runGenericTest()
+ {
+ try{
+ println("--- generic test");
+ deleteElement();
+//TEMPORARY
+ //if(ConfigTestHelper._lastException!=null)
+ // ConfigTestHelper._lastException.printStackTrace();
+//checkNoException("testting phase");
+//cleanExceptionIfMatched(null);
+ cleanExceptionIfMatched("is not found");
+ checkNotExist("after pre-deletion");
+
+ Object created = createElement();
+ if(checkExist("after creation"))
+ checkAttributes("attributes-check", created);
+
+ println("WHAT TO DO WITH NON-EXISTENT \"mElemMgr instanceof AMXConfigMgr\"????");
+ /*
+ if(mElemMgr instanceof AMXConfigMgr)
+ checkList("list operation");
+ */
+
+ deleteElement();
+//if(ConfigTestHelper._lastException!=null)
+// ConfigTestHelper._lastException.printStackTrace();
+ checkNotExist("after final-deletion");
+
+ } catch (Exception e)
+ {
+ //e.printStackTrace();
+ ConfigTestHelper.printStackTrace(e);
+ }
+ }
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/HTTPListenerTests.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/HTTPListenerTests.java
new file mode 100755
index 0000000..d1ae13b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/HTTPListenerTests.java
@@ -0,0 +1,317 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import com.sun.appserv.management.config.*;
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+import javax.management.remote.JMXConnector;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Tests the http listener related mbean api classes
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Sep 23, 2004
+ * @version $Revision: 1.3 $
+ */
+public class HTTPListenerTests {
+ private AMXConnector mAmxConnector;
+ private HTTPServiceConfig mHttpServiceConfig;
+ private static final String STOP_DOMAIN_COMMAND = "asadmin stop-domain";
+ private static final String START_DOMAIN_COMMAND = "asadmin start-domain";
+ int totalTests = 6;
+ int passed = 0;
+ int failed = 0;
+ int didNotRun = 0;
+
+ public HTTPListenerTests(){
+ setup();
+ }
+
+ private void setup() {
+ try {
+ mAmxConnector = new AMXConnector(getHost(),
+ getAMXPort(),
+ getAdminUser(),
+ getAdminPassword(),
+ getUseTLS());
+ mHttpServiceConfig = ((ConfigConfig)mAmxConnector.
+ getDomainRoot().
+ getDomainConfig().
+ getConfigConfigMap().
+ get(getConfigName())).
+ getHTTPServiceConfig();
+ } catch (IOException e) {
+ System.err.println(e.getMessage());
+ }
+ }
+
+ private void runtest() {
+ createVirtualServer();
+ createListener();
+ createSSLElement();
+ stopDomain();
+ startDomain();
+ setup();
+ removeSSLElement();
+ removeVirtualServer();
+ removeListener();
+ printSummary(passed, failed, didNotRun);
+ }
+
+ private void sleep(final int i) {
+ try {
+ Thread.sleep(i);
+ } catch (InterruptedException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ }
+
+ private void createVirtualServer() {
+ mHttpServiceConfig.createVirtualServerConfig(getVirtualServerName(),
+ getVSHosts(),
+ //this is not a joke! These optional params are actually required!
+ getVSOptional()) ;
+ final VirtualServerConfig cfg = (VirtualServerConfig) mHttpServiceConfig.getVirtualServerConfigMap().get(getVirtualServerName());
+ if(cfg == null){
+ System.err.println("VirtualServer was not created");
+ printSummary(passed, ++failed, ++didNotRun);
+ System.exit(1);
+ }
+ printProgress(++passed);
+
+ }
+
+ private void printProgress(final int i) {
+ System.out.println(i +" out of "+ totalTests + " tests passed");
+ }
+
+ private void printSummary(final int passed, final int failed, final int didNotRun) {
+ System.out.println("Summary Results:"+ passed+" tests passed, "+
+ failed+" tests failed, "+ didNotRun +" tests did not run" );
+ System.out.println("Total Expected to Run "+totalTests);
+ }
+
+ private Map getVSOptional() {
+ final Map vsOps = new HashMap();
+ vsOps.put(VirtualServerConfigKeys.DOC_ROOT_PROPERTY_KEY, "${com.sun.aas.instanceRoot}/docroot");
+ vsOps.put(VirtualServerConfigKeys.ACCESS_LOG_PROPERTY_KEY, "${com.sun.aas.instanceRoot}/logs/access");
+ vsOps.put(VirtualServerConfigKeys.HTTP_LISTENERS_KEY, "testListener");
+ return vsOps;
+ }
+
+ private String getVSHosts() {
+ return "${com.sun.aas.hostName}";
+ }
+
+
+ private void createListener() {
+ mHttpServiceConfig.createHTTPListenerConfig(getListenerName(),
+ getListenerAddress(),
+ getListenerPort(),
+ getVirtualServerName(),
+ getServerName(),
+ getOptional());
+ final HTTPListenerConfig cfg = (HTTPListenerConfig) mHttpServiceConfig.getHTTPListenerConfigMap().get(getListenerName());
+ if(cfg == null) {
+ System.err.println("HttpListener was not created");
+ printSummary(passed, ++failed, ++didNotRun);
+ System.exit(1);
+ }
+ printProgress(++passed);
+ }
+
+ private void createSSLElement() {
+ final HTTPListenerConfig cfg = ((HTTPListenerConfig)mHttpServiceConfig.
+ getHTTPListenerConfigMap().
+ get(getListenerName()));
+ cfg.createSSLConfig("s1as",null);
+ final SSLConfig ssl = cfg.getSSLConfig();
+ if(ssl ==null){
+ System.err.println("ssl element did not get created");
+ printSummary(passed, ++failed, ++didNotRun);
+ System.exit(1);
+ }
+ printProgress(++passed);
+ }
+
+ private void stopDomain() {
+ System.out.println("Stopping domain....");
+ try {
+ mAmxConnector.getAppserverConnectionSource().getJMXConnector(false).close();
+ } catch (IOException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ final String command = STOP_DOMAIN_COMMAND +" "+ getDomainName();
+ final String result = runCommand(command);
+ if(result.indexOf(getDomainName()+" stopped")<0){
+ System.out.println("Domain " + getDomainName() +" did not stop");
+ }
+ }
+
+ private void startDomain() {
+ System.out.println("Starting domain....");
+ final String command = START_DOMAIN_COMMAND +
+ " " +getDomainName();
+ final String result = runCommand(command);
+ if(result.indexOf(getDomainName()+" started")<0){
+ System.out.println("Domain " +getDomainName() + " did not start");
+ }
+ }
+
+ private void removeSSLElement() {
+ final HTTPListenerConfig cfg = ((HTTPListenerConfig)mHttpServiceConfig.
+ getHTTPListenerConfigMap().
+ get(getListenerName()));
+ cfg.removeSSLConfig();
+ final SSLConfig ssl = cfg.getSSLConfig();
+ if (ssl != null){
+ System.err.println("Could not delete SSL element");
+ printSummary(passed, ++failed, ++didNotRun);
+ }
+ else{
+ printProgress(++passed);
+ }
+ }
+
+ private void removeListener() {
+ mHttpServiceConfig.removeHTTPListenerConfig(getListenerName());
+ final HTTPListenerConfig cfg = (HTTPListenerConfig) mHttpServiceConfig.getHTTPListenerConfigMap().get(getListenerName());
+ if(cfg != null) {
+ System.err.println("Listener was not removed from http service");
+ printSummary(passed, ++failed, --totalTests);
+ }
+ else{
+ printProgress(++passed);
+ }
+ }
+
+ private void removeVirtualServer() {
+ mHttpServiceConfig.removeVirtualServerConfig(getVirtualServerName());
+ final VirtualServerConfig cfg = (VirtualServerConfig) mHttpServiceConfig.getVirtualServerConfigMap().get(getVirtualServerName());
+ if(cfg != null){
+ System.err.println("VirtualServer could not be removed");
+ printSummary(passed, ++failed, ++didNotRun);
+ }
+ else{
+ printProgress(++passed);
+ }
+ }
+
+ private String getListenerName() {
+ return "testListener";
+ }
+
+ private String getListenerAddress() {
+ return "localhost";
+ }
+
+ private int getListenerPort() {
+ return 48181;
+ }
+
+ private String getVirtualServerName() {
+ return "testVS";
+ }
+
+ private String getServerName() {
+ return "testServerName";
+ }
+
+ private Map getOptional() {
+ final Map ops = new HashMap();
+ ops.put(HTTPListenerConfigKeys.SECURITY_ENABLED_KEY, "true");
+ return ops;
+ }
+
+ protected String getHost() {
+ return System.getProperty("HOST", "localhost");
+ }
+
+ protected int getAMXPort() {
+ return Integer.parseInt(System.getProperty("AMX_PORT","8686"));
+ }
+
+ protected int getAdminPort() {
+ return Integer.parseInt(System.getProperty("ADMIN_PORT","4848"));
+ }
+
+ protected String getAdminUser() {
+ return System.getProperty("ADMIN_USER", "admin");
+ }
+
+ protected String getAdminPassword() {
+ return System.getProperty("ADMIN_PASSWORD", "adminadmin");
+ }
+
+ protected boolean getUseTLS() {
+ return Boolean.valueOf(System.getProperty("USE_TLS", "false")).booleanValue();
+ }
+
+ private String getConfigName() {
+ return System.getProperty("CONFIG_NAME","server-config");
+ }
+
+ private String getDomainName() {
+ return "domain1";
+ }
+
+ private String runCommand(final String command) {
+ String sb = null;
+ try {
+ final Process p = Runtime.getRuntime().exec(command);
+ sb = convertToString(p.getInputStream());
+ System.out.println("Received Process Output String: |" +sb+"|");
+ if(sb.length() == 0 ){
+ sb = convertToString(p.getErrorStream());
+ System.out.println("Received Process Error String: |" +sb+"|");
+ }
+ } catch (Exception e) {
+ //System.out.println(e.getMessage());
+ e.printStackTrace();
+ }
+ return sb;
+ }
+
+ private String convertToString(final InputStream in) {
+ final BufferedReader br = new BufferedReader
+ (new InputStreamReader(in));
+ String line;
+ final StringBuffer sb = new StringBuffer();
+ try {
+ while ((line = br.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(" ");
+ }
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return sb.toString();
+ }
+
+ public static void main(final String[] args){
+ HTTPListenerTests test = new HTTPListenerTests();
+ test.runtest();
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/IIOPListenerTests.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/IIOPListenerTests.java
new file mode 100755
index 0000000..a41ed14
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/IIOPListenerTests.java
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import com.sun.appserv.management.config.*;
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Tests the iiop listener related mbean api classes
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Sep 23, 2004
+ * @version $Revision: 1.3 $
+ */
+public class IIOPListenerTests {
+ private AMXConnector mAmxConnector;
+ private IIOPServiceConfig mIIOPServiceConfig;
+
+ private static final String STOP_DOMAIN_COMMAND = "asadmin stop-domain";
+ private static final String START_DOMAIN_COMMAND = "asadmin start-domain";
+ int totalTests = 4;
+ int passed = 0;
+ int failed = 0;
+ int didNotRun = 0;
+
+ public IIOPListenerTests(){
+ setup();
+ }
+
+ private void setup() {
+ try {
+ mAmxConnector = new AMXConnector(getHost(),
+ getAMXPort(),
+ getAdminUser(),
+ getAdminPassword(),
+ getUseTLS());
+ mIIOPServiceConfig = ((ConfigConfig)mAmxConnector.
+ getDomainRoot().
+ getDomainConfig().
+ getConfigConfigMap().
+ get(getConfigName())).
+ getIIOPServiceConfig();
+
+ } catch (IOException e) {
+ System.err.println(e.getMessage());
+ }
+ }
+
+ private void runtest() {
+ createListener();
+ createSSLElement();
+ stopDomain();
+ startDomain();
+ setup();
+ removeSSLElement();
+ removeListener();
+ printSummary(passed, failed, didNotRun);
+ }
+
+ private void printProgress(final int i) {
+ System.out.println(i +" out of "+ totalTests + " tests passed");
+ }
+
+ private void printSummary(final int passed, final int failed, final int didNotRun) {
+ System.out.println("Summary Results:"+ passed+" tests passed, "+
+ failed+" tests failed, "+ didNotRun +" tests did not run" );
+ System.out.println("Total Expected to Run "+totalTests);
+ }
+
+ private void createListener() {
+ mIIOPServiceConfig.createIIOPListenerConfig(getListenerName(),
+ getListenerAddress(),
+ getOptional());
+ final IIOPListenerConfig cfg = (IIOPListenerConfig) mIIOPServiceConfig.getIIOPListenerConfigMap().get(getListenerName());
+ if(cfg == null) {
+ System.err.println("IIOPListener was not created");
+ printSummary(passed, ++failed, ++didNotRun);
+ System.exit(1);
+ }
+ printProgress(++passed);
+ }
+
+ private void createSSLElement() {
+ final IIOPListenerConfig cfg = ((IIOPListenerConfig)mIIOPServiceConfig.
+ getIIOPListenerConfigMap().
+ get(getListenerName()));
+ cfg.createSSLConfig("s1as",null);
+ final SSLConfig ssl = cfg.getSSLConfig();
+ if(ssl ==null){
+ System.err.println("ssl element did not get created");
+ printSummary(passed, ++failed, ++didNotRun);
+ System.exit(1);
+ }
+ printProgress(++passed);
+ }
+
+ private void stopDomain() {
+ System.out.println("Stopping domain....");
+ try {
+ mAmxConnector.getAppserverConnectionSource().getJMXConnector(false).close();
+ } catch (IOException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ final String command = STOP_DOMAIN_COMMAND +" "+ getDomainName();
+ final String result = runCommand(command);
+ if(result.indexOf(getDomainName()+" stopped")<0){
+ System.out.println("Domain " + getDomainName() +" did not stop");
+ }
+ }
+
+ private void startDomain() {
+ System.out.println("Starting domain....");
+ final String command = START_DOMAIN_COMMAND +
+ " " +getDomainName();
+ final String result = runCommand(command);
+ if(result.indexOf(getDomainName()+" started")<0){
+ System.out.println("Domain " +getDomainName() + " did not start");
+ }
+ }
+
+ private void removeSSLElement() {
+ final IIOPListenerConfig cfg = ((IIOPListenerConfig)mIIOPServiceConfig.
+ getIIOPListenerConfigMap().
+ get(getListenerName()));
+ cfg.removeSSLConfig();
+ final SSLConfig ssl = cfg.getSSLConfig();
+ if (ssl != null){
+ System.err.println("Could not delete SSL element");
+ printSummary(passed, ++failed, ++didNotRun);
+ }
+ else{
+ printProgress(++passed);
+ }
+ }
+
+ private void removeListener() {
+ mIIOPServiceConfig.removeIIOPListenerConfig(getListenerName());
+ final IIOPListenerConfig cfg = (IIOPListenerConfig) mIIOPServiceConfig.getIIOPListenerConfigMap().get(getListenerName());
+ if(cfg != null) {
+ System.err.println("Listener was not removed from http service");
+ printSummary(passed, ++failed, --totalTests);
+ }
+ else{
+ printProgress(++passed);
+ }
+ }
+
+ private String getListenerName() {
+ return "testListener";
+ }
+
+ private String getListenerAddress() {
+ return "localhost";
+ }
+
+ private Map getOptional() {
+ final Map ops = new HashMap();
+ ops.put(IIOPListenerConfigKeys.SECURITY_ENABLED_KEY, "true");
+ return ops;
+ }
+
+ protected String getHost() {
+ return System.getProperty("HOST", "localhost");
+ }
+
+ protected int getAMXPort() {
+ return Integer.parseInt(System.getProperty("AMX_PORT","8686"));
+ }
+
+ protected int getAdminPort() {
+ return Integer.parseInt(System.getProperty("ADMIN_PORT","4848"));
+ }
+
+ protected String getAdminUser() {
+ return System.getProperty("ADMIN_USER", "admin");
+ }
+
+ protected String getAdminPassword() {
+ return System.getProperty("ADMIN_PASSWORD", "adminadmin");
+ }
+
+ protected boolean getUseTLS() {
+ return Boolean.valueOf(System.getProperty("USE_TLS", "false")).booleanValue();
+ }
+
+ private String getConfigName() {
+ return System.getProperty("CONFIG_NAME","server-config");
+ }
+
+ private String getDomainName() {
+ return "domain1";
+ }
+
+ private String runCommand(final String command) {
+ String sb = null;
+ try {
+ final Process p = Runtime.getRuntime().exec(command);
+ sb = convertToString(p.getInputStream());
+ System.out.println("Received Process Output String: |" +sb+"|");
+ if(sb.length() == 0 ){
+ sb = convertToString(p.getErrorStream());
+ System.out.println("Received Process Error String: |" +sb+"|");
+ }
+ } catch (Exception e) {
+ //System.out.println(e.getMessage());
+ e.printStackTrace();
+ }
+ return sb;
+ }
+
+ private String convertToString(final InputStream in) {
+ final BufferedReader br = new BufferedReader
+ (new InputStreamReader(in));
+ String line;
+ final StringBuffer sb = new StringBuffer();
+ try {
+ while ((line = br.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(" ");
+ }
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return sb.toString();
+ }
+
+ public static void main(final String[] args){
+ final IIOPListenerTests test = new IIOPListenerTests();
+ test.runtest();
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/RegEntry.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/RegEntry.java
new file mode 100755
index 0000000..570a7f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/RegEntry.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import java.util.HashMap;
+
+/**
+ * This is the class for element representing object.
+ * It contains element name and attributes for testing element
+ * Thhis object is using in cofig related generic tests (create/delete/update/list...)
+ * @author alexkrav
+ * @version $Revision: 1.2 $
+ */
+//************************************************************************************************
+public class RegEntry
+{
+
+ String name;
+ String dtdName;
+ String[] requiredAttrs;
+ Class[] requiredAttrClasses;
+ String masterNode;
+
+ RegEntry(String name, String dtdName, String[] required, String masterNode)
+ {
+ this.name = name;
+ this.dtdName = dtdName;
+ this.masterNode = masterNode;
+ requiredAttrs = required;
+ requiredAttrClasses = new Class[requiredAttrs.length];
+ Class strClass = name.getClass();
+ Class intClass = Integer.TYPE;
+ for(int i=0; i<requiredAttrs.length; i++)
+ {
+ if(requiredAttrs[i].endsWith("*int"))
+ {
+ requiredAttrs[i] = requiredAttrs[i].substring(0, requiredAttrs[i].length()-4);
+ requiredAttrClasses[i] = intClass;
+ }
+ else
+ {
+ requiredAttrClasses[i] = strClass;
+ }
+ }
+ }
+ public String[] getReqAttrs()
+ {
+ return requiredAttrs;
+ }
+ public Class[] getReqAttrClasses()
+ {
+ return requiredAttrClasses;
+ }
+ public String getMasterNodeName()
+ {
+ return masterNode;
+ }
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/RemoteInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/RemoteInstanceTest.java
new file mode 100644
index 0000000..779f8a9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/RemoteInstanceTest.java
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import com.sun.enterprise.admin.mbeanapi.common.*;
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+import com.sun.appserv.management.config.PropertiesAccess;
+import com.sun.appserv.management.config.ServerConfigKeys;
+
+
+import java.io.*;
+import java.util.*;
+
+
+
+/**
+ * Creates, starts, stops and deletes standalone instance(s) in a
+ * particular administrative domain
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 26, 2004
+ * @version $Revision: 1.1 $
+ */
+public class RemoteInstanceTest {
+ StandaloneInstanceManager sim;
+ protected static final String LIST_INSTANCES_COMMAND = "asadmin list-instances";
+ protected static final String START_NODE_AGENT_COMMAND = "asadmin start-node-agent";
+ protected static final Object CREATE_NODE_AGENT_COMMAND = "asadmin create-node-agent";
+ protected static final Object LIST_NODE_AGENTS_COMMAND = "asadmin list-node-agents";
+ protected static final String STOP_NODE_AGENT_COMMAND = "asadmin stop-node-agent";
+ protected static final String DELETE_NODE_AGENT_COMMAND = "asadmin delete-node-agent";
+ protected static final String DELETE_NODE_AGENT_CONFIG_COMMAND = "asadmin delete-node-agent-config";
+ SortedMap summary = new TreeMap();
+
+ public RemoteInstanceTest(){
+ try {
+ sim = new StandaloneInstanceManager(getHost(),
+ getAMXPort(),
+ getAdminUser(),
+ getAdminPassword(),
+ getUseTLS() );
+ summary.put("TOTAL AMX TESTS EXPECTED TO RUN", new Integer(getNumInstances()*4));
+ } catch (IOException e) {
+ System.out.println(e.getMessage());
+ }
+ }
+
+ public int runTest() throws TestFailedException{
+ int result;
+ result = createInstance();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Create Instance test failed");
+ }
+
+ result = startInstance();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Start Instance test failed");
+ }
+
+ result = stopInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Stop Instance test failed");
+ }
+
+ result = deleteInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Instance test failed");
+ }
+
+ printSummaryTestResults();
+ return 0;
+ }
+
+ private void printSummaryTestResults() {
+ for(Iterator i = summary.entrySet().iterator(); i.hasNext();){
+ System.out.println(i.next().toString());
+ }
+ }
+
+ protected int createInstance(){
+ for(int i = 0; i< getNumInstances(); i++){
+ try {
+ sim.createInstance(getInstanceNames()[i],
+ getNodeAgentName(),
+ getConfigName(),
+ null);//getOptionalParameters(i+1) );
+ } catch (Exception e){
+ final Throwable t = ExceptionUtil.getRootCause(e);
+ if(t.getMessage() != null){
+ if(t.getMessage().indexOf("WARNING")<0){
+ System.out.println(t.getMessage());
+ return 1;
+ }
+ }else{
+ e.printStackTrace();
+ }
+ }
+ System.out.println("Instance Creation for "+ getInstanceNames()[i] + " completed.");
+ }
+ return 0;
+ }
+
+ protected int startInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ sim.startInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Starting of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int stopInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ sim.stopInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Stopping of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int deleteInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ System.out.println("Deleting instance "+instanceName);
+ sim.deleteInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Deleting of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected String getHost() {
+ return System.getProperty("HOST", "localhost");
+ }
+
+ protected int getAMXPort() {
+ return Integer.parseInt(System.getProperty("AMX_PORT","8686"));
+ }
+
+ protected int getAdminPort() {
+ return Integer.parseInt(System.getProperty("ADMIN_PORT","4848"));
+ }
+
+ protected String getAdminUser() {
+ return System.getProperty("ADMIN_USER", "admin");
+ }
+
+ protected String getAdminPassword() {
+ return System.getProperty("ADMIN_PASSWORD", "adminadmin");
+ }
+
+ protected boolean getUseTLS() {
+ return Boolean.valueOf(System.getProperty("USE_TLS", "false")).booleanValue();
+ }
+
+ protected String[] getInstanceNames() {
+ final int num = getNumInstances();
+ final String[] instances = new String[num];
+ for (int i = 0; i < num; i++){
+ instances[i] = "instance"+(1+i);
+ }
+ return instances;
+ }
+
+ protected int getNumInstances() {
+ return Integer.parseInt(System.getProperty("NUM_INSTANCES", "1"));
+ }
+
+ protected String getNodeAgentName() {
+ return System.getProperty("NODE_AGENT");
+ }
+
+ protected String getConfigName() {
+ return System.getProperty("CONFIG_NAME");
+ }
+
+ //Properties should be specified as a SystemProperty "PROPERTIES" with its
+ // values following the pattern "key=value:key=value......"
+ //For each instance number passed in to this method, the port values will be incremented by
+ //that number here for each value provided through PROPERTIES system prop
+ protected Map getOptionalParameters(final int instanceNum) throws Exception {
+ final Map properties = new HashMap();
+ final String props = System.getProperty("PROPERTIES");
+ if(props == null)
+ return null;
+ final String[] specs = props.split(":");
+ String key, value;
+ for(int i=0; i<specs.length;i++){
+ key = specs[i].substring(0, specs[i].indexOf("=",0));
+ value = specs[i].substring(specs[i].indexOf("=")+1,specs[i].length());
+ key = getLegalKey(key);
+ if(key!=null){
+ properties.put(key, ""+(Integer.parseInt(value)+instanceNum));
+ }
+ else{
+ throw new Exception("PROPERTIES:property key did not match legal key");
+ }
+ }
+ System.out.println(properties.toString());
+ return properties;
+ }
+
+ private String getLegalKey(String key) {
+ String[] legalKeys = {
+ ServerConfigKeys.HTTP_LISTENER_1_PORT_KEY,
+ ServerConfigKeys.HTTP_LISTENER_2_PORT_KEY,
+ ServerConfigKeys.ORB_LISTENER_1_PORT_KEY,
+ ServerConfigKeys.SSL_PORT_KEY,
+ ServerConfigKeys.SSL_MUTUALAUTH_PORT_KEY,
+ ServerConfigKeys.JMX_SYSTEM_CONNECTOR_PORT_KEY,
+ };
+
+ for(int i=0; i<legalKeys.length;i++){
+ if(legalKeys[i].matches(PropertiesAccess.PROPERTY_PREFIX+key ))
+ return legalKeys[i];
+ }
+ return null;
+ }
+
+ public static void main(final String[] args){
+ final RemoteInstanceTest test = new RemoteInstanceTest();
+ try {
+ test.runTest();
+ } catch (TestFailedException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/StandaloneInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/StandaloneInstanceTest.java
new file mode 100755
index 0000000..225702a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/StandaloneInstanceTest.java
@@ -0,0 +1,519 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import com.sun.enterprise.admin.mbeanapi.common.*;
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+import com.sun.appserv.management.config.PropertiesAccess;
+import com.sun.appserv.management.config.ServerConfigKeys;
+
+
+import java.io.*;
+import java.util.*;
+
+
+
+/**
+ * Creates, starts, stops and deletes standalone instance(s) in a
+ * particular administrative domain
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 26, 2004
+ * @version $Revision: 1.9 $
+ */
+public class StandaloneInstanceTest {
+ StandaloneInstanceManager sim;
+ protected static final String LIST_INSTANCES_COMMAND = "asadmin list-instances";
+ protected static final String START_NODE_AGENT_COMMAND = "asadmin start-node-agent";
+ protected static final Object CREATE_NODE_AGENT_COMMAND = "asadmin create-node-agent";
+ protected static final Object LIST_NODE_AGENTS_COMMAND = "asadmin list-node-agents";
+ protected static final String STOP_NODE_AGENT_COMMAND = "asadmin stop-node-agent";
+ protected static final String DELETE_NODE_AGENT_COMMAND = "asadmin delete-node-agent";
+ protected static final String DELETE_NODE_AGENT_CONFIG_COMMAND = "asadmin delete-node-agent-config";
+ SortedMap summary = new TreeMap();
+
+ public StandaloneInstanceTest(){
+ try {
+ sim = new StandaloneInstanceManager(getHost(),
+ getAMXPort(),
+ getAdminUser(),
+ getAdminPassword(),
+ getUseTLS() );
+ summary.put("TOTAL AMX TESTS EXPECTED TO RUN", new Integer(getNumInstances()*4));
+ } catch (IOException e) {
+ System.out.println(e.getMessage());
+ }
+ }
+
+ public int runTest() throws TestFailedException{
+ int result;
+ /*final boolean newNodeAgent = Boolean.valueOf(System.getProperty("NEW_NODE_AGENT","true")).booleanValue();
+ //This is a work around for a bug involving nodeagent
+ //creation when part of the create instance process.
+ if(newNodeAgent){
+ result = createNodeAgent();
+ if(result == 1){
+ throw new TestFailedException("Create Node Agent Operation Failed");
+ }
+ result = verifyNodeAgentCreation();
+ if(result == 1){
+ throw new TestFailedException("Verification of Create Node Agent Operation Failed");
+ }
+ } */
+ // end workaround
+ result = createInstance();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Create Instance test failed");
+ }
+
+ result = verifyCreation();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Create Instance Verification failed");
+ }
+
+ result = startNodeAgent();
+ if(result == 1) {
+ printSummaryTestResults();
+ throw new TestFailedException("Start NodeAgent Operation failed");
+ }
+
+ result = startInstance();
+ if(result == 1){
+ printSummaryTestResults();
+ throw new TestFailedException("Start Instance test failed");
+ }
+
+ result = verifyStartInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Start Instance Verification failed");
+ }
+
+ result = stopInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Stop Instance test failed");
+ }
+
+ result = verifyStopInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Stop Instance Verification failed");
+ }
+
+ result = deleteInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Instance test failed");
+ }
+
+ result = verifyDeleteInstance();
+ if(result ==1){
+ printSummaryTestResults();
+ throw new TestFailedException("Delete Instance Verification failed");
+ }
+
+ /*if(newNodeAgent){
+ result = stopNodeAgent();
+ if(result == 1){
+ throw new TestFailedException("Stop Node Agent Operation Failed");
+ }
+ result = deleteNodeAgent();
+ if(result == 1){
+ throw new TestFailedException("Delete Node Agent Operation Failed");
+ }
+ } */
+ printSummaryTestResults();
+ return 0;
+ }
+
+ private void printSummaryTestResults() {
+ for(Iterator i = summary.entrySet().iterator(); i.hasNext();){
+ System.out.println(i.next().toString());
+ }
+ }
+
+ protected int createNodeAgent() {
+ final String nodeAgentName = getNodeAgentName();
+ final String command = CREATE_NODE_AGENT_COMMAND +
+ " --host " + getHost() +
+ " --port " + getAdminPort() +
+ " --user " + getAdminUser() +
+ " --password " + getAdminPassword()+
+ " " + nodeAgentName;
+ System.out.println("running command: " +command);
+ final String sb = runCommand(command);
+ if(sb.indexOf(nodeAgentName+" created")>=0){
+ System.out.println("Node Agent create operation for "+nodeAgentName+" completed.");
+ return 0;
+ }
+ return 1;
+ }
+
+ protected int verifyNodeAgentCreation() {
+ final String nodeAgentName = getNodeAgentName();
+ final String command = LIST_NODE_AGENTS_COMMAND +
+ " --host "+ getHost() +
+ " --port "+ getAdminPort() +
+ " --user "+ getAdminUser() +
+ " --password "+ getAdminPassword() +
+ " " + nodeAgentName;
+ System.out.println("running command: " +command);
+ final String sb = runCommand(command);
+ if(sb.indexOf(nodeAgentName)>=0){
+ System.out.println("Verification for Node Agent Create Operation for "+nodeAgentName+" completed.");
+ return 0;
+ }
+ return 1;
+ }
+
+ protected int createInstance(){
+ for(int i = 0; i< getNumInstances(); i++){
+ try {
+ sim.createInstance(getInstanceNames()[i],
+ getNodeAgentName(),
+ getConfigName(),
+ getOptionalParameters(i+1) );
+ } catch (Exception e){
+ final Throwable t = ExceptionUtil.getRootCause(e);
+ if(t.getMessage() != null){
+ if(t.getMessage().indexOf("WARNING")<0){
+ System.out.println(t.getMessage());
+ return 1;
+ }
+ }else{
+ e.printStackTrace();
+ }
+ }
+ System.out.println("Instance Creation for "+ getInstanceNames()[i] + " completed.");
+ }
+ return 0;
+ }
+
+ protected int verifyCreation() {
+ int retval=1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(instanceName);
+ if(sb.indexOf(instanceName)>=0){
+ System.out.println("Instance Creation Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE CREATION TEST", i+1 +" out of "+numInst+" PASS");
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", new Integer(i+1));
+ retval=0;
+ }
+ else
+ retval = 1;
+ }
+ return retval;
+ }
+
+ protected String getListInstancesCommandOutput(final String instanceName) {
+ //this assumes asadmin is somewhere in the path
+ String command = LIST_INSTANCES_COMMAND+
+ " --host "+ getHost()+
+ " --port "+ getAdminPort()+
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword();
+ if(instanceName != null)
+ command += " " + instanceName;
+ System.out.println("running command: " +command);
+ return runCommand(command);
+ }
+
+ protected String runCommand(final String command) {
+ String sb = null;
+ try {
+ final Process p = Runtime.getRuntime().exec(command);
+ sb = convertToString(p.getInputStream());
+ System.out.println("Received Process Output String: |" +sb+"|");
+ if(sb.length() == 0 ){
+ sb = convertToString(p.getErrorStream());
+ System.out.println("Received Process Error String: |" +sb+"|");
+ }
+ } catch (Exception e) {
+ //System.out.println(e.getMessage());
+ e.printStackTrace();
+ }
+ return sb;
+ }
+
+
+ protected String convertToString(final InputStream in) {
+ final BufferedReader br = new BufferedReader
+ (new InputStreamReader(in));
+ String line;
+ final StringBuffer sb = new StringBuffer();
+ try {
+ while ((line = br.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(" ");
+ }
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return sb.toString();
+ }
+
+ protected int startNodeAgent() {
+ final String command = START_NODE_AGENT_COMMAND +
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword()+
+ " --startinstances=false"+
+ " " +getNodeAgentName() ;
+ System.out.println("running command: " +command);
+ final String result = runCommand(command);
+ if(result.indexOf("successfully")>=0 ||
+ result.indexOf("running")>=0)
+ {
+ return 0;
+ }
+ return 1;
+ }
+
+ protected int startInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ sim.startInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Starting of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int verifyStartInstance() {
+ int retval=1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(instanceName);
+ if(sb.indexOf(instanceName+" running")>=0){
+ System.out.println("Instance Start Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE START TEST", i+1 +" out of "+numInst+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval=1;
+ }
+ return retval;
+ }
+
+ protected int stopInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ sim.stopInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Stopping of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int verifyStopInstance() {
+ int retval = 1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(instanceName);
+ if(sb.indexOf(instanceName+" not running")>=0){
+ System.out.println("Instance Stop Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE STOP TEST", i+1 +" out of "+numInst+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval =1;
+ }
+ return retval;
+ }
+
+ protected int deleteInstance() {
+ for(int i = 0; i< getNumInstances(); i++){
+ final String instanceName = getInstanceNames()[i];
+ try {
+ sim.deleteInstance(instanceName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("Deleting of instance " + instanceName +" completed.");
+ }
+ return 0;
+ }
+
+ protected int verifyDeleteInstance() {
+ int retval = 1;
+ final int numInst = getNumInstances();
+ for(int i = 0; i< numInst; i++){
+ final String instanceName = getInstanceNames()[i];
+ final String sb = getListInstancesCommandOutput(null);
+ if(sb.indexOf(instanceName)<0){
+ System.out.println("Instance Delete Verification for "+getInstanceNames()[i] + " successful.");
+ summary.put("INSTANCE DELETE TEST", i+1 +" out of "+numInst+" PASS");
+ final Integer total = new Integer(((Integer)summary.get("TOTAL AMX TESTS ACUALLY RUN")).intValue()+ 1);
+ summary.put("TOTAL AMX TESTS ACUALLY RUN", total);
+ retval = 0;
+ }
+ else
+ retval =1;
+ }
+ return retval;
+ }
+
+ protected int stopNodeAgent() {
+ final String command = STOP_NODE_AGENT_COMMAND +
+ " " +getNodeAgentName() ;
+ System.out.println("running command: " +command);
+ final String result = runCommand(command);
+ if(result.indexOf("successfully")>=0){
+ return 0;
+ }
+ return 1;
+ }
+
+ private int deleteNodeAgent() {
+ String command = DELETE_NODE_AGENT_COMMAND +
+ " " +getNodeAgentName() ;
+ System.out.println("running command: " +command);
+ String result = runCommand(command);
+ if(result.indexOf(getNodeAgentName()+" deleted")>=0){
+ command = DELETE_NODE_AGENT_CONFIG_COMMAND +
+ " --host "+ getHost()+
+ " --port "+ getAdminPort()+
+ " --user "+ getAdminUser()+
+ " --password " + getAdminPassword()+
+ " " +getNodeAgentName();
+ System.out.println("running command: " +command);
+ result = runCommand(command);
+ if(result.indexOf("successfully")>=0){
+ return 0;
+ }
+ }
+ return 1;
+
+ }
+
+ protected String getHost() {
+ return System.getProperty("HOST", "localhost");
+ }
+
+ protected int getAMXPort() {
+ return Integer.parseInt(System.getProperty("AMX_PORT","8686"));
+ }
+
+ protected int getAdminPort() {
+ return Integer.parseInt(System.getProperty("ADMIN_PORT","4848"));
+ }
+
+ protected String getAdminUser() {
+ return System.getProperty("ADMIN_USER", "admin");
+ }
+
+ protected String getAdminPassword() {
+ return System.getProperty("ADMIN_PASSWORD", "adminadmin");
+ }
+
+ protected boolean getUseTLS() {
+ return Boolean.valueOf(System.getProperty("USE_TLS", "false")).booleanValue();
+ }
+
+ protected String[] getInstanceNames() {
+ final int num = getNumInstances();
+ final String[] instances = new String[num];
+ for (int i = 0; i < num; i++){
+ instances[i] = "instance"+(1+i);
+ }
+ return instances;
+ }
+
+ protected int getNumInstances() {
+ return Integer.parseInt(System.getProperty("NUM_INSTANCES", "1"));
+ }
+
+ protected String getNodeAgentName() {
+ return System.getProperty("NODE_AGENT");
+ }
+
+ protected String getConfigName() {
+ return System.getProperty("CONFIG_NAME");
+ }
+
+ //Properties should be specified as a SystemProperty "PROPERTIES" with its
+ // values following the pattern "key=value:key=value......"
+ //For each instance number passed in to this method, the port values will be incremented by
+ //that number here for each value provided through PROPERTIES system prop
+ protected Map getOptionalParameters(final int instanceNum) throws Exception {
+ final Map properties = new HashMap();
+ final String props = System.getProperty("PROPERTIES");
+ if(props == null)
+ return null;
+ final String[] specs = props.split(":");
+ String key, value;
+ for(int i=0; i<specs.length;i++){
+ key = specs[i].substring(0, specs[i].indexOf("=",0));
+ value = specs[i].substring(specs[i].indexOf("=")+1,specs[i].length());
+ key = getLegalKey(key);
+ if(key!=null){
+ properties.put(key, ""+(Integer.parseInt(value)+instanceNum));
+ }
+ else{
+ throw new Exception("PROPERTIES:property key did not match legal key");
+ }
+ }
+ System.out.println(properties.toString());
+ return properties;
+ }
+
+ private String getLegalKey(String key) {
+ String[] legalKeys = {
+ ServerConfigKeys.HTTP_LISTENER_1_PORT_KEY,
+ ServerConfigKeys.HTTP_LISTENER_2_PORT_KEY,
+ ServerConfigKeys.ORB_LISTENER_1_PORT_KEY,
+ ServerConfigKeys.SSL_PORT_KEY,
+ ServerConfigKeys.SSL_MUTUALAUTH_PORT_KEY,
+ ServerConfigKeys.JMX_SYSTEM_CONNECTOR_PORT_KEY,
+ };
+
+ for(int i=0; i<legalKeys.length;i++){
+ if(legalKeys[i].matches(PropertiesAccess.PROPERTY_PREFIX+key ))
+ return legalKeys[i];
+ }
+ return null;
+ }
+
+ public static void main(final String[] args){
+ final StandaloneInstanceTest test = new StandaloneInstanceTest();
+ try {
+ test.runTest();
+ } catch (TestFailedException 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
new file mode 100755
index 0000000..9e7ade0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElemRegistry.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import java.util.HashMap;
+
+/**
+ * This is the class for element representing object.
+ * It contains element name and attributes for testing element
+ * Thhis object is using in cofig related generic tests (create/delete/update/list...)
+ * @author alexkrav
+ * @version $Revision: 1.6 $
+ */
+public class TestElemRegistry {
+ private static HashMap mRegistry = null;
+ public static String mConfigName;
+
+ //************************************************************************************************
+ static RegEntry getRegEntry(String name)
+ {
+ return (RegEntry)mRegistry.get(name);
+ }
+ private static void addRegEntry(HashMap map, String masterNode, String entryName, String[] req)
+ {
+ 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,
+ new RegEntry(entryName, dtd_name, req, masterNode));
+ }
+ /*
+ public static String[] getRequiredAttrs(String name)
+ {
+ RegEntry entry = getRegEntry(name);
+ return entry.getReqAttrs();
+ }
+ public static String[] getRequiredAttrClasses(String name)
+ {
+ RegEntry entry = getRegEntry(name);
+ return entry.getReqAttrClasses();
+ }
+ public static String getDtdName(String name)
+ {
+ 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"});
+ addRegEntry(reg, "domain", "jndi-resource", "external-jndi-resource", new String[]{"jndi-name", "jndi-lookup-name", "res-type", "factory-class"} );
+ addRegEntry(reg, "domain", "jdbc-resource", new String[]{"jndi-name", "pool-name"});
+ addRegEntry(reg, "domain", "mail-resource", new String[]{"jndi-name", "host", "user", "from"});
+ addRegEntry(reg, "domain", "persistence-manager-factory-resource", new String[]{"jndi-name"});
+ addRegEntry(reg, "domain", "connector-connection-pool-resource", "connector-connection-pool", new String[]{"name", "resource-adapter-name", "connection-definition-name"});
+ 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"});
+
+ addRegEntry(reg, "iiop-service", "iiop-listener", new String[]{"id", "address"});
+ addRegEntry(reg, "iiop-listener", "ssl", new String[]{"cert-nickname"});
+ mRegistry = reg;
+ return true;
+ }
+ //////////////////////////////////////////////////////////////////////////////////////
+}
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
new file mode 100755
index 0000000..d3ee48f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElement.java
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+import java.lang.Integer;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.management.ObjectName;
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.config.AMXConfig;
+import com.sun.appserv.management.config.ConfigConfig;
+
+
+/**
+ * This is the class for element representing object.
+ * It contains element name and attributes for testing element
+ * This object is using in cofig related generic tests (create/delete/update/list...)
+ * @author alexkrav
+ * @version $Revision: 1.8 $
+ */
+public class TestElement {
+ private String name;
+ private HashMap attributes;
+ RegEntry entry;
+
+ TestElement(String line)
+ {
+ int current = 0, next = 0;
+ attributes = new HashMap();
+ //not fast but easy
+ //+no errors handling
+ line = line.trim();
+ if(line.startsWith("<"))
+ line = line.substring(1).trim();
+ if(line.endsWith(">"))
+ line = line.substring(0, line.length()-1).trim();
+ //element name
+ next = line.indexOf(' ');
+ if (next<0)
+ name = line;
+ else
+ name = line.substring(0, next);
+//System.out.println("new element's name=\""+name+ "\"");
+//System.out.println("new element's name(camelized)=\""+camelize(name)+ "\"");
+ next++;
+ while (next>0 && next<line.length())
+ {
+ line = line.substring(next).trim();
+ if(line.length()<=0)
+ break;
+ //attrName
+ next = line.indexOf('=');
+ String attrName = line.substring(0, next);
+ //attrValue
+ line = line.substring(next+1).trim();
+ String attrValue;
+ if(line.charAt(0)=='"')
+ {
+ next = line.indexOf('"', 1);
+ attrValue = line.substring(1, next);
+ next++;
+ }
+ else
+ {
+ next = line.indexOf(' ');
+ if(next<=0)
+ attrValue = line;
+ else
+ 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+ "\")");
+ }
+ }
+ public String getElementName()
+ {
+ return name;
+ }
+ public Object getAttributeValue(String attrName)
+ {
+ return attributes.get(attrName);
+ }
+
+ public Map getAttributesMapCopy()
+ {
+ return new HashMap(attributes);
+ }
+
+ public String getDtdName()
+ {
+ return entry.dtdName;
+ }
+
+ public String getElementKeyName()
+ {
+ String[] req = entry.getReqAttrs();
+ return req[0];
+ }
+
+ public String getElementKey()
+ {
+ return (String)getAttributeValue(getElementKeyName());
+ }
+
+ public Object[] getCreationParams()
+ {
+ String[] req = entry.getReqAttrs();
+ Class[] classes = entry.getReqAttrClasses();
+ Object[] params;
+ Map optional = getAttributesMapCopy(); //all in the begining
+ if(req==null)
+ params = new Object[1];
+ else
+ params = new Object[req.length+1];
+ for(int i=0; i<req.length; i++)
+ {
+ params[i] = attributes.get(req[i]);
+ if(classes[i].equals(Integer.TYPE))
+ {
+ try {
+ params[i] = new Integer((String)(params[i]));
+ } catch (Exception e) {}
+ }
+ optional.remove(req[i]);
+ }
+
+ params[params.length-1] = optional;
+ return params;
+ }
+
+ public Class[] getCreationClasses() throws Exception
+ {
+ Class[] classes = entry.getReqAttrClasses();
+ Class[] cls = new Class[classes.length+1];
+ for(int i=0; i<classes.length; i++)
+ cls[i] = classes[i];
+ 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();
+ if("domain".equals(masterNodeName))
+ return domainRoot.getDomainConfig();
+ if("http-service".equals(masterNodeName))
+ return ((ConfigConfig)domainRoot.getDomainConfig().getConfigConfigMap().get("server-config")).getHTTPServiceConfig();
+ 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/config/com/sun/enterprise/admin/mbeanapi/config/TestFailedException.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestFailedException.java
new file mode 100755
index 0000000..0b73c1d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestFailedException.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.config;
+
+/**
+ * @author <a href=mailto:shreedhar.ganapathy@sun.com>Shreedhar Ganapathy</a>
+ * Date: Aug 26, 2004
+ * @version $Revision: 1.1 $
+ */
+public class TestFailedException extends Exception {
+ public TestFailedException(final String msg){
+ super(msg);
+ }
+}
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
new file mode 100644
index 0000000..a5994d6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.properties
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+###############################################################################
+###############################################################################
+######### DeploymentTests Properties ##################
+###############################################################################
+###############################################################################
+
+user=admin
+password=adminadmin
+host=localhost
+
+#####################################
+### targets -- set to "server" for the default server deployment. Otherwise give a comma
+### separated lists of instances and clusters
+### e.g. targets=foo,goo,hoo
+#####################################
+targets=server
+
+#####################################
+### port is the jmx port -- default=8686
+#####################################
+port=8686
+
+######################################
+### sampledir is a directory that has archive files for deployment in it
+### the default should be "samples"
+sampledir=samples
+
+#####################################
+### optional -- report - the path of the report file that gets generated.
+### The default is "DeploymentTests.out"
+#####################################
+report=DeploymentTests.out
+
+#####################################
+### optional -- pauseAfterDeploy -- set to "true" to pause after deploy but before undeploy
+#####################################
+pauseAfterDeploy=true
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/bootstrap.subcomponent.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/bootstrap.subcomponent.properties
new file mode 100644
index 0000000..3b4dbf4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/bootstrap.subcomponent.properties
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+publish.root.dir=../../../../../..
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
new file mode 100755
index 0000000..6454a01
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+src.dir=.
+mbeanapi.jar=${publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+jmxri.jar=${publish.home}/jmx/lib/jmxri.jar
+jmxremote.jar =${publish.home}/rjmx-ri/jmxremote.jar
+samples.src=${src.dir}/com/sun/enterprise/admin/mbeanapi/deployment/samples
+samples.dest=${src.dir}/build/com/sun/enterprise/admin/mbeanapi/deployment/samples
+
+
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
new file mode 100755
index 0000000..0d1f813
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Config tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property name="samples" value="${testsRoot}/samples"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+<property name="listfiles" value="false"/>
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${jmxremote.jar}"/>
+ <pathelement location="${build}"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build,copyuisamples"
+ description="Build entire component" />
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true"
+ listfiles="${listfiles}">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- copysamples-->
+ <target name="copyuisamples" depends="compile">
+ <copy todir="${samples.dest}">
+ <fileset dir="${samples.src}"/>
+ </copy>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ <delete dir="${samples}"/>
+ </target>
+
+ <!-- copyautosamples -->
+ <target name="copyautosamples">
+ <unzip src="${testsRoot}/samples.zip" dest="${samples}"/>
+ <unzip src="${testsRoot}/dir-deploy.zip" dest="${samples}"/>
+ </target>
+
+ <!-- runtests -->
+ <target name="runtests" depends="compile,copyautosamples">
+ <java classname="com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto" fork="true">
+ <jvmarg value="-ea"/>
+ <arg value="ant"/>
+ <classpath refid="run.classpath"/>
+ </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"/>
+ <classpath refid="run.classpath"/>
+ </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
new file mode 100644
index 0000000..e2a8f69
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/AdminObjectResourceTest.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.AdminObjectResourceConfig;
+
+/**
+ */
+public class AdminObjectResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myAdminObjectResource";
+ static final String kResType = "abc";
+ static final String kResAdapter = "abcAdapter";
+ static final String kObjectType = "user";
+
+ 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();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateAdminObjectResourceCmd createCmd =
+ cmdFactory.createCreateAdminObjectResourceCmd(jndiName,
+ resType, resAdapter, getOptional());
+
+ final DeleteAdminObjectResourceCmd deleteCmd =
+ cmdFactory.createDeleteAdminObjectResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ 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,
+ //kObjectType);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private AdminObjectResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (AdminObjectResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("JNDIName="+res.getJNDIName());
+ System.out.println("ResType="+res.getResType());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("ResAdapter="+res.getResAdapter());
+ System.out.println("Enabled="+res.getEnabled());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100755
index 0000000..510200c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseCmd.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.base.QueryMgr;
+import com.sun.appserv.management.j2ee.J2EEDomain;
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.client.AppserverConnectionSource;
+import com.sun.appserv.management.client.TLSParams;
+
+/**
+ */
+public abstract class BaseCmd implements Cmd, SinkCmd
+{
+ public static final String kConnectionSource = "connectionSource";
+
+ private final CmdEnv _cmdEnv;
+
+ protected BaseCmd(CmdEnv cmdEnv)
+ {
+ if (cmdEnv == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ _cmdEnv = cmdEnv;
+ }
+
+ public void setPipedData(Object o)
+ {
+ if (o instanceof AppserverConnectionSource)
+ {
+ setConnectionSource((AppserverConnectionSource)o);
+ }
+ else
+ {
+ throw new IllegalArgumentException(
+ "setPipedData: Support only AppserverConnectionSource for now");
+ }
+ }
+
+ protected CmdEnv getCmdEnv()
+ {
+ return _cmdEnv;
+ }
+
+ protected boolean isConnected()
+ {
+ return _cmdEnv.get(kConnectionSource) != null;
+ }
+
+ protected AppserverConnectionSource getConnectionSource()
+ {
+ return (AppserverConnectionSource)_cmdEnv.get(kConnectionSource);
+ }
+
+ protected void setConnectionSource(AppserverConnectionSource cs)
+ {
+ _cmdEnv.put(kConnectionSource, cs);
+ }
+
+ protected final DomainRoot getDomainRoot() throws Exception
+ {
+ return getConnectionSource().getDomainRoot();
+ }
+
+ protected final DomainConfig getDomainConfig() throws Exception
+ {
+ return getDomainRoot().getDomainConfig();
+ }
+
+ protected final J2EEDomain getJ2EEDomain() throws Exception
+ {
+ return getDomainRoot().getJ2EEDomain();
+ }
+
+ protected final TLSParams getTLSParams()
+ {
+ return Env.useTLS() ? Env.getTLSParams() : null;
+ }
+
+ protected final QueryMgr getQueryMgr() throws Exception
+ {
+ return getDomainRoot().getQueryMgr();
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseInstanceCmd.java
new file mode 100755
index 0000000..867efa1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseInstanceCmd.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.j2ee.J2EEServer;
+import com.sun.appserv.management.j2ee.J2EECluster;
+
+/**
+ */
+public abstract class BaseInstanceCmd extends BaseCmd
+{
+ public static final String kInstanceName = "InstanceName";
+ public static final String kClusterName = "ClusterName";
+ public static final String kConfigName = "ConfigName";
+ public static final String kNodeAgentName = "NodeAgentName";
+ public static final String kOptional = "Optional";
+
+ protected BaseInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ protected J2EEServer getJ2EEServer() throws Exception
+ {
+ final Map servers = getJ2EEDomain().getServerMap();
+ return (J2EEServer)servers.get(getInstanceName());
+ }
+
+ protected J2EECluster getJ2EECluster() throws Exception
+ {
+ final Map clusters = getJ2EEDomain().getClusterMap();
+ return (J2EECluster)clusters.get(getClusterName());
+ }
+
+ public String getInstanceName()
+ {
+ return (String)getCmdEnv().get(kInstanceName);
+ }
+
+ public String getClusterName()
+ {
+ return (String)getCmdEnv().get(kClusterName);
+ }
+
+ public String getNodeAgentName()
+ {
+ return (String)getCmdEnv().get(kNodeAgentName);
+ }
+
+ public String getConfigName()
+ {
+ return (String)getCmdEnv().get(kConfigName);
+ }
+
+ public Map getOptional()
+ {
+ return (Map)getCmdEnv().get(kOptional);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseResourceCmd.java
new file mode 100644
index 0000000..4607735
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseResourceCmd.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+/**
+ */
+public abstract class BaseResourceCmd extends BaseCmd
+{
+ public static final String kJNDIName = "JNDIName";
+ public static final String kOptional = "Optional";
+ public static final String kTarget = "Target";
+ public static final String kRACName = "resourceAdapterName";
+
+
+ public BaseResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ protected String getJNDIName()
+ {
+ return (String)getCmdEnv().get(kJNDIName);
+ }
+
+ protected String getTarget()
+ {
+ return (String)getCmdEnv().get(kTarget);
+ }
+
+ protected Map getOptional()
+ {
+ return (Map)getCmdEnv().get(kOptional);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseTest.java
new file mode 100755
index 0000000..acd4df6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+/**
+ */
+public abstract class BaseTest
+{
+ public BaseTest()
+ {
+ }
+
+ public void run() throws Exception
+ {
+ setup();
+ runInternal();
+ dismantle();
+ }
+
+ protected abstract void runInternal() throws Exception;
+
+ protected void setup() throws Exception {}
+ protected void dismantle() throws Exception {}
+
+ protected CmdFactory getCmdFactory()
+ {
+ return Env.getCmdFactory();
+ }
+
+}
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
new file mode 100755
index 0000000..6012f07
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ClusterLifecycleTest.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+/**
+ */
+public class ClusterLifecycleTest extends BaseTest
+{
+ 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 configName, final Map optional)
+ {
+ final CmdChainCmd chain = new CmdChainCmd();
+
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateClusterCmd createClusterCmd =
+ cmdFactory.createCreateClusterCmd(
+ clusterName, configName, optional);
+
+ final CreateClusteredInstanceCmd createClusteredInstanceCmd =
+ cmdFactory.createCreateClusteredInstanceCmd(instanceName,
+ clusterName, nodeAgentName, optional);
+
+ final StartClusterCmd startClusterCmd =
+ cmdFactory.createStartClusterCmd(clusterName);
+
+ final StopClusterCmd stopClusterCmd =
+ cmdFactory.createStopClusterCmd(clusterName);
+
+ final DeleteClusteredInstanceCmd deleteClusteredInstanceCmd =
+ cmdFactory.createDeleteClusteredInstanceCmd(instanceName);
+
+ final DeleteClusterCmd deleteClusterCmd = cmdFactory.
+ createDeleteClusterCmd(clusterName);
+
+ chain.addCmd(new PipeCmd(connectCmd, createClusterCmd));
+ chain.addCmd(new PipeCmd(connectCmd, createClusteredInstanceCmd));
+ chain.addCmd(new PipeCmd(connectCmd, startClusterCmd));
+ chain.addCmd(new PipeCmd(connectCmd, stopClusterCmd));
+ chain.addCmd(new PipeCmd(connectCmd, deleteClusteredInstanceCmd));
+ chain.addCmd(new PipeCmd(connectCmd, deleteClusterCmd));
+
+ target = chain;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ final String clusterName = args[0];
+ final String instanceName = args[1];
+ final String nodeAgentName = args[2];
+ final String configName = args.length == 4 ? args[3] : null;
+
+ new ClusterLifecycleTest("admin", "password", "localhost", 8686,
+ clusterName, instanceName, nodeAgentName, configName, null).run();
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Cmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Cmd.java
new file mode 100755
index 0000000..f4e9ab5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Cmd.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public interface Cmd
+{
+ Object execute() throws Exception;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdChainCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdChainCmd.java
new file mode 100755
index 0000000..5541725
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdChainCmd.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ */
+public class CmdChainCmd implements Cmd
+{
+ private final List _cmds = new ArrayList();
+
+ public CmdChainCmd()
+ {
+ }
+
+ public CmdChainCmd(List cmds)
+ {
+ _cmds.addAll(cmds);
+ }
+
+ public void addCmd(Cmd cmd)
+ {
+ _cmds.add(cmd);
+ }
+
+ public Object execute() throws Exception
+ {
+ final Iterator it = _cmds.iterator();
+ while (it.hasNext())
+ {
+ ((Cmd)it.next()).execute();
+ }
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdEnv.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdEnv.java
new file mode 100755
index 0000000..05cb2a5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdEnv.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+
+/**
+ */
+public final class CmdEnv
+{
+ private final Map env = Collections.synchronizedMap(new HashMap(4));
+
+ public CmdEnv()
+ {
+ }
+
+ public Object get(Object key)
+ {
+ return env.get(key);
+ }
+
+ public void put(Object key, Object value)
+ {
+ env.put(key, value);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdExecutor.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdExecutor.java
new file mode 100755
index 0000000..cc2e3c5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdExecutor.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class CmdExecutor implements Cmd
+{
+ private final Cmd[] _cmds;
+
+ public CmdExecutor(Cmd[] cmds)
+ {
+ if (cmds == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ _cmds = cmds;
+ }
+
+ public Object execute() throws Exception
+ {
+ for (int i = 0; i < _cmds.length; i++)
+ {
+ _cmds[i].execute();
+ }
+ return new Integer(0);
+ }
+}
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
new file mode 100755
index 0000000..3d7e4e1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdFactory.java
@@ -0,0 +1,493 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import java.io.*;
+
+/**
+ */
+public class CmdFactory
+{
+ public CmdFactory()
+ {
+ }
+
+ public ConnectCmd createConnectCmd(Phup phup)
+ {
+ 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();
+
+ cmdEnv.put(ConnectCmd.kHost, host);
+ cmdEnv.put(ConnectCmd.kPort, new Integer(port));
+ cmdEnv.put(ConnectCmd.kUser, user);
+ cmdEnv.put(ConnectCmd.kPassword, password);
+
+ return new ConnectCmd(cmdEnv);
+ }
+
+ public CreateInstanceCmd createCreateInstanceCmd(
+ String instanceName, String nodeAgentName,
+ String configName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateInstanceCmd.kInstanceName, instanceName);
+ cmdEnv.put(CreateInstanceCmd.kNodeAgentName, nodeAgentName);
+ cmdEnv.put(CreateInstanceCmd.kConfigName, configName);
+ cmdEnv.put(CreateInstanceCmd.kOptional, optional);
+
+ return new CreateInstanceCmd(cmdEnv);
+ }
+
+ public DeleteInstanceCmd createDeleteInstanceCmd(
+ String instanceName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteInstanceCmd.kInstanceName, instanceName);
+
+ return new DeleteInstanceCmd(cmdEnv);
+ }
+
+ public StartInstanceCmd createStartInstanceCmd(
+ String instanceName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(StartInstanceCmd.kInstanceName, instanceName);
+
+ return new StartInstanceCmd(cmdEnv);
+ }
+
+ public StopInstanceCmd createStopInstanceCmd(
+ String instanceName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(StopInstanceCmd.kInstanceName, instanceName);
+
+ return new StopInstanceCmd(cmdEnv);
+ }
+
+ 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,
+ String description, String contextRoot, boolean enable,
+ boolean forceDeploy, boolean generateRMIStubs,
+ boolean availabilityEnabled, boolean cascade, boolean verify,
+ String target)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeployCmd.kArchive, archive);
+ cmdEnv.put(DeployCmd.kTarget, target);
+
+ final Map deployOptions = new HashMap(10);
+
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_NAME_KEY, name);
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY,
+ description);
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_CONTEXT_ROOT_KEY,
+ contextRoot);
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_ENABLE_KEY,
+ new Boolean(enable).toString());
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_GENERATE_RMI_STUBS_KEY,
+ new Boolean(generateRMIStubs).toString());
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_FORCE_KEY,
+ new Boolean(forceDeploy).toString());
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_AVAILABILITY_ENABLED_KEY,
+ new Boolean(availabilityEnabled).toString());
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_CASCADE_KEY,
+ new Boolean(cascade).toString());
+ 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)
+ {
+ //
+ }
+ cmdEnv.put(DeployCmd.kDeployOptions, deployOptions);
+
+ return new DeployCmd(cmdEnv);
+ }
+
+ public CreateResourceAdapterConfigCmd createCreateResourceAdapterConfigCmd(
+ String racName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateResourceAdapterConfigCmd.kRACName, racName);
+ cmdEnv.put(CreateResourceAdapterConfigCmd.kOptional, optional);
+
+ return new CreateResourceAdapterConfigCmd(cmdEnv);
+ }
+
+ public DeleteResourceAdapterConfigCmd createDeleteResourceAdapterConfigCmd(
+ String racName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteResourceAdapterConfigCmd.kRACName, racName);
+
+ return new DeleteResourceAdapterConfigCmd(cmdEnv);
+ }
+
+ public CreateJNDIResourceCmd createCreateJNDIResourceCmd(
+ String jndiName, String jndiLookupName, String resType,
+ String factoryClass, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateJNDIResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreateJNDIResourceCmd.kJNDILookupName, jndiLookupName);
+ cmdEnv.put(CreateJNDIResourceCmd.kResType, resType);
+ cmdEnv.put(CreateJNDIResourceCmd.kFactoryClass, factoryClass);
+ cmdEnv.put(CreateJNDIResourceCmd.kOptional, optional);
+
+ return new CreateJNDIResourceCmd(cmdEnv);
+ }
+
+ public DeleteJNDIResourceCmd createDeleteJNDIResourceCmd(String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteJNDIResourceCmd.kJNDIName, jndiName);
+
+ return new DeleteJNDIResourceCmd(cmdEnv);
+ }
+
+ public CreateMailResourceCmd createCreateMailResourceCmd(
+ String jndiName, String host, String user,
+ String from, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateMailResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreateMailResourceCmd.kHost, host);
+ cmdEnv.put(CreateMailResourceCmd.kUser, user);
+ cmdEnv.put(CreateMailResourceCmd.kFrom, from);
+ cmdEnv.put(CreateMailResourceCmd.kOptional, optional);
+
+ return new CreateMailResourceCmd(cmdEnv);
+ }
+
+ public DeleteMailResourceCmd createDeleteMailResourceCmd(String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteMailResourceCmd.kJNDIName, jndiName);
+
+ return new DeleteMailResourceCmd(cmdEnv);
+ }
+
+ public CreatePMFResourceCmd createCreatePMFResourceCmd(
+ String jndiName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreatePMFResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreatePMFResourceCmd.kOptional, optional);
+
+ return new CreatePMFResourceCmd(cmdEnv);
+ }
+
+ public DeletePMFResourceCmd createDeletePMFResourceCmd(String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeletePMFResourceCmd.kJNDIName, jndiName);
+
+ return new DeletePMFResourceCmd(cmdEnv);
+ }
+
+ public CreateAdminObjectResourceCmd createCreateAdminObjectResourceCmd(
+ String jndiName, String resType, String resAdapter, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateAdminObjectResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreateAdminObjectResourceCmd.kResType, resType);
+ cmdEnv.put(CreateAdminObjectResourceCmd.kResAdapter, resAdapter);
+ cmdEnv.put(CreateAdminObjectResourceCmd.kOptional, optional);
+
+ return new CreateAdminObjectResourceCmd(cmdEnv);
+ }
+
+ public DeleteAdminObjectResourceCmd createDeleteAdminObjectResourceCmd(
+ String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteAdminObjectResourceCmd.kJNDIName, jndiName);
+
+ return new DeleteAdminObjectResourceCmd(cmdEnv);
+ }
+
+ public CreateCustomResourceCmd createCreateCustomResourceCmd(
+ String jndiName, String resType, String factoryClass, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateCustomResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreateCustomResourceCmd.kResType, resType);
+ cmdEnv.put(CreateCustomResourceCmd.kFactoryClass, factoryClass);
+ cmdEnv.put(CreateCustomResourceCmd.kOptional, optional);
+
+ return new CreateCustomResourceCmd(cmdEnv);
+ }
+
+ public DeleteCustomResourceCmd createDeleteCustomResourceCmd(
+ String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteCustomResourceCmd.kJNDIName, jndiName);
+
+ return new DeleteCustomResourceCmd(cmdEnv);
+ }
+
+ public CreateJDBCResourceCmd createCreateJDBCResourceCmd(
+ String jndiName, String poolName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateJDBCResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreateJDBCResourceCmd.kPoolName, poolName);
+ cmdEnv.put(CreateJDBCResourceCmd.kOptional, optional);
+
+ return new CreateJDBCResourceCmd(cmdEnv);
+ }
+
+ public DeleteJDBCResourceCmd createDeleteJDBCResourceCmd(
+ String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteJDBCResourceCmd.kJNDIName, jndiName);
+
+ return new DeleteJDBCResourceCmd(cmdEnv);
+ }
+
+ public CreateConnectorResourceCmd createCreateConnectorResourceCmd(
+ String jndiName, String poolName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateConnectorResourceCmd.kJNDIName, jndiName);
+ cmdEnv.put(CreateConnectorResourceCmd.kPoolName, poolName);
+ cmdEnv.put(CreateConnectorResourceCmd.kOptional, optional);
+
+ return new CreateConnectorResourceCmd(cmdEnv);
+ }
+
+ public DeleteConnectorResourceCmd createDeleteConnectorResourceCmd(
+ String jndiName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteConnectorResourceCmd.kJNDIName, jndiName);
+
+ return new DeleteConnectorResourceCmd(cmdEnv);
+ }
+
+ public CreateConnectorConnectionPoolCmd
+ createCreateConnectorConnectionPoolCmd(
+ String name, String resourceAdapterName,
+ String connectionDefinitionName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateConnectorConnectionPoolCmd.kName, name);
+ cmdEnv.put(CreateConnectorConnectionPoolCmd.kResourceAdapterName,
+ resourceAdapterName);
+ cmdEnv.put(CreateConnectorConnectionPoolCmd.kConnectionDefinitionName,
+ connectionDefinitionName);
+ cmdEnv.put(CreateConnectorConnectionPoolCmd.kOptional, optional);
+
+ return new CreateConnectorConnectionPoolCmd(cmdEnv);
+ }
+
+ public DeleteConnectorConnectionPoolCmd
+ createDeleteConnectorConnectionPoolCmd(String name)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteConnectorConnectionPoolCmd.kName, name);
+
+ return new DeleteConnectorConnectionPoolCmd(cmdEnv);
+ }
+
+ public CreateJDBCConnectionPoolCmd
+ createCreateJDBCConnectionPoolCmd(
+ String name, String datasourceClassname, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateJDBCConnectionPoolCmd.kName, name);
+ cmdEnv.put(CreateJDBCConnectionPoolCmd.kDatasourceClassname,
+ datasourceClassname);
+ cmdEnv.put(CreateJDBCConnectionPoolCmd.kOptional, optional);
+
+ return new CreateJDBCConnectionPoolCmd(cmdEnv);
+ }
+
+ public DeleteJDBCConnectionPoolCmd
+ createDeleteJDBCConnectionPoolCmd(String name)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteJDBCConnectionPoolCmd.kName, name);
+
+ return new DeleteJDBCConnectionPoolCmd(cmdEnv);
+ }
+
+ public UndeployCmd createUndeployCmd(String name, String target)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+ final Map undeployOptions = new HashMap(1);
+
+ cmdEnv.put(DeployCmd.kTarget, target);
+
+ undeployOptions.put(DeploymentMgr.DEPLOY_OPTION_NAME_KEY, name);
+ cmdEnv.put(DeployCmd.kDeployOptions, undeployOptions);
+
+ return new UndeployCmd(cmdEnv);
+ }
+
+ public ListDeployedAppsCmd createListDeployedAppsCmd(String target,
+ String appType)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+ cmdEnv.put(ListDeployedAppsCmd.kTarget, target);
+ cmdEnv.put(ListDeployedAppsCmd.kAppType, appType);
+
+ return new ListDeployedAppsCmd(cmdEnv);
+ }
+
+ public CreateClusterCmd createCreateClusterCmd(
+ String clusterName, String configName, Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateClusterCmd.kClusterName, clusterName);
+ cmdEnv.put(CreateClusterCmd.kConfigName, configName);
+ cmdEnv.put(CreateClusterCmd.kOptional, optional);
+
+ return new CreateClusterCmd(cmdEnv);
+ }
+
+ public DeleteClusterCmd createDeleteClusterCmd(String clusterName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteClusterCmd.kClusterName, clusterName);
+
+ return new DeleteClusterCmd(cmdEnv);
+ }
+
+ public StartClusterCmd createStartClusterCmd(String clusterName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(StartClusterCmd.kClusterName, clusterName);
+
+ return new StartClusterCmd(cmdEnv);
+ }
+
+ public StopClusterCmd createStopClusterCmd(String clusterName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(StopClusterCmd.kClusterName, clusterName);
+
+ return new StopClusterCmd(cmdEnv);
+ }
+
+ public CreateClusteredInstanceCmd createCreateClusteredInstanceCmd(
+ String instanceName, String clusterName, String nodeAgentName,
+ Map optional)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateClusteredInstanceCmd.kInstanceName, instanceName);
+ cmdEnv.put(CreateClusteredInstanceCmd.kNodeAgentName, nodeAgentName);
+ cmdEnv.put(CreateClusteredInstanceCmd.kClusterName, clusterName);
+ cmdEnv.put(CreateClusteredInstanceCmd.kOptional, optional);
+
+ return new CreateClusteredInstanceCmd(cmdEnv);
+ }
+
+ public DeleteClusteredInstanceCmd createDeleteClusteredInstanceCmd(
+ String instanceName)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(DeleteClusteredInstanceCmd.kInstanceName, instanceName);
+
+ return new DeleteClusteredInstanceCmd(cmdEnv);
+ }
+
+ public VirtualServerCmd createVirtualServerCmd(String name,
+ String configName, String hosts, Map optional, String mode)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(VirtualServerCmd.kName, name);
+ cmdEnv.put(VirtualServerCmd.kConfigName, configName);
+ cmdEnv.put(VirtualServerCmd.kHosts, hosts);
+ cmdEnv.put(VirtualServerCmd.kOptional, optional);
+
+ return new VirtualServerCmd(cmdEnv, mode);
+ }
+
+ public CreateAppRefCmd createCreateAppRefCmd(String ref,
+ boolean enabled, String virtualServers, boolean lbEnabled,
+ int disableTimeoutInMinutes, String target)
+ {
+ final CmdEnv cmdEnv = new CmdEnv();
+
+ cmdEnv.put(CreateAppRefCmd.kName, ref);
+ cmdEnv.put(CreateAppRefCmd.kVirtualServers, virtualServers);
+ cmdEnv.put(CreateAppRefCmd.kEnabled, new Boolean(enabled));
+ cmdEnv.put(CreateAppRefCmd.kLBEnabled, new Boolean(lbEnabled));
+ cmdEnv.put(CreateAppRefCmd.kDisableTimeoutInMinutes,
+ new Integer(disableTimeoutInMinutes));
+ cmdEnv.put(CreateAppRefCmd.kTarget, target);
+
+ return new CreateAppRefCmd(cmdEnv);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConfigTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConfigTest.java
new file mode 100755
index 0000000..e4cdca8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConfigTest.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.Set;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+/**
+ */
+public class ConfigTest extends BaseTest
+{
+ private final Cmd target;
+
+ public ConfigTest(final String user, final String password,
+ final String host, final int port, final String configName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CmdEnv cmdEnv = new CmdEnv();
+ cmdEnv.put(DeleteConfigCmd.kConfigName, configName);
+
+ final DeleteConfigCmd cmd = new DeleteConfigCmd(cmdEnv);
+
+ target = new PipeCmd(connectCmd, cmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ try
+ {
+ target.execute();
+ }
+ catch (Exception e)
+ {
+ System.out.println("Error: " + ExceptionUtil.getRootCause(e).
+ getMessage());
+ }
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new ConfigTest("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/ConnectCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectCmd.java
new file mode 100755
index 0000000..736d44d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectCmd.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.client.AppserverConnectionSource;
+import com.sun.appserv.management.client.TLSParams;
+
+/**
+ */
+public class ConnectCmd extends BaseCmd implements SourceCmd
+{
+ public static final String kHost = "host";
+ public static final String kPort = "port";
+ public static final String kUser = "user";
+ public static final String kPassword = "password";
+ public static final String kUseTLS = "useTLS";
+
+ public ConnectCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ if (isConnected())
+ {
+ return getConnectionSource();
+ }
+
+ final String host = (String)getCmdEnv().get(kHost);
+ final Integer port = (Integer)getCmdEnv().get(kPort);
+ final String user = (String)getCmdEnv().get(kUser);
+ final String password = (String)getCmdEnv().get(kPassword);
+
+ final AppserverConnectionSource cs = new AppserverConnectionSource(
+ AppserverConnectionSource.PROTOCOL_RMI, host, port.intValue(),
+ user, password, getTLSParams(), null);
+
+ getCmdEnv().put(kConnectionSource, cs);
+
+ return 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
new file mode 100644
index 0000000..d03f131
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorConnectionPoolTest.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.ConnectorConnectionPoolConfig;
+import com.sun.appserv.management.config.ConnectorConnectionPoolConfigKeys;
+
+
+/**
+ */
+public class ConnectorConnectionPoolTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kName = "myConnectorConnectionPool";
+ static final String kResourceAdapterName = "sivajdbcra";
+ 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,
+ final String connectionDefinitionName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateConnectorConnectionPoolCmd createCmd =
+ cmdFactory.createCreateConnectorConnectionPoolCmd(name,
+ resourceAdapterName, connectionDefinitionName,
+ getOptional());
+
+ final DeleteConnectorConnectionPoolCmd deleteCmd =
+ cmdFactory.createDeleteConnectorConnectionPoolCmd(name);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new ConnectorConnectionPoolTest(
+ "admin", "password", "localhost", 8686,
+ kName, kResourceAdapterName, kConnectionDefinitionName).
+ run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ optional.put(ConnectorConnectionPoolConfigKeys.TRANSACTION_SUPPORT_KEY,
+ kTransactionSupport);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private ConnectorConnectionPoolConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (ConnectorConnectionPoolConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("Name="+res.getName());
+ System.out.println("ResourceAdapterName="+
+ res.getResourceAdapterName());
+ System.out.println("ConnectionDefinitionName="+
+ res.getConnectionDefinitionName());
+ System.out.println("SteadyPoolSize="+res.getSteadyPoolSize());
+ System.out.println("MaxPoolSize="+res.getMaxPoolSize());
+ System.out.println("MaxWaitTimeInMillis="+
+ res.getMaxWaitTimeInMillis());
+ System.out.println("PoolResizeQuantity="+
+ res.getPoolResizeQuantity());
+ System.out.println("IdleTimeoutInSeconds="+
+ res.getIdleTimeoutInSeconds());
+ System.out.println("FailAllConnections="+
+ res.getFailAllConnections());
+ System.out.println("TransactionSupport="+
+ res.getTransactionSupport());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..e37e1e3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorResourceTest.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.ConnectorResourceConfig;
+
+/**
+ */
+public class ConnectorResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myConnectorResource";
+ static final String kPoolName = "mypool";
+ static final String kObjectType = "user";
+
+ public ConnectorResourceTest(final String user,
+ final String password, final String host, final int port,
+ final String jndiName, final String poolName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateConnectorResourceCmd createCmd =
+ cmdFactory.createCreateConnectorResourceCmd(jndiName,
+ poolName, getOptional());
+
+ final DeleteConnectorResourceCmd deleteCmd =
+ cmdFactory.createDeleteConnectorResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new ConnectorResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName, kPoolName).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //kObjectType);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private ConnectorResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (ConnectorResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("JNDIName="+res.getJNDIName());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("PoolName="+res.getPoolName());
+ System.out.println("Enabled="+res.getEnabled());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..7ef733d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Console.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ An easy interface to read numbers and strings from
+ standard input
+
+ @version 1.10 10 Mar 1997
+ @author Cay Horstmann
+*/
+
+public class Console
+{
+ /** 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();
+ }
+
+ /** 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;
+ }
+
+ /** 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 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)
+ */
+
+ 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/CreateAdminObjectResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAdminObjectResourceCmd.java
new file mode 100644
index 0000000..c4d5355
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAdminObjectResourceCmd.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.AdminObjectResourceConfig;
+
+/**
+ */
+public class CreateAdminObjectResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kResType = "ResType";
+ public static final String kResAdapter = "ResAdapter";
+
+ public CreateAdminObjectResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final AdminObjectResourceConfig resource = getDomainConfig().createAdminObjectResourceConfig(
+ getJNDIName(), getResType(), getResAdapter(), getOptional());
+ return resource;
+ }
+
+ private String getResType()
+ {
+ return (String)getCmdEnv().get(kResType);
+ }
+
+ private String getResAdapter()
+ {
+ return (String)getCmdEnv().get(kResAdapter);
+ }
+}
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
new file mode 100644
index 0000000..77118a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefCmd.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.DeployedItemRefConfigCR;
+
+/**
+ */
+public class CreateAppRefCmd extends DeployCmd implements SourceCmd
+{
+ public static String kName = "Name";
+ public static String kEnabled = "Enabled";
+ public static String kLBEnabled = "LBEnabled";
+ public static String kVirtualServers = "VirtualServers";
+ public static String kDisableTimeoutInMinutes = "DisableTimeoutInMinutes";
+
+ public CreateAppRefCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ return getDeployedItemRefConfigCR().
+ createDeployedItemRefConfig(getEnabled(), getName(),
+ getVirtualServers(), getLBEnabled(),
+ getDisableTimeoutInMinutes());
+ }
+
+ private boolean getEnabled()
+ {
+ return ((Boolean)getCmdEnv().get(kEnabled)).booleanValue();
+ }
+
+ private boolean getLBEnabled()
+ {
+ return ((Boolean)getCmdEnv().get(kLBEnabled)).booleanValue();
+ }
+
+ private String getVirtualServers()
+ {
+ return (String)getCmdEnv().get(kVirtualServers);
+ }
+
+ private int getDisableTimeoutInMinutes()
+ {
+ return ((Integer)getCmdEnv().get(kDisableTimeoutInMinutes)).
+ intValue();
+ }
+
+ private String getName()
+ {
+ return (String)getCmdEnv().get(kName);
+ }
+}
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
new file mode 100644
index 0000000..640c620
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefTest.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.DeployedItemRefConfig;
+
+
+/**
+ */
+public class CreateAppRefTest extends BaseTest
+{
+ private final Cmd target;
+
+ 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)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateAppRefCmd createCmd =
+ cmdFactory.createCreateAppRefCmd(refName, enabled,
+ virtualServers, lbEnabled, disableTimeoutInMinutes,
+ appservTarget);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+
+ target = p2;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ final String appRef = args[0];
+ final String target = args[1];
+ final String virtualServers = args.length == 3 ? args[2] : null;
+
+ new CreateAppRefTest(
+ "admin", "password", "localhost", 8686,
+ appRef, false, virtualServers, false, 160, target).run();
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private DeployedItemRefConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (DeployedItemRefConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("Ref="+res.getName());
+ System.out.println("Enabled="+res.getEnabled());
+ System.out.println("VirtualServers="+res.getVirtualServers());
+ //System.out.println("LBEnabled="+res.getLBEnabled());
+ //System.out.println("DisableTimeoutInMinutes="+res.getDisableTimeoutInMinutes());
+ return new Integer(0);
+ }
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterCmd.java
new file mode 100755
index 0000000..427c5b2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterCmd.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class CreateClusterCmd extends BaseInstanceCmd
+{
+ public CreateClusterCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ return getDomainConfig().createClusterConfig(getClusterName(), getConfigName(), getOptional());
+ }
+}
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
new file mode 100755
index 0000000..0ca258d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterTest.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+/**
+ */
+public class CreateClusterTest extends BaseTest
+{
+ private final Cmd target;
+
+ public CreateClusterTest(final String user, final String password,
+ final String host, final int port, final String clusterName,
+ final String configName, final Map optional)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateClusterCmd createClusterCmd =
+ cmdFactory.createCreateClusterCmd(
+ clusterName, configName, optional);
+
+ target = new PipeCmd(connectCmd, createClusterCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ final String clusterName = args[0];
+ final String configName = args.length == 2 ? args[1] : null;
+
+ new CreateClusterTest("admin", "password", "localhost", 8686,
+ clusterName, configName, null).run();
+ }
+}
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
new file mode 100755
index 0000000..4a49016
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceCmd.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.ClusteredServerConfig;
+
+/**
+ */
+public class CreateClusteredInstanceCmd extends BaseInstanceCmd
+{
+ public CreateClusteredInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ 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
new file mode 100755
index 0000000..a612c8b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceTest.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+/**
+ */
+public class CreateClusteredInstanceTest extends BaseTest
+{
+ private final Cmd target;
+
+ public CreateClusteredInstanceTest(final String user, final String password,
+ final String host, final int port, final String instanceName,
+ final String clusterName, final String nodeAgentName,
+ final Map optional)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateClusteredInstanceCmd createClusteredInstanceCmd =
+ cmdFactory.createCreateClusteredInstanceCmd(
+ instanceName, clusterName, nodeAgentName, optional);
+
+ target = new PipeCmd(connectCmd, createClusteredInstanceCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ final String instanceName = args[0];
+ final String clusterName = args[1];
+ final String nodeAgentName = args[2];
+
+ new CreateClusteredInstanceTest("admin", "password", "localhost", 8686,
+ instanceName, clusterName, nodeAgentName, null).run();
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateConnectorConnectionPoolCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateConnectorConnectionPoolCmd.java
new file mode 100644
index 0000000..27714ca
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateConnectorConnectionPoolCmd.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.config.ConnectorConnectionPoolConfig;
+
+/**
+ */
+public class CreateConnectorConnectionPoolCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kName = "Name";
+ public static final String kResourceAdapterName = "ResourceAdapterName";
+ public static final String kConnectionDefinitionName = "ConnectionDefinitionName";
+
+ public CreateConnectorConnectionPoolCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final ConnectorConnectionPoolConfig resource = getDomainConfig().createConnectorConnectionPoolConfig(
+ getName(), getResourceAdapterName(), getConnectionDefinitionName(),
+ getOptional());
+ return resource;
+ }
+
+ private String getName()
+ {
+ return (String)getCmdEnv().get(kName);
+ }
+
+ private String getResourceAdapterName()
+ {
+ return (String)getCmdEnv().get(kResourceAdapterName);
+ }
+
+ private String getConnectionDefinitionName()
+ {
+ return (String)getCmdEnv().get(kConnectionDefinitionName);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateConnectorResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateConnectorResourceCmd.java
new file mode 100644
index 0000000..839c0f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateConnectorResourceCmd.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.ConnectorResourceConfig;
+
+/**
+ */
+public class CreateConnectorResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kPoolName = "PoolName";
+
+ public CreateConnectorResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final ConnectorResourceConfig resource = getDomainConfig().createConnectorResourceConfig(
+ getJNDIName(), getPoolName(), getOptional());
+ return resource;
+ }
+
+ private String getPoolName()
+ {
+ return (String)getCmdEnv().get(kPoolName);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateCustomResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateCustomResourceCmd.java
new file mode 100644
index 0000000..e0e771b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateCustomResourceCmd.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.CustomResourceConfig;
+
+/**
+ */
+public class CreateCustomResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kResType = "ResType";
+ public static final String kFactoryClass = "FactoryClass";
+
+ public CreateCustomResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final CustomResourceConfig resource = getDomainConfig().createCustomResourceConfig(
+ getJNDIName(), getResType(), getFactoryClass(), getOptional());
+ return resource;
+ }
+
+ private String getResType()
+ {
+ return (String)getCmdEnv().get(kResType);
+ }
+
+ private String getFactoryClass()
+ {
+ return (String)getCmdEnv().get(kFactoryClass);
+ }
+}
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
new file mode 100755
index 0000000..3c3690a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceCmd.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.StandaloneServerConfig;
+
+/**
+ */
+public class CreateInstanceCmd extends BaseInstanceCmd
+{
+ public CreateInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ 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
new file mode 100755
index 0000000..410b8d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceTest.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.config.StandaloneServerConfig;
+
+/**
+ */
+public class CreateInstanceTest extends BaseTest
+{
+ private final Cmd target;
+
+ public CreateInstanceTest(final String user, final String password,
+ final String host, final int port, final String instanceName,
+ final String nodeAgentName, final String configName,
+ final Map optional)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateInstanceCmd createInstanceCmd = cmdFactory.
+ createCreateInstanceCmd(instanceName, nodeAgentName,
+ configName, optional);
+
+ target = new PipeCmd(connectCmd, createInstanceCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new CreateInstanceTest("admin", "password", "localhost", 8686,
+ args[0], "n1", null, null).run();
+ }
+}
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
new file mode 100644
index 0000000..7a98e00
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCConnectionPoolCmd.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.config.JDBCConnectionPoolConfig;
+
+/**
+ */
+public class CreateJDBCConnectionPoolCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kName = "Name";
+ public static final String kDatasourceClassname = "DatasourceClassname";
+
+ public CreateJDBCConnectionPoolCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final JDBCConnectionPoolConfig resource =
+ getDomainConfig().createJDBCConnectionPoolConfig(
+ getName(), getDatasourceClassname(), getOptional());
+ return resource;
+ }
+
+ private String getName()
+ {
+ return (String)getCmdEnv().get(kName);
+ }
+
+ private String getDatasourceClassname()
+ {
+ return (String)getCmdEnv().get(kDatasourceClassname);
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCResourceCmd.java
new file mode 100644
index 0000000..b13a2dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCResourceCmd.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.JDBCResourceConfig;
+
+/**
+ */
+public class CreateJDBCResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kPoolName = "PoolName";
+
+ public CreateJDBCResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final JDBCResourceConfig resource = getDomainConfig().createJDBCResourceConfig(
+ getJNDIName(), getPoolName(), getOptional());
+ return resource;
+ }
+
+ private String getPoolName()
+ {
+ return (String)getCmdEnv().get(kPoolName);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJNDIResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJNDIResourceCmd.java
new file mode 100644
index 0000000..92c3ffc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJNDIResourceCmd.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.config.JNDIResourceConfig;
+
+/**
+ */
+public class CreateJNDIResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kJNDILookupName = "JNDILookupName";
+ public static final String kResType = "ResType";
+ public static final String kFactoryClass = "FactoryClass";
+
+ public CreateJNDIResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final JNDIResourceConfig resource = getDomainConfig().createJNDIResourceConfig(
+ getJNDIName(), getJNDILookupName(), getResType(),
+ getFactoryClass(), getOptional());
+ return resource;
+ }
+
+ private String getJNDILookupName()
+ {
+ return (String)getCmdEnv().get(kJNDILookupName);
+ }
+
+ private String getFactoryClass()
+ {
+ return (String)getCmdEnv().get(kFactoryClass);
+ }
+
+ private String getResType()
+ {
+ return (String)getCmdEnv().get(kResType);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateMailResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateMailResourceCmd.java
new file mode 100644
index 0000000..ebbe36b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateMailResourceCmd.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.MailResourceConfig;
+
+/**
+ */
+public class CreateMailResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public static final String kHost = "Host";
+ public static final String kUser = "User";
+ public static final String kFrom = "From";
+
+ public CreateMailResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final MailResourceConfig resource = getDomainConfig().createMailResourceConfig(
+ getJNDIName(), getHost(), getUser(), getFrom(), getOptional());
+ return resource;
+ }
+
+ private String getHost()
+ {
+ return (String)getCmdEnv().get(kHost);
+ }
+
+ private String getUser()
+ {
+ return (String)getCmdEnv().get(kUser);
+ }
+
+ private String getFrom()
+ {
+ return (String)getCmdEnv().get(kFrom);
+ }
+}
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
new file mode 100644
index 0000000..a4afa7d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreatePMFResourceCmd.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.config.PersistenceManagerFactoryResourceConfig;
+
+/**
+ */
+public class CreatePMFResourceCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public CreatePMFResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final PersistenceManagerFactoryResourceConfig resource =
+ 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/CreateResourceAdapterConfigCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateResourceAdapterConfigCmd.java
new file mode 100644
index 0000000..4305366
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateResourceAdapterConfigCmd.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.ResourceAdapterConfig;
+
+/**
+ */
+public class CreateResourceAdapterConfigCmd extends BaseResourceCmd
+ implements SourceCmd
+{
+ public CreateResourceAdapterConfigCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final ResourceAdapterConfig rac = getDomainConfig().createResourceAdapterConfig(
+ getRACName(), getOptional());
+ return rac;
+ }
+
+ private String getRACName()
+ {
+ return (String)getCmdEnv().get(kRACName);
+ }
+}
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
new file mode 100644
index 0000000..80e8b35
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateVirtualServerTest.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.VirtualServerConfig;
+import com.sun.appserv.management.config.VirtualServerConfigKeys;
+
+
+/**
+ */
+public class CreateVirtualServerTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kName = "myVirtualServer";
+ static final String kConfigName = "server-config";
+ static final String kHosts = "${com.sun.aas.hostName}";
+ static final String kState = "on";
+ static final String kDocRoot = "${com.sun.aas.instanceRoot}/docroot";
+ static final String kAccessLog = "${com.sun.aas.instanceRoot}/logs/access";
+ 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,
+ final String vsName, final String configName, final String hosts)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final VirtualServerCmd createCmd =
+ cmdFactory.createVirtualServerCmd(vsName, configName,
+ hosts, getOptional(), VirtualServerCmd.kCreateMode);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+
+ target = p2;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new CreateVirtualServerTest(
+ "admin", "password", "localhost", 8686,
+ kName, kConfigName, kHosts).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ optional.put(VirtualServerConfigKeys.STATE_KEY, kState);
+ optional.put(VirtualServerConfigKeys.HTTP_LISTENERS_KEY, kHTTPListeners);
+ //optional.put(VirtualServerConfigKeys.DOC_ROOT_KEY, kDocRoot);
+ //optional.put(VirtualServerConfigKeys.LOG_FILE_KEY, kLogFile);
+ //optional.put(VirtualServerConfigKeys.DOC_ROOT_PROPERTY_KEY, kDocRoot);
+ //optional.put(VirtualServerConfigKeys.ACCESS_LOG_PROPERTY_KEY, kAccessLog);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private VirtualServerConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (VirtualServerConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("Name="+res.getName());
+ System.out.println("State="+res.getState());
+ System.out.println("HTTPListeners="+res.getHTTPListeners());
+ System.out.println("Hosts="+res.getHosts());
+ //System.out.println("Docroot="+res.getDocroot());
+ System.out.println("LogFile="+res.getLogFile());
+ System.out.println("Doc root property="+res.getPropertyValue("docroot"));
+ System.out.println("Access log property="+res.getPropertyValue("accesslog"));
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..e3a44b8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CustomResourceTest.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.CustomResourceConfig;
+
+/**
+ */
+public class CustomResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myCustomResource";
+ static final String kResType = "abc";
+ 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,
+ final String jndiName, final String resType, final String factoryClass)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateCustomResourceCmd createCmd =
+ cmdFactory.createCreateCustomResourceCmd(jndiName,
+ resType, factoryClass, getOptional());
+
+ final DeleteCustomResourceCmd deleteCmd =
+ cmdFactory.createDeleteCustomResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ 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,
+ //kObjectType);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private CustomResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (CustomResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("JNDIName="+res.getJNDIName());
+ System.out.println("ResType="+res.getResType());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("FactoryClass="+res.getFactoryClass());
+ System.out.println("Enabled="+res.getEnabled());
+
+ return new Integer(0);
+ }
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteAdminObjectResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteAdminObjectResourceCmd.java
new file mode 100644
index 0000000..ebcaffd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteAdminObjectResourceCmd.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.AdminObjectResourceConfig;
+
+/**
+ */
+public class DeleteAdminObjectResourceCmd extends BaseResourceCmd
+{
+ public DeleteAdminObjectResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeAdminObjectResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusterCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusterCmd.java
new file mode 100755
index 0000000..ff622d6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusterCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteClusterCmd extends BaseInstanceCmd
+{
+ public DeleteClusterCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeClusterConfig(getClusterName());
+
+ return null;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusterTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusterTest.java
new file mode 100755
index 0000000..244be35
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusterTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteClusterTest extends BaseTest
+{
+ private final Cmd target;
+
+ public DeleteClusterTest(final String user, final String password,
+ final String host, final int port, final String clusterName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final DeleteClusterCmd deleteClusterCmd = cmdFactory.
+ createDeleteClusterCmd(clusterName);
+
+ target = new PipeCmd(connectCmd, deleteClusterCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new DeleteClusterTest("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/DeleteClusteredInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceCmd.java
new file mode 100755
index 0000000..7c77a74
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteClusteredInstanceCmd extends BaseInstanceCmd
+{
+ public DeleteClusteredInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeClusteredServerConfig(getInstanceName());
+
+ return null;
+ }
+}
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
new file mode 100755
index 0000000..036c67d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteClusteredInstanceTest extends BaseTest
+{
+ private final Cmd target;
+
+ public DeleteClusteredInstanceTest(final String user, final String password,
+ final String host, final int port, final String instanceName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final DeleteClusteredInstanceCmd deleteClusteredInstanceCmd =
+ cmdFactory.createDeleteClusteredInstanceCmd(instanceName);
+
+ target = new PipeCmd(connectCmd, deleteClusteredInstanceCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ 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/DeleteConfigCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConfigCmd.java
new file mode 100755
index 0000000..e010109
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConfigCmd.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteConfigCmd extends BaseCmd
+{
+ public static final String kConfigName = "ConfigName";
+
+ public DeleteConfigCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeConfigConfig(getConfigName());
+
+ return new Integer(0);
+ }
+
+ private String getConfigName()
+ {
+ return (String)getCmdEnv().get(kConfigName);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConnectorConnectionPoolCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConnectorConnectionPoolCmd.java
new file mode 100644
index 0000000..eb3bcb2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConnectorConnectionPoolCmd.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteConnectorConnectionPoolCmd extends BaseResourceCmd
+{
+ public static final String kName = "Name";
+
+ public DeleteConnectorConnectionPoolCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeConnectorConnectionPoolConfig(getName());
+
+ return new Integer(0);
+ }
+
+ private String getName()
+ {
+ return (String)getCmdEnv().get(kName);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConnectorResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConnectorResourceCmd.java
new file mode 100644
index 0000000..53351a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteConnectorResourceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteConnectorResourceCmd extends BaseResourceCmd
+{
+ public DeleteConnectorResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeConnectorResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteCustomResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteCustomResourceCmd.java
new file mode 100644
index 0000000..3ba12f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteCustomResourceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteCustomResourceCmd extends BaseResourceCmd
+{
+ public DeleteCustomResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeCustomResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteInstanceCmd.java
new file mode 100755
index 0000000..091ff54
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteInstanceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteInstanceCmd extends BaseInstanceCmd
+{
+ public DeleteInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeStandaloneServerConfig(getInstanceName());
+
+ return null;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteInstanceTest.java
new file mode 100755
index 0000000..2c35c64
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteInstanceTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteInstanceTest extends BaseTest
+{
+ private final Cmd target;
+
+ public DeleteInstanceTest(final String user, final String password,
+ final String host, final int port, final String instanceName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final DeleteInstanceCmd deleteInstanceCmd = cmdFactory.
+ createDeleteInstanceCmd(instanceName);
+
+ target = new PipeCmd(connectCmd, deleteInstanceCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new DeleteInstanceTest("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/DeleteJDBCConnectionPoolCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJDBCConnectionPoolCmd.java
new file mode 100644
index 0000000..46ec94e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJDBCConnectionPoolCmd.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteJDBCConnectionPoolCmd extends BaseResourceCmd
+{
+ public static final String kName = "Name";
+
+ public DeleteJDBCConnectionPoolCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeJDBCConnectionPoolConfig(getName());
+
+ return new Integer(0);
+ }
+
+ private String getName()
+ {
+ return (String)getCmdEnv().get(kName);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJDBCResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJDBCResourceCmd.java
new file mode 100644
index 0000000..0dfa1a1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJDBCResourceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteJDBCResourceCmd extends BaseResourceCmd
+{
+ public DeleteJDBCResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeJDBCResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJNDIResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJNDIResourceCmd.java
new file mode 100644
index 0000000..ea585ed
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteJNDIResourceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteJNDIResourceCmd extends BaseResourceCmd
+{
+ public DeleteJNDIResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeJNDIResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteMailResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteMailResourceCmd.java
new file mode 100644
index 0000000..8dfda46
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteMailResourceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeleteMailResourceCmd extends BaseResourceCmd
+{
+ public DeleteMailResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeMailResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeletePMFResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeletePMFResourceCmd.java
new file mode 100644
index 0000000..3e96ea0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeletePMFResourceCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeletePMFResourceCmd extends BaseResourceCmd
+{
+ public DeletePMFResourceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removePersistenceManagerFactoryResourceConfig(getJNDIName());
+
+ return new Integer(0);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteResourceAdapterConfigCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteResourceAdapterConfigCmd.java
new file mode 100644
index 0000000..6df1244
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteResourceAdapterConfigCmd.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+
+/**
+ */
+public class DeleteResourceAdapterConfigCmd extends BaseResourceCmd
+{
+ public DeleteResourceAdapterConfigCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ getDomainConfig().removeResourceAdapterConfig(getRACName());
+ return new Integer(0);
+ }
+
+ private String getRACName()
+ {
+ return (String)getCmdEnv().get(kRACName);
+ }
+}
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
new file mode 100755
index 0000000..0c3fe5e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployCmd.java
@@ -0,0 +1,344 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.DomainRoot;
+import java.io.*;
+import java.util.*;
+
+import javax.management.Notification;
+import javax.management.NotificationListener;
+
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import com.sun.appserv.management.deploy.DeploymentProgress;
+import com.sun.appserv.management.deploy.DeploymentStatus;
+import com.sun.appserv.management.deploy.DeploymentSupport;
+
+import com.sun.appserv.management.config.AMXConfig;
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.config.ClusterConfig;
+import com.sun.appserv.management.config.StandaloneServerConfig;
+import com.sun.appserv.management.config.DeployedItemRefConfig;
+import com.sun.appserv.management.config.DeployedItemRefConfigCR;
+import com.sun.appserv.management.deploy.DeploymentSourceImpl;
+import com.sun.appserv.management.j2ee.J2EEDomain;
+import com.sun.appserv.management.j2ee.J2EELogicalServer;
+
+
+/**
+ */
+public class DeployCmd extends BaseCmd
+{
+ public static final String kArchive = "archive";
+ public static final String kTarget = "target";
+ public static final String kDeployOptions = "deployOptions";
+
+ public DeployCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ deploy();
+ associate();
+ startApp();
+
+ return null;
+ }
+
+ public Object upload(InputStream is, final long fileSize) throws Exception
+ {
+ 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;
+ while ( remaining != 0 )
+ {
+ final int actual = remaining < chunkSize ?
+ remaining : chunkSize;
+
+ final byte[] bytes = new byte[ actual ];
+ try
+ {
+ is.read(bytes);
+ }
+ catch (EOFException eofe)
+ {
+ done = true;
+ break;
+ }
+ done = mgr.uploadBytes( uploadID, bytes );
+ remaining -= actual;
+ }
+ assert( done );
+
+ return( uploadID );
+ }
+ finally
+ {
+ //nothing
+ }
+ }
+
+ protected void deploy() throws Exception
+ {
+ BufferedInputStream bis = null;
+ DeployListener myListener = null;;
+ DeploymentMgr mgr = null;
+ try
+ {
+ 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());
+ }
+
+
+ while ( ! myListener.isCompleted() )
+ {
+ try
+ {
+ Thread.sleep( 2000 );
+ }
+ catch( InterruptedException e )
+ {
+ }
+ }
+ checkFailed(checkForException(myListener.getFinalStatus()));
+ }
+ finally
+ {
+ if (bis != null) { bis.close(); }
+
+ if(myListener != null && mgr != null)
+ {
+ try
+ {
+ mgr.removeNotificationListener(myListener);
+ }
+ catch(javax.management.ListenerNotFoundException e)
+ {
+ System.err.println("Couldn't remove listener!");
+ }
+ }
+ }
+ }
+
+ protected void associate() throws Exception
+ {
+ final String target = getTarget();
+ if (!DEFAULT_DEPLOY_TARGET.equals(target)) //not a "domain".
+ {
+ final DeployedItemRefConfig refConfig =
+ getDeployedItemRefConfigCR(target).createDeployedItemRefConfig(getAppName());
+ assert refConfig != null;
+ }
+ }
+
+
+ protected void startApp() throws Exception
+ {
+ final String target = getTarget();
+ if (!DEFAULT_DEPLOY_TARGET.equals(target)) //not a "domain".
+ {
+ 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();
+ server.stopApp(getAppName(), null);
+ }
+ }
+
+
+ protected DeployedItemRefConfigCR getDeployedItemRefConfigCR()
+ throws Exception
+ {
+ return getDeployedItemRefConfigCR(getTarget());
+ }
+
+ protected DeployedItemRefConfigCR getDeployedItemRefConfigCR(String target)
+ throws Exception
+ {
+ final AMXConfig clusterOrServer = getClusterOrServer(target);
+ assert clusterOrServer != null;
+ DeployedItemRefConfigCR mgr = null;
+ if (clusterOrServer instanceof StandaloneServerConfig)
+ {
+ mgr = (StandaloneServerConfig)clusterOrServer;
+ }
+ else if (clusterOrServer instanceof ClusterConfig)
+ {
+ mgr = (ClusterConfig)clusterOrServer;
+ }
+ else
+ {
+ throw new Exception("Invaid deployment target: " +
+ "Target has to be a cluster or standalone server");
+ }
+ assert mgr != null;
+ return mgr;
+ }
+
+ 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();
+
+ AMXConfig proxy = null;
+ if (standAloneServers.containsKey(target))
+ {
+ proxy = (AMXConfig)standAloneServers.get(target);
+ }
+ else if (clusters.containsKey(target))
+ {
+ proxy = (AMXConfig)clusters.get(target);
+ }
+ else
+ {
+ //assert !clusteredServers.containsKey(target);
+ proxy = (AMXConfig)clusteredServers.get(target);
+ }
+ return proxy;
+ }
+
+ protected DeploymentMgr getDeploymentMgr() throws Exception
+ {
+ return( getDomainRoot().getDeploymentMgr() );
+ }
+
+ protected File getArchive()
+ {
+ final String file = (String)getCmdEnv().get(kArchive);
+ assert file != null;
+ final File f = new File(file);
+ assert (f.exists() && f.canRead());
+ return f;
+ }
+
+ protected String getAppName()
+ {
+ String name = null;
+ final Map deploymentOptions = getDeploymentOptions();
+ if (null != deploymentOptions)
+ {
+ name = (String)deploymentOptions.get(
+ DeploymentMgr.DEPLOY_OPTION_NAME_KEY);
+ }
+ if (null == name)
+ {
+ name = getArchive().getName();
+ //strip the extension
+ name = name.substring(0, name.lastIndexOf('.'));
+ System.err.println("App name=" + name);
+ }
+ return name;
+ }
+
+ static final String DEFAULT_DEPLOY_TARGET = "domain";
+
+ protected String getTarget()
+ {
+ final String target = (String)getCmdEnv().get(kTarget);
+ return (null == target) ? DEFAULT_DEPLOY_TARGET : target;
+ }
+
+ protected Map getDeploymentOptions()
+ {
+ return (Map)getCmdEnv().get(kDeployOptions);
+ }
+
+ 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))
+ {
+ throw new RuntimeException("Can't find target: " + getTarget());
+ }
+
+ return (J2EELogicalServer)serverMap.get(target);
+ }
+
+ public static Throwable checkForException(final DeploymentStatus s)
+ {
+ Throwable ex = s.getThrowable();
+ final Iterator it = s.getSubStages();
+ while ((ex == null) && (it.hasNext()))
+ {
+ final DeploymentStatus subStage =
+ DeploymentSupport.mapToDeploymentStatus((Map)it.next());
+ ex = subStage.getThrowable();
+ }
+ return ex;
+ }
+
+ public void checkFailed(final Throwable t) throws Exception
+ {
+ if ( t != null )
+ {
+ if ( t instanceof Exception )
+ {
+ throw ( Exception )t;
+ }
+ else
+ {
+ throw new Exception( t );
+ }
+ }
+ }
+}
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
new file mode 100644
index 0000000..eec3dfc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployListener.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import java.util.*;
+
+import javax.management.Notification;
+import javax.management.NotificationListener;
+
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import com.sun.appserv.management.deploy.DeploymentProgress;
+import com.sun.appserv.management.deploy.DeploymentStatus;
+import com.sun.appserv.management.deploy.DeploymentSupport;
+
+/**
+ */
+public class DeployListener implements NotificationListener
+{
+ private Object mDeployID;
+ private boolean mIsCompleted;
+ private DeploymentStatus mFinalStatus;
+
+ public DeployListener()
+ {
+ mDeployID = null;
+ mIsCompleted = false;
+ }
+
+ public boolean isCompleted()
+ {
+ return( mIsCompleted );
+ }
+
+ public synchronized void handleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ try
+ {
+ realHandleNotification( notif, handback );
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public synchronized DeploymentStatus getFinalStatus()
+ {
+ return mFinalStatus;
+ }
+
+ private synchronized void setFinalStatus(final DeploymentStatus status)
+ {
+ mFinalStatus = status;
+ }
+
+ 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);
+
+ 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." );
+
+ final Map statusData = new HashMap();
+ statusData.put(DeploymentStatus.STAGE_STATUS_KEY,
+ new Integer(DeploymentStatus.STATUS_CODE_FAILURE));
+ statusData.put(DeploymentStatus.STAGE_STATUS_MESSAGE_KEY,
+ t.getMessage());
+ statusData.put(DeploymentStatus.STAGE_THROWABLE_KEY, t);
+ final DeploymentStatus status = DeploymentSupport.
+ mapToDeploymentStatus( statusData );
+
+ setFinalStatus(status);
+
+ 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 );
+
+ 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
new file mode 100644
index 0000000..7f4c92c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployedAppInspector.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ */
+class DeployedAppInspector
+{
+ 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);
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ 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
new file mode 100755
index 0000000..733ce8a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTest.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class DeploymentTest extends BaseTest
+{
+ private final Cmd target;
+
+ public DeploymentTest(final String user, final String password,
+ final String host, final int port, final String archive,
+ final String name, final String contextRoot,
+ final boolean enable)
+ {
+ this(user, password, host, port, archive, name, contextRoot, enable,
+ "server");
+ }
+
+ public DeploymentTest(final String user, final String password,
+ final String host, final int port, final String archive,
+ final String name, final String contextRoot,
+ final boolean enable, String appservTarget)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final DeployCmd deployCmd = cmdFactory.createDeployCmd(archive, name,
+ contextRoot, enable, appservTarget);
+
+ target = new PipeCmd(connectCmd, deployCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ final String archive = args[0];
+ final String name = args.length >= 2 ? args[1] : null;
+ final String appserverTarget = args.length == 3 ? args[2] : null;
+
+ new DeploymentTest("admin", "password", "localhost", 8686,
+ archive, name, null, true, appserverTarget).run();
+ }
+}
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
new file mode 100644
index 0000000..d21c2f0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsAuto.java
@@ -0,0 +1,634 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+
+/**
+ * This class will deploy and undeploy every app found in the samples directory.
+ * It will discover the name of every cluster and stand-alone instance and deploy
+ * and undeploy all the samples to each.
+ * In order to run the test, you should create the appropriate clusters and instances
+ * and have a node-agent running.
+ */
+
+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);
+
+ if(inspector.isDeployed(test.sample.name))
+ {
+ test.addComment("App was previously deployed before the test. Undeploying before testing.\n");
+
+ 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(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();
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ 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
new file mode 100644
index 0000000..aab14c4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsException.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * DeploymentTestsException.java
+ *
+ * Created on September 17, 2004, 11:42 AM
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ *
+ * @author bnevins
+ */
+public class DeploymentTestsException extends Exception
+{
+ public DeploymentTestsException(String s)
+ {
+ super(s);
+ }
+
+ public DeploymentTestsException(Throwable t)
+ {
+ super(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
new file mode 100644
index 0000000..2f5bcae
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsUI.java
@@ -0,0 +1,294 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+
+/**
+ */
+
+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);
+
+ 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);
+
+ 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);
+
+ 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
new file mode 100755
index 0000000..56239c4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Env.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.TrustStoreTrustManager;
+import com.sun.appserv.management.client.TrustAnyTrustManager;
+import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
+
+/**
+ */
+public class Env
+{
+ public static final String USE_TLS_SYSTEM_PROPERTY = "useTLS";
+
+ private Env()
+ {
+ }
+
+ public static CmdFactory getCmdFactory()
+ {
+ return new CmdFactory();
+ }
+
+ public static TLSParams getTLSParams()
+ {
+ 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 =
+ new HandshakeCompletedListenerImpl();
+
+ if(trustMgr == null)
+ {
+ javax.net.ssl.X509TrustManager tm = TrustAnyTrustManager.getInstance();
+ return new TLSParams(tm, handshakeCompletedListener);
+ }
+
+
+ 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;
+ //final String useTLS = System.getProperty(USE_TLS_SYSTEM_PROPERTY);
+ //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
new file mode 100755
index 0000000..0b29ec0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/InstanceLifecycleTest.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+import com.sun.appserv.management.config.StandaloneServerConfig;
+
+/**
+ */
+public class InstanceLifecycleTest extends BaseTest
+{
+ private final Cmd target;
+
+ public InstanceLifecycleTest(final String user, final String password,
+ final String host, final int port, final String instanceName,
+ final String nodeAgentName, final String configName,
+ final Map optional)
+ {
+ final CmdChainCmd chain = new CmdChainCmd();
+
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+ final CreateInstanceCmd createInstanceCmd = cmdFactory.
+ createCreateInstanceCmd(instanceName, nodeAgentName,
+ configName, optional);
+ final StartInstanceCmd startInstanceCmd = cmdFactory.
+ createStartInstanceCmd(instanceName);
+ final StopInstanceCmd stopInstanceCmd = cmdFactory.
+ createStopInstanceCmd(instanceName);
+ final DeleteInstanceCmd deleteInstanceCmd = cmdFactory.
+ createDeleteInstanceCmd(instanceName);
+
+ chain.addCmd(new PipeCmd(connectCmd, createInstanceCmd));
+ chain.addCmd(new PipeCmd(connectCmd, startInstanceCmd));
+ chain.addCmd(new PipeCmd(connectCmd, stopInstanceCmd));
+ chain.addCmd(new PipeCmd(connectCmd, deleteInstanceCmd));
+
+ target = chain;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new InstanceLifecycleTest("admin", "password", "localhost", 8686,
+ args[0], "n1", null, null).run();
+ }
+}
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
new file mode 100644
index 0000000..e4f76de
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCConnectionPoolTest.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.JDBCConnectionPoolConfig;
+import com.sun.appserv.management.config.JDBCConnectionPoolConfigKeys;
+
+
+/**
+ */
+public class JDBCConnectionPoolTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kName = "myJDBCConnectionPool";
+ static final String kDatasourceClassname = "a.b.c";
+ static final String kResType = "javax.sql.ConnectionPoolDataSource";
+ 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)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateJDBCConnectionPoolCmd createCmd =
+ cmdFactory.createCreateJDBCConnectionPoolCmd(name,
+ datasourceClassname, getOptional());
+
+ final DeleteJDBCConnectionPoolCmd deleteCmd =
+ cmdFactory.createDeleteJDBCConnectionPoolCmd(name);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new JDBCConnectionPoolTest(
+ "admin", "password", "localhost", 8686, kName,
+ kDatasourceClassname).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ optional.put(JDBCConnectionPoolConfigKeys.TRANSACTION_ISOLATION_LEVEL_KEY,
+ kTransactionIsolationLevel);
+ optional.put(JDBCConnectionPoolConfigKeys.VALIDATION_TABLE_NAME_KEY,
+ kValidationTableName);
+ optional.put(JDBCConnectionPoolConfigKeys.RES_TYPE_KEY, kResType);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private JDBCConnectionPoolConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (JDBCConnectionPoolConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("Name="+res.getName());
+ System.out.println("DatasourceClassname="+
+ res.getDatasourceClassname());
+ System.out.println("ResType="+ res.getResType());
+ System.out.println("SteadyPoolSize="+res.getSteadyPoolSize());
+ System.out.println("MaxPoolSize="+res.getMaxPoolSize());
+ System.out.println("MaxWaitTimeInMillis="+
+ res.getMaxWaitTimeInMillis());
+ System.out.println("PoolResizeQuantity="+
+ res.getPoolResizeQuantity());
+ System.out.println("IdleTimeoutInSeconds="+
+ res.getIdleTimeoutInSeconds());
+ System.out.println("FailAllConnections="+
+ res.getFailAllConnections());
+ System.out.println("TransactionIsolationLevel="+
+ res.getTransactionIsolationLevel());
+ System.out.println("IsIsolationLevelGuaranteed="+
+ res.getIsIsolationLevelGuaranteed());
+ System.out.println("IsConnectionValidationRequired="+
+ res.getIsConnectionValidationRequired());
+ System.out.println("ConnectionValidationMethod="+
+ res.getConnectionValidationMethod());
+ System.out.println("ValidationTableName="+
+ res.getValidationTableName());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..7678054
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCResourceTest.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.JDBCResourceConfig;
+
+/**
+ */
+public class JDBCResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myJDBCResource";
+ static final String kPoolName = "__TimerPool";
+ static final String kObjectType = "user";
+
+ public JDBCResourceTest(final String user,
+ final String password, final String host, final int port,
+ final String jndiName, final String poolName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateJDBCResourceCmd createCmd =
+ cmdFactory.createCreateJDBCResourceCmd(jndiName,
+ poolName, getOptional());
+
+ final DeleteJDBCResourceCmd deleteCmd =
+ cmdFactory.createDeleteJDBCResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new JDBCResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName, kPoolName).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //kObjectType);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private JDBCResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (JDBCResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("JNDIName="+res.getJNDIName());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("PoolName="+res.getPoolName());
+ System.out.println("Enabled="+res.getEnabled());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..fc341ac
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JNDIResourceTest.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.JNDIResourceConfig;
+
+
+/**
+ */
+public class JNDIResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myJNDIResource";
+ static final String kJNDILookupName = "jndi/myJNDIResource";
+ static final String kResType = "abc";
+ 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,
+ final String resType, final String factoryClass)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateJNDIResourceCmd createCmd =
+ cmdFactory.createCreateJNDIResourceCmd(jndiName,
+ jndiLookupName, resType, factoryClass, getOptional());
+
+ final DeleteJNDIResourceCmd deleteCmd =
+ cmdFactory.createDeleteJNDIResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new JNDIResourceTest(
+ "admin", "adminadmin", "localhost", 8686,
+ kJNDIName, kJNDILookupName, kResType, kFactoryClass).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //kObjectType);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private JNDIResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (JNDIResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println(
+ "JNDIName="+res.getJNDIName());
+ System.out.println("JNDILookupName="+res.getJNDILookupName());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("FactoryClass="+res.getFactoryClass());
+ System.out.println("ResType="+res.getResType());
+
+ return new Integer(0);
+ }
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListClusteredInstancesCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListClusteredInstancesCmd.java
new file mode 100755
index 0000000..7185b70
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListClusteredInstancesCmd.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+
+/**
+ */
+public class ListClusteredInstancesCmd extends BaseInstanceCmd
+{
+ public ListClusteredInstancesCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ return getDomainConfig().getClusteredServerConfigMap();
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListClusteredInstancesTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListClusteredInstancesTest.java
new file mode 100755
index 0000000..32303eb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListClusteredInstancesTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ */
+public class ListClusteredInstancesTest extends BaseTest
+{
+ private final Cmd target;
+
+ public ListClusteredInstancesTest(final String user, final String password,
+ final String host, final int port)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final ListClusteredInstancesCmd cmd = new ListClusteredInstancesCmd(
+ new CmdEnv());
+
+ target = new PipeCmd(connectCmd, cmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ final Map clusteredServerProxyMap = (Map)target.execute();
+ final Set names = clusteredServerProxyMap.keySet();
+ System.out.println("Clustered Servers=" + names);
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new ListClusteredInstancesTest("admin", "password", "localhost", 8686).
+ run();
+ }
+}
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
new file mode 100755
index 0000000..dae097f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsCmd.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.config.ClusterConfig;
+import com.sun.appserv.management.config.ClusteredServerConfig;
+import java.util.Map;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.config.ServerConfig;
+
+/**
+ */
+public class ListDeployedAppsCmd extends DeployCmd
+{
+ public static final String kAppType = "AppType";
+
+ public static final String kAll = "All";
+ public static final String kEJBModules = "EJBModules";
+ public static final String kWebModules = "WebModules";
+ public static final String kApplications = "Applications";
+ public static final String kRARModules = "RARModules";
+ public static final String kLifecycleModules = "LifecycleModules";
+
+ public ListDeployedAppsCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final String target = getTarget();
+
+ final Cmd cmd = getListCmdByAppType(getAppType());
+ final Set s1 = (Set)cmd.execute();
+
+ if (DEFAULT_DEPLOY_TARGET.equals(target))
+ {
+ return s1;
+ }
+
+ final Set s2 = getDeployedItemRefs(target);
+
+ Set[] sets = new Set[] { s1, s2};
+
+ return sets;
+ //return intersect(s1, s2);
+
+ }
+
+ private Set intersect(final Set s1, final Set s2)
+ {
+ final Set s = new HashSet();
+ final Iterator it = s1.iterator();
+ while (it.hasNext())
+ {
+ final String next = (String)it.next();
+ if (s2.contains(next))
+ {
+ s.add(next);
+ }
+ }
+ return s;
+ }
+
+ 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();
+
+ if(o instanceof ClusterConfig)
+ return ((ClusterConfig)o).getDeployedItemRefConfigMap().keySet();
+
+ if(o instanceof ClusteredServerConfig)
+ return ((ClusteredServerConfig)o).getDeployedItemRefConfigMap().keySet();
+
+ throw new RuntimeException("???");
+ }
+
+ private String getAppType()
+ {
+ return (String)getCmdEnv().get(kAppType);
+ }
+
+
+ private Cmd getListCmdByAppType(final String appType) throws Exception
+ {
+ if (kAll.equals(appType))
+ {
+ return new ListAllAppsCmd();
+ }
+ else if (kApplications.equals(appType))
+ {
+ return new ListJ2EEApplicationsCmd();
+ }
+ else if (kEJBModules.equals(appType))
+ {
+ return new ListEJBModulesCmd();
+ }
+ else if (kWebModules.equals(appType))
+ {
+ return new ListWebModulesCmd();
+ }
+ else if (kRARModules.equals(appType))
+ {
+ return new ListRARModulesCmd();
+ }
+ else if (kLifecycleModules.equals(appType))
+ {
+ return new ListLifecycleModulesCmd();
+ }
+ else
+ {
+ throw new Exception("Unknown app type: " + appType);
+ }
+ }
+
+ private final class ListAllAppsCmd implements Cmd
+ {
+ public Object execute() throws Exception
+ {
+ final DomainConfig domainConfig = getDomainConfig();
+ final Set s = new HashSet();
+
+ s.addAll(domainConfig.getJ2EEApplicationConfigMap().keySet());
+ s.addAll(domainConfig.getEJBModuleConfigMap().keySet());
+ s.addAll(domainConfig.getWebModuleConfigMap().keySet());
+ s.addAll(domainConfig.getRARModuleConfigMap().keySet());
+ s.addAll(domainConfig.getAppClientModuleConfigMap().keySet());
+ s.addAll(domainConfig.getLifecycleModuleConfigMap().keySet());
+
+ return s;
+ }
+ }
+
+ private final class ListWebModulesCmd implements Cmd
+ {
+ public Object execute() throws Exception
+ {
+ final DomainConfig domainConfig = getDomainConfig();
+ return domainConfig.getWebModuleConfigMap().keySet();
+ }
+ }
+
+ private final class ListEJBModulesCmd implements Cmd
+ {
+ public Object execute() throws Exception
+ {
+ final DomainConfig domainConfig = getDomainConfig();
+ return domainConfig.getEJBModuleConfigMap().keySet();
+ }
+ }
+
+ private final class ListRARModulesCmd implements Cmd
+ {
+ public Object execute() throws Exception
+ {
+ final DomainConfig domainConfig = getDomainConfig();
+ return domainConfig.getRARModuleConfigMap().keySet();
+ }
+ }
+
+ private final class ListJ2EEApplicationsCmd implements Cmd
+ {
+ public Object execute() throws Exception
+ {
+ final DomainConfig domainConfig = getDomainConfig();
+ return domainConfig.getJ2EEApplicationConfigMap().keySet();
+ }
+ }
+
+ private final class ListLifecycleModulesCmd implements Cmd
+ {
+ public Object execute() throws Exception
+ {
+ final DomainConfig domainConfig = getDomainConfig();
+ return domainConfig.getLifecycleModuleConfigMap().keySet();
+ }
+ }
+}
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
new file mode 100755
index 0000000..1fa3d00
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsTest.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ */
+public class ListDeployedAppsTest extends BaseTest
+{
+ private final Cmd targetCmd;
+
+ public ListDeployedAppsTest(final String user, final String password,
+ final String host, final int port, final String target,
+ final String appType)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final ListDeployedAppsCmd cmd = cmdFactory.createListDeployedAppsCmd(
+ target, appType);
+
+ targetCmd = new PipeCmd(connectCmd, cmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ 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);
+ }
+
+ String[] getResults()
+ {
+ return results;
+ }
+ public static void main(String[] args) throws Exception
+ {
+ new ListDeployedAppsTest("admin", "password", "localhost", 8686,
+ args[0], args[1]).run();
+ }
+
+ 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
new file mode 100644
index 0000000..5ff8e16
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/MailResourceTest.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.MailResourceConfig;
+import com.sun.appserv.management.config.MailResourceConfigKeys;
+
+
+/**
+ */
+public class MailResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myMailResource";
+ static final String kHost = "mailHost";
+ static final String kUser = "abc";
+ static final String kFrom = "abc@sun.com";
+ static final String kObjectType = "user";
+ static final Boolean kDebug = new Boolean(true);
+ static final String kStoreProtocol = "imap";
+ static final String kStoreProtocolClass = "com.sun.mail.imap.IMAPStore";
+ 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,
+ final String rUser, final String rFrom)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateMailResourceCmd createCmd =
+ cmdFactory.createCreateMailResourceCmd(jndiName,
+ rHost, rUser, rFrom, getOptional());
+
+ final DeleteMailResourceCmd deleteCmd =
+ cmdFactory.createDeleteMailResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new MailResourceTest(
+ "admin", "password", "localhost", 8686,
+ kJNDIName, kHost, kUser, kFrom).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //kObjectType);
+ optional.put(MailResourceConfigKeys.DEBUG_KEY, kDebug);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private MailResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (MailResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("JNDIName="+res.getJNDIName());
+ System.out.println("Debug="+res.getDebug());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("Host="+res.getHost());
+ System.out.println("User="+res.getUser());
+ System.out.println("From="+res.getFrom());
+ System.out.println("StoreProtocol="+res.getStoreProtocol());
+ System.out.println("StoreProtocolClass="+res.getStoreProtocolClass());
+ System.out.println("TransportProtocol="+res.getTransportProtocol());
+ System.out.println("TransportProtocolClass="+res.getTransportProtocolClass());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..7a003d4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PMFResourceTest.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.PersistenceManagerFactoryResourceConfig;
+import com.sun.appserv.management.config.PersistenceManagerFactoryResourceConfigKeys;
+
+
+/**
+ */
+public class PMFResourceTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kJNDIName = "myPMFResource";
+ static final String kJDBCResourceJNDIName = "jndi/myJdbcResource";
+ 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,
+ final String jndiName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreatePMFResourceCmd createCmd =
+ cmdFactory.createCreatePMFResourceCmd(jndiName, getOptional());
+
+ final DeletePMFResourceCmd deleteCmd =
+ cmdFactory.createDeletePMFResourceCmd(jndiName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new PMFResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap();
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //kObjectType);
+ optional.put(PersistenceManagerFactoryResourceConfigKeys.JDBC_RESOURCE_JNDI_NAME_KEY,
+ kJDBCResourceJNDIName);
+ optional.put(PersistenceManagerFactoryResourceConfigKeys.FACTORY_CLASS_KEY,
+ kFactoryClass);
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private PersistenceManagerFactoryResourceConfig res;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ res = (PersistenceManagerFactoryResourceConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println("JNDIName="+res.getJNDIName());
+ System.out.println("FactoryClass="+res.getFactoryClass());
+ System.out.println("ObjectType="+res.getObjectType());
+ System.out.println("JDBCResourceJNDIName="+res.getJDBCResourceJNDIName());
+ System.out.println("Enabled="+res.getEnabled());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..c5bd3b9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Phup.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Thup.java
+ *
+ * Created on September 18, 2004, 11:53 PM
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Properties;
+
+/**
+ * An abbreviation for PortHostUserPassword
+ * It's annoying to pass it around all over the place as individual items,
+ * so I created this trivial class.
+ * @author bnevins
+ */
+class Phup
+{
+ 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;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PipeCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PipeCmd.java
new file mode 100755
index 0000000..0122a32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PipeCmd.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class PipeCmd implements Cmd, SourceCmd
+{
+ private final SourceCmd _srcCmd;
+ private final SinkCmd _sinkCmd;
+
+ public PipeCmd(SourceCmd srcCmd, SinkCmd sinkCmd)
+ {
+ if ((srcCmd == null) || (srcCmd == sinkCmd))
+ {
+ throw new IllegalArgumentException();
+ }
+ _srcCmd = srcCmd;
+ _sinkCmd = sinkCmd;
+ }
+
+ public Object execute() throws Exception
+ {
+ final Object o = _srcCmd.execute();
+ _sinkCmd.setPipedData(o);
+ return _sinkCmd.execute();
+ }
+}
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
new file mode 100644
index 0000000..7d49060
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ResourceAdapterConfigTest.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.sun.appserv.management.config.ResourceAdapterConfig;
+import com.sun.appserv.management.config.ResourceAdapterConfigKeys;
+
+
+/**
+ */
+public class ResourceAdapterConfigTest extends BaseTest
+{
+ private final Cmd target;
+
+ static final String kThreadPoolIDs = "thread-pool-1";
+ static final String kObjectType = "user";
+ static final String kName = "someName";
+ static final String kRACName = "myResourceAdapter";
+
+ public ResourceAdapterConfigTest(final String user,
+ final String password, final String host, final int port,
+ final String racName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final CreateResourceAdapterConfigCmd createRACCmd =
+ cmdFactory.createCreateResourceAdapterConfigCmd(racName,
+ getOptional());
+
+ final DeleteResourceAdapterConfigCmd deleteRACCmd =
+ cmdFactory.createDeleteResourceAdapterConfigCmd(racName);
+
+ final PipeCmd p1 = new PipeCmd(connectCmd, createRACCmd);
+ final PipeCmd p2 = new PipeCmd(p1, new VerifyCreateCmd());
+ final PipeCmd p3 = new PipeCmd(connectCmd, deleteRACCmd);
+
+ final CmdChainCmd chainCmd = new CmdChainCmd();
+ chainCmd.addCmd(p2);
+ chainCmd.addCmd(p3);
+
+ target = chainCmd;
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+
+ public static void main(String[] args) throws Exception
+ {
+ new ResourceAdapterConfigTest(
+ "admin", "password", "localhost", 8686, kRACName).run();
+ }
+
+ private Map getOptional()
+ {
+ final Map optional = new HashMap(3);
+
+ optional.put(ResourceAdapterConfigKeys.THREAD_POOL_IDS_KEY,
+ kThreadPoolIDs);
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //kObjectType);
+ System.out.println("Remove hard coded Name");
+ optional.put("Name", kName);
+
+ return optional;
+ }
+
+ private final class VerifyCreateCmd implements Cmd, SinkCmd
+ {
+ private ResourceAdapterConfig rac;
+
+ private VerifyCreateCmd()
+ {
+ }
+
+ public void setPipedData(Object o)
+ {
+ rac = (ResourceAdapterConfig)o;
+ }
+
+ public Object execute() throws Exception
+ {
+ System.out.println(
+ "ResourceAdapterName="+rac.getResourceAdapterName());
+ System.out.println("Name="+rac.getName());
+ System.out.println("ObjectType="+rac.getObjectType());
+ System.out.println("ThreadPoolIDs="+rac.getThreadPoolIDs());
+
+ return new Integer(0);
+ }
+
+ }
+}
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
new file mode 100644
index 0000000..835676b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SampleGetter.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * SampleGetter.java
+ *
+ * Created on September 21, 2004, 1:58 PM
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ *
+ * @author bnevins
+ */
+class SampleGetter
+{
+ SampleGetter(Properties p)
+ {
+ props = p;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ List getSampleList() throws DeploymentTestsException
+ {
+ String sampleDir = props.getProperty("sampledir");
+
+ 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 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
new file mode 100644
index 0000000..b6fcd83
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SimplePersistence.java
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * SimplePersistence.java
+ *
+ * Created on May 19, 2003, 10:37 AM
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import java.util.*;
+import java.net.URL;
+
+/**
+ *
+ * @author bnevins
+ */
+
+public class SimplePersistence
+{
+ 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, String fname, boolean autoFlush)
+ {
+ persistenceFileRootName = fname;
+ this.autoFlush = autoFlush;
+ init(o);
+ load();
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public SimplePersistence(File f)
+ {
+ this(f, true);
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public SimplePersistence(File f, boolean autoFlush)
+ {
+ persistenceFile =f;
+ this.autoFlush = autoFlush;
+
+ if(!persistenceFile.exists())
+ store();
+
+ 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/SinkCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SinkCmd.java
new file mode 100755
index 0000000..25bdd89
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SinkCmd.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public interface SinkCmd extends Cmd
+{
+ void setPipedData(Object o);
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SourceCmd.java
new file mode 100755
index 0000000..cabfa72
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SourceCmd.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public interface SourceCmd extends Cmd
+{
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartClusterCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartClusterCmd.java
new file mode 100755
index 0000000..6ee3139
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartClusterCmd.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.j2ee.J2EECluster;
+
+/**
+ */
+public class StartClusterCmd extends BaseInstanceCmd
+{
+ public StartClusterCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final J2EECluster j2eeCluster = getJ2EECluster();
+ assert j2eeCluster != null;
+
+ j2eeCluster.start();
+
+ return null;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartClusterTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartClusterTest.java
new file mode 100755
index 0000000..e7b3272
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartClusterTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class StartClusterTest extends BaseTest
+{
+ private final Cmd target;
+
+ public StartClusterTest(final String user, final String password,
+ final String host, final int port, final String clusterName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final StartClusterCmd startClusterCmd = cmdFactory.
+ createStartClusterCmd(clusterName);
+
+ target = new PipeCmd(connectCmd, startClusterCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new StartClusterTest("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/StartInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartInstanceCmd.java
new file mode 100755
index 0000000..4c66861
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartInstanceCmd.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.j2ee.J2EEServer;
+
+/**
+ */
+public class StartInstanceCmd extends BaseInstanceCmd
+{
+ public StartInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final J2EEServer j2eeServer = getJ2EEServer();
+ assert j2eeServer != null;
+
+ j2eeServer.start();
+
+ return null;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartInstanceTest.java
new file mode 100755
index 0000000..7edb9af
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StartInstanceTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class StartInstanceTest extends BaseTest
+{
+ private final Cmd target;
+
+ public StartInstanceTest(final String user, final String password,
+ final String host, final int port, final String instanceName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final StartInstanceCmd startInstanceCmd = cmdFactory.
+ createStartInstanceCmd(instanceName);
+
+ target = new PipeCmd(connectCmd, startInstanceCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new StartInstanceTest("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/StopClusterCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterCmd.java
new file mode 100755
index 0000000..5649a56
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterCmd.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.j2ee.J2EECluster;
+
+/**
+ */
+public class StopClusterCmd extends BaseInstanceCmd
+{
+ public StopClusterCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final J2EECluster j2eeCluster = getJ2EECluster();
+ assert j2eeCluster != null;
+
+ j2eeCluster.stop();
+
+ return null;
+ }
+}
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
new file mode 100755
index 0000000..1f4ec37
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class StopClusterTest extends BaseTest
+{
+ private final Cmd target;
+
+ public StopClusterTest(final String user, final String password,
+ final String host, final int port, final String clusterName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final StopClusterCmd stopClusterCmd =
+ cmdFactory.createStopClusterCmd(clusterName);
+
+ target = new PipeCmd(connectCmd, stopClusterCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new StopClusterTest("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/StopInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopInstanceCmd.java
new file mode 100755
index 0000000..83241ac
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopInstanceCmd.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import com.sun.appserv.management.j2ee.J2EEServer;
+
+/**
+ */
+public class StopInstanceCmd extends BaseInstanceCmd
+{
+ public StopInstanceCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ final J2EEServer j2eeServer = getJ2EEServer();
+ assert j2eeServer != null;
+
+ j2eeServer.stop();
+
+ return null;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopInstanceTest.java
new file mode 100755
index 0000000..f397fee
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopInstanceTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class StopInstanceTest extends BaseTest
+{
+ private final Cmd target;
+
+ public StopInstanceTest(final String user, final String password,
+ final String host, final int port, final String instanceName)
+ {
+ final CmdFactory cmdFactory = getCmdFactory();
+
+ final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ final StopInstanceCmd stopInstanceCmd = cmdFactory.
+ createStopInstanceCmd(instanceName);
+
+ target = new PipeCmd(connectCmd, stopInstanceCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ target.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ new StopInstanceTest("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/Tee.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Tee.java
new file mode 100644
index 0000000..052db04
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Tee.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/**
+ * @version 1.00 April 1, 2000
+ * @author Byron Nevins
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+
+
+public class Tee extends PrintStream
+{
+
+ /////////////////////////////////////////////////////////////////
+
+ 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;
+
+ // 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));
+ }
+
+
+ /////////////////////////////////////////////////////////////////
+
+ // 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(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;
+
+ /////////////////////////////////////////////////////////////////
+
+ 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();
+ }
+ }
+}
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
new file mode 100644
index 0000000..6caa7f0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeployCmd.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import java.util.*;
+import javax.management.*;
+import com.sun.appserv.management.deploy.*;
+import com.sun.appserv.management.config.*;
+
+/**
+ */
+public class UndeployCmd extends DeployCmd
+{
+ public UndeployCmd(CmdEnv cmdEnv)
+ {
+ super(cmdEnv);
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ undeploy();
+ return null;
+ }
+
+
+ protected void undeploy() throws Exception
+ {
+ final String appName = getAppName();
+ final DeploymentMgr deployMgr = getDeploymentMgr();
+
+ if (!DEFAULT_DEPLOY_TARGET.equals(getTarget()))
+ {
+ final DeployedItemRefConfigCR refMgr =
+ getDeployedItemRefConfigCR();
+
+ stopApp();
+ refMgr.removeDeployedItemRefConfig(appName);
+ }
+ final Map statusData = deployMgr.undeploy(appName, null);
+ 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
new file mode 100644
index 0000000..e34db58
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeploymentTest.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+/**
+ */
+public class UndeploymentTest extends BaseTest
+{
+ private Cmd cmd;
+
+ public UndeploymentTest(String user, String password, String host,
+ int port, String name, String target)
+ {
+ CmdFactory cmdFactory = getCmdFactory();
+
+ ConnectCmd connectCmd = cmdFactory.createConnectCmd(
+ user, password, host, port);
+
+ UndeployCmd undeployCmd = cmdFactory.
+ createUndeployCmd(name, target);
+
+ cmd = new PipeCmd(connectCmd, undeployCmd);
+ }
+
+ protected void runInternal() throws Exception
+ {
+ cmd.execute();
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ final String appName = args[0];
+ final String appserverTarget = args.length == 2 ? args[1] : null;
+
+ new UndeploymentTest("admin", "password", "localhost", 8686,
+ appName, appserverTarget).run();
+ }
+}
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
new file mode 100644
index 0000000..10c9ef0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Utils.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Utils.java
+ *
+ * Created on September 21, 2004, 2:17 PM
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.io.*;
+import javax.swing.*;
+
+/**
+ *
+ * @author bnevins
+ */
+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;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/VirtualServerCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/VirtualServerCmd.java
new file mode 100644
index 0000000..9e71f13
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/VirtualServerCmd.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.admin.mbeanapi.deployment;
+
+import java.util.Set;
+import java.util.Map;
+
+import com.sun.appserv.management.base.Util;
+import com.sun.appserv.management.config.ConfigConfig;
+import com.sun.appserv.management.config.VirtualServerConfig;
+import com.sun.appserv.management.config.HTTPServiceConfig;
+
+/**
+ */
+public class VirtualServerCmd extends BaseCmd implements SourceCmd
+{
+ public static final String kCreateMode = "CreateVirtualServer";
+ public static final String kDeleteMode = "DeleteVirtualServer";
+
+ public static final String kName = "Name";
+ public static final String kHosts = "Hosts";
+ public static final String kConfigName = "ConfigName";
+ public static final String kOptional = "Optional";
+
+ private final String mode;
+
+ public VirtualServerCmd(CmdEnv cmdEnv, String mode)
+ {
+ super(cmdEnv);
+ this.mode = mode;
+ }
+
+ public Object execute() throws Exception
+ {
+ assert isConnected();
+
+ Object ret = new Integer(0);
+ if (mode.equals(kCreateMode))
+ {
+ ret = create();
+ }
+ else if (mode.equals(kDeleteMode))
+ {
+ remove();
+ }
+ else
+ {
+ throw new Exception("Unknown mode");
+ }
+ return ret;
+ }
+
+ protected VirtualServerConfig create() throws Exception
+ {
+ final HTTPServiceConfig mgr = getHTTPServiceConfig(
+ getConfigName());
+ return mgr.createVirtualServerConfig(getName(), getHosts(), getOptional());
+ }
+
+ protected void remove() throws Exception
+ {
+ final String configName = getConfigName();
+ final String vsName = getName();
+
+ getHTTPServiceConfig(configName).removeVirtualServerConfig(vsName);
+ }
+
+ private HTTPServiceConfig getHTTPServiceConfig(
+ final String configName) throws Exception
+ {
+ final String j2eeTypeProp = Util.makeJ2EETypeProp(
+ HTTPServiceConfig.J2EE_TYPE);
+ final String configProp = Util.makeProp(
+ ConfigConfig.J2EE_TYPE, configName);
+ final String props = Util.concatenateProps(j2eeTypeProp, configProp);
+
+ final Set s = getQueryMgr().queryPropsSet(props);
+ assert s != null && s.size() == 1;
+
+ return (HTTPServiceConfig)s.iterator().next();
+ }
+
+ private String getHosts()
+ {
+ return (String)getCmdEnv().get(kHosts);
+ }
+
+ private String getName()
+ {
+ return (String)getCmdEnv().get(kName);
+ }
+
+ private String getConfigName()
+ {
+ return (String)getCmdEnv().get(kConfigName);
+ }
+
+ private Map getOptional()
+ {
+ return (Map)getCmdEnv().get(kOptional);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/LICENSE.md b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/LICENSE.md
new file mode 100644
index 0000000..e0358f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/LICENSE.md
@@ -0,0 +1,29 @@
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/README.md b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/README.md
new file mode 100644
index 0000000..766dda6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/README.md
@@ -0,0 +1 @@
+This directory contains sample code and hence files within this directory and below are covered under EDL 1.0.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient.jar b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient.jar
new file mode 100644
index 0000000..a51ca1f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient.jar
Binary files differ
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
new file mode 100644
index 0000000..2f13c4b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/build.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+<!DOCTYPE project [ <!ENTITY include SYSTEM "../../../../common-ant.xml"> ]>
+
+ <!-- ======================================================= -->
+ <!-- Application Server Sample Application build xml -->
+ <!-- ======================================================= -->
+
+<project name="soaptojmsmessage" default="core" basedir=".">
+ <property name="sample.home" value="../../../../"/>
+
+ <!-- ======================================================= -->
+ <!-- App name-dependent settings. -->
+ <!-- ======================================================= -->
+
+ <property name="binary.name" value="SOAPtoJMSMessageSample"/>
+
+ <!-- ======================================================= -->
+ <!-- Package directory structures of interest. -->
+ <!-- ======================================================= -->
+ <property name="app.pkg" value="samples/jms/soaptojms"/>
+
+ <!-- ======================================================= -->
+ <!-- Java Doc properties. -->
+ <!-- ======================================================= -->
+ <property name="sample.name" value="simple"/>
+ <property name="javadoc.pkgnames" value="samples.jms.soaptojms.*" />
+
+ <!-- ======================================================= -->
+ <!-- Include common.xml -->
+ <!-- ======================================================= -->
+
+ &include;
+
+ <!-- ======================================================= -->
+ <!-- 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="javax.jms.TopicConnectionFactory" />
+ <property name="queue.factory.jndi.name" value="jms/TopicConnectionFactory" />
+ <property name="queue.type" value="javax.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="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="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"/>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/docs/index.html b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/docs/index.html
new file mode 100644
index 0000000..e10f918
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/docs/index.html
@@ -0,0 +1,272 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+ <title>SOAP to JMS Sample Application</title>
+ <style TYPE="text/css">
+ body,td,p,div,span,a,ul,ul li, ol, ol li, ol li b, dl,h1,h2,h3,h4,h5,h6,li {
+ font-family:geneva,helvetica,arial,"lucida sans",sans-serif;
+ font-size:10pt
+ }
+ h1 {font-size:18pt}
+ h2 {font-size:14pt}
+ h3 {font-size:12pt}
+ code,kbd,tt,pre {
+ font-family:monaco,courier,"courier new";
+ font-size:10pt;
+ }
+ li {padding-bottom: 8px}
+ p.copy, p.copy a {
+ font-family:geneva,helvetica,arial,"lucida sans",sans-serif;
+ font-size:8pt
+ }
+ p.copy {text-align: center}
+
+ table.grey1,tr.grey1,td.grey1{background:#f1f1f1}
+ th {
+ color:#ffffff;
+ font-family:geneva,helvetica,arial,"lucida sans",sans-serif;
+ font-size:12pt
+ }
+ td.insidehead {
+ font-weight:bold;
+ background:white;
+ text-align: left;
+ }
+ a{text-decoration:none}
+ a:visited{color:#96C}
+ a:hover {text-decoration:underline}
+ </style>
+</head>
+
+ <body text="#000000" link="#594fbf" vlink="#1005fb" alink="#333366" bgcolor="#ffffff" marginwidth="10">
+
+<table width="100%" border="0" cellspacing="4" cellpadding="2">
+ <tbody>
+ <tr>
+ <td valign="top" align="right" bgcolor="#587993">
+ <font color="#ffffff" size="-1"><b>Sun Java System Application Server</b></font>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<p><a href="../../../../../docs/list.html">Samples Index</a></p>
+<!---- Don't modify anything above this line, except for the title tag -------->
+
+<h1>SOAP to JMS Sample Application</h1>
+<p>
+The SOAP to JMS sample application contains one application client
+which can be used to invoke two simple Java objects:
+
+ <ul>
+ <li> <code>SendSOAPMessageWithJMS</code>
+constructs a SOAP message using the Soap with Attachments API for Java
+(SAAJ) API, converts it to a JMS message,
+and then uses JMS to publish the message to a JMS Topic destination. </li>
+
+ <li> <code>ReceiveSOAPMessageWithJMS</code>
+uses JMS to subscribe to a JMS Topic, retrieves a JMS-wrapped SOAP
+message, then converts the message to a SOAP message. </li>
+</ul>
+
+
+<h2>Building, Deploying, and Running the Application</h2>
+
+<p>
+The general instructions for building, deploying, and running sample applications are provided in
+<a href="../../../../../docs/common-procedures.html">Building, Deploying, and Running Sample Applications</a>.
+In reading this document, use the following application-specific variables for this application:
+</p>
+
+<ul>
+ <li><code><i>install_dir</i></code> is the directory where Application Server is installed.
+ <li><code><i>app_dir</i></code> is the application base directory:
+ <code><i>install_dir</i>/samples/jms/apps/soaptojms/simple</code>.
+ <li>The prebuilt client JAR file is <code><i>app_dir</i>/simple-client/SOAPtoJMSMessageSampleClient.jar</code>.
+</ul>
+
+<p>
+Follow this general procedure:
+<ol>
+ <li><a href="../../../../../docs/common-procedures.html#build">Build the Application</a>.
+ The build file, <code>build.xml</code>, is in the <code><i>app_dir</i></code> directory.
+ <p>
+ By default, the application creates an attachment that includes
+ the <code>index.html</code> file located at the URL <code>http://localhost:8080/</code>.
+ If you want to attach a file at a different URL, or if you have changed the Application
+ Server HTTP port from 8080 to some other value, change the
+ value of the <code>url</code> property in the <code>src/soaptojms.properties</code> file.
+<p>Before you deploy or run the application, you must ensure that the neccessary resources have been configured for
+Application Server. The included <code>asant</code> deployment script automatically performs this step for you.
+But if you are using another deployment mechanism, you must perform it manually.
+See the instructions in <a href="#config">Configuring Resources</a>.
+<!--
+ <li><a href="../../../../../docs/common-procedures.html#deploy">Deploy the Application</a>
+ The EAR file is <code><i>install_dir</i>/samples/ejb/bmp/apps/simple/bmp-simple.ear</code>.
+-->
+ <li><a href="#run">Run the Application</a> as described below.
+</ol>
+
+<a name="config"> </a> <h2> Configuring Resources</h2>
+<p>
+If you deploy the application using <code>asant</code>, it will configure all the resources
+automatically. Otherwise, you must do it manually.
+
+<h3>Configuring Resources with Admin Console</h3>
+<p>
+Follow these steps to configure resources with Admin Console:
+<ol>
+<li>Log on to the Admin Console.
+<li>In the left pane, click on Java Message Service
+<li>Click on Connection Factories.
+<li>Click New in the right pane.
+<li>Add the following:
+<pre>
+JNDI-Name: jms/TopicConnectionFactory
+Type: javax.jms.TopicConnectionFactory
+Resource: Select Enabled checkbox
+</pre>
+
+<li>Click on Destination Resources.
+<li>Click New in the right pane.
+
+<li>Add the following:
+<pre>
+JNDI-Name: jms/TestTopic
+Type: javax.jms.Topic
+Resource: Select Enabled checkbox
+</pre>
+
+<li>Add a new property for this destination resource,
+with name-value pair as <code>Name=TestTopic</code>.
+</ol>
+
+<h3> Configuring resources with asadmin</h3>
+<p>
+To configure the resources using <code>asadmin</code>, use these commands:
+
+<p>
+Configure connection factory::
+
+<pre>
+asadmin create-jms-resource --user <i>username</i> --password <i>password</i>
+ --restype javax.jms.TopicConnectionFactory
+ jms/TopicConnectionFactory
+</pre>
+
+<p>
+Configure destination(topic):
+
+<pre>asadmin create-jms-resource --user <i>username</i> --password <i>password</i>
+ --restype javax.jms.Topic --property Name=TestTopic
+ jms/TestTopic
+</pre>
+
+
+<a name="run"></a><h3>Running the Sample Application</h3>
+<p>
+To run the sample application follow these steps:
+<ol>
+ <li>In a shell (console) window, change your working directory to <code><i>app_dir</i></code>
+ <pre>
+cd <i>install_dir</i>/samples/jms/apps/soaptojms/simple/
+</pre>
+
+ <li>Set the value of the environment variable APPCPATH to
+ <code><i>install_dir</i>/imq/lib/imqxm.jar</code>.
+
+ <li>Run the application client to invoke the <code>ReceiveSOAPMessageWithJMS</code> object:
+ <pre><i>install_dir</i>/bin/appclient -client SOAPtoJMSMessageSampleClient.jar Receive</pre>
+
+ <li>Wait until you see the message "ready to receive SOAP messages ...".
+
+ <li>In another shell window, set the value of the environment variable APPCPATH to
+ <code><i>install_dir</i>/imq/lib/imqxm.jar</code>
+
+ <li>In this shell window, run the application
+ client to invoke <code>SendSOAPMessageWithJMS</code> object as follows:
+
+ <pre><i>install_dir</i>/bin/appclient -client SOAPtoJMSMessageSampleClient.jar Send</pre>
+
+ It displays the following messages:
+<pre>
+ [java] Create a SOAP message
+ [java] Attaching the file from URL: http://localhost:8080
+ [java] Convert the message to a JMS message
+ [java] Publish the message
+ [java] Finished
+</pre>
+
+When <code>SendSOAPMessageWithJMS</code> finishes publishing the message,
+<code>ReceiveSOAPMessageWithJMS</code> in the first command window displays the following messages,
+followed by the HTML content of the attached URL:
+<pre>
+ [java] Message received! Converting the JMS message to SOAP message
+ [java] Attachment counts: 1
+ [java] Content type: text/html
+ [java] Content Id: cid-001
+ [java] Attachment content:
+</pre>
+
+ <li>Exit the ReceiveSOAPMessageWithJMS and SendSOAPMessageWithJMS application client
+ programs by typing CTRL-C in the shell windows.
+</ol>
+
+<p>
+You can optionally pass in the name of the Topic that you want
+the application client to reference when running. This optional paramater must
+match the value set to property <code>queue.jndi.name</code>, which is
+located in <code><<i>install_dir</i>>/samples/jms/apps/soaptojms/simple/build.xml</code> file.
+The value is set to <code>jms/TestTopic</code> by default. If you choose to pass in this
+optional parameter, then you need to pass the Topic name to the appclient command, so that
+the application client runs using the correct Topic name. Both the Send and Receive invocations
+of the application client must use the same Topic name, and it must match
+the <code>queue.jndi.name</code> property value, which again is located in
+<code><i>install_dir</i>/samples/jms/apps/soaptojms/simple/build.xml</code> file.
+<p>
+For example, to run this example in the samples domain, using Topic
+name <code>jms/TestTopic</code>, use these commands:
+<pre><i>install_dir</i>>/bin/appclient -client SOAPtoJMSMessageSampleClient.jar
+Receive jms/TestTopic -xml <i>install_dir</i>>/domains/samples/config/sun-acc.xml .
+
+<i>install_dir</i>/bin/appclient -client SOAPtoJMSMessageSampleClient.jar
+Send jms/TestTopic -xml <i>install_dir</i>>/domains/samples/config/sun-acc.xml .
+</pre>
+
+<h2>Troubleshooting</h2>
+
+<p>If you run the application in a different domain than the default,
+domain1, then you need to pass in the location of <code>sun-acc.xml</code> to the appclient
+command, so that the application
+client runs using the correct port for that particular domain.
+Use the <code>-xml</code> flag to pass in this location of this <code>sun-acc.xml</code> file.
+ For example, to run this example in the samples domain, use these commands:
+
+<pre><i>install_dir</i>/bin/appclient -client SOAPtoJMSMessageSampleClient.jar
+Receive -xml <i>install_dir</i>/domains/samples/config/sun-acc.xml
+
+<i>install_dir</i>/bin/appclient -client SOAPtoJMSMessageSampleClient.jar
+Send -xml <i>install_dir</i>/domains/samples/config/sun-acc.xml
+</pre>
+
+<!--- Do not modify the rest of the document -->
+<hr noshade="noshade" size="1">
+<!-- start copyright -->
+<p class="copy"> Copyright (c) 2018 Oracle and/or its affiliates.</a>
+All rights reserved. </p>
+<!-- end copyright -->
+
+</body>
+</html>
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
new file mode 100644
index 0000000..519827e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/build.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+<!DOCTYPE project [ <!ENTITY include SYSTEM "../../../../../common-ant.xml"> ]>
+
+ <!-- ======================================================= -->
+ <!-- Application Server Sample Application build xml -->
+ <!-- ======================================================= -->
+
+ <project name="soaptojmsmessage" default="core" basedir=".">
+ <property name="sample.home" value="../../../../../"/>
+
+ <!-- ======================================================= -->
+ <!-- App name-dependent settings. -->
+ <!-- ======================================================= -->
+
+ <!-- ======================================================= -->
+ <!-- Package directory structures of interest. -->
+ <!-- ======================================================= -->
+
+ <property name="app.pkg" value="samples/jms/soaptojms"/>
+ <property name="clientjar.file" value="../${appname}Client.jar"/>
+
+ <!-- ======================================================= -->
+ <!-- Java Doc properties. -->
+ <!-- ======================================================= -->
+ <property name="javadoc.pkgnames" value="samples.jms.soaptojms.*" />
+
+ <!-- ======================================================= -->
+ <!-- Xml files properties. -->
+ <!-- ======================================================= -->
+
+ <!-- ======================================================= -->
+ <!-- Include common.xml -->
+ <!-- ======================================================= -->
+
+ &include;
+
+ <!-- ======================================================= -->
+ <!-- Assemble CLIENT JAR module. -->
+ <!-- ======================================================= -->
+ <target name="clientjar_local" depends="clean_clientjar_common">
+ <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}/"
+ includes="**/*.class, **/soaptojms.properties" excludes="**/servlet/"
+ prefix="${app.pkg}"/>
+ <metainf dir="${clientDD.dir}" includes="${clientDD}"/>
+ </jar>
+ <property name="clientjar.done" value="true"/>
+ </target>
+
+ <!-- ======================================================= -->
+ <!-- Tagets to run sample application -->
+ <!-- ======================================================= -->
+ <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="copy_ear" depends="init_common">
+ <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/soaptojms.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/soaptojms.properties
new file mode 100644
index 0000000..2cc3fe0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/soaptojms.properties
@@ -0,0 +1,13 @@
+#
+# Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+#URL props.
+#Tue Mar 6 10:07:07 IST 2004
+url=http://localhost:8080
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/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/MANIFEST.MF
new file mode 100644
index 0000000..6a7ad4a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: samples.jms.soaptojms.SOAPMessageWithJMSClient
+
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
new file mode 100644
index 0000000..37ff3d5
--- /dev/null
+++ 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
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+<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>
+</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/conf/sun-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/sun-application-client.xml
new file mode 100644
index 0000000..238f1f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/sun-application-client.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 8.1 Application Client 1.4//EN' 'http://www.sun.com/software/appserver/dtds/sun-application-client_1_4-1.dtd'>
+<!--
+
+ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+<sun-application-client>
+</sun-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
new file mode 100644
index 0000000..86a8637
--- /dev/null
+++ 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
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.jms.soaptojms;
+
+
+/**
+ * This class is the central location to store the internal
+ * JNDI names of various entities. Any change here should
+ * also be reflected in the deployment descriptors.
+ */
+public class JNDINames {
+
+ private JNDINames() { } //Prevents instantiation
+
+ // JNDI names of topic resources
+ public static final String TOPIC_CONNECTION_FACTORY =
+ "jms/TopicConnectionFactory";
+
+ 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
new file mode 100644
index 0000000..2fdd040
--- /dev/null
+++ 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
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.jms.soaptojms;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.AttachmentPart;
+
+import com.sun.messaging.xml.MessageTransformer;
+import javax.jms.TopicConnectionFactory;
+
+import javax.jms.MessageListener;
+import javax.jms.TopicConnection;
+import javax.jms.TopicSession;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.jms.JMSException;
+import javax.jms.TopicSubscriber;
+
+import java.util.Iterator;
+
+/**
+ * This sample program shows a JMS message listener can use the MessageTransformer
+ * utility to convert JMS messages back to SOAP messages.
+ */
+public class ReceiveSOAPMessageWithJMS implements MessageListener {
+
+ TopicConnectionFactory tcf = null;
+ TopicConnection tc = null;
+ TopicSession session = null;
+ Topic topic = null;
+ TopicSubscriber subscriber = null;
+
+ MessageFactory messageFactory = null;
+
+ /**
+ * Default constructor.
+ *
+ * @param topicName a String that contains the name of a JMS Topic
+ *
+ */
+ public ReceiveSOAPMessageWithJMS(String topicName) {
+ init(topicName);
+ }
+
+ /**
+ * JMS Connection/Session/Destination/MessageListener set ups.
+ *
+ * @param topicName a String that contains the name of a JMS Topic
+ */
+ public void init(String topicName) {
+ try {
+
+ /**
+ * construct a default SOAP message factory.
+ */
+ messageFactory = MessageFactory.newInstance();
+
+ /**
+ * 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);
+ subscriber = session.createSubscriber(topic);
+ subscriber.setMessageListener( this );
+ tc.start();
+
+ System.out.println ("Ready to receive SOAP messages ...");
+ Thread.currentThread().join();
+ } catch (Exception jmse) {
+ jmse.printStackTrace();
+ }
+ }
+
+
+ /**
+ * JMS Messages are delivered to this method. The body of the message
+ * contains SOAP streams.
+ *
+ * 1. The message conversion utility converts JMS message to SOAP
+ * message type.
+ * 2. Get the attachment parts and print content information to the
+ * standard output stream.
+ *
+ * @param message a delivered message
+ *
+ */
+ public void onMessage (Message message) {
+
+ try {
+
+ /**
+ * convert JMS to SOAP message.
+ */
+ System.out.println("Message received! Converting the JMS message to SOAP message");
+
+ SOAPMessage soapMessage =
+ MessageTransformer.SOAPMessageFromJMSMessage( message, messageFactory );
+
+ /**
+ * Print attachment counts.
+ */
+ System.out.println("Attachment counts: " + soapMessage.countAttachments());
+
+ /**
+ * Get attachment parts of the SOAP message.
+ */
+ Iterator iterator = soapMessage.getAttachments();
+ while ( iterator.hasNext() ) {
+ /**
+ * Get next attachment.
+ */
+ AttachmentPart ap = (AttachmentPart) iterator.next();
+ /**
+ * Get content type.
+ */
+ String contentType = ap.getContentType();
+ System.out.println("Content type: " + contentType);
+ /**
+ * Get content Id.
+ */
+ String contentId = ap.getContentId();
+ System.out.println("Content Id: " + contentId);
+
+ /**
+ * Check if this is a Text attachment.
+ */
+ if ( contentType.indexOf("text") >=0 ) {
+ /**
+ * Get and print the string content if it is a text
+ * attachment.
+ */
+ String content = (String) ap.getContent();
+ System.out.println("Attachment content:\n\n" + content);
+ System.out.println("*** attachment content ends ***");
+ }
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ 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
new file mode 100644
index 0000000..db1ecfa
--- /dev/null
+++ 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
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.jms.soaptojms;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.AttachmentPart;
+
+import com.sun.messaging.xml.MessageTransformer;
+import javax.jms.TopicConnectionFactory;
+
+import javax.jms.MessageListener;
+import javax.jms.TopicConnection;
+import javax.jms.TopicSession;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.jms.JMSException;
+import javax.jms.TopicSubscriber;
+
+import java.util.Iterator;
+
+/**
+ * This sample program shows a JMS message listener can use the MessageTransformer
+ * 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\"";
+
+ if (args.length > 0) {
+ if (args[0].equalsIgnoreCase("Receive")){
+ if (args.length > 1) {
+ topicName = args[1];
+ }
+ try {
+ ReceiveSOAPMessageWithJMS rsm = new ReceiveSOAPMessageWithJMS(topicName);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (args[0].equalsIgnoreCase("Send")){
+ if (args.length > 1) {
+ topicName = args[1];
+ }
+ try {
+ SendSOAPMessageWithJMS ssm = new SendSOAPMessageWithJMS(topicName);
+ ssm.send();
+ ssm.close();
+ System.out.println("Finished");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } 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
new file mode 100644
index 0000000..e31af83
--- /dev/null
+++ 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
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.jms.soaptojms;
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.Name;
+
+import java.net.URL;
+import javax.activation.DataHandler;
+
+import com.sun.messaging.xml.MessageTransformer;
+//import com.sun.messaging.TopicConnectionFactory;
+import javax.jms.TopicConnectionFactory;
+
+import javax.jms.TopicConnection;
+import javax.jms.JMSException;
+import javax.jms.Session;
+import javax.jms.Message;
+import javax.jms.TopicSession;
+import javax.jms.Topic;
+import javax.jms.TopicPublisher;
+
+import java.util.*;
+import java.io.*;
+
+/**
+ * This example shows how to use the MessageTransformer utility to send SOAP
+ * messages with JMS.
+ * <p>
+ * SOAP messages are constructed with javax.xml.soap API. The messages
+ * are converted with MessageTransformer utility to convert SOAP to JMS
+ * message types. The JMS messages are then published to the JMS topics.
+ */
+public class SendSOAPMessageWithJMS {
+
+ TopicConnectionFactory tcf = null;
+ TopicConnection tc = null;
+ TopicSession session = null;
+ Topic topic = null;
+
+ TopicPublisher publisher = null;
+
+ /**
+ * default constructor.
+ *
+ * @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
+ *
+ */
+ public void init(String topicName) {
+ try {
+ 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);
+ publisher = session.createPublisher(topic);
+ } catch (JMSException jmse) {
+ jmse.printStackTrace();
+ } catch(ServiceLocatorException se) {
+ se.printStackTrace();
+ }
+ }
+
+ /**
+ * Send SOAP message with JMS API.
+ */
+ public void send () throws Exception {
+
+ /**
+ * Construct a default SOAP message factory.
+ */
+ MessageFactory mf = MessageFactory.newInstance();
+ /**
+ * Create a SOAP message object.
+ */
+ System.out.println ("Create a SOAP message");
+ SOAPMessage soapMessage = mf.createMessage();
+ /**
+ * Get SOAP part.
+ */
+ SOAPPart soapPart = soapMessage.getSOAPPart();
+ /**
+ * Get SOAP envelope.
+ */
+ SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
+
+ /**
+ * Get SOAP body.
+ */
+ SOAPBody soapBody = soapEnvelope.getBody();
+ /**
+ * Create a name object. with name space http://www.sun.com/imq.
+ */
+ Name name = soapEnvelope.createName("HelloWorld", "hw", "http://www.sun.com/imq");
+ /**
+ * Add child element with the above name.
+ */
+ SOAPElement element = soapBody.addChildElement(name);
+
+ /**
+ * Add another child element.
+ */
+ element.addTextNode( "Welcome to Sun Web Services." );
+
+ /**
+ * Create an atachment with activation API.
+ */
+
+ URL url = getUrlFromPropsFile();
+ System.out.println ("Attaching the file from URL: " + url);
+
+ DataHandler dh = new DataHandler (url);
+ AttachmentPart ap = soapMessage.createAttachmentPart(dh);
+ /**
+ * set content type/ID.
+ */
+ ap.setContentType("text/html");
+ ap.setContentId("cid-001");
+
+ /**
+ * add the attachment to the SOAP message.
+ */
+ soapMessage.addAttachmentPart(ap);
+ soapMessage.saveChanges();
+
+ /**
+ * Convert SOAP 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");
+ 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
+ */
+ 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
new file mode 100644
index 0000000..3bd2f00
--- /dev/null
+++ 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
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.jms.soaptojms;
+
+
+import java.net.URL;
+
+import javax.ejb.EJBHome;
+import javax.ejb.EJBLocalHome;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.rmi.PortableRemoteObject;
+import javax.sql.DataSource;
+
+import samples.jms.soaptojms.ServiceLocatorException;
+
+/**
+ * This class is an implementation of the Service Locator pattern. It is
+ * used to looukup resources such as JMS Destinations, etc.
+ */
+public class ServiceLocator {
+
+ private InitialContext ic;
+
+ public ServiceLocator() throws ServiceLocatorException {
+ try {
+ 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
+ */
+ public TopicConnectionFactory getTopicConnectionFactory(String topicConnFactoryName) throws ServiceLocatorException {
+ TopicConnectionFactory factory = null;
+ try {
+ factory = (TopicConnectionFactory) ic.lookup(topicConnFactoryName);
+ } catch (NamingException ne) {
+ ne.printStackTrace();
+ throw new ServiceLocatorException(ne);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new ServiceLocatorException(e);
+ }
+ return factory;
+ }
+
+
+ /**
+ * This method obtains the topc itself for a caller
+ * @return the Topic Destination to send messages to
+ */
+ public Topic getTopic(String topicName) throws ServiceLocatorException {
+ Topic topic = null;
+ try {
+ topic = (Topic)ic.lookup(topicName);
+ } catch (NamingException ne) {
+ throw new ServiceLocatorException(ne);
+ } catch (Exception e) {
+ throw new ServiceLocatorException(e);
+ }
+ return topic;
+ }
+
+}
+
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/ServiceLocatorException.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/ServiceLocatorException.java
new file mode 100644
index 0000000..387291e
--- /dev/null
+++ 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/ServiceLocatorException.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.jms.soaptojms;
+
+
+
+/**
+ * This class implements an exception which can wrapped a lower-level exception.
+ *
+ */
+public class ServiceLocatorException extends Exception {
+ private Exception exception;
+
+ /**
+ * Creates a new ServiceLocatorException wrapping another exception, and with a detail message.
+ * @param message the detail message.
+ * @param exception the wrapped exception.
+ */
+ public ServiceLocatorException(String message, Exception exception) {
+ super(message);
+ this.exception = exception;
+ return;
+ }
+
+ /**
+ * Creates a ServiceLocatorException with the specified detail message.
+ * @param message the detail message.
+ */
+ public ServiceLocatorException(String message) {
+ this(message, null);
+ return;
+ }
+
+ /**
+ * Creates a new ServiceLocatorException wrapping another exception, and with no detail message.
+ * @param exception the wrapped exception.
+ */
+ public ServiceLocatorException(Exception exception) {
+ this(null, exception);
+ return;
+ }
+
+ /**
+ * Gets the wrapped exception.
+ *
+ * @return the wrapped exception.
+ */
+ public Exception getException() {
+ return exception;
+ }
+
+ /**
+ * Retrieves (recursively) the root cause exception.
+ *
+ * @return the root cause exception.
+ */
+ public Exception getRootCause() {
+ if (exception instanceof ServiceLocatorException) {
+ return ((ServiceLocatorException) exception).getRootCause();
+ }
+ return exception == null ? this : exception;
+ }
+
+ public String toString() {
+ if (exception instanceof ServiceLocatorException) {
+ return ((ServiceLocatorException) exception).toString();
+ }
+ return exception == null ? super.toString() : exception.toString();
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/TestingLifecycleModule.txt b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/TestingLifecycleModule.txt
new file mode 100644
index 0000000..e5b5d87
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/TestingLifecycleModule.txt
@@ -0,0 +1,37 @@
+To test lifecycle-listener-modules :
+
+1. Compile the java file with command :
+
+javac -classpath $S1AS_HOME/lib/appserv-rt.jar DeplLifecycleModule.java
+
+2. Create server-instances
+
+3. Create the life-cycle-module with command :
+
+asadmin create-lifecycle-module --user admin --password admin123 --target <your-target> --classname DeplLifecycleModule --classpath $APS_HOME/devtests/deployment/lifecycle-module MyModule
+
+4. Stop and re-start <your-target> and search the server.log of <your-target> for the pattern "DeplLifecycleListener:" - you will find the following :
+
+DeplLifecycleListener: INIT_EVENT
+DeplLifecycleListener: STARTUP_EVENT
+DeplLifecycleListener: READY_EVENT
+
+5. Create refrence using command :
+
+asadmin create-application-ref --user admin --password asmin123 --target <ref-target> MyModule
+
+6. Stop and re-start <ref-target> and search the server.log of <ref-target> for the pattern "DeplLifecycleListener:" - you will find the following :
+
+DeplLifecycleListener: INIT_EVENT
+DeplLifecycleListener: STARTUP_EVENT
+DeplLifecycleListener: READY_EVENT
+
+7. Do "asadmin delete-lifecycle-module --user admin --password admin123 --target <your-target> MyModule" - it should fail
+
+8. Do the following :
+
+asadmin delete-application-ref --user admin --password admin123 --target <ref-target> MyModule
+asadmin delete-lifecycle-module --user admin --password admin123 --target <your-target> MyModule
+
+Now all the above commands should pass
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/depl-lifecycle-module.jar b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/depl-lifecycle-module.jar
new file mode 100644
index 0000000..cedf83e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/depl-lifecycle-module.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/hello.war b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/hello.war
new file mode 100644
index 0000000..fbdd9e7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/hello.war
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/sec-ssl-converter-ejb.jar b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/sec-ssl-converter-ejb.jar
new file mode 100644
index 0000000..b4d233d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/sec-ssl-converter-ejb.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/stateful-simple.ear b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/stateful-simple.ear
new file mode 100644
index 0000000..3cf13b0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/stateful-simple.ear
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/statelesshelloejb.jar b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/statelesshelloejb.jar
new file mode 100644
index 0000000..96347ab
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/statelesshelloejb.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/timersessionEjb.jar b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/timersessionEjb.jar
new file mode 100644
index 0000000..337fc83
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/timersessionEjb.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/wstoejb.jar b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/wstoejb.jar
new file mode 100644
index 0000000..237b6dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/wstoejb.jar
Binary files differ
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/config.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/config.properties
new file mode 100644
index 0000000..12ce226
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/config.properties
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+admin.user=admin
+admin.password=adminadmin
+admin.host=localhost
+jmx.port=8686
+admin.domain=domain1
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/readme.txt b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/readme.txt
new file mode 100644
index 0000000..626ec14
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/readme.txt
@@ -0,0 +1,26 @@
+Automatic MBAPI Deployment Tests (Byron Nevins, 2004)
+
+These tests can deploy any arbitrary list of samples. That requires a slight amount of work
+on your part. What's documented here is the simplest possible tests.
+
+The tests will deploy one each of jar, rar, war, ear and one dir-deploy of a web module.
+The tests do 3 steps for each sample:
+
+1)undeploy (in case it already exists on the server or you killed these tests in the middle earlier)
+2)deploy
+3)undeploy
+
+The results of the tests are printed to the screen and are formatted and place in a text file:
+DeploymentTests.out
+
+You can pause in-between the (2) deploy and (3) undeploy steps in order to run the app, check
+domain.xml, etc. The pause is implemented with a (GUI) message box so don't try it on a dumb terminal
+or a telnet session, etc.
+
+Details:
+
+1) Since you're reading this you've already done step 1 which is to checkout appserv-tests tree!
+2) possibly edit DeploymentTests.properties. This is where you set admin username/password, targets,
+server, pauseAfterDeploy, etc. If you use the most common settings -- username/password="admin"/"adminadmin"
+server=localhost, target="server", no pause-after-deploy -- then you don't need to touch the file at all.
+3)asant runtests
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
new file mode 100755
index 0000000..c821847
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.bat
@@ -0,0 +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
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.sh b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.sh
new file mode 100755
index 0000000..5f1f452
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+#
+# This script assumes that the appserv-tests directory is a subdir of the main build-dir
+#
+
+s1as=/ee
+java=${s1as}/jdk/bin/java
+
+base=../../../../../..
+cp1="${base}/publish/JDK1.4_DBG.OBJ/admin-core/mbeanapi/lib/mbeanapi.jar"
+cp2="${base}/publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar"
+cp3="${base}/publish/JDK1.4_DBG.OBJ/rjmx-ri/jmxremote.jar"
+cp4="${base}/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build"
+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
new file mode 100755
index 0000000..8bef4c8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsUI.bat
@@ -0,0 +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
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsui.sh b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsui.sh
new file mode 100644
index 0000000..99489c3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsui.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+#
+# This script assumes that the appserv-tests directory is a subdir of the main build-dir
+#
+
+base=../../../../../..
+cp1="${base}/publish/JDK1.4_DBG.OBJ/admin-core/mbeanapi/lib/mbeanapi.jar"
+cp2="${base}/publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar"
+cp3="${base}/publish/JDK1.4_DBG.OBJ/rjmx-ri/jmxremote.jar"
+cp4="${base}/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build"
+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
new file mode 100644
index 0000000..9932aad
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/test.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Deployment Tester" default="all" basedir=".">
+
+<target name="init-common" depends="">
+<echo message="Loading props from file ${env.APS_HOME}/config.properties" level="verbose"/>
+ <property file="./config.properties"/>
+ <echo message="admin.user ${admin.user}" />
+ <echo message="admin.password ${admin.password}" />
+ <echo message="admin.host ${admin.host}" />
+ <echo message="jmx.port ${jmx.port}" />
+</target>
+
+<target name="all" depends="init-common">
+ <echo message="admin.password ${admin.password}" />
+ <property name="db.port" value="9092"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/README
new file mode 100644
index 0000000..f09c6b9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/README
@@ -0,0 +1,8 @@
+To run tests:
+
+cd mbeanapi/common
+ant all // compiles common files required
+
+cd mbeanapi/monitoring
+ant all
+
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
new file mode 100644
index 0000000..57cdf1d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<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
new file mode 100644
index 0000000..b9c6a25
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/run.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../../config/ee-common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ee-synchronization" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+ &testproperties;
+
+ <target name="all" depends="setup, run-tests, cleanup"/>
+
+ <target name="setup">
+ <antcall target="deploy-apps"/>
+ <antcall target="create-connection-pools"/>
+ </target>
+
+ <target name="deploy-apps">
+ <echo message="Deploying ${env.S1AS_HOME}/samples/ejb/stateless/apps/simple/stateless-simple.ear "/>
+ <antcall target="deploy-common">
+ <param name="deployed.app" value="${env.S1AS_HOME}/samples/ejb/stateless/apps/simple/stateless-simple.ear"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy-apps">
+ <echo message="Un deploying stateless-simple"/>
+ <antcall target="undeploy-common">
+ <param name="deployedapp.name" value="stateless-simple"/>
+ </antcall>
+ </target>
+
+ <target name="create-connection-pools">
+ <echo message="creating a connection pool mbeanapi-test-conn-pool"/>
+ <antcall target="create-connector-connpool">
+ <param name="ra.name" value="stateless-simple#jdbcra"/>
+ <param name="connection.defname" value="javax.sql.DataSource"/>
+ <param name="connector.conpool.name" value="mbeanapi-test-conn-pool"/>
+ </antcall>
+ </target>
+
+ <target name="remove-connection-pools">
+ <echo message="deleting connection pool mbeanapi-test-conn-pool"/>
+ <antcall target="delete-connector-connpool-common">
+ <param name="connector.conpool.name" value="mbeanapi-test-conn-pool"/>
+ </antcall>
+ </target>
+
+ <target name="run-tests" depends="setup">
+ <antcall target="ejb">
+ <param name="ejb.target" value="all"/>
+ </antcall>
+ <antcall target="web">
+ <param name="web.target" value="all"/>
+ </antcall>
+ <antcall target="jdbc">
+ <param name="jdbc.target" value="all"/>
+ </antcall>
+ <antcall target="misc">
+ <param name="misc.target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="ejb">
+ <record name="ejb.output" action="start"/>
+ <ant dir="ejb" target="${ejb.target}"/>
+ <record name="ejb.output" action="stop"/>
+ </target>
+
+ <target name="web">
+ <record name="web.output" action="start"/>
+ <ant dir="web" target="${web.target}"/>
+ <record name="web.output" action="stop"/>
+ </target>
+
+ <target name="jdbc">
+ <record name="jdbc.output" action="start"/>
+ <ant dir="jdbc" target="${jdbc.target}"/>
+ <record name="jdbc.output" action="stop"/>
+ </target>
+
+ <target name="misc">
+ <record name="misc.output" action="start"/>
+ <ant dir="misc" target="${misc.target}"/>
+ <record name="misc.output" action="stop"/>
+ </target>
+
+ <target name="cleanup">
+ <antcall target="undeploy-apps"/>
+ <antcall target="remove-connection-pools"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
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
new file mode 100644
index 0000000..ba55e65
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/ConnectorMonitoring.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.mbeanapi.monitoring.connector;
+
+import com.sun.appserv.management.monitor.ConnectorConnectionPoolMonitor;
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.Collection;
+
+import com.sun.appserv.management.monitor.ApplicationMonitor;
+import com.sun.appserv.management.monitor.WebModuleMonitor;
+import com.sun.appserv.management.monitor.ServletMonitor;
+import com.sun.appserv.management.monitor.WebModuleVirtualServerMonitor;
+import com.sun.appserv.management.monitor.NativeWebCoreVirtualServerRequestMonitor;
+import com.sun.appserv.management.monitor.statistics.NativeWebCoreVirtualServerRequestStats;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+import com.sun.enterprise.admin.mbeanapi.common.AMXMonitoringTestBase;
+
+
+
+/**
+ * This test prints the statistics for ejb module and stateless bean
+ *
+ * ConnectorMonitoring</B>
+ *
+ * @author <a href=mailto:satish.viswanatham@sun.com>Satish Viswanatham</a>
+ * Date: Aug 24, 2004
+ * @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) :
+ "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 [" +
+ connMonitor.getName() + "]");
+ printStats(connMonitor.getStats().getStatistics());
+ }
+ /*
+ HTTPServiceMonitor httpService =
+ getServerRootMonitor(serverName).getHTTPServiceMonitor();
+ assert (httpService != null) : "The http service monitor is null!";
+ Map vsMap = httpService.getHTTPServiceVirtualServerMonitorMap();
+ assert (vsMap.size() > 0) : "The http service monitor map is empty!";
+ for(Iterator itr = vsMap.values().iterator(); itr.hasNext();) {
+ HTTPServiceVirtualServerMonitor vsMtr =
+ (HTTPServiceVirtualServerMonitor) vsMap.get(itr.next());
+ assert (vsMtr != null) : "The http virtual server monitor is null!";
+ NativeWebCoreVirtualServerRequestMonitor rMtr =
+ vsMtr.getNativeWebCoreVirtualServerRequestMonitor();
+ NativeWebCoreVirtualServerRequestStats wcStats =
+ rMtr.getNativeWebCoreVirtualServerRequestStats();
+ printStats(wcStats.getStatistics());
+ }
+ **/
+ }
+
+
+ /**
+ *
+ */
+ public static void main( final String[] args ) {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try {
+ ConnectorMonitoring connMtr = new ConnectorMonitoring(
+ System.getProperty("HOST", "hoyas.red.iplanet.com"),
+ Integer.parseInt(System.getProperty("PORT","8686")), args[0],
+ 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
new file mode 100644
index 0000000..2f0f1ec
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.properties
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+#
+# The environment variables for compiling and running the tests.
+#
+src.dir=
+
+#
+# Set location for jmx.jar either from install or build.
+#
+jmx.jar=
+
+#
+# Classpath dependent variables
+#
+module.publish.home=${src.dir}/publish/JDK1.4_DBG.OBJ
+mbeanapi.jar=${module.publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${module.publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmx-ri.jar=${module.publish.home}/jmx/lib/jmxri.jar
+jmx-remote.jar=${module.publish.home}/rjmx-ri/jmxremote.jar
+jmx-remote_optional.jar=${module.publish.home}/rjmx-ri/jmxremote_optional.jar
+appserv-commons.jar=${module.publish.home}/appserv-commons/lib/appserv-commons.jar
+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
+# null or "" then the default server instance "server" is assumed.
+#
+instance.name=server
+
+#
+# The application that the web module lives in. This is only relevant if the
+# web module to be tested is embedded within an application.
+#
+application.name=stateless-simple
+
+#
+# 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
new file mode 100644
index 0000000..c307117
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Monitoring tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${jmx.jar}"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${jmx-ri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ <pathelement location="${jmx-remote.jar}"/>
+ <pathelement location="${jmx-remote_optional.jar}"/>
+ <pathelement location="${appserv-commons.jar}"/>
+ <pathelement location="${mgmt-api.jar}"/>
+ <pathelement location="${jmx.jar}"/>
+ <pathelement location="build"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component">
+ <antcall target="connector-mtr-test"/>
+ </target>
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile-common -->
+ <target name="compile-common" depends="init">
+ <javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/common"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <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"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- EJB pool monitoring Test Case -->
+ <target name="connector-mtr-test">
+ <antcall target="test-common">
+ <param name="test.class"
+ value="com.sun.s1asdev.admin.mbeanapi.monitoring.connector.ConnectorMonitoring"/>
+ </antcall>
+ </target>
+
+ <target name="test-common">
+ <java classname="${test.class}" failonerror="true" fork="true">
+ <classpath>
+ <path refid="run.classpath"/>
+ </classpath>
+ <jvmarg value="-enableassertions"/>
+ <arg value="${instance.name}" />
+ <arg value="${application.name}" />
+ <arg value="${web.module.name}" />
+ </java>
+ </target>
+
+
+</project>
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
new file mode 100755
index 0000000..a9a5223
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/EJBMonitoring.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.mbeanapi.monitoring.ejb;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+
+import javax.management.j2ee.statistics.Statistic;
+import javax.management.j2ee.statistics.Stats;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.monitor.MonitoringRoot;
+import com.sun.appserv.management.monitor.ServerRootMonitor;
+import com.sun.appserv.management.monitor.ApplicationMonitor;
+import com.sun.appserv.management.monitor.EJBModuleMonitor;
+import com.sun.appserv.management.monitor.EJBMonitor;
+import com.sun.appserv.management.monitor.BeanPoolMonitor;
+import com.sun.appserv.management.monitor.BeanCacheMonitor;
+import com.sun.appserv.management.monitor.BeanMethodMonitor;
+import com.sun.appserv.management.monitor.MonitoringStats;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+
+
+/**
+ * This test print the statistics for ejb module and stateless bean
+ *
+ * EJBMonitoring</B>
+ *
+ * @author <a href=mailto:satish.viswanatham@sun.com>Satish Viswanatham</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.5 $
+ */
+public class EJBMonitoring {
+
+ private final DomainRoot mDomainRoot;
+
+ private String SERVER_NAME = "server";
+
+ //private String APP_NAME = "cmpcustomer1";
+ //private String APP_NAME = "bmp-simple";
+ private String APP_NAME = "stateless-simple";
+
+ private String STATELESS_EJB_NAME = "stateless-simpleEjb_jar";
+
+ public void testEJBPoolStats()
+ {
+ MonitoringRoot monitorRoot = mDomainRoot.getMonitoringRoot() ;
+ assert(monitorRoot !=null);
+ ServerRootMonitor svrRootMtr = (ServerRootMonitor) monitorRoot.
+ getServerRootMonitorMap(). get(SERVER_NAME);
+ Map appsMtrMgr = svrRootMtr.getApplicationMonitorMap();
+
+ ApplicationMonitor appMtr =
+ (ApplicationMonitor) appsMtrMgr.get(APP_NAME);
+
+ Map ejbMgr = appMtr.getEJBModuleMonitorMap();
+
+ Stats stats = null;
+ Statistic[] sts = null;
+
+ System.out.println(" size is " + ejbMgr.size());
+ Iterator itr = ejbMgr.values().iterator();
+
+ while (itr.hasNext()) {
+ Object tmp = itr.next();
+ System.out.println("Ejb is " + tmp);
+ EJBModuleMonitor beanMgr = (EJBModuleMonitor) tmp;
+
+ Map beans = beanMgr.getEJBMonitorMap();
+
+ Iterator it = beans.values().iterator();
+
+ while (it.hasNext()) {
+ EJBMonitor em = (EJBMonitor) it.next();
+ listStats(em);
+
+ Map methodMap = em.getBeanMethodMonitorMap();
+ itr = methodMap.values().iterator();
+
+ while (itr.hasNext()) {
+ Object o = itr.next();
+ System.out.println(
+ " Looking at stats for this method " + o);
+ BeanMethodMonitor bmm = (BeanMethodMonitor) o;
+ listStats(bmm);
+
+ }
+ }
+
+ BeanPoolMonitor bPool = beanMgr.getBeanPoolMonitor(
+ STATELESS_EJB_NAME);
+ if (bPool == null) {
+ System.out.println("Error: BeanPool monitor is null");
+ } else {
+ listStats(bPool);
+ }
+
+ BeanCacheMonitor bCache = beanMgr.getBeanCacheMonitor(
+ STATELESS_EJB_NAME);
+ if (bCache == null) {
+ System.out.println("Error: BeanCache monitor is null");
+ } else {
+ listStats(bCache);
+ }
+
+ }
+
+
+ }
+
+ public void listStats (MonitoringStats ms)
+ {
+ Stats stats = ms.getStats();
+ Statistic[] sts = stats.getStatistics();
+ printStats(sts);
+ }
+
+ public void printStats(Statistic[] stats)
+ {
+ if (stats == null)
+ return;
+
+ for ( int i=0; i < stats.length; i++)
+ {
+ printStat(stats[i]);
+ }
+
+ }
+
+ 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 "
+ + stat.getLastSampleTime() + " unit " + stat.getUnit());
+ }
+
+ public EJBMonitoring(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 );
+
+ mDomainRoot = ct.getDomainRoot();
+
+ }
+
+
+ public static void main( final String[] args )
+ {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try
+ {
+ EJBMonitoring ejbMtr = new EJBMonitoring(
+ System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER", "admin"),
+ System.getProperty("ADMIN_PASSWORD", "adminadmin"),
+ Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
+
+ ejbMtr.testEJBPoolStats();
+ }
+ catch( Throwable t )
+ {
+ ExceptionUtil.getRootCause( t ).printStackTrace();
+ }
+ }
+}
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
new file mode 100755
index 0000000..bb6166b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.properties
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+src.dir=.
+module.publish.home=../../../../../../${publish.home}
+mbeanapi.jar=${module.publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${module.publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmx-ri.jar=${module.publish.home}/jmx/lib/jmxri.jar
+jmx-remote.jar=${module.publish.home}/rjmx-ri/jmxremote.jar
+jmx-remote_optional.jar=${module.publish.home}/rjmx-ri/jmxremote_optional.jar
+appserv-commons.jar=${module.publish.home}/appserv-commons/lib/appserv-commons.jar
+mgmt-api.jar=${module.publish.home}/management-api/lib/management-api.jar
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.xml
new file mode 100755
index 0000000..322e1f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Monitoring tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${jmx-ri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ <pathelement location="${jmx-remote.jar}"/>
+ <pathelement location="${jmx-remote_optional.jar}"/>
+ <pathelement location="${appserv-commons.jar}"/>
+ <pathelement location="${mgmt-api.jar}"/>
+ <pathelement location="build"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component">
+ <antcall target="ejb-pool-mtr-test"/>
+ </target>
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- EJB pool monitoring Test Case -->
+ <target name="ejb-pool-mtr-test">
+ <antcall target="test-common">
+ <param name="test.class"
+ value="com.sun.s1asdev.admin.mbeanapi.monitoring.ejb.EJBMonitoring"/>
+ </antcall>
+ </target>
+
+ <target name="test-common">
+ <java classname="${test.class}" failonerror="true" fork="true">
+ <classpath>
+ <path refid="run.classpath"/>
+ </classpath>
+ <!--jvmarg value="-Dcom.sun.aas.instanceRoot=/tmp"/-->
+ </java>
+ </target>
+
+
+</project>
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
new file mode 100644
index 0000000..b067af8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/HTTPMonitoring.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.mbeanapi.monitoring.http;
+
+import com.sun.appserv.management.monitor.HTTPServiceMonitor;
+import com.sun.appserv.management.monitor.HTTPServiceVirtualServerMonitor;
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.Collection;
+
+import com.sun.appserv.management.monitor.ApplicationMonitor;
+import com.sun.appserv.management.monitor.WebModuleMonitor;
+import com.sun.appserv.management.monitor.ServletMonitor;
+import com.sun.appserv.management.monitor.WebModuleVirtualServerMonitor;
+import com.sun.appserv.management.monitor.NativeWebCoreVirtualServerRequestMonitor;
+import com.sun.appserv.management.monitor.statistics.NativeWebCoreVirtualServerRequestStats;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+import com.sun.enterprise.admin.mbeanapi.common.AMXMonitoringTestBase;
+
+
+
+/**
+ * This test prints the statistics for ejb module and stateless bean
+ *
+ * HTTPMonitoring</B>
+ *
+ * @author <a href=mailto:satish.viswanatham@sun.com>Satish Viswanatham</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.1 $
+ */
+public class HTTPMonitoring extends AMXMonitoringTestBase {
+
+ private String serverName;
+ private static String SERVLETS = " - SERVLETS -";
+ private static String VS = "VIRTUAL SERVER";
+
+ public HTTPMonitoring(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() {
+ HTTPServiceMonitor httpService =
+ getServerRootMonitor(serverName).getHTTPServiceMonitor();
+ assert (httpService != null) : "The http service monitor is null!";
+ Map vsMap = httpService.getHTTPServiceVirtualServerMonitorMap();
+ assert (vsMap.size() > 0) : "The http service monitor map is empty!";
+ for(Iterator itr = vsMap.values().iterator(); itr.hasNext();) {
+ HTTPServiceVirtualServerMonitor vsMtr =
+ (HTTPServiceVirtualServerMonitor) vsMap.get(itr.next());
+ assert (vsMtr != null) : "The http virtual server monitor is null!";
+ NativeWebCoreVirtualServerRequestMonitor rMtr =
+ vsMtr.getNativeWebCoreVirtualServerRequestMonitor();
+ NativeWebCoreVirtualServerRequestStats wcStats =
+ rMtr.getNativeWebCoreVirtualServerRequestStats();
+ printStats(wcStats.getStatistics());
+ }
+ }
+
+
+ /**
+ *
+ */
+ public static void main( final String[] args ) {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try {
+ HTTPMonitoring httpMtr = new HTTPMonitoring(
+ System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")), args[0],
+ 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
new file mode 100644
index 0000000..2f0f1ec
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.properties
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+#
+# The environment variables for compiling and running the tests.
+#
+src.dir=
+
+#
+# Set location for jmx.jar either from install or build.
+#
+jmx.jar=
+
+#
+# Classpath dependent variables
+#
+module.publish.home=${src.dir}/publish/JDK1.4_DBG.OBJ
+mbeanapi.jar=${module.publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${module.publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmx-ri.jar=${module.publish.home}/jmx/lib/jmxri.jar
+jmx-remote.jar=${module.publish.home}/rjmx-ri/jmxremote.jar
+jmx-remote_optional.jar=${module.publish.home}/rjmx-ri/jmxremote_optional.jar
+appserv-commons.jar=${module.publish.home}/appserv-commons/lib/appserv-commons.jar
+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
+# null or "" then the default server instance "server" is assumed.
+#
+instance.name=server
+
+#
+# The application that the web module lives in. This is only relevant if the
+# web module to be tested is embedded within an application.
+#
+application.name=stateless-simple
+
+#
+# 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
new file mode 100644
index 0000000..82c0cb5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Monitoring tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${jmx.jar}"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${jmx-ri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ <pathelement location="${jmx-remote.jar}"/>
+ <pathelement location="${jmx-remote_optional.jar}"/>
+ <pathelement location="${appserv-commons.jar}"/>
+ <pathelement location="${mgmt-api.jar}"/>
+ <pathelement location="${jmx.jar}"/>
+ <pathelement location="build"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component">
+ <antcall target="http-mtr-test"/>
+ </target>
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile-common -->
+ <target name="compile-common" depends="init">
+ <javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/common"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <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"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- EJB pool monitoring Test Case -->
+ <target name="http-mtr-test">
+ <antcall target="test-common">
+ <param name="test.class"
+ value="com.sun.s1asdev.admin.mbeanapi.monitoring.http.HTTPMonitoring"/>
+ </antcall>
+ </target>
+
+ <target name="test-common">
+ <java classname="${test.class}" failonerror="true" fork="true">
+ <classpath>
+ <path refid="run.classpath"/>
+ </classpath>
+ <jvmarg value="-enableassertions"/>
+ <arg value="${instance.name}" />
+ <arg value="${application.name}" />
+ <arg value="${web.module.name}" />
+ </java>
+ </target>
+
+
+</project>
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
new file mode 100644
index 0000000..a58467b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/JDBCMonitoring.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.mbeanapi.monitoring.jdbc;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+
+import javax.management.j2ee.statistics.Statistic;
+import javax.management.j2ee.statistics.Stats;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.monitor.MonitoringRoot;
+import com.sun.appserv.management.monitor.ServerRootMonitor;
+import com.sun.appserv.management.monitor.JDBCConnectionPoolMonitor;
+import com.sun.appserv.management.monitor.ConnectorConnectionPoolMonitor;
+import com.sun.appserv.management.monitor.MonitoringStats;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+
+
+/**
+ * This test print the statistics for jdbc and connector connection pools
+ *
+ * JDBCMonitoring</B>
+ *
+ * @author <a href=mailto:satish.viswanatham@sun.com>Satish Viswanatham</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.3 $
+ */
+public class JDBCMonitoring {
+
+ private static DomainRoot mDomainRoot;
+
+ private static String SERVER_NAME = "server";
+
+ public void testCCPoolStats( ServerRootMonitor svrRootMtr)
+ {
+
+ Map cpMtrMgr = svrRootMtr.getConnectorConnectionPoolMonitorMap();
+ 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);
+ }
+
+ }
+
+ public void testJDBCPoolStats( ServerRootMonitor svrRootMtr)
+ {
+
+ Map cpMtrMgr = svrRootMtr.getJDBCConnectionPoolMonitorMap();
+ System.out.println("jdbc connection pool size is " + cpMtrMgr.size());
+ Iterator itr = cpMtrMgr.values().iterator();
+ while (itr.hasNext()) {
+ Object o = itr.next();
+ System.out.println(" Connection pool is " + o);
+ JDBCConnectionPoolMonitor cPool = (JDBCConnectionPoolMonitor)o;
+ listStat(cPool);
+ }
+
+ }
+
+ public void listStat(MonitoringStats mtr)
+ {
+ if (mtr == null) {
+ System.out.println("Monitoring stats is null");
+ } else {
+ listStats(mtr);
+ }
+ }
+
+ public void listStats(MonitoringStats ms)
+ {
+ Stats stats = ms.getStats();
+ Statistic[] sts = stats.getStatistics();
+ printStats(sts);
+ }
+
+ public void printStats(Statistic[] stats)
+ {
+ if (stats == null)
+ return;
+
+ for ( int i=0; i < stats.length; i++)
+ {
+ printStat(stats[i]);
+ }
+
+ }
+
+ 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 "
+ + stat.getLastSampleTime() + " unit " + stat.getUnit());
+ }
+
+ public JDBCMonitoring(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 );
+
+ mDomainRoot = ct.getDomainRoot();
+
+ }
+
+
+ public static void main( final String[] args )
+ {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try
+ {
+ JDBCMonitoring jdbcMtr = new JDBCMonitoring(
+ System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER", "admin"),
+ System.getProperty("ADMIN_PASSWORD", "adminadmin"),
+ Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
+
+ MonitoringRoot monitorRoot = mDomainRoot.getMonitoringRoot() ;
+ assert(monitorRoot !=null);
+ ServerRootMonitor svrRootMtr = (ServerRootMonitor) monitorRoot.
+ getServerRootMonitorMap(). get(SERVER_NAME);
+
+ jdbcMtr.testJDBCPoolStats(svrRootMtr);
+ jdbcMtr.testCCPoolStats(svrRootMtr);
+ }
+ catch( Throwable t )
+ {
+ ExceptionUtil.getRootCause( t ).printStackTrace();
+ }
+ }
+}
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
new file mode 100644
index 0000000..bb6166b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.properties
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+src.dir=.
+module.publish.home=../../../../../../${publish.home}
+mbeanapi.jar=${module.publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${module.publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmx-ri.jar=${module.publish.home}/jmx/lib/jmxri.jar
+jmx-remote.jar=${module.publish.home}/rjmx-ri/jmxremote.jar
+jmx-remote_optional.jar=${module.publish.home}/rjmx-ri/jmxremote_optional.jar
+appserv-commons.jar=${module.publish.home}/appserv-commons/lib/appserv-commons.jar
+mgmt-api.jar=${module.publish.home}/management-api/lib/management-api.jar
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.xml
new file mode 100644
index 0000000..6afd09b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Monitoring tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${jmx-ri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ <pathelement location="${jmx-remote.jar}"/>
+ <pathelement location="${jmx-remote_optional.jar}"/>
+ <pathelement location="${appserv-commons.jar}"/>
+ <pathelement location="build"/>
+ <pathelement location="${mgmt-api.jar}"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component">
+ <antcall target="jdbc-mtr-test"/>
+ </target>
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- EJB pool monitoring Test Case -->
+ <target name="jdbc-mtr-test">
+ <antcall target="test-common">
+ <param name="test.class"
+ value="com.sun.s1asdev.admin.mbeanapi.monitoring.jdbc.JDBCMonitoring"/>
+ </antcall>
+ </target>
+
+ <target name="test-common">
+ <java classname="${test.class}" failonerror="true" fork="true">
+ <classpath>
+ <path refid="run.classpath"/>
+ </classpath>
+ <!--jvmarg value="-Dcom.sun.aas.instanceRoot=/tmp"/-->
+ </java>
+ </target>
+
+
+</project>
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
new file mode 100644
index 0000000..6b28d59
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/MiscMonitoring.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.mbeanapi.monitoring.misc;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+
+import javax.management.j2ee.statistics.Statistic;
+import javax.management.j2ee.statistics.Stats;
+
+import com.sun.appserv.management.DomainRoot;
+import com.sun.appserv.management.monitor.MonitoringRoot;
+import com.sun.appserv.management.monitor.ServerRootMonitor;
+import com.sun.appserv.management.monitor.JVMMonitor;
+import com.sun.appserv.management.monitor.TransactionServiceMonitor;
+import com.sun.appserv.management.monitor.HTTPServiceMonitor;
+import com.sun.appserv.management.monitor.ConnectionManagerMonitor;
+import com.sun.appserv.management.monitor.ThreadPoolMonitor;
+import com.sun.appserv.management.monitor.MonitoringStats;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+
+
+/**
+ * This test print the statistics for ejb module and stateless bean
+ *
+ * JDBCMonitoring</B>
+ *
+ * @author <a href=mailto:satish.viswanatham@sun.com>Satish Viswanatham</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.3 $
+ */
+public class MiscMonitoring {
+
+ 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: "
+ + "\n");
+
+ System.out.println("Thread PoolORB monitor map " + tpMap.size());
+
+ Iterator itr = tpMap.values().iterator();
+
+ while ( itr.hasNext()) {
+ Object o = itr.next();
+ System.out.println(" Looking at monitor " + o);
+
+ ThreadPoolMonitor tpm = (ThreadPoolMonitor) o;
+ listStats(tpm);
+ }
+ }
+
+ public void testORBStats(ServerRootMonitor svrRootMtr)
+ {
+ Map orbMap= svrRootMtr.getORBConnectionManagerMonitorMap();
+ System.out.println("\n" + "ORB Connection Manager Monitor Stats: "
+ + "\n");
+
+ System.out.println("ORB monitor map " + orbMap.size());
+
+ Iterator itr = orbMap.values().iterator();
+
+ while ( itr.hasNext()) {
+ Object o = itr.next();
+ System.out.println(" Looking at monitor " + o);
+
+ ConnectionManagerMonitor cm = (ConnectionManagerMonitor) o;
+ listStats(cm);
+ }
+ }
+
+ public void testJVMStats(ServerRootMonitor svrRootMtr)
+ {
+ JVMMonitor jvmMtr = svrRootMtr.getJVMMonitor();
+
+ System.out.println("\n" + "JVM Monitor Stats: " + "\n");
+ listStats(jvmMtr);
+ }
+
+ public void testTransactionServiceStats(ServerRootMonitor svrRootMtr)
+ {
+ TransactionServiceMonitor tsMtr =
+ svrRootMtr.getTransactionServiceMonitor();
+
+ System.out.println("\n" + "Transaction Service Monitor Stats: " + "\n");
+ listStats(tsMtr);
+ }
+
+ public void testHTTPServiceStats(ServerRootMonitor svrRootMtr)
+ {
+ HTTPServiceMonitor tsMtr = svrRootMtr.getHTTPServiceMonitor();
+
+ System.out.println("\n" + "File Cache Monitor Stats: " + "\n");
+ listStats(tsMtr.getFileCacheMonitor());
+ System.out.println("\n" + "DNS Monitor Stats: " + "\n");
+ listStats(tsMtr.getDNSMonitor());
+ System.out.println("\n" + "PWC Thread pool Monitor Stats: " + "\n");
+ listStats(tsMtr.getPWCThreadPoolMonitor());
+ System.out.println("\n" + "Connection queue Monitor Stats: " + "\n");
+ listStats(tsMtr.getConnectionQueueMonitor());
+ System.out.println("\n" + "Keep Alive Monitor Stats: " + "\n");
+ listStats(tsMtr.getKeepAliveMonitor());
+ }
+
+ public void listStats(MonitoringStats mtr)
+ {
+ if (mtr == null) {
+ System.out.println("Monitoring stats is null");
+ } else {
+ Stats stats = mtr.getStats();
+ Statistic[] sts = stats.getStatistics();
+ printStats(sts);
+ }
+ }
+
+ public void printStats(Statistic[] stats)
+ {
+ if (stats == null)
+ return;
+
+ for ( int i=0; i < stats.length; i++)
+ {
+ printStat(stats[i]);
+ }
+
+ }
+
+ 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 "
+ + stat.getLastSampleTime() + " unit " + stat.getUnit());
+ }
+
+ public MiscMonitoring(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 );
+
+ mDomainRoot = ct.getDomainRoot();
+
+ }
+
+
+ public static void main( final String[] args )
+ {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try
+ {
+ MiscMonitoring miscMtr = new MiscMonitoring(
+ System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")),
+ System.getProperty("ADMIN_USER", "admin"),
+ System.getProperty("ADMIN_PASSWORD", "adminadmin"),
+ Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
+
+ MonitoringRoot monitorRoot = mDomainRoot.getMonitoringRoot() ;
+ assert(monitorRoot !=null);
+ ServerRootMonitor svrRootMtr = (ServerRootMonitor) monitorRoot.
+ getServerRootMonitorMap(). get(SERVER_NAME);
+
+ miscMtr.testJVMStats(svrRootMtr);
+ miscMtr.testTransactionServiceStats(svrRootMtr);
+ miscMtr.testHTTPServiceStats(svrRootMtr);
+ miscMtr.testThreadPoolStats(svrRootMtr);
+ miscMtr.testORBStats(svrRootMtr);
+ }
+ catch( Throwable t )
+ {
+ ExceptionUtil.getRootCause( t ).printStackTrace();
+ }
+ }
+}
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
new file mode 100644
index 0000000..bb6166b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.properties
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+
+
+src.dir=.
+module.publish.home=../../../../../../${publish.home}
+mbeanapi.jar=${module.publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${module.publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmx-ri.jar=${module.publish.home}/jmx/lib/jmxri.jar
+jmx-remote.jar=${module.publish.home}/rjmx-ri/jmxremote.jar
+jmx-remote_optional.jar=${module.publish.home}/rjmx-ri/jmxremote_optional.jar
+appserv-commons.jar=${module.publish.home}/appserv-commons/lib/appserv-commons.jar
+mgmt-api.jar=${module.publish.home}/management-api/lib/management-api.jar
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.xml
new file mode 100644
index 0000000..1127060
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Monitoring tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${jmx-ri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ <pathelement location="${jmx-remote.jar}"/>
+ <pathelement location="${jmx-remote_optional.jar}"/>
+ <pathelement location="${appserv-commons.jar}"/>
+ <pathelement location="${mgmt-api.jar}"/>
+ <pathelement location="build"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component">
+ <antcall target="misc-mtr-test"/>
+ </target>
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- EJB pool monitoring Test Case -->
+ <target name="misc-mtr-test">
+ <antcall target="test-common">
+ <param name="test.class"
+ value="com.sun.s1asdev.admin.mbeanapi.monitoring.misc.MiscMonitoring"/>
+ </antcall>
+ </target>
+
+ <target name="test-common">
+ <java classname="${test.class}" failonerror="true" fork="true">
+ <classpath>
+ <path refid="run.classpath"/>
+ </classpath>
+ <!--jvmarg value="-Dcom.sun.aas.instanceRoot=/tmp"/-->
+ </java>
+ </target>
+
+
+</project>
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
new file mode 100644
index 0000000..8bb8735
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/WebMonitoring.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.mbeanapi.monitoring.web;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.Collection;
+
+import com.sun.appserv.management.monitor.ApplicationMonitor;
+import com.sun.appserv.management.monitor.ServletMonitor;
+import com.sun.appserv.management.monitor.WebModuleVirtualServerMonitor;
+
+import com.sun.appserv.management.util.misc.ExceptionUtil;
+
+import com.sun.appserv.management.util.stringifier.SmartStringifier;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryIniterImpl;
+import com.sun.appserv.management.util.stringifier.StringifierRegistryImpl;
+
+import com.sun.enterprise.admin.mbeanapi.common.AMXConnector;
+import com.sun.enterprise.admin.mbeanapi.common.AMXMonitoringTestBase;
+
+
+
+/**
+ * This test prints the statistics for ejb module and stateless bean
+ *
+ * WebMonitoring</B>
+ *
+ * @author <a href=mailto:satish.viswanatham@sun.com>Satish Viswanatham</a>
+ * Date: Aug 24, 2004
+ * @version $Revision: 1.7 $
+ */
+public class WebMonitoring extends AMXMonitoringTestBase {
+
+ private String serverName;
+ private static String SERVLETS = " - SERVLETS -";
+ private static String VS = "VIRTUAL SERVER";
+
+ public WebMonitoring(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(final String applicationName, final String webModule) {
+ if(isEmbeddedWebModule(applicationName, webModule)) {
+ testEmbeddedWebModules(getWebModules(applicationName));
+ } else {
+ testStandAloneWebModule(webModule);
+ }
+ }
+
+
+ /**
+ *
+ */
+ public void testStandAloneWebModule(final String webModuleName) {
+ Map webMap = getServerRootMonitor(serverName).
+ getWebModuleVirtualServerMonitorMap();
+ assert(webMap != null && webMap.size() > 0) : "FAILURE!";
+ testEmbeddedWebModules(webMap);
+ }
+
+
+ /**
+ *
+ */
+ public void testEmbeddedWebModules(final Map webModules) {
+ assert(webModules != null && webModules.size() > 0) :
+ "No web module monitors found! Make sure that the monitoring level " +
+ "is set to HIGH or LOW!!";
+ Iterator itr = webModules.values().iterator();
+ while(itr.hasNext()) {
+ WebModuleVirtualServerMonitor webMonitor = (WebModuleVirtualServerMonitor)itr.next();
+ 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 [" +
+ webMonitor.getName() + "]");
+ testWebModuleServlets(webMonitor.getServletMonitorMap());
+ }
+ }
+ }
+
+
+ /**
+ *
+ */
+ public void testWebModuleServlets(final Map servlets) {
+ printBlock(SERVLETS);
+ assert(servlets != null && servlets.size() > 0) :
+ "No servlet monitors found! Make sure that the monitoring level " +
+ "is set to HIGH or LOW!!";
+ Iterator itr = servlets.values().iterator();
+ while(itr.hasNext()) {
+ ServletMonitor sltMonitor = (ServletMonitor)itr.next();
+ System.out.println(" |");
+ System.out.println(" |");
+ System.out.println(" ---- SERVLET [" + sltMonitor.getName() + "]");
+ listStats(sltMonitor);
+ }
+ }
+
+
+ /**
+ *
+ */
+ private Map getWebModules(final String applicationName) {
+ return getApplicationMonitor(serverName, applicationName).
+ getWebModuleVirtualServerMonitorMap();
+ }
+
+
+ /**
+ *
+ */
+ private boolean isEmbeddedWebModule(final String applicationName,
+ final String webModuleName) {
+ final ApplicationMonitor appMtr =
+ getApplicationMonitor(serverName, applicationName);
+ final Map webMgr = appMtr.getWebModuleVirtualServerMonitorMap();
+ return (webMgr.get(webModuleName) != null
+ || "".equals(webMgr.get(webModuleName)));
+ }
+
+
+
+ /**
+ *
+ */
+ public static void main( final String[] args ) {
+ new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
+
+ try {
+ WebMonitoring webMtr = new WebMonitoring(
+ System.getProperty("HOST", "localhost"),
+ Integer.parseInt(System.getProperty("PORT","8686")), args[0],
+ 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]);
+ }
+
+ } 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
new file mode 100644
index 0000000..2f0f1ec
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.properties
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+#
+# The environment variables for compiling and running the tests.
+#
+src.dir=
+
+#
+# Set location for jmx.jar either from install or build.
+#
+jmx.jar=
+
+#
+# Classpath dependent variables
+#
+module.publish.home=${src.dir}/publish/JDK1.4_DBG.OBJ
+mbeanapi.jar=${module.publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
+mbeanapi-impl.jar=${module.publish.home}/admin/mbeanapi-impl/lib/mbeanapi-impl.jar
+jmx-ri.jar=${module.publish.home}/jmx/lib/jmxri.jar
+jmx-remote.jar=${module.publish.home}/rjmx-ri/jmxremote.jar
+jmx-remote_optional.jar=${module.publish.home}/rjmx-ri/jmxremote_optional.jar
+appserv-commons.jar=${module.publish.home}/appserv-commons/lib/appserv-commons.jar
+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
+# null or "" then the default server instance "server" is assumed.
+#
+instance.name=server
+
+#
+# The application that the web module lives in. This is only relevant if the
+# web module to be tested is embedded within an application.
+#
+application.name=stateless-simple
+
+#
+# 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
new file mode 100644
index 0000000..776cfd5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="MBeanApi Monitoring tests" default="all" basedir=".">
+
+<property name="testsRoot" value="."/>
+<property name="build" value="${testsRoot}/build"/>
+<property file="./bootstrap.subcomponent.properties"/>
+<property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+<property file="./../../../../../../../appserv/build.properties"/>
+<property file="./build.properties"/>
+
+
+ <path id="compile.classpath">
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="${jmx.jar}"/>
+ </path>
+
+ <path id="run.classpath">
+ <pathelement location="${jmx-ri.jar}"/>
+ <pathelement location="${mbeanapi.jar}"/>
+ <pathelement location="${mbeanapi-impl.jar}"/>
+ <pathelement location="../../common/build"/>
+ <pathelement location="${jmx-remote.jar}"/>
+ <pathelement location="${jmx-remote_optional.jar}"/>
+ <pathelement location="${appserv-commons.jar}"/>
+ <pathelement location="${mgmt-api.jar}"/>
+ <pathelement location="${jmx.jar}"/>
+ <pathelement location="build"/>
+ </path>
+
+ <target name="init" description="MBeanapi Tests initialization">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <!-- all -->
+ <target name="all" depends="build"
+ description="Build entire component">
+ <antcall target="web-mtr-test"/>
+ </target>
+
+ <!-- build -->
+ <target name="build" depends="compile"
+ description="Build entire component" />
+
+ <!-- compile-common -->
+ <target name="compile-common" depends="init">
+ <javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/common"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <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"
+ destdir="${build}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ source="${javac.source}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath refid="compile.classpath"/>
+ <include name="**/*.java"/>
+ </javac>
+ </target>
+
+ <!-- clean -->
+ <target name="clean" description="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- EJB pool monitoring Test Case -->
+ <target name="web-mtr-test">
+ <antcall target="test-common">
+ <param name="test.class"
+ value="com.sun.s1asdev.admin.mbeanapi.monitoring.web.WebMonitoring"/>
+ </antcall>
+ </target>
+
+ <target name="test-common">
+ <java classname="${test.class}" failonerror="true" fork="true">
+ <classpath>
+ <path refid="run.classpath"/>
+ </classpath>
+ <jvmarg value="-enableassertions"/>
+ <arg value="${instance.name}" />
+ <arg value="${application.name}" />
+ <arg value="${web.module.name}" />
+ </java>
+ </target>
+
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/LICENSE.md b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/LICENSE.md
new file mode 100644
index 0000000..e0358f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/LICENSE.md
@@ -0,0 +1,29 @@
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/README.html b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/README.html
new file mode 100644
index 0000000..7aef608
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/README.html
@@ -0,0 +1,136 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+ <title>README--AMX SDK</title>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <meta name="description"
+ content="Starting place for Appserver Management Extensions (AMX) SDK">
+</head>
+<body bgcolor="#ffffff">
+<div style="text-align: center;"><big><big><big><span
+ style="font-weight: bold;"><small>Appserver Management Extensions
+(AMX) README</small> <br>
+</span></big></big></big>
+<div style="text-align: left;"><br>
+<small><span style="font-style: italic;">Last updated: 27 January 2004</span></small><br>
+<br>
+<big style="font-weight: bold;">Introduction<br>
+<br>
+</big>Sun's Java Enterprise System Appserver, and the J2EE SDK both now
+include an Java Management Extensions (JMX) MBean API for
+management/configuration and monitoring of the server. This API
+is denoted <span style="font-weight: bold;">A</span>ppserver <span
+ style="font-weight: bold;">M</span>anagement E<span
+ style="font-weight: bold;">X</span>tensions (AMX), <span
+ style="font-style: italic;"><span style="font-weight: bold;">A</span>ppserver
+</span>because
+it's for the Appserver, <span style="font-style: italic;"><span
+ style="font-weight: bold;">M</span>anagement </span>because it covers
+configuration,
+management, and monitoring, <span style="font-style: italic;">E</span><span
+ style="font-weight: bold; font-style: italic;">x</span><span
+ style="font-style: italic;">tensions </span>because the APIs go well
+beyond the J2EE Management (JSR 77) specification.<big
+ style="font-weight: bold;"><br>
+</big><br>
+<big><span style="font-weight: bold;">Contents</span></big><br>
+<br>
+The SDK consists of the following:<br>
+<br>
+<table cellpadding="2" cellspacing="2" border="1"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top; font-weight: bold;"><a
+ href="./amx-javadoc">Item<br>
+ </a> </td>
+ <td style="vertical-align: top; font-weight: bold;"><a
+ href="./amx-javadoc">Description<br>
+ </a> </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><span
+ style="font-family: monospace;">amx-client.jar</span><br>
+ </td>
+ <td style="vertical-align: top;">jar file containing the <a
+ href="./amx-javadoc/index.html">AMX
+APIs</a>. Tthe contents of this jar are almost entirely interfaces, but
+there are some concrete classes as needed to support clients.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a
+ href="./amx-javadoc/index.html"><span style="font-family: monospace;">amx-javadoc/</span></a><br
+ style="font-family: monospace;">
+ <a href="./samples-javadoc/index.html"><span
+ style="font-family: monospace;">samples-javadoc/</span></a><br>
+ </td>
+ <td style="vertical-align: top;">Javadoc for the AMX APIs, and
+the sample code, respectively.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;"><a
+ href="./samples/amx">samples/amx</a><br>
+ </td>
+ <td style="vertical-align: top;">source code for the samples<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;"><a
+ href="./run-samples.sh">run-samples.sh</a><br>
+ <a href="./run-samples.bat">run-samples.bat</a><br>
+ </td>
+ <td style="vertical-align: top;">Scripts to run the sample
+command line.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a href="./SampleMain.properties"><span
+ style="font-family: monospace;">SampleMain.properties</span></a><br>
+ </td>
+ <td style="vertical-align: top;">Properties file used by the
+sample command line. <span style="font-weight: bold;">Edit this
+file</span> appropriately for your target server.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><span
+ style="font-family: monospace;">jmxri.jar</span><br
+ style="font-family: monospace;">
+ <span style="font-family: monospace;">javax77.jar</span><br
+ style="font-family: monospace;">
+ <span style="font-family: monospace;">jmxremote.jar</span><br>
+ </td>
+ <td style="vertical-align: top;">Required jar files containing
+JMX 1.2, J2EE Management (JSR 77) and JMX Remote (JSR 160)
+classes. The contents of these jar files is required. Note
+that JMX and JMX Remote are included in JDK 1.5, but not in JDK 1.4<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<br>
+</div>
+</div>
+The source code is already compiled. Edit <a
+ href="./SampleMain.properties">SampleMain.properties</a>
+appropriately, and run the sample script.<br>
+<br>
+<br>
+<br>
+</body>
+</html>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/README.md b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/README.md
new file mode 100644
index 0000000..766dda6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/README.md
@@ -0,0 +1 @@
+This directory contains sample code and hence files within this directory and below are covered under EDL 1.0.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/SampleMain.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/SampleMain.properties
new file mode 100644
index 0000000..253d448
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/SampleMain.properties
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+#
+# This properties file is ready by samples.amx.SampleMain to learn
+# to which server it should connect.
+#
+# If you aren't sure of the AMX port and/or whether TLS/SSL is enabled,
+# open domain.xml and look at the <jmx-connector> element within
+# the <admin-service> element:#
+# <jmx-connector ... port="8686" security-enabled="false"/>
+#
+
+# the hostname or IP address of the server's host
+connect.host=localhost
+
+# the AMX RMI port, 8686 by default. NOT the admin GUI port
+connect.port=8686
+
+# the admin user name
+connect.user=admin
+
+# the admin user password
+connect.password=admin123
+
+# set to true if using TLS for admin RMI, false otherwise
+# for PE/RI, useTLS should be false by default, for EE it should be true
+connect.useTLS=true
+
+# a truststore file to store the server certificate (if useTLS is on)
+connect.truststore=sample-truststore
+
+# password to use for the truststore file
+connect.truststorePassword=changeme
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
new file mode 100644
index 0000000..6464a9a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/DeployNotificationListener.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package com.sun.appserv.management.sample;
+
+import java.util.Map;
+
+import javax.management.NotificationListener;
+import javax.management.Notification;
+
+import com.sun.appserv.management.deploy.DeploymentStatus;
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import com.sun.appserv.management.deploy.DeploymentSupport;
+import com.sun.appserv.management.deploy.DeploymentProgress;
+
+
+/**
+ A JMX NotificationListener for deployment.
+ */
+public final class DeployNotificationListener
+ 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() + "%" );
+ }
+ }
+ }
+}
+
+
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
new file mode 100644
index 0000000..c9173f6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/LineReaderImpl.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/*
+ * $Header: /m/jws/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/LineReaderImpl.java,v 1.1 2004/10/12 22:49:10 llc Exp $
+ * $Revision: 1.1 $
+ * $Date: 2004/10/12 22:49:10 $
+ */
+
+package com.sun.appserv.management.sample;
+
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+/**
+ 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 );
+ }
+
+ 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
new file mode 100644
index 0000000..9402a08
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleHandshakeCompletedListener.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package com.sun.appserv.management.sample;
+
+import javax.net.ssl.HandshakeCompletedEvent;
+
+import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
+
+
+/**
+ 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
+{
+ 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
new file mode 100644
index 0000000..65ca94f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleListener.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package com.sun.appserv.management.sample;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Collections;
+
+import javax.management.NotificationListener;
+import javax.management.Notification;
+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
+ */
+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( "" );
+ }
+
+
+
+}
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
new file mode 100644
index 0000000..75a8c5b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.java
@@ -0,0 +1,410 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package com.sun.appserv.management.sample;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Properties;
+
+import javax.management.remote.JMXConnector;
+import javax.management.InstanceNotFoundException;
+
+import com.sun.appserv.management.DomainRoot;
+
+import com.sun.appserv.management.base.AMX;
+import com.sun.appserv.management.base.XTypes;
+
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.TrustStoreTrustManager;
+import com.sun.appserv.management.client.AppserverConnectionSource;
+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.
+ */
+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 );
+
+ 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/SampleMain.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.properties
new file mode 100644
index 0000000..eca0244
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.properties
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+connect.host=localhost
+connect.port=8686
+connect.user=admin
+connect.password=admin123
+connect.truststore=sample-truststore
+connect.truststorePassword=changeme
+connect.useTLS=true
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
new file mode 100644
index 0000000..5bf789d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleUtil.java
@@ -0,0 +1,295 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package com.sun.appserv.management.sample;
+
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import javax.management.Attribute;
+import javax.management.Notification;
+import javax.management.MBeanServerNotification;
+import javax.management.AttributeChangeNotification;
+
+
+/**
+ 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() );
+ }
+
+
+
+ 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
new file mode 100644
index 0000000..9c806f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/Samples.java
@@ -0,0 +1,993 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package com.sun.appserv.management.sample;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.management.Attribute;
+import javax.management.Notification;
+import javax.management.AttributeChangeNotification;
+import javax.management.NotificationListener;
+import javax.management.ListenerNotFoundException;
+import javax.management.ObjectName;
+import javax.management.NotificationFilter;
+import javax.management.MBeanServerConnection;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanServerNotification;
+
+import com.sun.appserv.management.DomainRoot;
+
+import com.sun.appserv.management.base.AMX;
+import com.sun.appserv.management.base.XTypes;
+import com.sun.appserv.management.base.Container;
+import com.sun.appserv.management.base.Sample;
+import com.sun.appserv.management.base.Util;
+import com.sun.appserv.management.base.Extra;
+import com.sun.appserv.management.base.StdAttributesAccess;
+import com.sun.appserv.management.base.QueryMgr;
+
+import com.sun.appserv.management.client.AppserverConnectionSource;
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
+
+import com.sun.appserv.management.j2ee.J2EEDomain;
+import com.sun.appserv.management.j2ee.J2EEServer;
+
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import com.sun.appserv.management.deploy.DeploymentStatus;
+import com.sun.appserv.management.deploy.DeploymentProgress;
+import com.sun.appserv.management.deploy.DeploymentSupport;
+
+import com.sun.appserv.management.monitor.MonitoringDottedNames;
+import com.sun.appserv.management.monitor.JMXMonitorMgr;
+import com.sun.appserv.management.monitor.AMXStringMonitor;
+
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.config.HTTPServiceConfig;
+import com.sun.appserv.management.config.ConfigConfig;
+import com.sun.appserv.management.config.ConfigDottedNames;
+import com.sun.appserv.management.config.StandaloneServerConfig;
+import com.sun.appserv.management.config.ModuleMonitoringLevelsConfig;
+import com.sun.appserv.management.config.ModuleMonitoringLevelValues;
+import com.sun.appserv.management.config.PropertiesAccess;
+
+
+/**
+ Main class demonstrating a variety of MBean API (AMX) usages.
+ */
+public final class Samples
+{
+ private final DomainRoot mDomainRoot;
+
+ 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" );
+
+
+ // 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
new file mode 100644
index 0000000..8a9398d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/create-amx-sample.sh
@@ -0,0 +1,186 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# !/bin/sh
+# Last updated 27 October 2004, Lloyd L Chambers
+# Use this script to generate the sample code and javadoc to go with it
+#
+
+
+# return the full path for any input directory name--partial, relative or full
+# 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
+
+ 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
+}
+
+
+#determine directory of this script
+fullpath `dirname $0`
+SCRIPT_DIR=$FULLPATH_RESULT
+
+# 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
+else
+ CPS=$CLASSPATH_SEPARATOR
+fi
+
+
+CPS=;
+DEV_ROOT=$SCRIPT_DIR/../../../../../../../../../../../..
+fullpath `dirname $DEV_ROOT`
+DEV_ROOT=$FULLPATH_RESULT
+
+echo SCRIPT_DIR=$SCRIPT_DIR
+echo DEV_ROOT=$DEV_ROOT
+
+PUBLISH="$DEV_ROOT/publish/JDK1.4_DBG.OBJ"
+echo PUBLISH=$PUBLISH
+
+LIB="$PUBLISH/packager/lib"
+echo LIB=$LIB
+
+JMX_RI_JAR=$PUBLISH/jmx/lib/jmxri.jar
+JMX_REMOTE_JAR=$PUBLISH/rjmx-ri/jmxremote.jar
+JAVAX77_JAR=$PUBLISH/management-api/lib/management-api.jar
+
+# the jar built by gmake in admin-core/mbeanapi
+# contains extra com.sun.enterprise stuff
+MBEANAPI_BUILD_JAR=$PUBLISH/admin-core/mbeanapi/lib/mbeanapi.jar
+AMX_CLIENT_JAR_NAME=amx-client.jar
+
+SAMPLE_DIR=amx-sample
+
+STD_JARS="$JMX_RI_JAR;$JMX_REMOTE_JAR;$JAVAX77_JAR"
+JAR_CP="$STD_JARS;$LIB/appserv-rt.jar;$MBEANAPI_BUILD_JAR;$LIB/j2ee.jar"
+
+
+SRC_CLIENT="$DEV_ROOT/admin-core/mbeanapi/src/java"
+#SRC_IMPL="$DEV_ROOT/admin/mbeanapi-impl/src/java"
+#SRC_TESTS="$DEV_ROOT/admin/mbeanapi-impl/tests"
+SRC_OTHER=
+SRC_SAMPLE="$DEV_ROOT/appserv-tests/devtests/ee/admin/mbeanapi/samples/"
+SRC="$SRC_CLIENT;$SRC_SAMPLE"
+SRC="$SRC;$SRC_OTHER"
+
+LINK_URL=http://java.sun.com/j2se/1.5.0/docs/api/
+SUB_PACKAGES=com.sun.appserv.management
+SUB_PACKAGES="$SUB_PACKAGES"
+# SUB_PACKAGES="$SUB_PACKAGES:com.sun.enterprise.management"
+SAMPLE_PKG=com.sun.appserv.management.sample
+
+NO_QUALIFIER="-noqualifier java.lang:java.io:java.util:javax.management:javax.management.remote"
+SHARED_OPTIONS="-breakiterator -sourcepath $SRC -link $LINK_URL -classpath $JAR_CP -source 1.4 $NO_QUALIFIER"
+
+
+echo STD_JARS=$STD_JARS
+echo JAR_CPS=$JAR_CP
+echo SRC_CLIENT=$SRC_CLIENT
+echo SRC_IMPL=$SRC_IMPL
+echo SRC_SAMPLE=$SRC_SAMPLE
+echo SRC=$SRC
+echo LINK_URL=$LINK_URL
+echo SUB_PACKAGES=$SUB_PACKAGES
+echo SAMPLE_PKG=$SAMPLE_PKG
+echo ""
+echo NO_QUALIFIER=$NO_QUALIFIER
+echo SHARED_OPTIONS=$SHARED_OPTIONS
+
+rm -rf $SAMPLE_DIR
+mkdir $SAMPLE_DIR
+
+
+# Extract just com.sun.appserv.management from MBEANAPI_BUILD_JAR
+echo "Creating amx-client jar"
+jar xf $MBEANAPI_BUILD_JAR
+# get rid of stuff we don't want
+# make a new jar excluding com.sun.enterprise
+rm -rf META-INF com/sun/enterprise
+jar cf $AMX_CLIENT_JAR_NAME com/
+mv $AMX_CLIENT_JAR_NAME $SAMPLE_DIR
+rm -rf com
+
+
+# remove existing javadoc dirs
+# generate all the javadoc without source-code links
+echo ""
+echo "--- Generating javadoc for AMX ---"
+echo ""
+javadoc -d amx-javadoc -protected -subpackages $SUB_PACKAGES $SHARED_OPTIONS
+
+
+# generate just the sample javadoc, with source-code links
+echo ""
+echo "--- Generating javadoc for Sample code ---"
+echo ""
+ARGS="-linksource -d amx-javadoc.sample -private -subpackages $SAMPLE_PKG $SHARED_OPTIONS"
+javadoc $ARGS
+rm -rf amx-javadoc/com/sun/appserv/management/sample
+cp -r amx-javadoc.sample/src-html amx-javadoc
+mv amx-javadoc.sample/com/sun/appserv/management/sample amx-javadoc/com/sun/appserv/management/sample
+mv amx-javadoc $SAMPLE_DIR
+rm -rf amx-javadoc.sample
+
+# copy sample code
+STEMP=com/sun/appserv/management/sample
+mkdir -p $SAMPLE_DIR/$STEMP
+cp $SRC_SAMPLE/$STEMP/*.java $SAMPLE_DIR/$STEMP
+
+cp $SRC_SAMPLE/com/sun/appserv/management/sample/SampleMain.properties $SAMPLE_DIR
+
+cp $JMX_RI_JAR $JMX_REMOTE_JAR $SAMPLE_DIR
+cp $JAVAX77_JAR $SAMPLE_DIR/javax77.jar
+cp run-samples.bat run-samples.sh $SAMPLE_DIR
+
+echo ""
+echo "--- Compiling sample code ---"
+
+javac -classpath "${SAMPLE_DIR}/${AMX_CLIENT_JAR_NAME};$STD_JARS" -sourcepath $SAMPLE_DIR $SAMPLE_DIR/com/sun/appserv/management/sample/*.java
+
+jar cf ${SAMPLE_DIR}.jar $SAMPLE_DIR
+
+echo DONE
+
+
+
+
+
+
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/package.html b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/package.html
new file mode 100644
index 0000000..91f32a5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/package.html
@@ -0,0 +1,257 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+ <title>Appserver MBean API Sample Guide</title>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+</head>
+<body bgcolor="#FFFFFF">
+<div style="text-align: center;">
+ <div align="left"><big><big><span
+ style="font-weight: bold;">Appserver MBean API (AMX) Sample Guide</span></big></big><br>
+ </div>
+</div>
+<p> <br>
+ This document gives an overview on using the Appserver MBean API (<span
+ style="font-weight: bold;">AMX</span>). Sample source code may be viewed
+ directly by clicking on individual method names within the Javadoc. Nearly all
+ the source code is contained within <a href="./Samples.html">Samples</a>.</p>
+<p>Please see <span style="font-weight: bold;"><a
+ href="../package-summary.html#SystemRequirements">System Requirements</a></span>
+ before using the samples.<br>
+ <span style="font-weight: bold;"> </span><br>
+ <br style="font-weight: bold;">
+ <big> <span style="font-weight: bold;"><font size="+1">Running the sample command
+ line</font></span></big><a name="Connecting" style="font-weight: bold;"></a><br>
+ <br>
+ You can invoke the sample code program, a simple command-line interface as follows:<br>
+ <br>
+ <span style="font-family: monospace;">java -classpath <span
+ style="font-style: italic;">classpath </span>com.sun.appserv.management.sample.SampleMain
+ SampleMain.properties</span><br>
+ <br>
+ See <a
+ href="./SampleMain.html">SampleMain.connect()</a> for an example of how to connect
+ to the server. If a properties file is not specified it uses default values
+ for the above items. If specified, the properties file uses the following
+ format:<br>
+ <br>
+ <span style="font-family: monospace;">connect.host=<span
+ style="font-weight: bold;">localhost</span></span><br
+ style="font-family: monospace;">
+ <span style="font-family: monospace;">connect.port=<span
+ style="font-weight: bold;">8686</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.user=<span
+ style="font-weight: bold;">admin</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.password=<span
+ style="font-weight: bold;">admin123</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.truststore=<span
+ style="font-weight: bold;">~/.keystore</span></span><br
+ style="font-family: monospace;">
+ <span style="font-family: monospace;">connect.truststorePassword=<span
+ style="font-weight: bold;">changeme</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.useTLS=<span
+ style="font-weight: bold;">false</span><br style="font-weight: bold;">
+ </span> <br>
+ Note that in an EE build, TLS is generally enabled, so <span
+ style="font-family: monospace;">useTLS </span>must be true and the trustStore
+ and truststorePassword are required. Connections will fail (or hang)
+ if <span style="font-family: monospace;">useTLS </span>is not set appropriately.<br>
+ <br>
+ Once you have connected to the DAS via an <a
+ href="../client/AppserverConnectionSource.html">AppserverConnectionSource</a>
+ call <a
+ href="../client/AppserverConnectionSource.html#getDomainRoot()">getDomainRoot()</a>
+ to get an instance of <a
+ href="../DomainRoot.html">DomainRoot</a>. All further interfaces may be
+ obtained from <a
+ href="../DomainRoot.html">DomainRoot</a>, directly or indirectly.<br>
+ <br>
+ <big><span style="font-weight: bold;"><font size="+1">Viewing and running the
+ sample code</font></span></big><a name="ViewingAndRunning" style="font-weight: bold;"></a><span
+ style="font-family: monospace;"><br>
+ <br>
+ </span>Javadoc for all samples is found in <a
+ href="./Samples.html">Samples.java</a>. Each method is accompanied by Javadoc.
+ While viewing the Javadoc for a particular method (not just the summary of all
+ methods), clicking on the method name displays the source code for that method.<br>
+ <br>
+ You may wish to run the SampleMain command line interface while viewing the
+ Javadoc. The available samples are summarized here:<br>
+ <br>
+</p>
+<table cellpadding="2" cellspacing="2" border="1"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top; font-weight: bold;">SampleMain
+command name<br>
+ </td>
+ <td style="vertical-align: top; font-weight: bold;">Samples.java
+method name<br>
+ </td>
+ <td style="vertical-align: top; font-weight: bold;">Discussion<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">demo-jmx-monitor<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#demoJMXMonitor()">demoJMXMonitor()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates the use of a <span
+ style="font-family: monospace;">javax.management.monitor</span> MBean to be notified
+ of changes in the value of an <span style="font-family: monospace;">javax.management.Attribute</span>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">deploy<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#deploy(java.io.File)">deploy()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates how to deploy an archive using
+ the low-level API.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">list-attributes<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#displayAllAttributes(com.sun.appserv.management.base.AMX)">displayAllAttributes()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates how to access and display available
+ Attributes on a <a
+ href="../base/AMX.html">AMX</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">list<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#handleList()">handleList()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates how to access various types
+ of <a
+ href="../base/AMX.html">AMX</a> by obtaining a Map and then displaying it.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">list-properties<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#displayAllProperties()">displayAllProperties()</a><br>
+ </td>
+ <td style="vertical-align: top;">Display all properties found on all <a
+ href="../base/AMX.html">AMX</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">query<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#demoQuery()">demoQuery()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrate how to use the <a
+ href="../base/QueryMgr.html">QueryMgr</a> facilities.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">quit<br>
+ </td>
+ <td style="vertical-align: top;">-<br>
+ </td>
+ <td style="vertical-align: top;"><br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">run-all<br>
+ </td>
+ <td style="vertical-align: top;">-<br>
+ </td>
+ <td style="vertical-align: top;">Runs all samples that do not require additional
+ arguments.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">start-server<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#startServer(java.lang.String)">startServer(String serverName)</a><br>
+ </td>
+ <td style="vertical-align: top;">Starts a server.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">stop-server<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#stopServer(java.lang.String)">stopServer(</a><a
+ href="file:///H:/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample./Samples.html#startServer(java.lang.String)">String
+ serverName</a><a
+ href="./Samples.html#stopServer(java.lang.String)">)</a><br>
+ </td>
+ <td style="vertical-align: top;">Stops a server.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">show-hierarchy<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#displayHierarchy(java.lang.String)">displayHierarchy()</a>
+ </td>
+ <td style="vertical-align: top;">Displays the hierarchy of all available <a
+ href="../base/AMX.html">AMX</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">set-monitoring<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#setMonitoring(java.lang.String, java.lang.String)">setMonitoring(
+ configName, level)</a><br>
+ </td>
+ <td style="vertical-align: top;">Sets the monitoring state for all available
+ modules.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">undeploy<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#undeploy(java.lang.String)">undeploy(String moduleName)</a><br>
+ </td>
+ <td style="vertical-align: top;">Undeploys a deployed module.<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<br>
+<span style="font-family: monospace;"><br>
+<br>
+<br>
+</span><br>
+<br>
+<br>
+<br>
+<br>
+<br>
+</body>
+</html>
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
new file mode 100755
index 0000000..1017e00
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.bat
@@ -0,0 +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
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.sh b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.sh
new file mode 100644
index 0000000..98383de
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.sh
@@ -0,0 +1,16 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# These jar files must be present!
+export STD_JARS="jmxri.jar;jmxremote.jar;javax77.jar"
+export 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
new file mode 100644
index 0000000..037448b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/create-amx-sdk.sh
@@ -0,0 +1,181 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# !/bin/sh
+# Last updated 27 January 2005, Lloyd Chambers
+# Use this script to generate AMX SDK
+#
+
+
+# return the full path for any input directory name--partial, relative or full
+# 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
+
+ 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
+}
+
+
+#determine directory of this script
+fullpath `dirname $0`
+SCRIPT_DIR=$FULLPATH_RESULT
+
+# 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
+else
+ CPS=$CLASSPATH_SEPARATOR
+fi
+
+
+CPS=;
+DEV_ROOT=$SCRIPT_DIR/../../../../../../..
+fullpath `dirname $DEV_ROOT`
+DEV_ROOT=$FULLPATH_RESULT
+
+echo SCRIPT_DIR=$SCRIPT_DIR
+echo DEV_ROOT=$DEV_ROOT
+
+PUBLISH="$DEV_ROOT/publish/JDK1.4_DBG.OBJ"
+echo PUBLISH=$PUBLISH
+
+LIB="$PUBLISH/packager/lib"
+echo LIB=$LIB
+
+JMX_RI_JAR=$PUBLISH/jmx/lib/jmxri.jar
+JMX_REMOTE_JAR=$PUBLISH/rjmx-ri/jmxremote.jar
+JAVAX77_JAR=$PUBLISH/management-api/lib/management-api.jar
+
+# the jar built by gmake in admin-core/mbeanapi
+# contains extra com.sun.enterprise stuff
+MBEANAPI_BUILD_JAR=$PUBLISH/admin-core/mbeanapi/lib/mbeanapi.jar
+AMX_CLIENT_JAR_NAME=amx-client.jar
+
+# name of the directory into which we'll build the SDK
+SDK_DIR=amx-sdk
+
+STD_JARS="$JMX_RI_JAR;$JMX_REMOTE_JAR;$JAVAX77_JAR"
+JAR_CP="$STD_JARS;$LIB/appserv-rt.jar;$MBEANAPI_BUILD_JAR;$LIB/j2ee.jar"
+
+
+SRC_CLIENT="$DEV_ROOT/admin-core/mbeanapi/src/java"
+#SRC_IMPL="$DEV_ROOT/admin/mbeanapi-impl/src/java"
+#SRC_TESTS="$DEV_ROOT/admin/mbeanapi-impl/tests"
+SRC_OTHER=
+SRC_SAMPLE="$DEV_ROOT/appserv-tests/devtests/ee/admin/mbeanapi/samples"
+SRC="$SRC_CLIENT;$SRC_SAMPLE"
+SRC="$SRC;$SRC_OTHER"
+
+LINK_URL=http://java.sun.com/j2se/1.4.2/docs/api
+SUB_PACKAGES=com.sun.appserv.management
+SUB_PACKAGES="$SUB_PACKAGES"
+# SUB_PACKAGES="$SUB_PACKAGES:com.sun.enterprise.management"
+SAMPLES_PKG=samples.amx
+SAMPLES_PKG_DIR=samples/amx
+
+NO_QUALIFIER="-noqualifier java.lang:java.io:java.util:javax.management:javax.management.remote"
+SHARED_OPTIONS="-breakiterator -sourcepath $SRC -link $LINK_URL -classpath $JAR_CP -source 1.4 $NO_QUALIFIER"
+
+
+echo STD_JARS=$STD_JARS
+echo JAR_CPS=$JAR_CP
+echo SRC_CLIENT=$SRC_CLIENT
+echo SRC_IMPL=$SRC_IMPL
+echo SRC_SAMPLE=$SRC_SAMPLE
+echo SRC=$SRC
+echo LINK_URL=$LINK_URL
+echo SUB_PACKAGES=$SUB_PACKAGES
+echo SAMPLES_PKG=$SAMPLES_PKG
+echo SAMPLES_PKG_DIR=$SAMPLES_PKG_DIR
+echo ""
+echo NO_QUALIFIER=$NO_QUALIFIER
+echo SHARED_OPTIONS=$SHARED_OPTIONS
+
+rm -rf $SDK_DIR ${SDK_DIR}.jar
+mkdir $SDK_DIR
+
+echo "\nCopying support jars..."
+cp $JMX_RI_JAR $JMX_REMOTE_JAR $SDK_DIR
+cp $JAVAX77_JAR $SDK_DIR/javax77.jar
+
+echo "\nCopying samples scripts..."
+cp $SRC_SAMPLE/run-samples.bat $SRC_SAMPLE/run-samples.sh $SDK_DIR
+cp $SRC_SAMPLE/SampleMain.properties $SDK_DIR
+
+
+# Extract just com.sun.appserv.management from MBEANAPI_BUILD_JAR
+echo "\nCreating amx-client.jar..."
+jar xf $MBEANAPI_BUILD_JAR
+# get rid of stuff we don't want
+# make a new jar excluding com.sun.enterprise
+rm -rf META-INF com/sun/enterprise com/sun/CVS
+jar cf $AMX_CLIENT_JAR_NAME com/
+mv $AMX_CLIENT_JAR_NAME $SDK_DIR
+rm -rf com
+
+
+# copy and compile sample code
+echo "\nCopying and compiling sample code..."
+mkdir -p $SDK_DIR/$SAMPLES_PKG_DIR
+cp $SRC_SAMPLE/$SAMPLES_PKG_DIR/*.java $SDK_DIR/$SAMPLES_PKG_DIR
+
+javac -classpath "${SDK_DIR}/${AMX_CLIENT_JAR_NAME};$STD_JARS" -sourcepath $SDK_DIR $SDK_DIR/samples/amx/*.java
+
+# generate all amx javadoc without source-code links
+echo "\nGenerating AMX javadoc..."
+javadoc -d amx-javadoc -protected -subpackages $SUB_PACKAGES $SHARED_OPTIONS
+mv amx-javadoc $SDK_DIR
+
+# generate the sample javadoc, with source-code links
+# Note that this must be done after the AMX javadoc, as we are linking to it
+echo "\nGenerating javadoc for Sample code..."
+javadoc -linksource -d samples-javadoc -private -subpackages $SAMPLES_PKG -linkoffline ../amx-javadoc ./$SDK_DIR/amx-javadoc $SHARED_OPTIONS
+mv samples-javadoc $SDK_DIR
+
+
+echo "\nCreating " $SDK_DIR.jar
+jar cf ${SDK_DIR}.jar $SDK_DIR
+
+echo DONE
+
+
+
+
+
+
+
+
+
+
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
new file mode 100755
index 0000000..12350b4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.bat
@@ -0,0 +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
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.sh b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.sh
new file mode 100644
index 0000000..65c2aed
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.sh
@@ -0,0 +1,16 @@
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Distribution License v. 1.0, which is available at
+# http://www.eclipse.org/org/documents/edl-v10.php.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# These jar files must be present!
+export STD_JARS="jmxri.jar;jmxremote.jar;javax77.jar"
+export 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
new file mode 100644
index 0000000..3238efb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/DeployNotificationListener.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.amx;
+
+import java.util.Map;
+
+import javax.management.NotificationListener;
+import javax.management.Notification;
+
+import com.sun.appserv.management.deploy.DeploymentStatus;
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import com.sun.appserv.management.deploy.DeploymentSupport;
+import com.sun.appserv.management.deploy.DeploymentProgress;
+
+
+/**
+ A JMX NotificationListener for deployment.
+ */
+public final class DeployNotificationListener
+ 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() + "%" );
+ }
+ }
+ }
+}
+
+
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
new file mode 100644
index 0000000..06fe1b3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/LineReaderImpl.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/*
+ * $Header: /m/jws/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/LineReaderImpl.java,v 1.1 2005/01/27 21:34:04 llc Exp $
+ * $Revision: 1.1 $
+ * $Date: 2005/01/27 21:34:04 $
+ */
+
+package samples.amx;
+
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+/**
+ 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 );
+ }
+
+ 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
new file mode 100644
index 0000000..6ad637f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleHandshakeCompletedListener.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.amx;
+
+import javax.net.ssl.HandshakeCompletedEvent;
+
+import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
+
+
+/**
+ 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
+{
+ 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
new file mode 100644
index 0000000..9764573
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleListener.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.amx;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Collections;
+
+import javax.management.NotificationListener;
+import javax.management.Notification;
+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
+ */
+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( "" );
+ }
+
+
+
+}
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
new file mode 100644
index 0000000..d92fe1d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleMain.java
@@ -0,0 +1,410 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.amx;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Properties;
+
+import javax.management.remote.JMXConnector;
+import javax.management.InstanceNotFoundException;
+
+import com.sun.appserv.management.DomainRoot;
+
+import com.sun.appserv.management.base.AMX;
+import com.sun.appserv.management.base.XTypes;
+
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.TrustStoreTrustManager;
+import com.sun.appserv.management.client.AppserverConnectionSource;
+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.
+ */
+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 );
+
+ 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
new file mode 100644
index 0000000..c2515b3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleUtil.java
@@ -0,0 +1,295 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.amx;
+
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import javax.management.Attribute;
+import javax.management.Notification;
+import javax.management.MBeanServerNotification;
+import javax.management.AttributeChangeNotification;
+
+
+/**
+ 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() );
+ }
+
+
+
+ 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
new file mode 100644
index 0000000..a98c667
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/Samples.java
@@ -0,0 +1,1002 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.amx;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.management.Attribute;
+import javax.management.Notification;
+import javax.management.AttributeChangeNotification;
+import javax.management.NotificationListener;
+import javax.management.ListenerNotFoundException;
+import javax.management.ObjectName;
+import javax.management.NotificationFilter;
+import javax.management.MBeanServerConnection;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanServerNotification;
+
+import com.sun.appserv.management.DomainRoot;
+
+import com.sun.appserv.management.base.AMX;
+import com.sun.appserv.management.base.XTypes;
+import com.sun.appserv.management.base.Container;
+import com.sun.appserv.management.base.Sample;
+import com.sun.appserv.management.base.Util;
+import com.sun.appserv.management.base.Extra;
+import com.sun.appserv.management.base.StdAttributesAccess;
+import com.sun.appserv.management.base.QueryMgr;
+
+import com.sun.appserv.management.client.AppserverConnectionSource;
+import com.sun.appserv.management.client.TLSParams;
+import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
+
+import com.sun.appserv.management.j2ee.J2EEDomain;
+import com.sun.appserv.management.j2ee.J2EEServer;
+
+import com.sun.appserv.management.deploy.DeploymentMgr;
+import com.sun.appserv.management.deploy.DeploymentStatus;
+import com.sun.appserv.management.deploy.DeploymentProgress;
+import com.sun.appserv.management.deploy.DeploymentSupport;
+
+import com.sun.appserv.management.monitor.MonitoringDottedNames;
+import com.sun.appserv.management.monitor.JMXMonitorMgr;
+import com.sun.appserv.management.monitor.AMXStringMonitor;
+
+import com.sun.appserv.management.config.DomainConfig;
+import com.sun.appserv.management.config.HTTPServiceConfig;
+import com.sun.appserv.management.config.ConfigConfig;
+import com.sun.appserv.management.config.ConfigDottedNames;
+import com.sun.appserv.management.config.StandaloneServerConfig;
+import com.sun.appserv.management.config.ModuleMonitoringLevelsConfig;
+import com.sun.appserv.management.config.ModuleMonitoringLevelValues;
+import com.sun.appserv.management.config.PropertiesAccess;
+
+
+/**
+ Main class demonstrating a variety of MBean API (AMX) usages.
+ */
+public final class Samples
+{
+ private final DomainRoot mDomainRoot;
+
+ 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" );
+
+
+ // 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/mbeanapi/samples/samples/amx/package.html b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/package.html
new file mode 100644
index 0000000..bb8fb0d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/package.html
@@ -0,0 +1,257 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+ <title>Appserver MBean API Sample Guide</title>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+</head>
+<body bgcolor="#FFFFFF">
+<div style="text-align: center;">
+ <div align="left"><big><big><span
+ style="font-weight: bold;">Appserver MBean API (AMX) Sample Guide</span></big></big><br>
+ </div>
+</div>
+<p> <br>
+ This document gives an overview on using the Appserver MBean API (<span
+ style="font-weight: bold;">AMX</span>). Sample source code may be viewed
+ directly by clicking on individual method names within the Javadoc. Nearly all
+ the source code is contained within <a href="./Samples.html">Samples</a>.</p>
+<p>Please see <span style="font-weight: bold;"><a
+ href="../../com/sun/appserv/management/package-summary.html#SystemRequirements">System Requirements</a></span>
+ before using the samples.<br>
+ <span style="font-weight: bold;"> </span><br>
+ <br style="font-weight: bold;">
+ <big> <span style="font-weight: bold;"><font size="+1">Running the sample command
+ line</font></span></big><a name="Connecting" style="font-weight: bold;"></a><br>
+ <br>
+ You can invoke the sample code program, a simple command-line interface as follows:<br>
+ <br>
+ <span style="font-family: monospace;">java -classpath <span
+ style="font-style: italic;">classpath </span>com.sun.appserv.management.sample.SampleMain
+ SampleMain.properties</span><br>
+ <br>
+ See <a
+ href="./SampleMain.html">SampleMain.connect()</a> for an example of how to connect
+ to the server. If a properties file is not specified it uses default values
+ for the above items. If specified, the properties file uses the following
+ format:<br>
+ <br>
+ <span style="font-family: monospace;">connect.host=<span
+ style="font-weight: bold;">localhost</span></span><br
+ style="font-family: monospace;">
+ <span style="font-family: monospace;">connect.port=<span
+ style="font-weight: bold;">8686</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.user=<span
+ style="font-weight: bold;">admin</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.password=<span
+ style="font-weight: bold;">admin123</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.truststore=<span
+ style="font-weight: bold;">~/.keystore</span></span><br
+ style="font-family: monospace;">
+ <span style="font-family: monospace;">connect.truststorePassword=<span
+ style="font-weight: bold;">changeme</span></span><br
+ style="font-family: monospace; font-weight: bold;">
+ <span style="font-family: monospace;">connect.useTLS=<span
+ style="font-weight: bold;">false</span><br style="font-weight: bold;">
+ </span> <br>
+ Note that in an EE build, TLS is generally enabled, so <span
+ style="font-family: monospace;">useTLS </span>must be true and the trustStore
+ and truststorePassword are required. Connections will fail (or hang)
+ if <span style="font-family: monospace;">useTLS </span>is not set appropriately.<br>
+ <br>
+ Once you have connected to the DAS via an <a
+ href="../../com/sun/appserv/management/client/AppserverConnectionSource.html">AppserverConnectionSource</a>
+ call <a
+ href="../../com/sun/appserv/management/client/AppserverConnectionSource.html#getDomainRoot()">getDomainRoot()</a>
+ to get an instance of <a
+ href="../../com/sun/appserv/management/DomainRoot.html">DomainRoot</a>. All further interfaces may be
+ obtained from <a
+ href="../../com/sun/appserv/management/DomainRoot.html">DomainRoot</a>, directly or indirectly.<br>
+ <br>
+ <big><span style="font-weight: bold;"><font size="+1">Viewing and running the
+ sample code</font></span></big><a name="ViewingAndRunning" style="font-weight: bold;"></a><span
+ style="font-family: monospace;"><br>
+ <br>
+ </span>Javadoc for all samples is found in <a
+ href="./Samples.html">Samples.java</a>. Each method is accompanied by Javadoc.
+ While viewing the Javadoc for a particular method (not just the summary of all
+ methods), clicking on the method name displays the source code for that method.<br>
+ <br>
+ You may wish to run the SampleMain command line interface while viewing the
+ Javadoc. The available samples are summarized here:<br>
+ <br>
+</p>
+<table cellpadding="2" cellspacing="2" border="1"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top; font-weight: bold;">SampleMain
+command name<br>
+ </td>
+ <td style="vertical-align: top; font-weight: bold;">Samples.java
+method name<br>
+ </td>
+ <td style="vertical-align: top; font-weight: bold;">Discussion<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">demo-jmx-monitor<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#demoJMXMonitor()">demoJMXMonitor()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates the use of a <span
+ style="font-family: monospace;">javax.management.monitor</span> MBean to be notified
+ of changes in the value of an <span style="font-family: monospace;">javax.management.Attribute</span>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">deploy<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#deploy(java.io.File)">deploy()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates how to deploy an archive using
+ the low-level API.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">list-attributes<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#displayAllAttributes(com.sun.appserv.management.base.AMX)">displayAllAttributes()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates how to access and display available
+ Attributes on a <a
+ href="../../com/sun/appserv/management/base/AMX.html">AMX</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">list<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#handleList()">handleList()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrates how to access various types
+ of <a
+ href="../../com/sun/appserv/management/base/AMX.html">AMX</a> by obtaining a Map and then displaying it.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">list-properties<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#displayAllProperties()">displayAllProperties()</a><br>
+ </td>
+ <td style="vertical-align: top;">Display all properties found on all <a
+ href="../../com/sun/appserv/management/base/AMX.html">AMX</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">query<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#demoQuery()">demoQuery()</a><br>
+ </td>
+ <td style="vertical-align: top;">Demonstrate how to use the <a
+ href="../../com/sun/appserv/management/base/QueryMgr.html">QueryMgr</a> facilities.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">quit<br>
+ </td>
+ <td style="vertical-align: top;">-<br>
+ </td>
+ <td style="vertical-align: top;"><br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">run-all<br>
+ </td>
+ <td style="vertical-align: top;">-<br>
+ </td>
+ <td style="vertical-align: top;">Runs all samples that do not require additional
+ arguments.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">start-server<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#startServer(java.lang.String)">startServer(String serverName)</a><br>
+ </td>
+ <td style="vertical-align: top;">Starts a server.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">stop-server<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#stopServer(java.lang.String)">stopServer(</a><a
+ href="file:///H:/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample./Samples.html#startServer(java.lang.String)">String
+ serverName</a><a
+ href="./Samples.html#stopServer(java.lang.String)">)</a><br>
+ </td>
+ <td style="vertical-align: top;">Stops a server.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">show-hierarchy<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#displayHierarchy(java.lang.String)">displayHierarchy()</a>
+ </td>
+ <td style="vertical-align: top;">Displays the hierarchy of all available <a
+ href="../../com/sun/appserv/management/base/AMX.html">AMX</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">set-monitoring<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#setMonitoring(java.lang.String, java.lang.String)">setMonitoring(
+ configName, level)</a><br>
+ </td>
+ <td style="vertical-align: top;">Sets the monitoring state for all available
+ modules.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; font-family: monospace;">undeploy<br>
+ </td>
+ <td style="vertical-align: top;"><a
+ href="./Samples.html#undeploy(java.lang.String)">undeploy(String moduleName)</a><br>
+ </td>
+ <td style="vertical-align: top;">Undeploys a deployed module.<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<br>
+<span style="font-family: monospace;"><br>
+<br>
+<br>
+</span><br>
+<br>
+<br>
+<br>
+<br>
+<br>
+</body>
+</html>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/monitoring/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/monitoring/README
new file mode 100644
index 0000000..72753b1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/monitoring/README
@@ -0,0 +1,4 @@
+Directory: appserv-tests/devtests/ee/admin/monitoring
+Purpose: Tests for monitoring mbeans. This should test the monitoring dotted names as well.
+
+Contact Muralidhar Vempaty/ Kedar Mhaswade/ Rob Ruyak for details/enhancements etc.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/nodeagent/README b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/nodeagent/README
new file mode 100644
index 0000000..062e6a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/nodeagent/README
@@ -0,0 +1,4 @@
+Directory: appserv-tests/devtests/ee/admin/nodeagent
+Purpose: Tests for node agent and MBeans therein. It may also contain longevity tests, stress tests for node agent.
+
+Contact Mark Basler for details/enhancements etc.
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
new file mode 100644
index 0000000..54534e9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="cluster.name" value="ee-event-cluster"/>
+<property name="nodeagent.name" value="ee-event-agent"/>
+<property name="clustered.server.name" value="ee-event-server-1"/>
+<property name="clustered.server.name.two" value="ee-event-server-2"/>
+<property name="ee" value="enterprise edition"/>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.xml
new file mode 100644
index 0000000..365d190
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../config/ee-common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ee-notification" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+ &testproperties;
+
+ <target name="all" depends="setup-cluster, run-tests, remove-cluster"/>
+
+ <target name="setup-cluster" depends="init-common">
+ <antcall target="setup-default-cluster-common"/>
+ <antcall target="start-default-cluster-common"/>
+ </target>
+
+ <target name="run-tests" depends="setup-cluster">
+ <antcall target="lookup">
+ <param name="lookup.target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="lookup">
+ <record name="lookup.output" action="start"/>
+ <ant dir="lookup" target="${lookup.target}"/>
+ <record name="lookup.output" action="stop"/>
+ </target>
+
+ <target name="remove-cluster" depends="init-common">
+ <antcall target="stop-default-cluster-common"/>
+ <antcall target="remove-default-cluster-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
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
new file mode 100644
index 0000000..9c74073
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.properties
@@ -0,0 +1,51 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="ee" value="enterprise edition"/>
+
+<property name="module" value="notification"/>
+<property name="appname" value="${module}-lookup"/>
+
+<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="test.client"
+ 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="app.type" value="application"/>
+<property name="client.jar.location" value="${admin.domain.dir}/${admin.domain}/applications/j2ee-apps/${appname}Client.jar"/>
+
+<property name="javamail.resource.name" value="javamail/s1qeMail"/>
+<property name="mailhost" value="localhost"/>
+<property name="mailuser" value="nazrul.islam@sun.com"/>
+<property name="fromaddress" value="nazrul.islam@sun.com"/>
+<property name="debug" value="false"/>
+<property name="enabled" value="true"/>
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
new file mode 100644
index 0000000..c739747
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.xml
@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../../config/ee-common.xml">
+<!ENTITY pTestproperties SYSTEM "file:./../build.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="lookup" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+ &pTestproperties;
+ &testproperties;
+
+ <target name="all" depends="clean,build,setup,deploy,run,undeploy,unsetup"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup"/>
+ <target name="unsetup"/>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-ee">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ <antcall target="restart-cluster"/>
+ <antcall target="copy-client-jar"/>
+ </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"/>
+ </target>
+
+ <target name="restart-cluster" depends="init-common">
+ <antcall target="stop-cluster-common">
+ <param name="cluster.name" value="ee-event-cluster"/>
+ </antcall>
+ <antcall target="start-cluster-common">
+ <param name="cluster.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <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"/>
+
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <!-- 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} successful"/>
+ </target>
+
+
+ <target name="run" depends="init-common">
+ <antcall target="run-test-0" />
+ <antcall target="run-test-1" />
+ <antcall target="run-test-2" />
+ <antcall target="run-test-5" />
+ <antcall target="run-test-7" />
+ <antcall target="run-test-9" />
+ <antcall target="run-test-3" />
+ <antcall target="run-test-4" />
+ <antcall target="run-test-6" />
+ <antcall target="run-test-8" />
+ <antcall target="run-test-10" />
+ </target>
+
+ <target name="run-test-1" depends="init-common">
+
+ <antcall target="create-jdbc-res-pool"/>
+ <antcall target="create-jdbc-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="1"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="1"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-2" depends="init-common">
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="2"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="2"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-3" depends="init-common">
+
+ <antcall target="delete-jdbc-res"/>
+ <!-- antcall target="delete-jdbc-res-reference"/ -->
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="3"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="3"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-4" depends="init-common">
+
+ <antcall target="delete-jdbc-res-pool"/>
+ <!-- antcall target="delete-jdbc-res-pool-reference"/ -->
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="4"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="4"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-0" depends="init-common">
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="0"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="0"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-5" depends="init-common">
+ <!-- antcall target="create-persistence-res"/ -->
+ <antcall target="create-persistence-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="5"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="5"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-6" depends="init-common">
+ <!-- antcall target="delete-persistence-res-reference"/ -->
+ <antcall target="delete-persistence-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="6"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="6"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-7" depends="init-common">
+ <!-- antcall target="create-jms-res"/ -->
+ <antcall target="create-jms-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="7"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="7"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-8" depends="init-common">
+ <!-- antcall target="delete-jms-res-reference"/ -->
+ <antcall target="delete-jms-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="8"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="8"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-9" depends="init-common">
+ <!-- antcall target="create-javamail-res"/ -->
+ <antcall target="create-javamail-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="9"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="9"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="run-test-10" depends="init-common">
+ <!-- antcall target="delete-javamail-res-reference"/ -->
+ <antcall target="delete-javamail-res"/>
+
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="10"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="10"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="create-jdbc-res-pool" depends="init-common">
+ <antcall target="create-jdbc-connpool-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-jdbc-res-pool" depends="init-common">
+ <antcall target="delete-jdbc-connpool-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-jdbc-res-pool-reference" depends="init-common">
+ <antcall target="delete-resource-reference-common">
+ <param name="target.name" value="ee-event-cluster"/>
+ <param name="resource.name" value="${jdbc.conpool.name}"/>
+ </antcall>
+ </target>
+
+ <target name="create-persistence-res" depends="init-common">
+ <antcall target="create-persistence-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-persistence-res" depends="init-common">
+ <antcall target="delete-persistence-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="create-jdbc-res" depends="init-common">
+ <antcall target="create-jdbc-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-jdbc-res" depends="init-common">
+ <antcall target="delete-jdbc-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="create-jms-res" depends="init-common">
+ <antcall target="create-jms-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-jms-res" depends="init-common">
+ <antcall target="delete-jms-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="create-javamail-res" depends="init-common">
+ <antcall target="create-javamail-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-javamail-res" depends="init-common">
+ <antcall target="delete-javamail-resource-common">
+ <param name="appserver.instance.name" value="ee-event-cluster"/>
+ </antcall>
+ </target>
+
+ <target name="delete-jdbc-res-reference" depends="init-common">
+ <antcall target="delete-resource-reference-common">
+ <param name="target.name" value="ee-event-cluster"/>
+ <param name="resource.name" value="${jdbc.resource.name}"/>
+ </antcall>
+ </target>
+
+ <target name="delete-persistence-res-reference" depends="init-common">
+ <antcall target="delete-resource-reference-common">
+ <param name="target.name" value="ee-event-cluster"/>
+ <param name="resource.name" value="${pm.resource.name}"/>
+ </antcall>
+ </target>
+
+ <target name="delete-jms-res-reference" depends="init-common">
+ <antcall target="delete-resource-reference-common">
+ <param name="target.name" value="ee-event-cluster"/>
+ <param name="resource.name" value="${jms.resource.name}"/>
+ </antcall>
+ </target>
+
+ <target name="delete-mail-res-reference" depends="init-common">
+ <antcall target="delete-mail-reference-common">
+ <param name="target.name" value="ee-event-cluster"/>
+ <param name="resource.name" value="${javamail.resource.name}"/>
+ </antcall>
+ </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"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..289e978
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/LookupClient.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.client;
+
+import java.util.Properties;
+import java.math.BigDecimal;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import com.sun.devtest.admin.notification.lookup.ejb.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ * A simple java client. This uses the services provided by the
+ * <code>LookupBean</code>.
+ */
+public class LookupClient {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ LookupClient() {
+ }
+
+ /**
+ * The main method of the client.
+ */
+ public static void main(String[] args) {
+ LookupClient client = new LookupClient();
+ client.run(args);
+ }
+
+ private void run(String[] args) {
+
+ String url = null;
+ String testId = null;
+ String jndiName = null;
+ Context context = null;
+ String ctxFactory = null;
+ java.lang.Object obj = null;
+
+ try {
+ stat.addDescription("Tests dynamic reconfig of resources");
+
+ if (args.length == 3) {
+ url = args[0];
+ ctxFactory = args[1];
+ jndiName = args[2];
+ }
+ testId = System.getProperty("testId", "0");
+
+ if ( (url == null) || (ctxFactory == null) ) {
+ // 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/lookupBean");
+ } else {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", url);
+ env.put("java.naming.factory.initial", ctxFactory);
+ // Initialize the Context with JNDI specific properties
+ context = new InitialContext(env);
+ System.out.println("Context Initialized with " +
+ "URL: " + url + ", Factory: " + ctxFactory);
+ // Create Home object
+ obj = context.lookup(jndiName);
+ }
+
+ LookupRemoteHome home =
+ (LookupRemoteHome) PortableRemoteObject.narrow(obj,
+ LookupRemoteHome.class);
+ LookupRemote bean = home.create();
+
+ runDefaultTest(bean, "converter");
+ } catch (Exception ex) {
+ System.err.println("Caught an unexpected exception!");
+ ex.printStackTrace();
+ }
+ }
+
+ private void runDefaultTest(LookupRemote bean, String testId) {
+ try {
+ BigDecimal param = new BigDecimal ("100.00");
+ BigDecimal amount = bean.dollarToYen(param);
+ System.out.println("\n\n\n===========Beginning Simple Test=====\n\n");
+ System.out.println("$100 is : "+amount+"Yen");
+ amount = bean.yenToEuro(param);
+ System.out.println("Yen is :"+amount+"Euro");
+ stat.addStatus(testId, stat.PASS);
+ } catch (Exception e) {
+ stat.addStatus(testId, stat.FAIL);
+ e.printStackTrace();
+ } finally {
+ stat.printSummary("Test Result for #" + testId);
+ }
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/MANIFEST.MF
new file mode 100644
index 0000000..543e7b7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.devtest.admin.notification.lookup.client.LookupClient
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application-client.xml
new file mode 100644
index 0000000..8cc652f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application-client.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>LookupClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/lookupBean</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.devtest.admin.notification.lookup.ejb.LookupRemoteHome</home>
+ <remote>com.sun.devtest.admin.notification.lookup.ejb.LookupRemote</remote>
+ </ejb-ref>
+</application-client>
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
new file mode 100644
index 0000000..a9155aa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>notification-lookupApp</display-name>
+ <module>
+ <java>notification-lookup-client.jar</java>
+ </module>
+ <module>
+ <ejb>notification-lookup-ejb.jar</ejb>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..466d9bb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/ejb-jar.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <display-name>LookupApp</display-name>
+ <ejb-name>LookupBean</ejb-name>
+ <home>com.sun.devtest.admin.notification.lookup.ejb.LookupRemoteHome</home>
+ <remote>com.sun.devtest.admin.notification.lookup.ejb.LookupRemote</remote>
+ <ejb-class>com.sun.devtest.admin.notification.lookup.ejb.LookupBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Bean</transaction-type>
+ <resource-ref>
+ <res-ref-name>jdbcRes</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jdbcPool</res-ref-name>
+ <res-type>javax.sql.ConnectionPoolDataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>pmfRes</res-ref-name>
+ <res-type>javax.sql.ConnectionPoolDataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jmsRes</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>javaMailRes</res-ref-name>
+ <res-type>javax.mail.Session</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..fedc5a9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/lookupBean</ejb-ref-name>
+ <jndi-name>lookupbean</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..04f1386
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>LookupBean</ejb-name>
+ <jndi-name>lookupbean</jndi-name>
+
+ <resource-ref>
+ <res-ref-name>jdbcRes</res-ref-name>
+ <jndi-name>jdbc/s1qeDB</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>pmfRes</res-ref-name>
+ <jndi-name>jdo/s1qePM</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>jmsRes</res-ref-name>
+ <jndi-name>jms/SampleQueue</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>javaMailRes</res-ref-name>
+ <jndi-name>javamail/s1qeMail</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>jdbcPool</res-ref-name>
+ <jndi-name>__SYSTEM/pools/jdbc-pointbase-pool</jndi-name>
+ </resource-ref>
+
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..c9fbc1d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupBean.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.ejb;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import java.math.*;
+import javax.naming.*;
+
+/**
+ */
+public class LookupBean implements SessionBean {
+
+ SessionContext sessionContext_;
+
+ BigDecimal yenRate = new BigDecimal("121.6000");
+ BigDecimal euroRate = new BigDecimal("0.0077");
+
+ /**
+ * Returns the yen value for a given dollar amount.
+ * @param dollars dollar amount to be converted to yen.
+ */
+ public BigDecimal dollarToYen(BigDecimal dollars) {
+
+ BigDecimal result = dollars.multiply(yenRate);
+ return result.setScale(2,BigDecimal.ROUND_UP);
+ }
+
+ /**
+ * Returns the euro value for a given yen amount.
+ * @param yen yen amount to be converted to euro.
+ */
+ public BigDecimal yenToEuro(BigDecimal yen) {
+ BigDecimal result = yen.multiply(euroRate);
+ return result.setScale(2,BigDecimal.ROUND_UP);
+ }
+
+ public boolean lookupResource(String jndiName) {
+ try {
+ Context context = new InitialContext();
+ Object obj = context.lookup(jndiName);
+ if (obj != null) {
+ System.out.println("Looked up " + obj.getClass().getName());
+ return true;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Required by EJB spec.
+ */
+ public LookupBean() {}
+
+ /**
+ * Creates a bean. Required by EJB spec.
+ * @exception throws CreateException.
+ */
+ public void ejbCreate() {}
+
+ /**
+ * Removes the bean. Required by EJB spec.
+ */
+ public void ejbRemove() {}
+
+ /**
+ * 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.
+ */
+ public void ejbPassivate() {}
+
+ /**
+ * Sets the session context. Required by EJB spec.
+ * @param ctx A SessionContext object.
+ */
+ public void setSessionContext(SessionContext sc) {
+ sessionContext_ = sc;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupRemote.java
new file mode 100644
index 0000000..e9b5b2e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupRemote.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.ejb;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+import java.math.*;
+
+/**
+ *
+ */
+public interface LookupRemote extends EJBObject {
+
+ /**
+ */
+ public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
+
+ /**
+ */
+ public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
+
+ public boolean lookupResource(String jndiName) throws RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupRemoteHome.java
new file mode 100644
index 0000000..d6caede
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupRemoteHome.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.ejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ */
+public interface LookupRemoteHome extends EJBHome {
+ /**
+ */
+ LookupRemote create() throws RemoteException, CreateException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/build.xml
new file mode 100644
index 0000000..d903032
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/build.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../../config/ee-common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ee-synchronization-api" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+
+ <target name="all">
+ <antcall target="security">
+ <param name="security.target" value="all" />
+ </antcall>
+ <antcall target="client">
+ <param name="client.target" value="all" />
+ </antcall>
+ <antcall target="deployment">
+ <param name="deployment.target" value="all" />
+ </antcall>
+ </target>
+
+ <target name="security">
+ <record name="security.output" action="start"/>
+ <ant dir="security" target="${security.target}"/>
+ <record name="security.output" action="stop"/>
+ </target>
+ <target name="client">
+ <record name="client.output" action="start"/>
+ <ant dir="client" target="${client.target}"/>
+ <record name="client.output" action="stop"/>
+ </target>
+ <target name="deployment">
+ <record name="deployment.output" action="start"/>
+ <ant dir="deployment" target="${deployment.target}"/>
+ <record name="deployment.output" action="stop"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
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
new file mode 100644
index 0000000..9f84851
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="apiClient"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..8eaa536
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../config/common.xml">
+<!ENTITY eecommonBuild SYSTEM "file:./../../../../../../config/ee-common.xml">
+<!ENTITY testRootproperties SYSTEM "file:./../../build.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="synchronization-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eecommonBuild;
+ &testRootproperties;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+ <target name="deployapp" depends="clean,build,create-resources,deploy"/>
+ <target name="undeployapp" depends="undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/**.class" />
+ <param name="appclientjar.classes"
+ value="**/*Client*.class, **/*SFSB*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-to-cluster">
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+ <antcall target="copy-client-jar"/>
+ </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"/>
+ </target>
+
+
+ <target name="create-resources" depends="init-common">
+ <!--
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+ -->
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <antcall target="run-standalone-client">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="get-or-put" value="get"/>
+ <param name="src-loc" value="docroot/index.html"/>
+ <param name="dest-loc" value="/tmp/index.html"/>
+ </antcall>
+
+ <antcall target="run-standalone-client">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="get-or-put" value="put"/>
+ <param name="src-loc" value="${com.sun.aas.instanceRoot}/logs/server.log"/>
+ <param name="dest-loc" value="generated"/>
+ </antcall>
+ </target>
+
+
+ <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>
+
+ <!-- This should be a common target FIX IT -->
+ <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"/>
+
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <!-- 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}
+ successful"/>
+ <antcall target="stop-default-cluster-common"/>
+ <antcall target="start-default-cluster-common"/>
+
+ </target>
+
+
+ <!-- =============================================== -->
+ <!-- Target to run the standalone client without ACC -->
+ <!-- =============================================== -->
+ <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"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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}"/>
+ <!--arg value="${test.server.name} ${test.action} ${test.src} ${test.dest}"/-->
+ <arg value="ee-synchronization-server-2"/>
+ <arg value="${get-or-put}"/>
+ <arg value="${src-loc}"/>
+ <arg value="${dest-loc}"/>
+ </java>
+ </target>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant create-resources Create all destinations and connection factories
+ ant delete-resources Delete all destinations and connection factories
+ </echo>
+ </target>
+</project>
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
new file mode 100644
index 0000000..9220175
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/Client.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.stress.passivateactivate.client;
+
+import java.util.ArrayList;
+
+import java.io.Serializable;
+import javax.naming.*;
+import javax.jms.*;
+import javax.ejb.*;
+import javax.rmi.PortableRemoteObject;
+import java.rmi.NoSuchObjectException;
+import java.util.Properties;
+
+import com.sun.s1asdev.admin.ee.synchronization.api.client.SynchronizationHome;
+import com.sun.s1asdev.admin.ee.synchronization.api.client.Synchronization;
+
+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 =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ private Synchronization sfsb = null;
+
+ public static void main (String[] args) {
+
+ stat.addDescription("synchronization");
+ if ( args.length != 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);
+ System.out.println("Usage: Command can be either put or get. Please retry");
+ return;
+ }
+
+ Client client = new Client(args);
+ System.out.println("[apiClient] doTest()...");
+ client.doTest(args);
+ System.out.println("[apiClient] DONE doTest()...");
+ stat.printSummary("synchronization");
+ }
+
+ public Client (String[] args) {
+ }
+
+ public void doTest(String[] args) {
+
+ initSFSB(args);
+ testSynch(args);
+ }
+
+ private void initSFSB(String[] args) {
+
+ System.out.println("[apiClient] Inside init....");
+ try {
+ Context ic = null;
+ Object objref = 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");
+ } else {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", args[0]);
+ env.put("java.naming.factory.initial", args[1]);
+ ic = new InitialContext(env);
+ objref = ic.lookup(args[2]);
+ }
+
+ SynchronizationHome home = (SynchronizationHome)
+ PortableRemoteObject.narrow (objref, SynchronizationHome.class);
+
+ sfsb = (Synchronization) home.create();
+
+ System.out.println("[passivateactivate] Initalization done");
+ stat.addStatus("init apiClient", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ System.out.println("[apiClient] Exception in init....");
+ e.printStackTrace();
+ stat.addStatus("client initSFSB", stat.FAIL);
+ }
+ }
+
+ public void testSynch(String[] args) {
+ try {
+ boolean r;
+ if ( args[4].equals("get")) {
+ r = sfsb.getFile(args[3], args[5], args[6]);
+
+ } else {
+ r = sfsb.putFile(args[3], args[5], args[6]);
+
+ }
+ if ( r)
+ System.out.println( args[4] + " of " + args[5] +
+ " to " + args[6] + " passed.");
+ else
+ 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);
+
+ }
+ }
+
+} //Client{}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/MANIFEST.MF
new file mode 100644
index 0000000..9504ef2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+Main-Class: com.sun.s1asdev.ejb.stress.passivateactivate.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/application-client.xml
new file mode 100644
index 0000000..b4b1e22
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/application-client.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>apiClientClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/apiClient</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1asdev.admin.ee.synchronization.api.client.SynchronizationHome</home>
+ <remote>com.sun.s1asdev.admin.ee.synchronization.api.client.Synchronization</remote>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/application.xml
new file mode 100644
index 0000000..00cc750
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>Simple Synchronization Application</description>
+ <display-name>apiClient-ejb</display-name>
+ <module>
+ <ejb>apiClient-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>apiClient-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..14523bc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/ejb-jar.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>apiClient</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>apiClient</display-name>
+ <ejb-name>apiClient</ejb-name>
+ <home>com.sun.s1asdev.admin.ee.synchronization.api.client.SynchronizationHome</home>
+ <remote>com.sun.s1asdev.admin.ee.synchronization.api.client.Synchronization</remote>
+ <ejb-class>com.sun.s1asdev.admin.ee.synchronization.api.client.SynchronizationEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>apiClient</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..173c905
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/apiClient</ejb-ref-name>
+ <jndi-name>ejb/apiClient</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..0a9e2da
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>apiClient</ejb-name>
+ <jndi-name>ejb/apiClient</jndi-name>
+ <bean-cache>
+ <max-cache-size>12</max-cache-size>
+ </bean-cache>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..ff836e0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/Synchronization.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.ee.synchronization.api.client;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+import java.io.IOException;
+import com.sun.enterprise.ee.synchronization.SynchronizationException;
+
+
+public interface Synchronization
+ extends EJBObject
+{
+
+ public boolean getFile(String instanceName, String sourceFile,
+ String destLoc) 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
new file mode 100644
index 0000000..a833a42
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationEJB.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.ee.synchronization.api.client;
+
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+import java.io.File;
+import java.io.IOException;
+
+import java.rmi.RemoteException;
+
+import com.sun.enterprise.ee.synchronization.api.SynchronizationClient;
+import com.sun.enterprise.ee.synchronization.api.SynchronizationFactory;
+import com.sun.enterprise.ee.synchronization.SynchronizationException;
+
+public class SynchronizationEJB
+ implements SessionBean
+{
+ private SessionContext context;
+ private Context initialCtx;
+
+ public void ejbCreate() {
+ }
+
+ 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;
+ }
+ }
+
+ 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;
+ }
+ }
+
+ public void setSessionContext(SessionContext sc) {
+ this.context = sc;
+ try {
+ this.initialCtx = new InitialContext();
+ } catch (Throwable th) {
+ th.printStackTrace();
+ }
+ }
+
+ public void ejbRemove() {}
+
+ public void ejbActivate() {
+ System.out.println ("In SFSB.ejbActivate() " );
+ }
+
+ 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
new file mode 100644
index 0000000..0dacfb5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationHome.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.ee.synchronization.api.client;
+
+import java.rmi.RemoteException;
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+
+public interface SynchronizationHome
+ extends EJBHome
+{
+ 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
new file mode 100644
index 0000000..8a119ba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/common.xml
@@ -0,0 +1,32 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- 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"/>
+ </antcall>
+</target>
+
+<target name="delete-user">
+ <antcall target="delete-user-common">
+ <param name="user" value="harpreet"/>
+ </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
new file mode 100644
index 0000000..c50f79e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="apiDeployment"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..4825c7a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.xml
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../config/common.xml">
+<!ENTITY eecommonBuild SYSTEM "file:./../../../../../../config/ee-common.xml">
+<!ENTITY testRootproperties SYSTEM "file:./../../build.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<!-- This dev test assumes the presence of samples in the server installation-->
+<project name="synch-deployment-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eecommonBuild;
+ &testRootproperties;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+ <target name="deployapp" depends="clean,build,create-resources,deploy"/>
+ <target name="undeployapp" depends="undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/**.class" />
+ <param name="appclientjar.classes"
+ value="**/*Client*.class, **/*SFSB*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common">
+
+ <!-- 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>
+ <antcall target="deploy-to-das">
+ <param name="deployed.app" value="${env.S1AS_HOME}/samples/ejb/misc/apps/timersession/timersession.ear"/>
+ </antcall>
+ <antcall target="deploy-to-das">
+ <param name="deployed.app" value="${env.S1AS_HOME}/samples/quickstart/hello.war"/>
+ </antcall>
+ <antcall target="deploy-to-cluster">
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+ <antcall target="copy-client-jar"/>
+ </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"/>
+ </target>
+
+
+ <target name="create-resources" depends="init-common">
+ <!--
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+ -->
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <antcall target="run-standalone-client">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="appclient.application.args" value="ee-synchronization-server-1 put com_sun_web_ui ."/>
+ <param name="test.app.name" value="mailconnector"/>
+ <param name="test.app.type" value="ConnectorModule"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="appclient.application.args" value="ee-synchronization-server-1 put com_sun_web_ui ."/>
+ <param name="test.app.name" value="timersession"/>
+ <param name="test.app.type" value="J2EEApplication"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="appclient.application.args" value="ee-synchronization-server-1 put com_sun_web_ui ."/>
+ <param name="test.app.name" value="hello"/>
+ <param name="test.app.type" value="WebModule"/>
+ </antcall>
+ </target>
+
+
+ <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"/>
+ </antcall>
+ <antcall target="undeploy-common">
+ <param name="deployedapp.name" value="hello"/>
+ </antcall>
+ <antcall target="undeploy-common">
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+ </target>
+
+ <!-- This should be a common target FIX IT -->
+ <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"/>
+
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <!-- 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}
+ successful"/>
+ <antcall target="stop-default-cluster-common"/>
+ <antcall target="start-default-cluster-common"/>
+
+ </target>
+
+ <target name="deploy-to-das" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="${deployed.app}"/>
+ </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="ejb/apiDeployment"/>
+ <property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
+ <property name="ctxfactory"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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}"/>
+ <!--arg value="${test.server.name} ${test.action} ${test.src} ${test.dest}"/-->
+ <arg value="ee-synchronization-server-1"/>
+ <arg value="get"/>
+ <arg value="${test.app.name}"/>
+ <arg value="."/>
+ <arg value="${test.app.type}"/>
+ </java>
+ </target>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant create-resources Create all destinations and connection factories
+ ant delete-resources Delete all destinations and connection factories
+ </echo>
+ </target>
+</project>
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
new file mode 100644
index 0000000..56eb8db
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/Client.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.stress.passivateactivate.client;
+
+import java.util.ArrayList;
+
+import java.io.Serializable;
+import javax.naming.*;
+import javax.jms.*;
+import javax.ejb.*;
+import javax.rmi.PortableRemoteObject;
+import java.rmi.NoSuchObjectException;
+import java.util.Properties;
+
+import com.sun.s1asdev.admin.ee.synchronization.api.deployment.SynchronizationHome;
+import com.sun.s1asdev.admin.ee.synchronization.api.deployment.Synchronization;
+
+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 =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ private Synchronization sfsb = null;
+
+ public static void main (String[] args) {
+
+ stat.addDescription("synchronization");
+ if ( args.length != 8) {
+ 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);
+ System.out.println("Usage: Command can be either put or get. Please retry");
+ return;
+ }
+
+ Client client = new Client(args);
+ System.out.println("[deploymentClient] doTest()...");
+ client.doTest(args);
+ System.out.println("[deploymentClient] DONE doTest()...");
+ stat.printSummary("synchronization");
+ }
+
+ public Client (String[] args) {
+ }
+
+ public void doTest(String[] args) {
+
+ initSFSB(args);
+ testSynch(args);
+ }
+
+ private void initSFSB(String[] args) {
+
+ System.out.println("[SynchronizationClient] Inside init....");
+ try {
+ Context ic = null;
+ Object objref = null;
+ if ((args[0] == null) || (args[1] == null)) {
+ ic = new InitialContext();
+ objref = ic.lookup("java:comp/env/ejb/apiDeployment");
+ } else {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", args[0]);
+ env.put("java.naming.factory.initial", args[1]);
+ ic = new InitialContext(env);
+ objref = ic.lookup(args[2]);
+ }
+
+ SynchronizationHome home = (SynchronizationHome)
+ PortableRemoteObject.narrow (objref, SynchronizationHome.class);
+
+ sfsb = (Synchronization) home.create();
+
+ System.out.println("[passivateactivate] Initalization done");
+ stat.addStatus("init deploymentClient", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ System.out.println("[deploymentClient] Exception in init....");
+ e.printStackTrace();
+ stat.addStatus("client initSFSB", stat.FAIL);
+ }
+ }
+
+ public void testSynch(String[] args) {
+ try {
+ boolean r;
+ if ( args[4].equals("get")) {
+ r = sfsb.get(args[3], args[5], args[7], args[6]);
+
+ } else {
+ r = sfsb.putFile(args[3], args[5], args[6]);
+
+ }
+ if ( r) {
+ 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] +
+ " to " + args[6] + " failed.");
+ stat.addStatus("Synchronization of applications bits", stat.FAIL);
+ }
+
+ } catch (Exception ex) {
+ stat.addStatus("ejbclient accessSFSB", stat.FAIL);
+
+ }
+ }
+
+} //Client{}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/MANIFEST.MF
new file mode 100644
index 0000000..9504ef2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+Main-Class: com.sun.s1asdev.ejb.stress.passivateactivate.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/application-client.xml
new file mode 100644
index 0000000..c6cc023
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/application-client.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>apiDeploymentClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/apiDeployment</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1asdev.admin.ee.synchronization.api.deployment.SynchronizationHome</home>
+ <remote>com.sun.s1asdev.admin.ee.synchronization.api.deployment.Synchronization</remote>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/application.xml
new file mode 100644
index 0000000..6ca95a1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>Simple Synchronization Application</description>
+ <display-name>apiDeployment-ejb</display-name>
+ <module>
+ <ejb>apiDeployment-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>apiDeployment-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..cb91c6b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/ejb-jar.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>apiDeployment</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>apiDeployment</display-name>
+ <ejb-name>apiDeployment</ejb-name>
+ <home>com.sun.s1asdev.admin.ee.synchronization.api.deployment.SynchronizationHome</home>
+ <remote>com.sun.s1asdev.admin.ee.synchronization.api.deployment.Synchronization</remote>
+ <ejb-class>com.sun.s1asdev.admin.ee.synchronization.api.deployment.SynchronizationEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>apiDeployment</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..6309af8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/apiDeployment</ejb-ref-name>
+ <jndi-name>ejb/apiDeployment</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..fc9c10b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>apiDeployment</ejb-name>
+ <jndi-name>ejb/apiDeployment</jndi-name>
+ <bean-cache>
+ <max-cache-size>12</max-cache-size>
+ </bean-cache>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..2484882
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/Synchronization.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.ee.synchronization.api.deployment;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+import java.io.IOException;
+import com.sun.enterprise.ee.synchronization.SynchronizationException;
+
+
+public interface Synchronization
+ extends EJBObject
+{
+
+ 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 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
new file mode 100644
index 0000000..80fbdb4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationEJB.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.ee.synchronization.api.deployment;
+
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+import java.io.File;
+import java.io.IOException;
+
+import java.rmi.RemoteException;
+
+import com.sun.enterprise.ee.synchronization.api.SynchronizationClient;
+import com.sun.enterprise.ee.synchronization.api.SynchronizationFactory;
+import com.sun.enterprise.ee.synchronization.SynchronizationException;
+import com.sun.enterprise.ee.synchronization.api.ApplicationsMgr;
+import com.sun.enterprise.server.ApplicationServer;
+import com.sun.enterprise.config.ConfigContext;
+
+public class SynchronizationEJB
+ implements SessionBean
+{
+ private SessionContext context;
+ private Context initialCtx;
+
+ public void ejbCreate() {
+ }
+
+ public boolean getFile(String instanceName, String sourceFile,
+ String destLoc) {
+ try {
+ ConfigContext ctx = ApplicationServer.getServerContext().
+ getConfigContext();
+ ApplicationsMgr appSynchMgr = SynchronizationFactory.
+ createSynchronizationContext(ctx).getApplicationsMgr();
+
+ appSynchMgr.synchronize(sourceFile);
+ return true;
+ } catch(Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public boolean get(String instanceName, String name, String type,
+ String destLoc) {
+ try {
+ ConfigContext ctx = ApplicationServer.getServerContext().
+ getConfigContext();
+ ApplicationsMgr appSynchMgr = SynchronizationFactory.
+ createSynchronizationContext(ctx).getApplicationsMgr();
+
+ if (type == null) {
+ return false;
+ }
+
+ if ( "J2EEApplication".equals(type) ) {
+ appSynchMgr.synchronizeJ2EEApplication(name);
+ return true;
+ }
+
+ if ( "WebModule".equals(type) ) {
+ appSynchMgr.synchronizeWebModule(name);
+ return true;
+ }
+
+ if ( "EJBModule".equals(type) ) {
+ appSynchMgr.synchronizeEJBModule(name);
+ return true;
+ }
+
+ if ( "ConnectorModule".equals(type) ) {
+ appSynchMgr.synchronizeConnectorModule(name);
+ return true;
+ }
+
+ if ( "AppclientModule".equals(type) ) {
+ appSynchMgr.synchronizeAppclientModule(name);
+ return true;
+ }
+
+ if ( "LifecycleModule".equals(type) ) {
+ appSynchMgr.synchronizeLifecycleModule(name);
+ return true;
+ }
+
+ return false;
+ } catch(Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ 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;
+ }
+ }
+
+ public void setSessionContext(SessionContext sc) {
+ this.context = sc;
+ try {
+ this.initialCtx = new InitialContext();
+ } catch (Throwable th) {
+ th.printStackTrace();
+ }
+ }
+
+ public void ejbRemove() {}
+
+ public void ejbActivate() {
+ System.out.println ("In SFSB.ejbActivate() " );
+ }
+
+ 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
new file mode 100644
index 0000000..c03e6ac
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationHome.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.admin.ee.synchronization.api.deployment;
+
+import java.rmi.RemoteException;
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+
+public interface SynchronizationHome
+ extends EJBHome
+{
+ 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
new file mode 100644
index 0000000..5d6355c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.properties
@@ -0,0 +1,34 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="apiSecurity"/>
+<property name="app.type" value="application"/>
+<!--======= -->
+<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="apiSecurity"/>
+<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
new file mode 100644
index 0000000..ba5536c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.xml
@@ -0,0 +1,234 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../../../config/run.xml">
+<!ENTITY commonConfig SYSTEM "file:./../../../../../../config/ee-common.xml">
+<!ENTITY testProperties SYSTEM "./../../build.properties">
+<!ENTITY commonSecurity SYSTEM "file:./../common.xml">
+<!ENTITY localTestProperties SYSTEM "./build.properties">
+]>
+
+
+<project name="security" basedir="." default="usage">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &commonConfig;
+ &testProperties;
+ &localTestProperties;
+ &commonSecurity;
+
+ <target name="all" depends="build, setup, deploy,run, undeploy, unsetup"/>
+
+ <target name="setup"/>
+ <target name="unsetup"/>
+
+ <target name="create-users" depends="init-common">
+ <property environment="env"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="create-auth-realm" />
+ <param name="operand.props" value="--classname com.sun.enterprise.security.auth.realm.file.FileRealm --property file=${env.S1AS_HOME}/domains/domain1/config/keyfile2:jaas-context=fileRealm --target ${cluster.name} file2"/>
+ </antcall>
+
+ <antcall target="create-user-common">
+ <param name="user" value="harpreet"/>
+ <param name="password" value="harpreet"/>
+ <param name="groups" value="employee"/>
+ <param name="authrealmname" value="file2"/>
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+
+ <antcall target="create-user-common">
+ <param name="user" value="harry"/>
+ <param name="password" value="harry"/>
+ <param name="groups" value="administrator"/>
+ <param name="authrealmname" value="file2"/>
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+ </target>
+
+ <target name="delete-users" depends="init-common">
+ <antcall target="delete-user-common">
+ <param name="user" value="harpreet"/>
+ <param name="authrealmname" value="file2"/>
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+
+ <antcall target="delete-user-common">
+ <param name="user" value="harry"/>
+ <param name="authrealmname" value="file2"/>
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="delete-auth-realm" />
+ <param name="operand.props" value="--target ${cluster.name} file2"/>
+ </antcall>
+
+ </target>
+
+ <target name="clean" depends="init-common">
+ <delete dir="${build.classes.dir}"/>
+ <delete dir="${assemble.dir}"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="shopping"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="create-users"/>
+ <antcall target="deploy-to-cluster">
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runpwd"/>
+ <antcall target="runpwdfile"/>
+ </target>
+
+ <target name="runpwd" depends="init-common">
+ <antcall target="run-standalone-client">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="test.user" value="harpreet"/>
+ <param name="test.passwd" value="harpreet"/>
+ </antcall>
+ </target>
+
+ <target name="runpwdfile" depends="init-common">
+ <antcall target="run-standalone-client-file">
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ <param name="test.user" value="harpreet"/>
+ <param name="test.passwd" value="pwdfile"/>
+ </antcall>
+ </target>
+
+ <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"/>
+
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <!-- 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}
+ successful"/>
+ <antcall target="stop-default-cluster-common"/>
+ <antcall target="start-default-cluster-common"/>
+
+ </target>
+
+ <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"
+ 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="${provider.url}"/>
+ <arg value="${ctxfactory}"/>
+ <arg value="${jndi.name}"/>
+ </exec>
+ </target>
+
+ <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"
+ 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="${provider.url}"/>
+ <arg value="${ctxfactory}"/>
+ <arg value="${jndi.name}"/>
+ </exec>
+ </target>
+
+ <!-- =============================================== -->
+ <!-- Target to run the standalone client without ACC -->
+ <!-- =============================================== -->
+ <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"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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}"/>
+ </java>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common">
+ <param name="appserver.instance.name" value="${cluster.name}"/>
+ </antcall>
+ <antcall target="delete-users"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/MANIFEST.MF
new file mode 100644
index 0000000..8267511
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+Main-Class: com.sun.devtest.admin.synchronization.api.security.client.RpaClient
+
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
new file mode 100644
index 0000000..51f6188
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/RpaClient.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.synchronization.api.security.client;
+
+import java.util.ArrayList;
+
+import java.io.Serializable;
+import javax.naming.*;
+import javax.jms.*;
+import javax.ejb.*;
+import javax.rmi.PortableRemoteObject;
+import java.rmi.NoSuchObjectException;
+import java.util.Properties;
+
+import com.sun.devtest.admin.synchronization.api.security.shopping.*;
+
+//import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class RpaClient {
+
+ // consts
+ public static String kTestNotRun = "TEST NOT RUN";
+ public static String kTestPassed = "TEST PASSED";
+ public static String kTestFailed = "TEST FAILED";
+
+ //private static SimpleReporterAdapter stat =
+ // new SimpleReporterAdapter("appserv-tests");
+
+
+ private RpaRemote hr = null;
+
+ public static void main (String[] args) {
+
+ //stat.addDescription("synchronization");
+ if ( args.length != 3) {
+ //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);
+ testSynch(args);
+ }
+
+ private void initSFSB(String[] args) {
+
+ System.out.println("[apiClient] Inside init....");
+ try {
+ Context ic = null;
+ Object objref = 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");
+ } else {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", args[0]);
+ env.put("java.naming.factory.initial", args[1]);
+ ic = new InitialContext(env);
+ objref = ic.lookup(args[2]);
+ }
+
+ RpaHome home = (RpaHome)
+ PortableRemoteObject.narrow (objref, RpaHome.class);
+
+ hr = home.create("LizHurley");
+
+ System.out.println("[passivateactivate] Initalization done");
+ //stat.addStatus("init apiClient", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ System.out.println("[apiClient] Exception in init....");
+ e.printStackTrace();
+ //stat.addStatus("client initSFSB", stat.FAIL);
+ }
+ }
+
+ public void testSynch(String[] args) {
+ // invoke 3 overloaded methods on the EJB
+ try{
+ 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());
+ hr.deleteItem("lipstick2");
+ java.lang.String[] shoppingList = hr.getItems();
+ System.out.println("Shopping list for LizHurley");
+ for (int i=0; i<shoppingList.length; i++){
+ System.out.println(shoppingList[i]);
+ }
+
+ System.out.println("Total Cost for Ms Hurley = "+
+ hr.getTotalCost());
+
+ } catch(Exception re){
+ re.printStackTrace();
+ System.out.println("RealmPerApp:RpaLoginBean Test Failed");
+ System.exit(-1);
+ }
+ System.out.println("RealmPerApp:RpaLoginBean Test Passed");
+
+ }
+
+} //Client{}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/application-client.xml
new file mode 100644
index 0000000..67904c3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/application-client.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" "http://java.sun.com/dtd/application-client_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>apiSecurityClient</display-name>
+ <description>Stateful Login Bean checking j2eelogin.name and j2eelogin.password properties</description>
+ <ejb-ref>
+ <ejb-ref-name>ejb/apiSecurity</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.devtest.admin.synchronization.api.security.shopping.RpaHome</home>
+ <remote>com.sun.devtest.admin.synchronization.api.security.shopping.RpaRemote</remote>
+ </ejb-ref>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/application.xml
new file mode 100644
index 0000000..a9905f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>apiSecurity-ejb</display-name>
+ <module>
+ <ejb>apiSecurity-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>apiSecurity-client.jar</java>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..b0b62ab
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/ejb-jar.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>apiSecurity</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>apiSecurity</display-name>
+ <ejb-name>apiSecurity</ejb-name>
+ <home>com.sun.devtest.admin.synchronization.api.security.shopping.RpaHome</home>
+ <remote>com.sun.devtest.admin.synchronization.api.security.shopping.RpaRemote</remote>
+ <ejb-class>com.sun.devtest.admin.synchronization.api.security.shopping.RpaBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-role-ref>
+ <role-name>EMP</role-name>
+ <role-link>Employee</role-link>
+ </security-role-ref>
+ <security-role-ref>
+ <role-name>STAFF</role-name>
+ <role-link>Employee</role-link>
+ </security-role-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <security-role>
+ <role-name>Employee</role-name>
+ </security-role>
+ <container-transaction>
+ <method>
+ <ejb-name>apiSecurity</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..8502f56
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+<ejb-ref>
+<ejb-ref-name>ejb/apiSecurity</ejb-ref-name>
+<jndi-name>ejb/apiSecurity</jndi-name>
+</ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-application.xml
new file mode 100644
index 0000000..6108988
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-application.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application>
+ <unique-id>0</unique-id>
+ <security-role-mapping>
+ <role-name>Administrator</role-name>
+ <principal-name>harry</principal-name>
+ </security-role-mapping>
+ <security-role-mapping>
+ <role-name>Employee</role-name>
+ <principal-name>harpreet</principal-name>
+ </security-role-mapping>
+ <security-role-mapping>
+ <role-name>Manager</role-name>
+ <principal-name>harpreet</principal-name>
+ </security-role-mapping>
+ <realm>file2</realm>
+</sun-application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..5ba97d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+<enterprise-beans>
+<unique-id>0</unique-id>
+<ejb>
+<ejb-name>apiSecurity</ejb-name>
+<jndi-name>ejb/apiSecurity</jndi-name>
+<ior-security-config>
+<transport-config>
+<integrity>supported</integrity>
+<confidentiality>supported</confidentiality>
+<establish-trust-in-target>supported</establish-trust-in-target>
+<establish-trust-in-client>supported</establish-trust-in-client>
+</transport-config>
+<as-context>
+<auth-method>username_password</auth-method>
+<realm>file2</realm>
+<required>true</required>
+</as-context>
+<sas-context>
+<caller-propagation>supported</caller-propagation>
+</sas-context>
+</ior-security-config>
+<gen-classes/>
+</ejb>
+</enterprise-beans>
+</sun-ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/pwdfile b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/pwdfile
new file mode 100644
index 0000000..9746ce8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/pwdfile
@@ -0,0 +1 @@
+PASSWORD=harpreet
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
new file mode 100644
index 0000000..d1edaea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaBean.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * ShoppingEJB.java
+ *
+ * Created on May 15, 2003, 5:16 PM
+ */
+
+package com.sun.devtest.admin.synchronization.api.security.shopping;
+
+import javax.ejb.SessionContext;
+import javax.ejb.SessionBean;
+import java.util.Vector;
+import java.lang.String;
+import java.util.Iterator;
+import javax.ejb.EJBException;
+import java.rmi.RemoteException;
+/**
+ *
+ * @author Harpreet
+ * @version
+ */
+
+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();
+ items.add(item);
+ itemPrice.add(new Integer(price));
+ totalItems++;
+ totalPrice += price;
+ System.out.println(" Shopping Cart: Shopper "+ shopper +" has bought "
+ + item +" for price ="+ price +" .Total Items = "+totalItems +
+ " .TotalPrice = " + totalPrice);
+ }
+
+ 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 "+
+ price.intValue());
+ totalPrice -= price.shortValue();
+ 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();
+
+ Iterator it = items.iterator();
+ int sz = items.size();
+ String[] itemNames = new String[sz];
+ for(int i=0; it.hasNext();){
+ itemNames[i++] = new String( (String)it.next());
+ }
+ 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(javax.ejb.SessionContext sessionContext) {
+ sc = sessionContext;
+ }
+
+ private void checkCallerPrincipal() throws EJBException {
+ System.out.println("Caller Princial = " + sc.getCallerPrincipal() +
+ " comparing against " + principal);
+
+ if (!sc.getCallerPrincipal().getName().equals(principal)) {
+ throw new EJBException("Wrong Principal. Principal should be = "
+ + 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
new file mode 100644
index 0000000..e520210
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaHome.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * RpaHome.java
+ *
+ * Created on May 15, 2003, 5:21 PM
+ */
+
+package com.sun.devtest.admin.synchronization.api.security.shopping;
+import javax.ejb.EJBHome;
+/**
+ *
+ * @author Harpreet Singh
+ */
+public interface RpaHome extends EJBHome{
+
+ public RpaRemote create(java.lang.String shopperName)
+ throws java.rmi.RemoteException, javax.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
new file mode 100644
index 0000000..425d2e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaRemote.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Rpa.java
+ *
+ * Created on May 15, 2003, 5:09 PM
+ */
+
+package com.sun.devtest.admin.synchronization.api.security.shopping;
+import javax.ejb.EJBObject;
+/**
+ * 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
new file mode 100644
index 0000000..de31417
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/sun-acc-1.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ 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
+-->
+
+<!DOCTYPE client-container PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Application Client Container//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client-container_1_1.dtd">
+
+<client-container>
+ <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"/>
+ </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
new file mode 100644
index 0000000..af946be
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/wss-client-config.xml
@@ -0,0 +1,36 @@
+<!--
+
+ Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
+ dumpMessages="false">
+ <xwss:Timestamp/>
+ <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:Encrypt>
+ <xwss:X509Token certificateAlias="s1as"/>
+ </xwss:Encrypt>
+ <xwss:Sign>
+ <xwss:X509Token certificateAlias="s1as"/>
+ </xwss:Sign>
+ <xwss:UsernameToken digestPassword="false" useNonce="false"/>
+</xwss:SecurityConfiguration>
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
new file mode 100644
index 0000000..74fad6a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="cluster.name" value="ee-synchronization-cluster"/>
+<property name="nodeagent.name" value="ee-synchronization-agent"/>
+<property name="clustered.server.name" value="ee-synchronization-server-1"/>
+<property name="clustered.server.name.two" value="ee-synchronization-server-2"/>
+<property name="ee" value="enterprise edition"/>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.xml
new file mode 100644
index 0000000..d082382
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../config/ee-common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ee-synchronization" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+ &testproperties;
+
+ <!-- -->
+ <!-- TESTS ASSUME DAS IS RUNNING -->
+ <!-- -->
+ <target name="all" depends="setup-cluster, run-tests, remove-cluster"/>
+
+ <target name="setup-cluster" depends="init-common">
+ <antcall target="setup-default-cluster-common"/>
+ <antcall target="start-default-cluster-common"/>
+ </target>
+
+ <target name="run-tests" depends="setup-cluster">
+ <antcall target="api">
+ <param name="api.target" value="all"/>
+ </antcall>
+ <antcall target="cleaner">
+ <param name="cleaner.target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="api">
+ <record name="api.output" action="start"/>
+ <ant dir="api" target="${api.target}"/>
+ <record name="api.output" action="stop"/>
+ </target>
+
+ <target name="cleaner">
+ <record name="cleaner.output" action="start"/>
+ <ant dir="cleaner" target="${cleaner.target}"/>
+ <record name="cleaner.output" action="stop"/>
+ </target>
+
+ <target name="remove-cluster" depends="init-common">
+ <antcall target="stop-default-cluster-common"/>
+ <antcall target="remove-default-cluster-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/bootstrap.subcomponent.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/bootstrap.subcomponent.properties
new file mode 100644
index 0000000..dad0bbc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/bootstrap.subcomponent.properties
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+publish.root.dir=../../../../../../..
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
new file mode 100644
index 0000000..4a83703
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.properties
@@ -0,0 +1,53 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="ee" value="enterprise edition"/>
+
+<property name="module" value="synchronization-cleaner"/>
+<property name="appname" value="${module}-application"/>
+
+<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="test.client"
+ 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="app.type" value="application"/>
+<property name="client.jar.location" value="${admin.domain.dir}/${admin.domain}/applications/j2ee-apps/${appname}Client.jar"/>
+
+<property name="javamail.resource.name" value="javamail/s1qeMail"/>
+<property name="mailhost" value="localhost"/>
+<property name="mailuser" value="nazrul.islam@sun.com"/>
+<property name="fromaddress" value="nazrul.islam@sun.com"/>
+<property name="debug" value="false"/>
+<property name="enabled" value="true"/>
+<property name="testsrc.dir" value="testsrc"/>
+<property name="publish.root.dir" value="./../../../../../../../" />
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
new file mode 100644
index 0000000..b590bbe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.xml
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../config/common.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../../../config/ee-common.xml">
+<!ENTITY junit_targets SYSTEM "file:./../../../../../../../appserv-ee/junit_targets.xml">
+<!ENTITY properties SYSTEM "file:./build.properties">
+<!ENTITY parentProperties SYSTEM "file:./../../build.properties">
+]>
+
+<project name="ee-synchronization-cleaner" default="usage" basedir=".">
+
+ <property file="./bootstrap.subcomponent.properties"/>
+ <property file="./../../../../../../../bootstrap/bootstrap.properties"/>
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+ &junit_targets;
+ &properties;
+ &parentProperties;
+
+ <target name="all" depends="clean, build, setup, run-tests, unsetup"/>
+
+ <target name="run-tests">
+ <antcall target="deploy" />
+ <antcall target="run-default-test" />
+ <antcall target="undeploy" />
+ <antcall target="verify-test" />
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup"/>
+ <target name="unsetup"/>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-ee">
+ <param name="appserver.instance.name" value="ee-synchronization-cluster"/>
+ </antcall>
+ <antcall target="remove-cleaner-cookie"/>
+ <antcall target="restart-cluster"/>
+ <antcall target="copy-client-jar"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common">
+ <param name="appserver.instance.name" value="ee-synchronization-cluster"/>
+ </antcall>
+ <antcall target="remove-cleaner-cookie"/>
+ <antcall target="restart-cluster"/>
+ </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"/>
+ </target>
+
+ <target name="remove-cleaner-cookie" depends="init-common">
+ <move file="${env.S1AS_HOME}/nodeagents/${nodeagent.name}/${clustered.server.name}/generated/.com_sun_appserv_cleaner_cookie" tofile="${assemble.dir}/.com_sun_appserv_cleaner_cookie" overwrite="true" failonerror="true"/>
+ </target>
+
+ <target name="restart-cluster" depends="init-common">
+ <antcall target="stop-cluster-common">
+ <param name="cluster.name" value="ee-synchronization-cluster"/>
+ </antcall>
+ <antcall target="start-cluster-common">
+ <param name="cluster.name" value="ee-synchronization-cluster"/>
+ </antcall>
+ </target>
+
+ <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"/>
+
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <!-- 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} 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"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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="run-default-test" depends="init-common">
+ <!-- antcall target="runclient-common"/ -->
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="0"/>
+ <param name="orb.port" value="${orb.listener1.port}"/>
+ </antcall>
+ <antcall target="run-standalone-client">
+ <param name="test.id" value="0"/>
+ <param name="orb.port" value="${orb.listener1.port.two}"/>
+ </antcall>
+ </target>
+
+ <target name="junit-test-common">
+ <!-- Log directory for server logger -->
+ <mkdir dir="/tmp/logs"/>
+ <java classname="${junit.test.class}" failonerror="true" fork="true"
+ classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar:${junit.jar}">
+ <!--
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+ -->
+ <jvmarg value="-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager"/>
+ <jvmarg value="-Dcom.sun.aas.instanceRoot=${env.S1AS_HOME}/nodeagents/${nodeagent.name}/${clustered.server.name}"/>
+ <jvmarg value="-Dappname=${appname}App"/>
+ </java>
+ </target>
+
+ <target name="verify-test" depends="compile-test">
+ <echo message="s1astest.classpath ${s1astest.classpath}" />
+ <echo message="assemble.dir ${assemble.dir}" />
+ <echo message="build.classes.dir ${build.classes.dir}" />
+
+ <antcall target="junit-test-common">
+ <param name="junit.test.class"
+ value="com.sun.enterprise.ee.synchronization.cleaner.SynchronizationCleanerTest"/>
+ </antcall>
+ </target>
+
+ <path id="test.classpath">
+ <!-- path refid="s1astest.classpath"/ -->
+ <pathelement location="${s1astest.classpath}"/>
+ <pathelement location="${assemble.dir}"/>
+ <pathelement location="${build.classes.dir}"/>
+ <pathelement location="${junit.jar}"/>
+ </path>
+
+ <target name="compile-test" depends="init-common"
+ description="Compile test sources">
+ <echo message="JUnit Jar ${junit.jar}" />
+
+ <javac srcdir="${testsrc.dir}"
+ destdir="${build.classes.dir}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ deprecation="${javac.deprecation}"
+ failonerror="true">
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+ <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
new file mode 100644
index 0000000..289e978
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/LookupClient.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.client;
+
+import java.util.Properties;
+import java.math.BigDecimal;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import com.sun.devtest.admin.notification.lookup.ejb.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ * A simple java client. This uses the services provided by the
+ * <code>LookupBean</code>.
+ */
+public class LookupClient {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ LookupClient() {
+ }
+
+ /**
+ * The main method of the client.
+ */
+ public static void main(String[] args) {
+ LookupClient client = new LookupClient();
+ client.run(args);
+ }
+
+ private void run(String[] args) {
+
+ String url = null;
+ String testId = null;
+ String jndiName = null;
+ Context context = null;
+ String ctxFactory = null;
+ java.lang.Object obj = null;
+
+ try {
+ stat.addDescription("Tests dynamic reconfig of resources");
+
+ if (args.length == 3) {
+ url = args[0];
+ ctxFactory = args[1];
+ jndiName = args[2];
+ }
+ testId = System.getProperty("testId", "0");
+
+ if ( (url == null) || (ctxFactory == null) ) {
+ // 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/lookupBean");
+ } else {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", url);
+ env.put("java.naming.factory.initial", ctxFactory);
+ // Initialize the Context with JNDI specific properties
+ context = new InitialContext(env);
+ System.out.println("Context Initialized with " +
+ "URL: " + url + ", Factory: " + ctxFactory);
+ // Create Home object
+ obj = context.lookup(jndiName);
+ }
+
+ LookupRemoteHome home =
+ (LookupRemoteHome) PortableRemoteObject.narrow(obj,
+ LookupRemoteHome.class);
+ LookupRemote bean = home.create();
+
+ runDefaultTest(bean, "converter");
+ } catch (Exception ex) {
+ System.err.println("Caught an unexpected exception!");
+ ex.printStackTrace();
+ }
+ }
+
+ private void runDefaultTest(LookupRemote bean, String testId) {
+ try {
+ BigDecimal param = new BigDecimal ("100.00");
+ BigDecimal amount = bean.dollarToYen(param);
+ System.out.println("\n\n\n===========Beginning Simple Test=====\n\n");
+ System.out.println("$100 is : "+amount+"Yen");
+ amount = bean.yenToEuro(param);
+ System.out.println("Yen is :"+amount+"Euro");
+ stat.addStatus(testId, stat.PASS);
+ } catch (Exception e) {
+ stat.addStatus(testId, stat.FAIL);
+ e.printStackTrace();
+ } finally {
+ stat.printSummary("Test Result for #" + testId);
+ }
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/MANIFEST.MF
new file mode 100644
index 0000000..543e7b7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.devtest.admin.notification.lookup.client.LookupClient
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application-client.xml
new file mode 100644
index 0000000..8cc652f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application-client.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>LookupClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/lookupBean</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.devtest.admin.notification.lookup.ejb.LookupRemoteHome</home>
+ <remote>com.sun.devtest.admin.notification.lookup.ejb.LookupRemote</remote>
+ </ejb-ref>
+</application-client>
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
new file mode 100644
index 0000000..a69ef90
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>synchronization-cleaner-applicationApp</display-name>
+ <module>
+ <java>synchronization-cleaner-application-client.jar</java>
+ </module>
+ <module>
+ <ejb>synchronization-cleaner-application-ejb.jar</ejb>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..466d9bb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/ejb-jar.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <display-name>LookupApp</display-name>
+ <ejb-name>LookupBean</ejb-name>
+ <home>com.sun.devtest.admin.notification.lookup.ejb.LookupRemoteHome</home>
+ <remote>com.sun.devtest.admin.notification.lookup.ejb.LookupRemote</remote>
+ <ejb-class>com.sun.devtest.admin.notification.lookup.ejb.LookupBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Bean</transaction-type>
+ <resource-ref>
+ <res-ref-name>jdbcRes</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jdbcPool</res-ref-name>
+ <res-type>javax.sql.ConnectionPoolDataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>pmfRes</res-ref-name>
+ <res-type>javax.sql.ConnectionPoolDataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jmsRes</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>javaMailRes</res-ref-name>
+ <res-type>javax.mail.Session</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..fedc5a9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/lookupBean</ejb-ref-name>
+ <jndi-name>lookupbean</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..04f1386
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>LookupBean</ejb-name>
+ <jndi-name>lookupbean</jndi-name>
+
+ <resource-ref>
+ <res-ref-name>jdbcRes</res-ref-name>
+ <jndi-name>jdbc/s1qeDB</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>pmfRes</res-ref-name>
+ <jndi-name>jdo/s1qePM</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>jmsRes</res-ref-name>
+ <jndi-name>jms/SampleQueue</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>javaMailRes</res-ref-name>
+ <jndi-name>javamail/s1qeMail</jndi-name>
+ <default-resource-principal>
+ <name>DBUSER</name>
+ <password>DBPASSWORD</password>
+ </default-resource-principal>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>jdbcPool</res-ref-name>
+ <jndi-name>__SYSTEM/pools/jdbc-pointbase-pool</jndi-name>
+ </resource-ref>
+
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..c9fbc1d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupBean.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.ejb;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import java.math.*;
+import javax.naming.*;
+
+/**
+ */
+public class LookupBean implements SessionBean {
+
+ SessionContext sessionContext_;
+
+ BigDecimal yenRate = new BigDecimal("121.6000");
+ BigDecimal euroRate = new BigDecimal("0.0077");
+
+ /**
+ * Returns the yen value for a given dollar amount.
+ * @param dollars dollar amount to be converted to yen.
+ */
+ public BigDecimal dollarToYen(BigDecimal dollars) {
+
+ BigDecimal result = dollars.multiply(yenRate);
+ return result.setScale(2,BigDecimal.ROUND_UP);
+ }
+
+ /**
+ * Returns the euro value for a given yen amount.
+ * @param yen yen amount to be converted to euro.
+ */
+ public BigDecimal yenToEuro(BigDecimal yen) {
+ BigDecimal result = yen.multiply(euroRate);
+ return result.setScale(2,BigDecimal.ROUND_UP);
+ }
+
+ public boolean lookupResource(String jndiName) {
+ try {
+ Context context = new InitialContext();
+ Object obj = context.lookup(jndiName);
+ if (obj != null) {
+ System.out.println("Looked up " + obj.getClass().getName());
+ return true;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Required by EJB spec.
+ */
+ public LookupBean() {}
+
+ /**
+ * Creates a bean. Required by EJB spec.
+ * @exception throws CreateException.
+ */
+ public void ejbCreate() {}
+
+ /**
+ * Removes the bean. Required by EJB spec.
+ */
+ public void ejbRemove() {}
+
+ /**
+ * 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.
+ */
+ public void ejbPassivate() {}
+
+ /**
+ * Sets the session context. Required by EJB spec.
+ * @param ctx A SessionContext object.
+ */
+ public void setSessionContext(SessionContext sc) {
+ sessionContext_ = sc;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupRemote.java
new file mode 100644
index 0000000..e9b5b2e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupRemote.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.ejb;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+import java.math.*;
+
+/**
+ *
+ */
+public interface LookupRemote extends EJBObject {
+
+ /**
+ */
+ public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
+
+ /**
+ */
+ public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
+
+ public boolean lookupResource(String jndiName) throws RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupRemoteHome.java
new file mode 100644
index 0000000..d6caede
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupRemoteHome.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.devtest.admin.notification.lookup.ejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ */
+public interface LookupRemoteHome extends EJBHome {
+ /**
+ */
+ LookupRemote create() throws RemoteException, CreateException;
+}
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
new file mode 100644
index 0000000..c26962e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/testsrc/SynchronizationCleanerTest.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.enterprise.ee.synchronization.cleaner;
+
+import java.io.File;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+/**
+ * Synchronization cleaner test.
+ *
+ * @author Nazrul Islam
+ */
+public class SynchronizationCleanerTest extends TestCase {
+
+ public SynchronizationCleanerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() {
+ }
+
+ protected void tearDown() {
+ }
+
+ /**
+ * Tests the remove functionality of file handler.
+ */
+ public void test() {
+
+ try {
+ String iRoot = System.getProperty("com.sun.aas.instanceRoot");
+ String appname = System.getProperty("appname");
+ String appdir = iRoot + File.separator + "applications"
+ + File.separator + "j2ee-apps" + File.separator + appname;
+
+ System.out.println("Application dir: " + appdir);
+
+ File app = new File(appdir);
+
+ // file should be removed
+ assertTrue( !app.exists() );
+ System.out.println("Application dir is removed after restart.");
+
+ String gendir = iRoot + File.separator + "generated"
+ + "ejb" + File.separator + "j2ee-apps" + File.separator + appname;
+ File gen = new File(gendir);
+ assertTrue( !gen.exists() );
+ System.out.println("Generated dir is removed after restart.");
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ 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"));
+ return suite;
+ }
+ public static void main(String args[]) {
+ junit.textui.TestRunner.run(SynchronizationCleanerTest.suite());
+ }
+ */
+
+ public static void main(String args[]) {
+ junit.textui.TestRunner.run(SynchronizationCleanerTest.class);
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/build.xml
new file mode 100644
index 0000000..f7432d9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/build.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY eeCommonBuild SYSTEM "file:./../../../../../config/ee-common.xml">
+<!ENTITY testproperties SYSTEM "file:./../build.properties">
+]>
+
+<project name="ee-synchronization-cleaner" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &eeCommonBuild;
+ &testproperties;
+
+ <target name="all" depends="run-tests"/>
+
+ <target name="run-tests">
+ <antcall target="application">
+ <param name="application.target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="application">
+ <record name="application.output" action="start"/>
+ <ant dir="application" target="${application.target}"/>
+ <record name="application.output" action="stop"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/build.properties
new file mode 100644
index 0000000..02fa83f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/build.properties
@@ -0,0 +1,17 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
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
new file mode 100644
index 0000000..8d3cd3a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common-web.xml
@@ -0,0 +1,1643 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ 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}
+ ${assemble.dir}
+-->
+<!-- ================================================================ -->
+<target name="clean-classes-common" depends="init-common">
+ <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>
+
+<target name="clean-common" depends="init-common">
+ <antcall target="clean-classes-common"/>
+ <antcall target="clean-jars-common"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to compile the java source files -->
+<!--
+Variables used:
+ ${build.classes.dir}
+ ${s1astest.classpath}
+ ${src}
+-->
+<!-- ================================================================ -->
+<target name="compile-common" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <echo message="common.xml: Compiling test source files" level="verbose"/>
+ <mkdir dir="${src}"/>
+ <javac srcdir="${src}"
+ destdir="${build.classes.dir}"
+ classpath="${s1astest.classpath}"
+ debug="on"
+ failonerror="true"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- This is the external target war-common to be called up build files
+usage:
+<antcall target="war-common">
+<param name="war.classes" value="MyServlet.class,MyOtherServlet.class"/>
+</antcall>
+Assumption: All the static content is placed in webcontent directory
+
+Variables Used:
+ ${war.file}
+ ${build.classes.dir}
+ ${appname}
+ ${assemble.dir}
+ ${web.xml}
+ ${tlds}
+ ${tagfiles}
+ ${APS_HOME}
+ ${webclient.war.files}
+ ${webclient.war.classes}
+-->
+<!-- ================================================================ -->
+
+<target name="webclient-war-common" if="hasWebclient" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-war-common">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+</target>
+
+<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"
+ overwrite="true" />
+</target>
+
+<target name="clean-webapps-common" depends="init-common">
+ <delete dir="${build.webapps.dir}" quiet="true" />
+</target>
+
+<target name="clear">
+ <delete file="${war.file}"/>
+</target>
+
+<target name="copy-tlds" if="tlds-exist" depends="clear,test-tlds-exist">
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/tlds"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/tlds" failonerror="false">
+ <fileset dir="${tlds}">
+ <include name="**/*.tld"/>
+ </fileset>
+ </copy>
+</target>
+
+<target name="copy-tagfiles" if="tagfiles-exist" depends="clear,test-tagfiles-exist">
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/tags"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/tags" failonerror="false">
+ <fileset dir="${tagfiles}">
+ <include name="**/*.tag"/>
+ <include name="**/*.tagx"/>
+ </fileset>
+ </copy>
+</target>
+
+<target name="package-war-common" depends="copy-tlds,copy-tagfiles">
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
+ <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}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-web.xml" failonerror="false"/>
+ <copy file="${sun-web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
+ <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}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/sun-ejb-jar.xml" failonerror="false"/>
+ <copy file="${weblogic.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/weblogic.xml" failonerror="false"/>
+ <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">
+ <include name="**/*.jar"/>
+ <include name="**/*.zip"/>
+ </fileset>
+ </copy>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
+ failonerror="false"/>
+ <copy file="${mappingfile.location}/${mappingfile.name}"
+ tofile="${build.classes.dir}/tmp/${mappingfile.name}"
+ failonerror="false"/>
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
+ failonerror="false"/>
+ <copy file="${tagPlugins.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/tagPlugins.xml"
+ failonerror="false"/>
+ <copy file="${web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"
+ failonerror="false"/>
+ <copy file="${persistence.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/persistence.xml"
+ failonerror="false"/>
+ <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/javax.enterprise.inject.spi.Extension" failonerror="false"/>
+
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
+ <fileset dir="${war.classes}">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <echo message="Creating war file ${war.file}" level="verbose"/>
+ <mkdir dir="${basedir}/docroot"/>
+ <jar jarfile="${war.file}" update="true">
+ <fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
+ <include name="**/*class*"/>
+ </fileset>
+ <fileset dir="${basedir}/docroot" casesensitive="yes">
+ <include name="**/*.html"/>
+ <include name="**/*.HTML"/>
+ <include name="**/*.xhtml"/>
+ <include name="**/*.jsp"/>
+ <include name="**/*.jspx"/>
+ <include name="**/*.jspf"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.do"/>
+ <include name="**/*.txt"/>
+ <include name="**/*.shtml"/>
+ <include name="**/*.jar"/>
+ <exclude name="**/*.java,**/*.xml,**/*.properties"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}/tmp/" casesensitive="true">
+ <include name="WEB-INF/web.xml"/>
+ <include name="WEB-INF/glassfish-web.xml"/>
+ <include name="WEB-INF/glassfish-ejb-jar.xml"/>
+ <include name="WEB-INF/glassfish-resources.xml"/>
+ <include name="WEB-INF/sun-web.xml"/>
+ <include name="WEB-INF/sun-ejb-jar.xml"/>
+ <include name="WEB-INF/beans.xml"/>
+ <include name="WEB-INF/weblogic.xml"/>
+ <include name="WEB-INF/webservices.xml"/>
+ <include name="WEB-INF/tagPlugins.xml"/>
+ <include name="WEB-INF/lib/*"/>
+ <include name="WEB-INF/lib/extra/*"/>
+ <include name="WEB-INF/tlds/*"/>
+ <include name="WEB-INF/tags/*"/>
+ <include name="WEB-INF/wsdl/${wsdlfile.name}"/>
+ <include name="${mappingfile.name}"/>
+ <include name="META-INF/context.xml"/>
+ <include name="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension"/>
+ <include name="WEB-INF/classes/META-INF/persistence.xml"/>
+ </fileset>
+ </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}"
+ level="verbose"/>
+</target>
+
+<target name="test-tlds-exist">
+ <available file="${tlds}" property="tlds-exist"/>
+</target>
+
+<target name="test-tagfiles-exist">
+ <available file="${tagfiles}" property="tagfiles-exist"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to package the ejb application to jar file -->
+<!--
+Variables Used:
+ ${ejb.jar}
+ ${build.classes.dir}
+ ${ejb-jar.xml}
+ ${beans.xml}
+ ${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"
+ level="verbose"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/ejb-jar.xml"
+ failonerror="false"/>
+ <copy file="${persistence-orm.xml}"
+ tofile="${build.classes.dir}/META-INF/persistence-orm.xml"
+ failonerror="false"/>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/META-INF/webservices.xml"
+ failonerror="false"/>
+ <copy file="${sun-ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"
+ failonerror="false"/>
+ <copy file="${glassfish-ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/glassfish-ejb-jar.xml"
+ failonerror="false"/>
+ <copy file="${glassfish-resources.xml}"
+ tofile="${build.classes.dir}/META-INF/glassfish-resources.xml"
+ failonerror="false"/>
+ <copy file="${sun-cmp-mappings.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml"
+ failonerror="false"/>
+ <copy file="${beans.xml}"
+ tofile="${build.classes.dir}/META-INF/beans.xml"
+ failonerror="false"/>
+ <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/>
+ <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true"
+ includes ="${ejbjar.classes}">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="ejb-jar.xml"/>
+ <include name="persistence-orm.xml"/>
+ <include name="webservices.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ <include name="glassfish-resources.xml"/>
+ <include name="glassfish-ejb-jar.xml"/>
+ <include name="sun-cmp-mappings.xml"/>
+ <include name="beans.xml"/>
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
+ <delete file="${build.classes.dir}/*.dbschema" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to package the appclient application to jar file -->
+<!--
+Variables Used:
+ ${appclient.jar}
+ ${appclientjar.classes}
+ ${appclientjar.files}
+ ${build.classes.dir}
+ ${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"
+ level="verbose"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${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">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ </jar>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create the ejb application jar file -->
+<!-- ================================================================ -->
+<target name="ejb-jar-common" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-ejbjar-common">
+ <param name="ejbjar.files" value="${build.classes.dir}"/>
+ <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create the appclient jar file -->
+<!-- ================================================================ -->
+<target name="appclient-jar-common" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.files"
+ value="${build.classes.dir}"/>
+ <param name="appclient.jar"
+ value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+</target>
+
+<!-- ===== package par ===== -->
+<target name="package-persistence-common" depends="init-common" if="ejb30-persistence">
+ <echo message="CREATING Persistence archive: common.xml: ${build.classes.dir}, ${assemble.dir}"/>
+ <mkdir dir="${assemble.dir}"/>
+ <delete file="${assemble.dir}/${appname}-persistence.jar" failonerror="false"/>
+ <echo message="common.xml: Generating PAR inside build directory"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${persistence.xml}" tofile="${build.classes.dir}/META-INF/persistence.xml" failonerror="false"/>
+ <copy file="${mapping.xml}" tofile="${build.classes.dir}/META-INF/entity-mapping.xml" failonerror="false"/>
+ <!-- make a jar -->
+ <jar jarfile="${assemble.dir}/${appname}-persistence.jar" basedir="${build.classes.dir}" update="true" includes ="**/*.class" excludes="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class,**/*EJB*.class,**/*Exception.class">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="**/*.xml"/>
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to assemble the ejb application to ear file -->
+<!-- ================================================================ -->
+<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"/>
+ <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">
+ <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/glassfish-resources.xml"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
+ </jar>
+</target>
+
+
+<!-- ================================================================ -->
+<!-- Target to assemble the ejb application to ear file -->
+<!-- ================================================================ -->
+<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"/>
+ <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"
+ 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/glassfish-resources.xml"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
+ </ear>
+</target>
+
+
+<!-- run Verifier on the ear file -->
+<target name="verifier" depends="init-common">
+ <echo message="Running verifier
+ ear file ${assemble.dir}/${appname}App.ear " level="verbose"/>
+ <antcall target="verifier-common">
+ <param name="verifier.command" value=" -n -rw "/>
+ <param name="operand.props" value="${assemble.dir}/${appname}App.ear"/>
+ </antcall>
+ <echo message="Validate the static check results" level="verbose"/>
+</target>
+
+<target name="verifier-common">
+ <echo message="Operand ${operand.props}" level="verbose"/>
+ <exec executable="${VERIFIER}" failonerror="true">
+ <arg line="${verifier.command} ${operand.props}" />
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to execute asadmin commands -->
+<!-- ================================================================ -->
+<target name="asadmin-common">
+ <echo message="Doing admin task ${admin.command} in EMBEDDEDMODE " level="verbose"/>
+ <echo message="Operand ${operand.props}" level="verbose"/>
+ <echo message="asadmin ${admin.command} ${operand.props}"/>
+ <glassfish-embedded-admin commandLine="${admin.command} ${operand.props}" />
+</target>
+
+<target name="start-server-embedded-with-web-jar">
+ <echo> === Embedded STARTING === </echo>
+ <glassfish-embedded-start/>
+</target>
+
+
+<target name="asadmin-common-ignore-fail">
+ <echo message="Doing admin task ${admin.command} in EMBEDDEDMODE (ignore failures)"
+ level="verbose"/>
+ <echo message="Operand ${operand.props}" level="verbose"/>
+ <echo message="asadmin ${admin.command} ${operand.props}"/>
+ <glassfish-embedded-admin commandLine="${admin.command} ${operand.props}"/>
+</target>
+
+<!-- Target to execute a batchfile of asadmin commands -->
+<!-- ================================================================ -->
+<target name="asadmin-batch-common">
+ <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">
+AS_ADMIN_USERPASSWORD=${password}
+AS_ADMIN_PASSWORD=${admin.password}
+AS_ADMIN_ADMINPASSWORD=${admin.password}
+AS_ADMIN_MASTERPASSWORD=${master.password}
+</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}" />
+ </exec>
+ <delete file="${user.password.file}" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+
+<!-- ================================================================ -->
+<!-- Target to create the user in file realm the AppServ -->
+<!-- ================================================================ -->
+<target name="create-user-common" depends="init-common">
+<property name="user.password.file" value="asadminuserpassword.txt"/>
+<echo file="${user.password.file}" append="false">
+AS_ADMIN_USERPASSWORD=${password}
+AS_ADMIN_PASSWORD=${admin.password}
+AS_ADMIN_ADMINPASSWORD=${admin.password}
+AS_ADMIN_MASTERPASSWORD=${master.password}
+</echo>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="create-file-user" />
+ <param name="operand.props"
+ value="--user ${admin.user} --passwordfile ${user.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true --groups ${groups} --userpassword ${password} --authrealmname ${authrealmname} --target ${appserver.instance.name} ${user}"/>
+ </antcall>
+ <delete file="${user.password.file}" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete the user in file realm the AppServ -->
+<!-- ================================================================ -->
+<target name="delete-user-common" depends="init-common">
+<echo message="Deleting user ${user} in file realm" level="verbose"/>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="delete-file-user" />
+ <param name="operand.props"
+ value="${user}"/>
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- J2EE Connector related targets -->
+<!-- ================================================================ -->
+
+<target name="create-connector-connpool-common"
+ depends="init-common, create-connector-connpool"/>
+
+<target name="create-connector-connpool" depends="init-common">
+ <property name="failonerror" value="false"/>
+ <property name="extra-params" value=""/>
+ <echo message="asadmin create-connector-connection-pool ${as.props} --raname ${ra.name} --connectiondefinition ${connection.defname} --target ${appserver.instance.name} ${connector.conpool.name}"/>
+ <exec executable="${ASADMIN}" failonerror="${failonerror}">
+ <arg line="create-connector-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="--raname ${ra.name}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--connectiondefinition ${connection.defname}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${connector.conpool.name}"/>
+ </exec>
+</target>
+
+<target name="delete-connector-connpool-common" depends="init-common">
+ <echo message="asadmin delete-connector-connection-pool ${as.props} --cascade=true ${connector.conpool.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-connector-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="--cascade=true"/>
+ <arg line="${connector.conpool.name}"/>
+ </exec>
+</target>
+
+<!-- create/delete Connector resource -->
+<target name="create-connector-resource-common" depends="init-common">
+ <property name="failonerror" value="false"/>
+ <echo message="asadmin create-connector-resource ${as.props} --poolname ${connector.conpool.name} --target ${appserver.instance.name} ${connector.jndi.name}"/>
+ <exec executable="${ASADMIN}" failonerror="${failonerror}">
+ <arg line="create-connector-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--poolname ${connector.conpool.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${connector.jndi.name}"/>
+ </exec>
+</target>
+
+<target name="delete-connector-resource-common" depends="init-common">
+ <echo message="asadmin delete-connector-resource ${as.props} ${connector.jndi.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-connector-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="${connector.jndi.name}"/>
+ </exec>
+</target>
+
+<!-- deploy/undeploy RAR files -->
+<target name="deploy-rar-common" depends="init-common">
+ <echo message="Deploying ${rarfile}" level="verbose"/>
+ <echo message="asadmin deploy ${as.props} --target ${appserver.instance.name} --force=${force} ${rarfile}"/>
+ <property name="force" value="false"/>
+ <property name="extra-params" value=""/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--force=${force}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${rarfile}"/>
+ </exec>
+ <echo message="Deploying ${rarfile} on ${appserver.instance.name}"/>
+</target>
+
+<target name="undeploy-rar-common" depends="init-common">
+ <echo message="Undeploying ${undeployrar}" level="verbose"/>
+ <echo message="asadmin undeploy ${as.props} --target ${appserver.instance.name} --cascade=${cascade} ${undeployrar}"/>
+ <property name="cascade" value="false"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--cascade=${cascade}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${undeployrar}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create JDBC connection pool -->
+<!-- ================================================================ -->
+<target name="create-jdbc-connpool-common" depends="init-common">
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+ level="verbose"/>
+ <property name="extra-params" value=""/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-jdbc-connection-pool"/>
+ <arg line="--datasourceclassname ${db.class}"/>
+ <arg line="--restype ${jdbc.resource.type}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+ <antcall target="set-${db.type}-connpool-props"/>
+</target>
+
+<target name="create-jdbc-driver-connpool-common" depends="init-common">
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+ level="verbose"/>
+ <property name="extra-params" value=""/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-jdbc-connection-pool"/>
+ <arg line="--driverclassname ${db.class}"/>
+ <arg line="--restype ${jdbc.resource.type}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+ <antcall target="set-${db.type}-driver-connpool-props"/>
+</target>
+
+<target name="set-pointbase-connpool-props">
+ <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.DatabaseName=${db.url}"/>
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.User=${db.user}" />
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.Password=${db.pwd}" />
+ </antcall>
+</target>
+
+<target name="set-pointbase-driver-connpool-props">
+ <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}"/>
+ </antcall>
+</target>
+
+<target name="set-derby-connpool-props">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.User=${db.user}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.Password=${db.pwd}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.driverType=4"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.portNumber=${db.port}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.dataBaseName=${db.name}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.retrieveMessagesFromServerOnGetMessage=true"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.create=true"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.serverName=${db.host}"/>
+ </exec>
+</target>
+
+<target name="set-derby-driver-connpool-props">
+ <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}"/>
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete JDBC connection-pool -->
+<!-- ================================================================ -->
+<target name="delete-jdbc-connpool-common" depends="init-common">
+<echo message="asadmin delete-jdbc-connection-pool ${as.props} --cascade=true --target ${appserver.instance.name} ${jdbc.conpool.name}"/>
+<exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-jdbc-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="--cascade=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+ <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}"
+ 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">
+ <arg line="create-jdbc-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--connectionpoolid ${jdbc.conpool.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jdbc.resource.name}"/>
+ </exec>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete JDBC resource -->
+<!-- ================================================================ -->
+<target name="delete-jdbc-resource-common" depends="init-common">
+<echo message="asadmin delete-jdbc-resource ${as.props} --target ${appserver.instance.name} ${jdbc.resource.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-jdbc-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jdbc.resource.name}"/>
+ </exec>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to deploy JDBC resources -->
+<!-- ================================================================ -->
+<target name="deploy-jdbc-common" depends="init-common">
+ <antcall target="create-jdbc-connpool-common" />
+ <antcall target="create-jdbc-resource-common" />
+</target>
+
+<target name="deploy-jdbc-driver-common" depends="init-common">
+ <antcall target="create-jdbc-driver-connpool-common" />
+ <antcall target="create-jdbc-resource-common" />
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to undeploy JDBC resources -->
+<!-- ================================================================ -->
+<target name="undeploy-jdbc-common" depends="init-common">
+ <antcall target="delete-jdbc-resource-common" />
+ <antcall target="delete-jdbc-connpool-common" />
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create persistence resource -->
+<!-- ================================================================ -->
+<target name="create-persistence-resource-common" depends="init-common">
+<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">
+ <arg line="create-persistence-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${pm.resource.name}"/>
+ </exec>
+ <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"
+ value="${resources.dottedname.prefix}.persistence-manager-factory-resource.${pm.resource.name}.factory_class=${pm.factory.class}"/>
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${resources.dottedname.prefix}.persistence-manager-factory-resource.${pm.resource.name}.jdbc_resource_jndi_name=${jdbc.resource.name}" />
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete persistence resource -->
+<!-- ================================================================ -->
+<target name="delete-persistence-resource-common" depends="init-common">
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command"
+ 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}"
+ level="verbose"/>
+ <echo message="${s1astest.classpath}"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${sql.file}"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+</target>
+
+
+<target name="execute-ejb-sql-common" depends="init-common">
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+ level="verbose"/>
+ <sql
+ driver="${db.driver}"
+ url="jdbc:derby://localhost:${db.port}/sun-appserv-samples;create=true;"
+ userid="APP"
+ password="APP"
+ src="${sql.file}"
+ onerror="continue"
+ print="yes"
+ output="${build.classes.dir}/setupDBTables.out"
+ classpath="${s1astest.classpath}" />
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create/delete javamail resources -->
+<!--
+ Properties required:
+ mailhost
+ fromaddress
+ debug
+ enabled
+ javamail.resource.name (e.g. mail/MySession)
+-->
+<!-- ================================================================ -->
+<target name="create-javamail-resource-common">
+ <exec executable="${ASADMIN}">
+ <arg line="create-javamail-resource"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--mailhost ${mailhost}"/>
+ <arg line="--mailuser ${mailuser}"/>
+ <arg line="--fromaddress ${fromaddress}"/>
+ <arg line="--storeprotocol=imap"/>
+ <arg line="--storeprotocolclass=com.sun.mail.imap.IMAPStore"/>
+ <arg line="--transprotocol=smtp"/>
+ <arg line="--transprotocolclass=com.sun.mail.smtp.SMTPTransport"/>
+ <arg line="--debug=${debug}"/>
+ <arg line="--enabled=${enabled}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${javamail.resource.name}"/>
+ </exec>
+</target>
+
+<target name="delete-javamail-resource-common">
+ <exec executable="${ASADMIN}">
+ <arg line="delete-javamail-resource"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${javamail.resource.name}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- 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}"
+ level="verbose"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="sql/${db.create}"
+ onerror="continue"
+ print="yes"
+ output="${build.classes.dir}/setupDBTables.out"
+ classpath="${s1astest.classpath}"
+ />
+</target>
+
+<!-- ================================================================ -->
+<!-- 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}"
+ level="verbose"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="sql/${db.drop}"
+ onerror="continue"
+ print="yes"
+ output="${build.classes.dir}/setupDBTables.out"
+ classpath="${s1astest.classpath}"
+ />
+</target>
+
+<!-- ======================================================= -->
+<!-- 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}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="create-jms-resource "/>
+ <arg line="--restype ${jms.factory.type}"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jms.factory.name}" />
+ </exec>
+</target>
+
+<!-- ======================================================= -->
+<!-- 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}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="delete-jms-resource "/>
+ <arg line="${as.props}"/>
+ <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}"
+ level="verbose"/>
+
+ <exec executable="${ASADMIN}">
+ <arg line="create-jmsdest --desttype ${dest.type} "/>
+ <arg line="${as.props}"/>
+ <arg line="${dest.name}"/>
+ </exec>
+
+ <exec executable="${ASADMIN}">
+ <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="${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}"
+ level="verbose"/>
+
+ <exec executable="${ASADMIN}">
+ <arg line="delete-jms-resource "/>
+ <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="${as.props} ${dest.name}"/>
+ </exec>
+</target>
+
+<!-- deploy/undeploy JMS resources -->
+<target name="deploy-jms-common" depends="init-common">
+ <antcall target="create-jms-connection-common" />
+ <antcall target="create-jms-resource-common" />
+</target>
+
+<target name="undeploy-jms-common" depends="init-common">
+ <antcall target="delete-jms-connection-common" />
+ <antcall target="delete-jms-resource-common" />
+</target>
+
+
+<!-- run StaticCheck on the ear file -->
+<target name="staticCheck-common" depends="init-common">
+ <echo message="Running StaticCheck -b on
+ ear file ${assemble.dir}/${appname}App.ear " level="verbose"/>
+ <antcall target="verifier-common">
+ <param name="static-check.command" value=" -b "/>
+ <param name="operand.props" value="${assemble.dir}/${appname}App.ear"/>
+ </antcall>
+ <echo message="Validate the static check results" level="verbose"/>
+</target>
+
+<target name="deploy-dir" depends="init-common">
+ <echo message="Deploying files: ${assemble.dir}" level="verbose"/>
+ <glassfish-embedded-deploy app="${assemble.dir}" name="${appname}-web" contextroot="${contextroot}" libraries="${libraries}"/>
+</target>
+
+<!-- deploy the applications in AppServ -->
+<target name="deploy-common" depends="init-common">
+ <echo> === EMBEDDED DEPLOYING ${assemble.dir}/${appname}App.ear --retrive=${assemble.dir}</echo>
+ <glassfish-embedded-deploy app="${assemble.dir}/${appname}App.ear" libraries="${libraries}" retrievestubs="${assemble.dir}"/>
+ <echo message="Deployment on target server ${appserver.instance.name} successful"/>
+</target>
+
+<target name="deploy-verify-common" depends="init-common">
+ <antcall target="deploy-verify-common-pe"/>
+ <antcall target="deploy-verify-common-ee"/>
+</target>
+
+<target name="deploy-verify-common-pe" depends="init-common" unless="ee">
+ <property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--verify=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--libraries ${libraries}"/>
+ <arg line="${deployed.app}"/>
+ </exec>
+ <echo message="Deployment on target server ${appserver.instance.name} successful"/>
+ </target>
+
+<target name="deploy-verify-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">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--verify=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--libraries ${libraries}"/>
+ <arg line="${deployed.app}"/>
+ </exec>
+ <echo message="Deployment on target server ${appserver.instance.name} successful"/>
+</target>
+
+<!-- deploy the web application in AppServ -->
+<target name="deploy-jsp-common" depends="init-common">
+ <echo message="Deploying ${deploy.file} from ${basedir}." level="verbose"/>
+ <property name="precompilejsp" value="true"/>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--precompilejsp=${precompilejsp}"/>
+ <arg line="--upload true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ </exec>
+</target>
+
+<target name="deploy-war-name" depends="init-common">
+ <echo message="Deploying ${warname} from ${basedir}."
+ level="verbose"/>
+ <echo> === EMBEDDED DEPLOYING ${warname} from ${basedir}</echo>
+ <glassfish-embedded-deploy app="${basedir}/${warname}.war"/>
+</target>
+
+<!-- deploy the standalone war in AppServ -->
+<target name="deploy-war-common">
+ <echo> === EMBEDDED DEPLOYING ${assemble.dir}/${appname}-web.war === </echo>
+ <glassfish-embedded-deploy app="${assemble.dir}/${appname}-web.war" name="${appname}-web" contextroot="${contextroot}" libraries="${libraries}"/>
+</target>
+
+<!-- CLASSPATH including embedded ant-tasks.jar and web jar should be set externally -->
+<taskdef name="glassfish-embedded-deploy" classname="org.glassfish.ant.embedded.tasks.DeployTask"/>
+<taskdef name="glassfish-embedded-undeploy" classname="org.glassfish.ant.embedded.tasks.UndeployTask"/>
+<taskdef name="glassfish-embedded-start" classname="org.glassfish.ant.embedded.tasks.StartServerTask"/>
+<taskdef name="glassfish-embedded-stop" classname="org.glassfish.ant.embedded.tasks.StopServerTask"/>
+<taskdef name="glassfish-embedded-admin" classname="org.glassfish.ant.embedded.tasks.AdminTask"/>
+
+<target name="stop-server-embedded" >
+ <echo> === Embedded STOPING === </echo>
+ <glassfish-embedded-stop/>
+ <sleep seconds="5"/>
+</target>
+
+<!-- deploy the standalone war in AppServ without specifying any
+ contextroot argument, so that the context-root specified in
+ sun-web.xml takes effect
+-->
+<target name="deploy-war-no-context-root" depends="init-common">
+ <echo> === EMBEDDED DEPLOYING ${assemble.dir}/${appname}-web.war with default contextroot=== </echo>
+ <glassfish-embedded-deploy app="${assemble.dir}/${appname}-web.war" name="${appname}-web" libraries="${libraries}"/>
+</target>
+
+<!-- deploy the standalone jar in AppServ -->
+<target name="deploy-jar-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--upload=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${assemble.dir}/${appname}-ejb.jar"/>
+ </exec>
+</target>
+
+<!-- deploy the standalone jar in AppServ -->
+<target name="deploy-client-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--upload=true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${assemble.dir}/${appname}-client.jar"/>
+ </exec>
+</target>
+
+<target name="undeploy-war-name" depends="init-common">
+ <echo> === Embedded UNDEPLOYING ${warname} === </echo>
+ <glassfish-embedded-undeploy name="${warname}"/>
+</target>
+
+<!-- undeploy the applications in AppServ -->
+<target name="undeploy-common" depends="init-common">
+ <echo> === Embedded UNDEPLOYING ${appname} === </echo>
+ <glassfish-embedded-undeploy name="${appname}App"/>
+</target>
+
+<!-- undeploy the standalone war in AppServ -->
+<target name="undeploy-war-common" depends="init-common" >
+ <echo> === Embedded UNDEPLOYING ${appname}-web === </echo>
+ <glassfish-embedded-undeploy name="${appname}-web"/>
+</target>
+
+<!-- undeploy the standalone war in AppServ -->
+<target name="undeploy-jar-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+</target>
+
+<!-- undeploy the standalone client in AppServ -->
+<target name="undeploy-client-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${appname}-client"/>
+ </exec>
+</target>
+
+<!-- run appclient in AppServ -->
+<target name="runclient-common" depends="init-common">
+ <echo message="appclient -client ${assemble.dir}/${appname}AppClient.jar -name ${appname}Client -textauth -user j2ee -password j2ee -xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml ${appclient.application.args}"/>
+ <exec executable="${APPCLIENT}" failonerror="false">
+ <!-- set APPCPATH to include reporter.jar so that all app clients
+ don't have to package the test framework in their apps -->
+ <env key="APPCPATH" file="${env.APS_HOME}/lib/reporter.jar"/>
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-name ${appname}Client"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+
+<!-- confirming report generation... -->
+ <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>
+</target>
+
+<!-- run web client in AppServ -->
+<target name="runwebclient-common" depends="init-common">
+ <echo message="Running Web Test from ${basedir}" level="verbose"/>
+ <echo message="http host: ${http.host}" level="verbose"/>
+ <echo message="http port: ${http.port}" level="verbose"/>
+ <java
+ fork="on" failonerror="false"
+ classpath="${env.APS_HOME}/lib/webtest.jar:${s1astest.classpath}"
+ classname="com.sun.ejte.ccl.webrunner.webtest.WebTest">
+ <arg value="script.txt"/>
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="appserv-tests"/>
+ <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"
+ tofile="${db.dir}/pointbase.ini"/>
+ <replace file="${db.dir}/pointbase.ini" token="@@@" value="${db.dir}"/>
+</target>
+
+<!-- start/stop Pointbase servers -->
+<target name="startPB" depends="preparePB">
+ <java classname="com.pointbase.net.netServer"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="/port:9092"/>
+ <arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
+ <arg line="/noconsole"/>
+ </java>
+ <java classname="com.pointbase.net.netServer"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="/port:9093"/>
+ <arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
+ <arg line="/noconsole"/>
+ </java>
+</target>
+
+<!-- target name="startPB" depends="preparePB">
+ <parallel>
+ <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"
+ classpath="${db.classpath}" failonerror="true" fork="true">
+ <arg line="/port:9093"/>
+ <arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
+ </java>
+ </parallel>
+</target -->
+
+<!-- start Derby Database -->
+<target name="startDerby">
+ <condition property="darwin">
+ <os name="Mac OS X"/>
+ </condition>
+ <antcall target="startDerbyNonMac"/>
+ <antcall target="startDerbyMac"/>
+</target>
+
+<target name="startDerbyNonMac" depends="init-common" unless="darwin">
+ <echo message="Starting Derby DB servers in the Network Mode on ports ${db.port} and ${db.port.2}"/>
+ <parallel>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="-h localhost -p ${db.port} start"/>
+ </java>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="-h localhost -p ${db.port.2} start"/>
+ </java>
+ </parallel>
+</target>
+
+<target name="startDerbyMac" depends="init-common" if="darwin">
+ <echo message="Starting Derby DB servers in the Network Mode on ports ${db.port} and ${db.port.2}"/>
+ <parallel>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <arg line="-h localhost -p ${db.port} start"/>
+ </java>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <arg line="-h localhost -p ${db.port.2} start"/>
+ </java>
+ </parallel>
+</target>
+
+<!-- start Derby Database -->
+<target name="stopDerby" depends="init-common">
+ <echo message="Stopping Derby DB servers on ports ${db.port} and ${db.port.2}"/>
+ <parallel>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" failonerror="true" fork="true">
+ <arg line="-h localhost -p ${db.port} shutdown"/>
+ </java>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" failonerror="true" fork="true">
+ <arg line="-h localhost -p ${db.port.2} shutdown"/>
+ </java>
+ </parallel>
+</target>
+
+<target name="pb">
+ <echo message="So you are using pointbase ... !"/>
+ <property file="${env.APS_HOME}/config/pointbase.properties"/>
+</target>
+
+<!-- setup IMQ for RI Build -->
+<target name="setup-mq-common" depends="init-common">
+ <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"
+ level="verbose"/>
+ <exec executable="${IMQDBMGR}" failonerror="true">
+ <arg line="-javahome ${java.home} -b ${admin.domain}_${appserver.instance.name} create all" />
+ </exec>
+</target>
+
+<target name="import-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <exec executable="${WSCOMPILE}">
+<!--
+ <arg line="-classpath ${s1astest.classpath}"/>
+-->
+ <arg line="-classpath ${build.classes.dir}"/>
+ <arg line="-import"/>
+ <arg line="-source 1.1.2"/>
+ <arg line="-keep"/>
+ <arg line="-d "/>
+ <arg path="${build.classes.dir}"/>
+ <!--
+ <arg line="-s "/>
+ <arg path="${basedir}/gensource"/>
+ -->
+ <arg line="-mapping ${build.classes.dir}/${mapping.file}"/>
+ <arg line="${config-wsdl.file}"/>
+ </exec>
+</target>
+
+<!-- Confirm Report Generation -->
+
+<target name="checkReporting-common">
+ <available file="RepRunConf.txt" type="file" property="isReported"/>
+ <antcall target="confirmReportPresent-common"/>
+ <antcall target="confirmMissingReport-common"/>
+</target>
+
+<target name="confirmReportPresent-common" if="isReported">
+ <echo message="file RepRunConf.txt is present."/>
+ <echo message="Test seems to be reported fine"/>
+ <delete file="RepRunConf.txt"/>
+</target>
+
+<target name="confirmMissingReport-common" unless="isReported">
+ <echo message="file RepRunConf.txt is missing!!!"/>
+ <echo message="Test does not seem to have been reported"/>
+ <echo message="Adding status 'did not run' into report..."/>
+ <java classname="com.sun.ejte.ccl.reporter.ReporterClient">
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ <arg value="${test.name}"/>
+ <arg value="${test.description}"/>
+ <arg value="${test.count}"/>
+ </java>
+ <delete file="RepRunConf.txt"/>
+</target>
+
+
+<!-- usage -->
+<target name="usage-common">
+ <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 undeploy Undeploy the ear files from S1AS
+ ant usage Display this message
+ </echo>
+</target>
+
+
+<!-- EE Targets 8.1 -->
+<!--Added Feb 5th 2004 by Deepa Singh -->
+<target name="ee" depends="ee-common">
+ <echo message="So you are using Enterprise Edition"/>
+ <property name="ee" value="Enterprise Edition"/>
+ <property file="${env.APS_HOME}/eeconfig/ee-config.properties"/>
+ <loadfile property="target-server-port" srcFile="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <condition property="orbPortSet" value="true">
+ <contains string="${target-server-port}" substring="${orb.port}"/>
+ </condition>
+ <antcall target="change-orb-port"/>
+</target>
+
+<target name="change-orb-port" unless="orbPortSet">
+ <echo message="changing orb port from the default [3700] to ${orb.port}"/>
+ <replace file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml" token="3700" value="${orb.port}"/>
+</target>
+
+
+<target name="restart-instance">
+ <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>
+ <sleep seconds="30"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="start-instance"/>
+ <arg line="${as.props}"/>
+ <arg line="${appserver.instance.name}"/>
+ </exec>
+</target>
+
+<target name="testTimer" depends="init-common">
+
+<echo message="creating timer table from ${env.APS_HOME}/lib/ejbtimer_${db.type}.sql"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${env.APS_HOME}/lib/ejbtimer_${db.type}.sql"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+
+</target>
+
+<target name="setupTimer" depends="init-common" if="ee">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-resource-ref"/>
+ <arg line="${as.props}"/>
+ <arg line="--target server"/>
+ <arg line="${jdbc.resource.name}"/>
+ </exec>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource=${jdbc.resource.name}"/>
+ </antcall>
+
+ <echo message="creating timer table from ${env.APS_HOME}/lib/ejbtimer_{db.type}.sql"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${env.APS_HOME}/lib/ejbtimer_${db.type}.sql"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+
+ <antcall target="restart-instance"/>
+</target>
+
+<target name="unsetupTimer" depends="init-common" if="ee">
+ <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">
+ <arg line="unset"/>
+ <arg line="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource"/>
+ </exec>
+
+ <echo message="dropping timer table from ${env.APS_HOME}/lib/ejbtimer_${db.type}_drop.sql"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${env.APS_HOME}/lib/ejbtimer_${db.type}_drop.sql"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+</target>
+
+<target name="prepare-truststore-common" depends="init-common">
+ <property name="truststore.db.file" location="${build.base.dir}/cacerts.jks"/>
+ <property name="cert.rfc.file" location="${build.base.dir}/${cert.nickname}.rfc"/>
+
+ <delete quiet="true" file="${truststore.db.file}"/>
+ <delete quiet="true" file="${cert.rfc.file}"/>
+
+ <!--
+ Determine if we need to use the certutil or the keytool command to
+ access the certificate keystore
+ -->
+ <property name="certutil.db.dir" location="${admin.domain.dir}/${admin.domain}/config"/>
+ <condition property="use.certutil">
+ <and>
+ <or>
+ <available file="${env.S1AS_HOME}/lib/certutil"/>
+ <available file="${env.S1AS_HOME}/lib/certutil.exe"/>
+ </or>
+ <available file="${certutil.db.dir}/cert8.db"/>
+ <available file="${certutil.db.dir}/key3.db"/>
+ <available file="${certutil.db.dir}/secmod.db"/>
+ </and>
+ </condition>
+ <antcall target="prepare-truststore-certutil-common"/>
+ <antcall target="prepare-truststore-keytool-common"/>
+</target>
+
+<target name="prepare-truststore-certutil-common" depends="init-common" if="use.certutil">
+ <exec executable="${env.S1AS_HOME}/lib/certutil" failonerror="true" output="${cert.rfc.file}">
+ <!--
+ LD_LIBRARY_PATH is needed on Unix platforms and should have no
+ effect on Windows
+ -->
+ <env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
+ <arg line="-L -n '${cert.nickname}' -a"/>
+ <arg value="-d"/>
+ <arg file="${certutil.db.dir}"/>
+ </exec>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-import -trustcacerts -alias '${cert.nickname}' -storepass '${ssl.password}' -noprompt"/>
+ <arg value="-file"/>
+ <arg file="${cert.rfc.file}"/>
+ <arg value="-keystore"/>
+ <arg file="${truststore.db.file}"/>
+ </exec>
+</target>
+
+
+<target name="prepare-truststore-keytool-common" depends="init-common" unless="use.certutil">
+ <copy file="${admin.domain.dir}/${admin.domain}/config/cacerts.jks" tofile="${truststore.db.file}"/>
+</target>
+
+
+<target name="prepare-keystore-common" depends="init-common">
+ <property name="keystore.db.file" location="${build.base.dir}/keystore.jks"/>
+ <delete quiet="true" file="${keystore.db.file}"/>
+ <copy file="${admin.domain.dir}/${admin.domain}/config/keystore.jks" tofile="${keystore.db.file}" failonerror="false"/>
+</target>
+
+<target name="get-version-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false" outputproperty="appserver.version">
+ <arg line="version"/>
+ <arg line="${as.props}"/>
+ <arg line="--verbose"/>
+ </exec>
+ <condition property="platform" value="true">
+ <contains string="${appserver.version}" substring="Platform" casesensitive="false"/>
+ </condition>
+ <condition property="enterprise" value="true">
+ <contains string="${appserver.version}" substring="Enterprise" casesensitive="false"/>
+ </condition>
+ <antcall target="platform-common"/>
+ <antcall target="enterprise-common"/>
+</target>
+
+<target name="platform-common" if="platform">
+ <echo message="This is Platform Version***"/>
+</target>
+
+<target name="enterprise-common" if="enterprise">
+ <echo message="This is Enterprise Version***"/>
+</target>
+
+<target name="create-PermSize" depends="init-common">
+ <echo message="asadmin create-jvm-options ${as.props} -- -XX:MaxPermSize=${jvm.maxpermsize}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-jvm-options"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="-- -XX\:MaxPermSize=${jvm.maxpermsize}"/>
+ </exec>
+</target>
+
+ <target name="restart-server">
+ <antcall target="stop-server"/>
+ <antcall target="start-server"/>
+ </target>
+
+ <target name="start-server" depends="setOSConditions">
+ <antcall target="start-server-embedded-with-web-jar"/>
+ </target>
+
+ <target name="stop-server" depends="setOSConditions">
+ <antcall target="stop-server-embedded"/>
+ </target>
+
+ <target name="create-jvm-options" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="create-jvm-options"/>
+ <arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
+ <arg line="${option}"/>
+ </exec>
+ <echo message="REQUIRED TO RESTART SERVER......."/>
+ </target>
+
+ <target name="delete-jvm-options" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="delete-jvm-options"/>
+ <arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
+ <arg line="${option}"/>
+ </exec>
+ <echo message="REQUIRED TO RESTART SERVER......."/>
+ </target>
+
+<!-- ================================================================ -->
+<!-- Target to Flush connection pool -->
+<!-- ================================================================ -->
+<target name="flush-connpool-common" depends="init-common">
+<echo message="Flush connection pool ${jdbc.conpool.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="flush-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to generate a neat Html report -->
+<!-- ================================================================ -->
+<target name="dev-report" depends="init-common">
+ <java classname=
+"com.sun.appserv.test.util.results.HtmlReportProducer" fork="true" failonerror="false"
+ classpath="${env.APS_HOME}/lib/reportbuilder.jar">
+ <arg value="${env.APS_HOME}/test_results.xml"/>
+ </java>
+</target>
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
new file mode 100644
index 0000000..6f63ad3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common.xml
@@ -0,0 +1,1648 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ 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}
+ ${assemble.dir}
+-->
+<!-- ================================================================ -->
+<target name="clean-classes-common" depends="init-common">
+ <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>
+
+<target name="clean-common" depends="init-common">
+ <antcall target="clean-classes-common"/>
+ <antcall target="clean-jars-common"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to compile the java source files -->
+<!--
+Variables used:
+ ${build.classes.dir}
+ ${s1astest.classpath}
+ ${src}
+-->
+<!-- ================================================================ -->
+<target name="compile-common" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <echo message="common.xml: Compiling test source files" level="verbose"/>
+ <mkdir dir="${src}"/>
+ <javac srcdir="${src}"
+ destdir="${build.classes.dir}"
+ classpath="${s1astest.classpath}"
+ debug="on"
+ failonerror="true"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- This is the external target war-common to be called up build files
+usage:
+<antcall target="war-common">
+<param name="war.classes" value="MyServlet.class,MyOtherServlet.class"/>
+</antcall>
+Assumption: All the static content is placed in webcontent directory
+
+Variables Used:
+ ${war.file}
+ ${build.classes.dir}
+ ${appname}
+ ${assemble.dir}
+ ${web.xml}
+ ${tlds}
+ ${tagfiles}
+ ${APS_HOME}
+ ${webclient.war.files}
+ ${webclient.war.classes}
+-->
+<!-- ================================================================ -->
+
+<target name="webclient-war-common" if="hasWebclient" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-war-common">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+</target>
+
+<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"
+ overwrite="true" />
+</target>
+
+<target name="clean-webapps-common" depends="init-common">
+ <delete dir="${build.webapps.dir}" quiet="true" />
+</target>
+
+<target name="clear">
+ <delete file="${war.file}"/>
+</target>
+
+<target name="copy-tlds" if="tlds-exist" depends="clear,test-tlds-exist">
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/tlds"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/tlds" failonerror="false">
+ <fileset dir="${tlds}">
+ <include name="**/*.tld"/>
+ </fileset>
+ </copy>
+</target>
+
+<target name="copy-tagfiles" if="tagfiles-exist" depends="clear,test-tagfiles-exist">
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/tags"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/tags" failonerror="false">
+ <fileset dir="${tagfiles}">
+ <include name="**/*.tag"/>
+ <include name="**/*.tagx"/>
+ </fileset>
+ </copy>
+</target>
+
+<target name="package-war-common" depends="copy-tlds,copy-tagfiles">
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
+ <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}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-web.xml" failonerror="false"/>
+ <copy file="${sun-web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
+ <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}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/sun-ejb-jar.xml" failonerror="false"/>
+ <copy file="${weblogic.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/weblogic.xml" failonerror="false"/>
+ <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">
+ <include name="**/*.jar"/>
+ <include name="**/*.zip"/>
+ </fileset>
+ </copy>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
+ failonerror="false"/>
+ <copy file="${mappingfile.location}/${mappingfile.name}"
+ tofile="${build.classes.dir}/tmp/${mappingfile.name}"
+ failonerror="false"/>
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
+ failonerror="false"/>
+ <copy file="${tagPlugins.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/tagPlugins.xml"
+ failonerror="false"/>
+ <copy file="${web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"
+ failonerror="false"/>
+ <copy file="${persistence.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/persistence.xml"
+ failonerror="false"/>
+ <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/javax.enterprise.inject.spi.Extension" failonerror="false"/>
+
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
+ <fileset dir="${war.classes}">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <echo message="Creating war file ${war.file}" level="verbose"/>
+ <mkdir dir="${basedir}/docroot"/>
+ <jar jarfile="${war.file}" update="true">
+ <fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
+ <include name="**/*class*"/>
+ </fileset>
+ <fileset dir="${basedir}/docroot" casesensitive="yes">
+ <include name="**/*.html"/>
+ <include name="**/*.HTML"/>
+ <include name="**/*.xhtml"/>
+ <include name="**/*.jsp"/>
+ <include name="**/*.jspx"/>
+ <include name="**/*.jspf"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.do"/>
+ <include name="**/*.txt"/>
+ <include name="**/*.shtml"/>
+ <include name="**/*.jar"/>
+ <exclude name="**/*.java,**/*.xml,**/*.properties"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}/tmp/" casesensitive="true">
+ <include name="WEB-INF/web.xml"/>
+ <include name="WEB-INF/glassfish-web.xml"/>
+ <include name="WEB-INF/glassfish-ejb-jar.xml"/>
+ <include name="WEB-INF/glassfish-resources.xml"/>
+ <include name="WEB-INF/sun-web.xml"/>
+ <include name="WEB-INF/sun-ejb-jar.xml"/>
+ <include name="WEB-INF/beans.xml"/>
+ <include name="WEB-INF/weblogic.xml"/>
+ <include name="WEB-INF/webservices.xml"/>
+ <include name="WEB-INF/tagPlugins.xml"/>
+ <include name="WEB-INF/lib/*"/>
+ <include name="WEB-INF/lib/extra/*"/>
+ <include name="WEB-INF/tlds/*"/>
+ <include name="WEB-INF/tags/*"/>
+ <include name="WEB-INF/wsdl/${wsdlfile.name}"/>
+ <include name="${mappingfile.name}"/>
+ <include name="META-INF/context.xml"/>
+ <include name="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension"/>
+ <include name="WEB-INF/classes/META-INF/persistence.xml"/>
+ </fileset>
+ </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}"
+ level="verbose"/>
+</target>
+
+<target name="test-tlds-exist">
+ <available file="${tlds}" property="tlds-exist"/>
+</target>
+
+<target name="test-tagfiles-exist">
+ <available file="${tagfiles}" property="tagfiles-exist"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to package the ejb application to jar file -->
+<!--
+Variables Used:
+ ${ejb.jar}
+ ${build.classes.dir}
+ ${ejb-jar.xml}
+ ${beans.xml}
+ ${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"
+ level="verbose"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/ejb-jar.xml"
+ failonerror="false"/>
+ <copy file="${persistence-orm.xml}"
+ tofile="${build.classes.dir}/META-INF/persistence-orm.xml"
+ failonerror="false"/>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/META-INF/webservices.xml"
+ failonerror="false"/>
+ <copy file="${sun-ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"
+ failonerror="false"/>
+ <copy file="${glassfish-ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/glassfish-ejb-jar.xml"
+ failonerror="false"/>
+ <copy file="${glassfish-resources.xml}"
+ tofile="${build.classes.dir}/META-INF/glassfish-resources.xml"
+ failonerror="false"/>
+ <copy file="${sun-cmp-mappings.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml"
+ failonerror="false"/>
+ <copy file="${beans.xml}"
+ tofile="${build.classes.dir}/META-INF/beans.xml"
+ failonerror="false"/>
+ <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/>
+ <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true"
+ includes ="${ejbjar.classes}">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="ejb-jar.xml"/>
+ <include name="persistence-orm.xml"/>
+ <include name="webservices.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ <include name="glassfish-resources.xml"/>
+ <include name="glassfish-ejb-jar.xml"/>
+ <include name="sun-cmp-mappings.xml"/>
+ <include name="beans.xml"/>
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
+ <delete file="${build.classes.dir}/*.dbschema" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to package the appclient application to jar file -->
+<!--
+Variables Used:
+ ${appclient.jar}
+ ${appclientjar.classes}
+ ${appclientjar.files}
+ ${build.classes.dir}
+ ${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"
+ level="verbose"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${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">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ </jar>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create the ejb application jar file -->
+<!-- ================================================================ -->
+<target name="ejb-jar-common" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-ejbjar-common">
+ <param name="ejbjar.files" value="${build.classes.dir}"/>
+ <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create the appclient jar file -->
+<!-- ================================================================ -->
+<target name="appclient-jar-common" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.files"
+ value="${build.classes.dir}"/>
+ <param name="appclient.jar"
+ value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+</target>
+
+<!-- ===== package par ===== -->
+<target name="package-persistence-common" depends="init-common" if="ejb30-persistence">
+ <echo message="CREATING Persistence archive: common.xml: ${build.classes.dir}, ${assemble.dir}"/>
+ <mkdir dir="${assemble.dir}"/>
+ <delete file="${assemble.dir}/${appname}-persistence.jar" failonerror="false"/>
+ <echo message="common.xml: Generating PAR inside build directory"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${persistence.xml}" tofile="${build.classes.dir}/META-INF/persistence.xml" failonerror="false"/>
+ <copy file="${mapping.xml}" tofile="${build.classes.dir}/META-INF/entity-mapping.xml" failonerror="false"/>
+ <!-- make a jar -->
+ <jar jarfile="${assemble.dir}/${appname}-persistence.jar" basedir="${build.classes.dir}" update="true" includes ="**/*.class" excludes="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class,**/*EJB*.class,**/*Exception.class">
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="**/*.xml"/>
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to assemble the ejb application to ear file -->
+<!-- ================================================================ -->
+<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"/>
+ <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">
+ <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/glassfish-resources.xml"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
+ </jar>
+</target>
+
+
+<!-- ================================================================ -->
+<!-- Target to assemble the ejb application to ear file -->
+<!-- ================================================================ -->
+<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"/>
+ <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"
+ 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/glassfish-resources.xml"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
+ </ear>
+</target>
+
+
+<!-- run Verifier on the ear file -->
+<target name="verifier" depends="init-common">
+ <echo message="Running verifier
+ ear file ${assemble.dir}/${appname}App.ear " level="verbose"/>
+ <antcall target="verifier-common">
+ <param name="verifier.command" value=" -n -rw "/>
+ <param name="operand.props" value="${assemble.dir}/${appname}App.ear"/>
+ </antcall>
+ <echo message="Validate the static check results" level="verbose"/>
+</target>
+
+<target name="verifier-common">
+ <echo message="Operand ${operand.props}" level="verbose"/>
+ <exec executable="${VERIFIER}" failonerror="true">
+ <arg line="${verifier.command} ${operand.props}" />
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to execute asadmin commands -->
+<!-- ================================================================ -->
+<target name="asadmin-common">
+ <echo message="Doing admin task ${admin.command} in EMBEDDEDMODE " level="verbose"/>
+ <echo message="Operand ${operand.props}" level="verbose"/>
+ <echo message="asadmin ${admin.command} ${operand.props}"/>
+ <glassfish-embedded-admin commandLine="${admin.command} ${operand.props}" />
+</target>
+
+<target name="asadmin-common-ignore-fail">
+ <echo message="Doing admin task ${admin.command} in EMBEDDEDMODE (ignore failures)"
+ level="verbose"/>
+ <echo message="Operand ${operand.props}" level="verbose"/>
+ <echo message="asadmin ${admin.command} ${operand.props}"/>
+ <glassfish-embedded-admin commandLine="${admin.command} ${operand.props}"/>
+</target>
+
+<!-- Target to execute a batchfile of asadmin commands -->
+<!-- ================================================================ -->
+<target name="asadmin-batch-common">
+ <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">
+AS_ADMIN_USERPASSWORD=${password}
+AS_ADMIN_PASSWORD=${admin.password}
+AS_ADMIN_ADMINPASSWORD=${admin.password}
+AS_ADMIN_MASTERPASSWORD=${master.password}
+</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}" />
+ </exec>
+ <delete file="${user.password.file}" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+
+<!-- ================================================================ -->
+<!-- Target to create the user in file realm the AppServ -->
+<!-- ================================================================ -->
+<target name="create-user-common" depends="init-common">
+<property name="user.password.file" value="asadminuserpassword.txt"/>
+<echo file="${user.password.file}" append="false">
+AS_ADMIN_USERPASSWORD=${password}
+AS_ADMIN_PASSWORD=${admin.password}
+AS_ADMIN_ADMINPASSWORD=${admin.password}
+AS_ADMIN_MASTERPASSWORD=${master.password}
+</echo>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="create-file-user" />
+ <param name="operand.props"
+ value="--user ${admin.user} --passwordfile ${user.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true --groups ${groups} --userpassword ${password} --authrealmname ${authrealmname} --target ${appserver.instance.name} ${user}"/>
+ </antcall>
+ <delete file="${user.password.file}" failonerror="false"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete the user in file realm the AppServ -->
+<!-- ================================================================ -->
+<target name="delete-user-common" depends="init-common">
+<echo message="Deleting user ${user} in file realm" level="verbose"/>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="delete-file-user" />
+ <param name="operand.props"
+ value="${user}"/>
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- J2EE Connector related targets -->
+<!-- ================================================================ -->
+
+<target name="create-connector-connpool-common"
+ depends="init-common, create-connector-connpool"/>
+
+<target name="create-connector-connpool" depends="init-common">
+ <property name="failonerror" value="false"/>
+ <property name="extra-params" value=""/>
+ <echo message="asadmin create-connector-connection-pool ${as.props} --raname ${ra.name} --connectiondefinition ${connection.defname} --target ${appserver.instance.name} ${connector.conpool.name}"/>
+ <exec executable="${ASADMIN}" failonerror="${failonerror}">
+ <arg line="create-connector-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="--raname ${ra.name}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--connectiondefinition ${connection.defname}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${connector.conpool.name}"/>
+ </exec>
+</target>
+
+<target name="delete-connector-connpool-common" depends="init-common">
+ <echo message="asadmin delete-connector-connection-pool ${as.props} --cascade=true ${connector.conpool.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-connector-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="--cascade=true"/>
+ <arg line="${connector.conpool.name}"/>
+ </exec>
+</target>
+
+<!-- create/delete Connector resource -->
+<target name="create-connector-resource-common" depends="init-common">
+ <property name="failonerror" value="false"/>
+ <echo message="asadmin create-connector-resource ${as.props} --poolname ${connector.conpool.name} --target ${appserver.instance.name} ${connector.jndi.name}"/>
+ <exec executable="${ASADMIN}" failonerror="${failonerror}">
+ <arg line="create-connector-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--poolname ${connector.conpool.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${connector.jndi.name}"/>
+ </exec>
+</target>
+
+<target name="delete-connector-resource-common" depends="init-common">
+ <echo message="asadmin delete-connector-resource ${as.props} ${connector.jndi.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-connector-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="${connector.jndi.name}"/>
+ </exec>
+</target>
+
+<!-- deploy/undeploy RAR files -->
+<target name="deploy-rar-common" depends="init-common">
+ <echo message="Deploying ${rarfile}" level="verbose"/>
+ <echo message="asadmin deploy ${as.props} --target ${appserver.instance.name} --force=${force} ${rarfile}"/>
+ <property name="force" value="false"/>
+ <property name="extra-params" value=""/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--force=${force}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${rarfile}"/>
+ </exec>
+ <echo message="Deploying ${rarfile} on ${appserver.instance.name}"/>
+</target>
+
+<target name="undeploy-rar-common" depends="init-common">
+ <echo message="Undeploying ${undeployrar}" level="verbose"/>
+ <echo message="asadmin undeploy ${as.props} --target ${appserver.instance.name} --cascade=${cascade} ${undeployrar}"/>
+ <property name="cascade" value="false"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--cascade=${cascade}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${undeployrar}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create JDBC connection pool -->
+<!-- ================================================================ -->
+<target name="create-jdbc-connpool-common" depends="init-common">
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+ level="verbose"/>
+ <property name="extra-params" value=""/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-jdbc-connection-pool"/>
+ <arg line="--datasourceclassname ${db.class}"/>
+ <arg line="--restype ${jdbc.resource.type}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+ <antcall target="set-${db.type}-connpool-props"/>
+</target>
+
+<target name="create-jdbc-driver-connpool-common" depends="init-common">
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+ level="verbose"/>
+ <property name="extra-params" value=""/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-jdbc-connection-pool"/>
+ <arg line="--driverclassname ${db.class}"/>
+ <arg line="--restype ${jdbc.resource.type}"/>
+ <arg line="${extra-params}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+ <antcall target="set-${db.type}-driver-connpool-props"/>
+</target>
+
+<target name="set-pointbase-connpool-props">
+ <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.DatabaseName=${db.url}"/>
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.User=${db.user}" />
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.Password=${db.pwd}" />
+ </antcall>
+</target>
+
+<target name="set-pointbase-driver-connpool-props">
+ <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}"/>
+ </antcall>
+</target>
+
+<target name="set-derby-connpool-props">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.User=${db.user}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.Password=${db.pwd}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.driverType=4"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.portNumber=${db.port}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.dataBaseName=${db.name}"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.retrieveMessagesFromServerOnGetMessage=true"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.create=true"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="set"/>
+ <arg line="${as.props}"/>
+ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.serverName=${db.host}"/>
+ </exec>
+</target>
+
+<target name="set-derby-driver-connpool-props">
+ <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}"/>
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete JDBC connection-pool -->
+<!-- ================================================================ -->
+<target name="delete-jdbc-connpool-common" depends="init-common">
+<echo message="asadmin delete-jdbc-connection-pool ${as.props} --cascade=true --target ${appserver.instance.name} ${jdbc.conpool.name}"/>
+<exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-jdbc-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="--cascade=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+ <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}"
+ 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">
+ <arg line="create-jdbc-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--connectionpoolid ${jdbc.conpool.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jdbc.resource.name}"/>
+ </exec>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete JDBC resource -->
+<!-- ================================================================ -->
+<target name="delete-jdbc-resource-common" depends="init-common">
+<echo message="asadmin delete-jdbc-resource ${as.props} --target ${appserver.instance.name} ${jdbc.resource.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-jdbc-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jdbc.resource.name}"/>
+ </exec>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to deploy JDBC resources -->
+<!-- ================================================================ -->
+<target name="deploy-jdbc-common" depends="init-common">
+ <antcall target="create-jdbc-connpool-common" />
+ <antcall target="create-jdbc-resource-common" />
+</target>
+
+<target name="deploy-jdbc-driver-common" depends="init-common">
+ <antcall target="create-jdbc-driver-connpool-common" />
+ <antcall target="create-jdbc-resource-common" />
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to undeploy JDBC resources -->
+<!-- ================================================================ -->
+<target name="undeploy-jdbc-common" depends="init-common">
+ <antcall target="delete-jdbc-resource-common" />
+ <antcall target="delete-jdbc-connpool-common" />
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create persistence resource -->
+<!-- ================================================================ -->
+<target name="create-persistence-resource-common" depends="init-common">
+<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">
+ <arg line="create-persistence-resource"/>
+ <arg line="${as.props}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${pm.resource.name}"/>
+ </exec>
+ <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"
+ value="${resources.dottedname.prefix}.persistence-manager-factory-resource.${pm.resource.name}.factory_class=${pm.factory.class}"/>
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${resources.dottedname.prefix}.persistence-manager-factory-resource.${pm.resource.name}.jdbc_resource_jndi_name=${jdbc.resource.name}" />
+ </antcall>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to delete persistence resource -->
+<!-- ================================================================ -->
+<target name="delete-persistence-resource-common" depends="init-common">
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command"
+ 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}"
+ level="verbose"/>
+ <echo message="${s1astest.classpath}"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${sql.file}"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+</target>
+
+
+<target name="execute-ejb-sql-common" depends="init-common">
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+ level="verbose"/>
+ <sql
+ driver="${db.driver}"
+ url="jdbc:derby://localhost:${db.port}/sun-appserv-samples;create=true;"
+ userid="APP"
+ password="APP"
+ src="${sql.file}"
+ onerror="continue"
+ print="yes"
+ output="${build.classes.dir}/setupDBTables.out"
+ classpath="${s1astest.classpath}" />
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create/delete javamail resources -->
+<!--
+ Properties required:
+ mailhost
+ fromaddress
+ debug
+ enabled
+ javamail.resource.name (e.g. mail/MySession)
+-->
+<!-- ================================================================ -->
+<target name="create-javamail-resource-common">
+ <exec executable="${ASADMIN}">
+ <arg line="create-javamail-resource"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--mailhost ${mailhost}"/>
+ <arg line="--mailuser ${mailuser}"/>
+ <arg line="--fromaddress ${fromaddress}"/>
+ <arg line="--storeprotocol=imap"/>
+ <arg line="--storeprotocolclass=com.sun.mail.imap.IMAPStore"/>
+ <arg line="--transprotocol=smtp"/>
+ <arg line="--transprotocolclass=com.sun.mail.smtp.SMTPTransport"/>
+ <arg line="--debug=${debug}"/>
+ <arg line="--enabled=${enabled}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${javamail.resource.name}"/>
+ </exec>
+</target>
+
+<target name="delete-javamail-resource-common">
+ <exec executable="${ASADMIN}">
+ <arg line="delete-javamail-resource"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${as.props}"/>
+ <arg line="${javamail.resource.name}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- 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}"
+ level="verbose"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="sql/${db.create}"
+ onerror="continue"
+ print="yes"
+ output="${build.classes.dir}/setupDBTables.out"
+ classpath="${s1astest.classpath}"
+ />
+</target>
+
+<!-- ================================================================ -->
+<!-- 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}"
+ level="verbose"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="sql/${db.drop}"
+ onerror="continue"
+ print="yes"
+ output="${build.classes.dir}/setupDBTables.out"
+ classpath="${s1astest.classpath}"
+ />
+</target>
+
+<!-- ======================================================= -->
+<!-- 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}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="create-jms-resource "/>
+ <arg line="--restype ${jms.factory.type}"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${jms.factory.name}" />
+ </exec>
+</target>
+
+<!-- ======================================================= -->
+<!-- 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}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="delete-jms-resource "/>
+ <arg line="${as.props}"/>
+ <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}"
+ level="verbose"/>
+
+ <exec executable="${ASADMIN}">
+ <arg line="create-jmsdest --desttype ${dest.type} "/>
+ <arg line="${as.props}"/>
+ <arg line="${dest.name}"/>
+ </exec>
+
+ <exec executable="${ASADMIN}">
+ <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="${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}"
+ level="verbose"/>
+
+ <exec executable="${ASADMIN}">
+ <arg line="delete-jms-resource "/>
+ <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="${as.props} ${dest.name}"/>
+ </exec>
+</target>
+
+<!-- deploy/undeploy JMS resources -->
+<target name="deploy-jms-common" depends="init-common">
+ <antcall target="create-jms-connection-common" />
+ <antcall target="create-jms-resource-common" />
+</target>
+
+<target name="undeploy-jms-common" depends="init-common">
+ <antcall target="delete-jms-connection-common" />
+ <antcall target="delete-jms-resource-common" />
+</target>
+
+
+<!-- run StaticCheck on the ear file -->
+<target name="staticCheck-common" depends="init-common">
+ <echo message="Running StaticCheck -b on
+ ear file ${assemble.dir}/${appname}App.ear " level="verbose"/>
+ <antcall target="verifier-common">
+ <param name="static-check.command" value=" -b "/>
+ <param name="operand.props" value="${assemble.dir}/${appname}App.ear"/>
+ </antcall>
+ <echo message="Validate the static check results" level="verbose"/>
+</target>
+
+<target name="deploy-dir" depends="init-common">
+ <echo message="Deploying files: ${assemble.dir}" level="verbose"/>
+ <glassfish-embedded-deploy app="${assemble.dir}" name="${appname}-web" contextroot="${contextroot}" libraries="${libraries}"/>
+</target>
+
+<!-- deploy the applications in AppServ -->
+<target name="deploy-common" depends="init-common">
+ <echo> === EMBEDDED DEPLOYING ${assemble.dir}/${appname}App.ear --retrive=${assemble.dir}</echo>
+ <glassfish-embedded-deploy app="${assemble.dir}/${appname}App.ear" libraries="${libraries}" retrievestubs="${assemble.dir}"/>
+ <echo message="Deployment on target server ${appserver.instance.name} successful"/>
+</target>
+
+<target name="deploy-verify-common" depends="init-common">
+ <antcall target="deploy-verify-common-pe"/>
+ <antcall target="deploy-verify-common-ee"/>
+</target>
+
+<target name="deploy-verify-common-pe" depends="init-common" unless="ee">
+ <property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--verify=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--libraries ${libraries}"/>
+ <arg line="${deployed.app}"/>
+ </exec>
+ <echo message="Deployment on target server ${appserver.instance.name} successful"/>
+ </target>
+
+<target name="deploy-verify-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">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--verify=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--libraries ${libraries}"/>
+ <arg line="${deployed.app}"/>
+ </exec>
+ <echo message="Deployment on target server ${appserver.instance.name} successful"/>
+</target>
+
+<!-- deploy the web application in AppServ -->
+<target name="deploy-jsp-common" depends="init-common">
+ <echo message="Deploying ${deploy.file} from ${basedir}." level="verbose"/>
+ <property name="precompilejsp" value="true"/>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--precompilejsp=${precompilejsp}"/>
+ <arg line="--upload true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ </exec>
+</target>
+
+<target name="deploy-war-name" depends="init-common">
+ <echo message="Deploying ${warname} from ${basedir}."
+ level="verbose"/>
+ <echo> === EMBEDDED DEPLOYING ${warname} from ${basedir}</echo>
+ <glassfish-embedded-deploy app="${basedir}/${warname}.war"/>
+</target>
+
+<!-- deploy the standalone war in AppServ -->
+<target name="deploy-war-common">
+ <echo> === EMBEDDED DEPLOYING ${assemble.dir}/${appname}-web.war === </echo>
+ <glassfish-embedded-deploy app="${assemble.dir}/${appname}-web.war" name="${appname}-web" contextroot="${contextroot}" libraries="${libraries}"/>
+</target>
+
+<!-- CLASSPATH including embedded ant-tasks.jar and uber jar (or static-shell jar) should be set externally -->
+<taskdef name="glassfish-embedded-deploy" classname="org.glassfish.ant.embedded.tasks.DeployTask"/>
+<taskdef name="glassfish-embedded-undeploy" classname="org.glassfish.ant.embedded.tasks.UndeployTask"/>
+<taskdef name="glassfish-embedded-start" classname="org.glassfish.ant.embedded.tasks.StartServerTask"/>
+<taskdef name="glassfish-embedded-stop" classname="org.glassfish.ant.embedded.tasks.StopServerTask"/>
+<taskdef name="glassfish-embedded-admin" classname="org.glassfish.ant.embedded.tasks.AdminTask"/>
+
+<target name="start-server-embedded-with-static-shell" if="env.S1AS_HOME">
+ <echo> === EMBEDDED STARTING WITH GLASSFISH INSTALLATION at ${env.S1AS_HOME} === </echo>
+ <glassfish-embedded-start installRoot="${env.S1AS_HOME}" instanceRoot="${env.S1AS_HOME}/domains/domain1/" configFile="file:///${env.S1AS_HOME}/domains/domain1/config/domain.xml" configFileReadOnly="false" httpPort="-1"/>
+</target>
+
+<target name="start-server-embedded-with-uber-jar" unless="env.S1AS_HOME">
+ <echo> === Embedded STARTING === </echo>
+ <glassfish-embedded-start/>
+</target>
+
+<target name="stop-server-embedded" >
+ <echo> === Embedded STOPING === </echo>
+ <glassfish-embedded-stop/>
+ <sleep seconds="5"/>
+</target>
+
+<!-- deploy the standalone war in AppServ without specifying any
+ contextroot argument, so that the context-root specified in
+ sun-web.xml takes effect
+-->
+<target name="deploy-war-no-context-root" depends="init-common">
+ <echo> === EMBEDDED DEPLOYING ${assemble.dir}/${appname}-web.war with default contextroot=== </echo>
+ <glassfish-embedded-deploy app="${assemble.dir}/${appname}-web.war" name="${appname}-web" libraries="${libraries}"/>
+</target>
+
+<!-- deploy the standalone jar in AppServ -->
+<target name="deploy-jar-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--upload=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${assemble.dir}/${appname}-ejb.jar"/>
+ </exec>
+</target>
+
+<!-- deploy the standalone jar in AppServ -->
+<target name="deploy-client-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--upload=true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${assemble.dir}/${appname}-client.jar"/>
+ </exec>
+</target>
+
+<target name="undeploy-war-name" depends="init-common">
+ <echo> === Embedded UNDEPLOYING ${warname} === </echo>
+ <glassfish-embedded-undeploy name="${warname}"/>
+</target>
+
+<!-- undeploy the applications in AppServ -->
+<target name="undeploy-common" depends="init-common">
+ <echo> === Embedded UNDEPLOYING ${appname} === </echo>
+ <glassfish-embedded-undeploy name="${appname}App"/>
+</target>
+
+<!-- undeploy the standalone war in AppServ -->
+<target name="undeploy-war-common" depends="init-common" >
+ <echo> === Embedded UNDEPLOYING ${appname}-web === </echo>
+ <glassfish-embedded-undeploy name="${appname}-web"/>
+</target>
+
+<!-- undeploy the standalone war in AppServ -->
+<target name="undeploy-jar-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+</target>
+
+<!-- undeploy the standalone client in AppServ -->
+<target name="undeploy-client-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${appname}-client"/>
+ </exec>
+</target>
+
+<!-- run appclient in AppServ -->
+<target name="runclient-common" depends="init-common">
+ <echo message="appclient -client ${assemble.dir}/${appname}AppClient.jar -name ${appname}Client -textauth -user j2ee -password j2ee -xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml ${appclient.application.args}"/>
+ <exec executable="${APPCLIENT}" failonerror="false">
+ <!-- set APPCPATH to include reporter.jar so that all app clients
+ don't have to package the test framework in their apps -->
+ <env key="APPCPATH" file="${env.APS_HOME}/lib/reporter.jar"/>
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-name ${appname}Client"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+
+<!-- confirming report generation... -->
+ <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>
+</target>
+
+<!-- run web client in AppServ -->
+<target name="runwebclient-common" depends="init-common">
+ <echo message="Running Web Test from ${basedir}" level="verbose"/>
+ <echo message="http host: ${http.host}" level="verbose"/>
+ <echo message="http port: ${http.port}" level="verbose"/>
+ <java
+ fork="on" failonerror="false"
+ classpath="${env.APS_HOME}/lib/webtest.jar:${s1astest.classpath}"
+ classname="com.sun.ejte.ccl.webrunner.webtest.WebTest">
+ <arg value="script.txt"/>
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="appserv-tests"/>
+ <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"
+ tofile="${db.dir}/pointbase.ini"/>
+ <replace file="${db.dir}/pointbase.ini" token="@@@" value="${db.dir}"/>
+</target>
+
+<!-- start/stop Pointbase servers -->
+<target name="startPB" depends="preparePB">
+ <java classname="com.pointbase.net.netServer"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="/port:9092"/>
+ <arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
+ <arg line="/noconsole"/>
+ </java>
+ <java classname="com.pointbase.net.netServer"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="/port:9093"/>
+ <arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
+ <arg line="/noconsole"/>
+ </java>
+</target>
+
+<!-- target name="startPB" depends="preparePB">
+ <parallel>
+ <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"
+ classpath="${db.classpath}" failonerror="true" fork="true">
+ <arg line="/port:9093"/>
+ <arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
+ </java>
+ </parallel>
+</target -->
+
+<!-- start Derby Database -->
+<target name="startDerby">
+ <condition property="darwin">
+ <os name="Mac OS X"/>
+ </condition>
+ <antcall target="startDerbyNonMac"/>
+ <antcall target="startDerbyMac"/>
+</target>
+
+<target name="startDerbyNonMac" depends="init-common" unless="darwin">
+ <echo message="Starting Derby DB servers in the Network Mode on ports ${db.port} and ${db.port.2}"/>
+ <parallel>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="-h localhost -p ${db.port} start"/>
+ </java>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <arg line="-h localhost -p ${db.port.2} start"/>
+ </java>
+ </parallel>
+</target>
+
+<target name="startDerbyMac" depends="init-common" if="darwin">
+ <echo message="Starting Derby DB servers in the Network Mode on ports ${db.port} and ${db.port.2}"/>
+ <parallel>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <arg line="-h localhost -p ${db.port} start"/>
+ </java>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" fork="true" spawn="true">
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <arg line="-h localhost -p ${db.port.2} start"/>
+ </java>
+ </parallel>
+</target>
+
+<!-- start Derby Database -->
+<target name="stopDerby" depends="init-common">
+ <echo message="Stopping Derby DB servers on ports ${db.port} and ${db.port.2}"/>
+ <parallel>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" failonerror="true" fork="true">
+ <arg line="-h localhost -p ${db.port} shutdown"/>
+ </java>
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ classpath="${db.classpath}" failonerror="true" fork="true">
+ <arg line="-h localhost -p ${db.port.2} shutdown"/>
+ </java>
+ </parallel>
+</target>
+
+<target name="pb">
+ <echo message="So you are using pointbase ... !"/>
+ <property file="${env.APS_HOME}/config/pointbase.properties"/>
+</target>
+
+<!-- setup IMQ for RI Build -->
+<target name="setup-mq-common" depends="init-common">
+ <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"
+ level="verbose"/>
+ <exec executable="${IMQDBMGR}" failonerror="true">
+ <arg line="-javahome ${java.home} -b ${admin.domain}_${appserver.instance.name} create all" />
+ </exec>
+</target>
+
+<target name="import-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <exec executable="${WSCOMPILE}">
+<!--
+ <arg line="-classpath ${s1astest.classpath}"/>
+-->
+ <arg line="-classpath ${build.classes.dir}"/>
+ <arg line="-import"/>
+ <arg line="-source 1.1.2"/>
+ <arg line="-keep"/>
+ <arg line="-d "/>
+ <arg path="${build.classes.dir}"/>
+ <!--
+ <arg line="-s "/>
+ <arg path="${basedir}/gensource"/>
+ -->
+ <arg line="-mapping ${build.classes.dir}/${mapping.file}"/>
+ <arg line="${config-wsdl.file}"/>
+ </exec>
+</target>
+
+<!-- Confirm Report Generation -->
+
+<target name="checkReporting-common">
+ <available file="RepRunConf.txt" type="file" property="isReported"/>
+ <antcall target="confirmReportPresent-common"/>
+ <antcall target="confirmMissingReport-common"/>
+</target>
+
+<target name="confirmReportPresent-common" if="isReported">
+ <echo message="file RepRunConf.txt is present."/>
+ <echo message="Test seems to be reported fine"/>
+ <delete file="RepRunConf.txt"/>
+</target>
+
+<target name="confirmMissingReport-common" unless="isReported">
+ <echo message="file RepRunConf.txt is missing!!!"/>
+ <echo message="Test does not seem to have been reported"/>
+ <echo message="Adding status 'did not run' into report..."/>
+ <java classname="com.sun.ejte.ccl.reporter.ReporterClient">
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ <arg value="${test.name}"/>
+ <arg value="${test.description}"/>
+ <arg value="${test.count}"/>
+ </java>
+ <delete file="RepRunConf.txt"/>
+</target>
+
+
+<!-- usage -->
+<target name="usage-common">
+ <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 undeploy Undeploy the ear files from S1AS
+ ant usage Display this message
+ </echo>
+</target>
+
+
+<!-- EE Targets 8.1 -->
+<!--Added Feb 5th 2004 by Deepa Singh -->
+<target name="ee" depends="ee-common">
+ <echo message="So you are using Enterprise Edition"/>
+ <property name="ee" value="Enterprise Edition"/>
+ <property file="${env.APS_HOME}/eeconfig/ee-config.properties"/>
+ <loadfile property="target-server-port" srcFile="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <condition property="orbPortSet" value="true">
+ <contains string="${target-server-port}" substring="${orb.port}"/>
+ </condition>
+ <antcall target="change-orb-port"/>
+</target>
+
+<target name="change-orb-port" unless="orbPortSet">
+ <echo message="changing orb port from the default [3700] to ${orb.port}"/>
+ <replace file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml" token="3700" value="${orb.port}"/>
+</target>
+
+
+<target name="restart-instance">
+ <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>
+ <sleep seconds="30"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="start-instance"/>
+ <arg line="${as.props}"/>
+ <arg line="${appserver.instance.name}"/>
+ </exec>
+</target>
+
+<target name="testTimer" depends="init-common">
+
+<echo message="creating timer table from ${env.APS_HOME}/lib/ejbtimer_${db.type}.sql"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${env.APS_HOME}/lib/ejbtimer_${db.type}.sql"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+
+</target>
+
+<target name="setupTimer" depends="init-common" if="ee">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-resource-ref"/>
+ <arg line="${as.props}"/>
+ <arg line="--target server"/>
+ <arg line="${jdbc.resource.name}"/>
+ </exec>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command" value="set" />
+ <param name="operand.props"
+ value="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource=${jdbc.resource.name}"/>
+ </antcall>
+
+ <echo message="creating timer table from ${env.APS_HOME}/lib/ejbtimer_{db.type}.sql"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${env.APS_HOME}/lib/ejbtimer_${db.type}.sql"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+
+ <antcall target="restart-instance"/>
+</target>
+
+<target name="unsetupTimer" depends="init-common" if="ee">
+ <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">
+ <arg line="unset"/>
+ <arg line="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource"/>
+ </exec>
+
+ <echo message="dropping timer table from ${env.APS_HOME}/lib/ejbtimer_${db.type}_drop.sql"/>
+ <sql
+ driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.pwd}"
+ src="${env.APS_HOME}/lib/ejbtimer_${db.type}_drop.sql"
+ onerror="continue"
+ print="yes"
+ classpath="${s1astest.classpath}"/>
+</target>
+
+<target name="prepare-truststore-common" depends="init-common">
+ <property name="truststore.db.file" location="${build.base.dir}/cacerts.jks"/>
+ <property name="cert.rfc.file" location="${build.base.dir}/${cert.nickname}.rfc"/>
+
+ <delete quiet="true" file="${truststore.db.file}"/>
+ <delete quiet="true" file="${cert.rfc.file}"/>
+
+ <!--
+ Determine if we need to use the certutil or the keytool command to
+ access the certificate keystore
+ -->
+ <property name="certutil.db.dir" location="${admin.domain.dir}/${admin.domain}/config"/>
+ <condition property="use.certutil">
+ <and>
+ <or>
+ <available file="${env.S1AS_HOME}/lib/certutil"/>
+ <available file="${env.S1AS_HOME}/lib/certutil.exe"/>
+ </or>
+ <available file="${certutil.db.dir}/cert8.db"/>
+ <available file="${certutil.db.dir}/key3.db"/>
+ <available file="${certutil.db.dir}/secmod.db"/>
+ </and>
+ </condition>
+ <antcall target="prepare-truststore-certutil-common"/>
+ <antcall target="prepare-truststore-keytool-common"/>
+</target>
+
+<target name="prepare-truststore-certutil-common" depends="init-common" if="use.certutil">
+ <exec executable="${env.S1AS_HOME}/lib/certutil" failonerror="true" output="${cert.rfc.file}">
+ <!--
+ LD_LIBRARY_PATH is needed on Unix platforms and should have no
+ effect on Windows
+ -->
+ <env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
+ <arg line="-L -n '${cert.nickname}' -a"/>
+ <arg value="-d"/>
+ <arg file="${certutil.db.dir}"/>
+ </exec>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-import -trustcacerts -alias '${cert.nickname}' -storepass '${ssl.password}' -noprompt"/>
+ <arg value="-file"/>
+ <arg file="${cert.rfc.file}"/>
+ <arg value="-keystore"/>
+ <arg file="${truststore.db.file}"/>
+ </exec>
+</target>
+
+
+<target name="prepare-truststore-keytool-common" depends="init-common" unless="use.certutil">
+ <copy file="${admin.domain.dir}/${admin.domain}/config/cacerts.jks" tofile="${truststore.db.file}"/>
+</target>
+
+
+<target name="prepare-keystore-common" depends="init-common">
+ <property name="keystore.db.file" location="${build.base.dir}/keystore.jks"/>
+ <delete quiet="true" file="${keystore.db.file}"/>
+ <copy file="${admin.domain.dir}/${admin.domain}/config/keystore.jks" tofile="${keystore.db.file}" failonerror="false"/>
+</target>
+
+<target name="get-version-common" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="false" outputproperty="appserver.version">
+ <arg line="version"/>
+ <arg line="${as.props}"/>
+ <arg line="--verbose"/>
+ </exec>
+ <condition property="platform" value="true">
+ <contains string="${appserver.version}" substring="Platform" casesensitive="false"/>
+ </condition>
+ <condition property="enterprise" value="true">
+ <contains string="${appserver.version}" substring="Enterprise" casesensitive="false"/>
+ </condition>
+ <antcall target="platform-common"/>
+ <antcall target="enterprise-common"/>
+</target>
+
+<target name="platform-common" if="platform">
+ <echo message="This is Platform Version***"/>
+</target>
+
+<target name="enterprise-common" if="enterprise">
+ <echo message="This is Enterprise Version***"/>
+</target>
+
+<target name="create-PermSize" depends="init-common">
+ <echo message="asadmin create-jvm-options ${as.props} -- -XX:MaxPermSize=${jvm.maxpermsize}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-jvm-options"/>
+ <arg line="${as.props}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="-- -XX\:MaxPermSize=${jvm.maxpermsize}"/>
+ </exec>
+</target>
+
+ <target name="restart-server">
+ <antcall target="stop-server"/>
+ <antcall target="start-server"/>
+ </target>
+
+ <target name="start-server" depends="setOSConditions">
+ <antcall target="start-server-embedded-with-static-shell"/>
+ <antcall target="start-server-embedded-with-uber-jar"/>
+ </target>
+
+ <target name="stop-server" depends="setOSConditions">
+ <antcall target="stop-server-embedded"/>
+ </target>
+
+ <target name="create-jvm-options" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="create-jvm-options"/>
+ <arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
+ <arg line="${option}"/>
+ </exec>
+ <echo message="REQUIRED TO RESTART SERVER......."/>
+ </target>
+
+ <target name="delete-jvm-options" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="delete-jvm-options"/>
+ <arg line="--user ${admin.user} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
+ <arg line="${option}"/>
+ </exec>
+ <echo message="REQUIRED TO RESTART SERVER......."/>
+ </target>
+
+<!-- ================================================================ -->
+<!-- Target to Flush connection pool -->
+<!-- ================================================================ -->
+<target name="flush-connpool-common" depends="init-common">
+<echo message="Flush connection pool ${jdbc.conpool.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="flush-connection-pool"/>
+ <arg line="${as.props}"/>
+ <arg line="${jdbc.conpool.name}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to generate a neat Html report -->
+<!-- ================================================================ -->
+<target name="dev-report" depends="init-common">
+ <java classname=
+"com.sun.appserv.test.util.results.HtmlReportProducer" fork="true" failonerror="false"
+ classpath="${env.APS_HOME}/lib/reportbuilder.jar">
+ <arg value="${env.APS_HOME}/test_results.xml"/>
+ </java>
+</target>
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
new file mode 100644
index 0000000..afffa2a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/jaxrpc-hello-web-build.xml
@@ -0,0 +1,193 @@
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ <!ENTITY jaxrpctargets SYSTEM "../common/targets.xml">
+ <!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+ <!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+ <!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jaxrpc-hello-web" default="all" basedir=".">
+
+ <property name="appname" value="MyHelloService"/>
+
+ <property environment="env" />
+
+ <property file="${env.APS_HOME}/config.properties"/>
+ <property file="samplebuild.properties"/>
+
+ &jaxrpctargets;
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </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"
+ 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}"
+ webxml="./web.xml" filesonly="true" >
+ <fileset dir="${assemble.war}" includes="WEB-INF/**, build/**" />
+ </war>
+ <copy file="${assemble.war}/${war.file}" todir="." />
+ </target>
+
+ <target name="build" depends="build-service"
+ description="Executes the targets needed to build the service.">
+ </target>
+
+ <target name="deploy" depends="set-asadmin,build,create-war">
+ <echo message="Deploying ${war.file} from ${basedir}." level="verbose"/>
+ <glassfish-embedded-start />
+ <glassfish-embedded-deploy app="${war.file}" />
+ </target>
+
+
+
+ <target name="undeploy-war1" depends="init-common">
+ <echo message="Undeploying ${war.file} from ${basedir}." level="verbose"/>
+ <glassfish-embedded-undeploy name="${warname}"/>
+ </target>
+
+
+ <!-- <target name="build-client" depends="build-static"
+ description="Executes the targets needed to build a static stub client.">
+ </target>
+
+ <target name="runclient1" depends="run-client"
+ description="Runs the client.">
+ </target>
+
+ <target name="run-client"
+ description="Runs a stand-alone (non-J2EE) client">
+ <java classname="${client.class}" fork="yes" >
+ <arg line="${endpoint.address}" />
+ <classpath refid="run.classpath" />
+ </java>
+ </target>
+
+
+ <target name="generate-client-stubs"
+ description="Runs wscompile to generate the client stub classes">
+ <antcall target="run-wscompile">
+ <param name="param1" value="-gen:client -d ${build.classes.dir} -keep -s ${build.classes.dir} -classpath ${build.classes.dir} ${config.wsdl.file}"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common,generate-client-stubs">
+ <antcall target="compile-common">
+ <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"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="mapping.xml,META-INF/wsdl/**,helloservice/**,com/**" />
+ </antcall>
+
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-client.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="run" depends="init-common,assemble-client">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/hello-jaxrpc/hello"/>
+ </antcall>
+ </target> -->
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="run-wscompile">
+ <param name="param1" value="-gen:client -d ${build.classes.dir}/webclient/WEB-INF/classes -keep -s ${build.classes.dir}/webclient/WEB-INF/classes -classpath ${build.classes.dir}/webclient/WEB-INF/classes ${config.wsdl.file}"/>
+ </antcall>
+
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="class.path"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="build/mapping.xml" tofile="${build.classes.dir}/webclient/WEB-INF/hello-mapping.xml"/>
+ <copy file="build/MyHelloService.wsdl" tofile="${build.classes.dir}/webclient/WEB-INF/wsdl/hello.wsdl"/>
+ <copy file="config-wsdl.xml" tofile="${build.classes.dir}/webclient/WEB-INF/hello-config.xml"/>
+
+
+
+
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <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}" />
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <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"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+
+
+</project>
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
new file mode 100644
index 0000000..6538ac4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties-web.xml
@@ -0,0 +1,212 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property environment="env"/>
+
+<taskdef name="glassfish-embedded-start" classname="org.glassfish.ant.embedded.tasks.StartServerTask" classpath="${env.GF_HOME}/ant-tasks/target/ant-tasks.jar:${env.GF_HOME}/extras/embedded/all/target/glassfish-embedded-all.jar:${env.S1AS_HOME}/modules/ant.jar"/>
+
+<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"
+ level="verbose"/>
+ <property name="pe" value="Platform Edition of S1AS"/>
+ <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"/>
+ <echo message="http.port ${http.port}" level="verbose"/>
+ <echo message="http.host ${http.host}" level="verbose"/>
+
+ <echo file="${admin.password.file}" append="false">AS_ADMIN_PASSWORD=${admin.password}
+AS_ADMIN_ADMINPASSWORD=${admin.password}
+AS_ADMIN_MASTERPASSWORD=${master.password}</echo>
+
+ <property name="as.props"
+ value="--user ${admin.user} --passwordfile ${admin.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
+
+ <property name="authrealmname" value="file"/>
+ <property name="apptype" value="application"/>
+ <!-- pointbase properties -->
+ <property name="db.root" value="${env.S1AS_HOME}/../javadb"/>
+ <property name="db.dir" value="${env.APS_HOME}/build"/>
+ <property name="db.classpath" value="${db.root}/lib/derby.jar:${db.root}/lib/derbyclient.jar:${db.root}/lib/derbynet.jar:${env.APS_HOME}/sqetests/connector/lib/cci-derby-proc.jar"/>
+
+ <property file="${env.APS_HOME}/config/derby.properties"/>
+
+ <!-- set home directory for the AVK -->
+ <property name="javke.home" value="${env.JAVKE_HOME}"/>
+
+ <!-- resource properties -->
+ <property name="dest.type" value="queue"/>
+ <property name="dest.name" value="Queue"/>
+ <property name="jms.factory.name" value="jms/QCFactory"/>
+ <property name="jms.factory.type" value="javax.jms.QueueConnectionFactory"/>
+ <property name="jms.resource.name" value="jms/SampleQueue"/>
+ <property name="jms.resource.type" value="javax.jms.Queue"/>
+
+ <property name="jdbc.conpool.name" value="ql-jdbc-pool"/>
+ <property name="jdbc.resource.name" value="jdbc/s1qeDB"/>
+ <property name="jdbc.resource.type" value="javax.sql.DataSource"/>
+ <property name="pm.resource.name" value="jdo/s1qePM" />
+ <property name="pm.factory.class"
+ value="com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl" />
+
+ <!-- appclient properties -->
+ <property name="appclient.application.args" value="" />
+
+ <!-- Test Harnes properties -->
+ <property name="build.base.dir"
+ value="${env.APS_HOME}/build/module"/>
+ <property name="build.webapps.dir"
+ value="${env.APS_HOME}/build/wars"/>
+ <property name="build.classes.dir"
+ value="${build.base.dir}/classes"/>
+ <property name="assemble.dir"
+ value="${build.base.dir}/archive"/>
+ <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"
+ value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class" />
+ <property name="appclientjar.classes"
+ value="**/*Local*.class,**/*Home*.class,**/*Remote*.class,**/*Client*.class" />
+ <property name="webclient.war.files"
+ value="${build.classes.dir}"/>
+ <property name="webclient.war.classes"
+ value="**/*Servlet*.class"/>
+
+ <property name="test.name" value=""/>
+ <property name="test.description" value=""/>
+ <property name="test.count" value="1"/>
+
+ <!-- SE/EE specific properties -->
+ <property name="cluster.name" value="cluster1"/>
+ <property name="clustered.server.name" value="server1"/>
+ <property name="clustered.server.name.two" value="server2"/>
+ <property name="nodeagent.name" value="agent1"/>
+ <property name="das.host" value="localhost"/>
+ <property name="das.jmx.port" value="8686"/>
+ <property name="http.listener1.port" value="38080"/>
+ <property name="http.listener2.port" value="38181"/>
+ <property name="orb.listener1.port" value="33700"/>
+ <property name="ssl.port" value="33820"/>
+ <property name="ssl.mutualauth.port" value="33920"/>
+ <property name="jmx.system.connector.port" value="38686"/>
+ <property name="http.listener1.port.two" value="38081"/>
+ <property name="http.listener2.port.two" value="38182"/>
+ <property name="orb.listener1.port.two" value="33701"/>
+ <property name="ssl.port.two" value="33821"/>
+ <property name="ssl.mutualauth.port.two" value="33921"/>
+ <property name="jmx.system.connector.port.two" value="38687"/>
+ <property name="cert.nickname" value="s1as"/>
+</target>
+
+<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.
+ -->
+<target name="setOSConditions">
+ <condition property="isUnix">
+ <os family="unix"/>
+ </condition>
+
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+</target>
+
+<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"
+ 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"
+ 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"/>
+ <property name="TNAMESERV" value="${env.S1AS_HOME}/jdk/bin/tnameserv.exe"/>
+
+ <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"
+ value="${env.S1AS_HOME}/pointbase/server/StartServer.bat"/>
+ <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">
+ <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"/>
+ <property name="CAPTURESCHEMA" value="${env.S1AS_HOME}/bin/capture-schema"/>
+ <property name="CHECKPATCH" value="${env.S1AS_HOME}/bin/checkpatch"/>
+ <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"
+ 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"
+ value="${env.S1AS_HOME}/pointbase/server/StartServer"/>
+ <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
+lines of MANIFEST.MF files since they are very sensitive to it.
+-->
+<target name="fixFiles" depends="setOSConditions" >
+ <antcall target="convUnix" />
+ <antcall target="convWin" />
+</target>
+<target name="convUnix" if="isUnix">
+ <fixcrlf srcdir="."
+ eol="lf" eof="remove"
+ includes="**/*.MF" />
+ <echo message="fixed files for Unix" level="verbose"/>
+</target>
+
+<target name="convWin" if="isWindows">
+ <fixcrlf srcdir="."
+ eol="crlf" eof="asis"
+ includes="**/*.MF" />
+ <echo message="fixed files for Windows" level="verbose"/>
+</target>
+
+<target name="ee-common" depends="setToolProperty">
+</target>
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
new file mode 100644
index 0000000..a136830
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties.xml
@@ -0,0 +1,212 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property environment="env"/>
+
+<taskdef name="glassfish-embedded-start" classname="org.glassfish.ant.embedded.tasks.StartServerTask" classpath="${env.GF_HOME}/ant-tasks/target/ant-tasks.jar:${env.GF_HOME}/extras/embedded/all/target/glassfish-embedded-all.jar:${env.S1AS_HOME}/modules/ant.jar"/>
+
+<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"
+ level="verbose"/>
+ <property name="pe" value="Platform Edition of S1AS"/>
+ <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"/>
+ <echo message="http.port ${http.port}" level="verbose"/>
+ <echo message="http.host ${http.host}" level="verbose"/>
+
+ <echo file="${admin.password.file}" append="false">AS_ADMIN_PASSWORD=${admin.password}
+AS_ADMIN_ADMINPASSWORD=${admin.password}
+AS_ADMIN_MASTERPASSWORD=${master.password}</echo>
+
+ <property name="as.props"
+ value="--user ${admin.user} --passwordfile ${admin.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
+
+ <property name="authrealmname" value="file"/>
+ <property name="apptype" value="application"/>
+ <!-- pointbase properties -->
+ <property name="db.root" value="${env.S1AS_HOME}/../javadb"/>
+ <property name="db.dir" value="${env.APS_HOME}/build"/>
+ <property name="db.classpath" value="${db.root}/lib/derby.jar:${db.root}/lib/derbyclient.jar:${db.root}/lib/derbynet.jar:${env.APS_HOME}/sqetests/connector/lib/cci-derby-proc.jar"/>
+
+ <property file="${env.APS_HOME}/config/derby.properties"/>
+
+ <!-- set home directory for the AVK -->
+ <property name="javke.home" value="${env.JAVKE_HOME}"/>
+
+ <!-- resource properties -->
+ <property name="dest.type" value="queue"/>
+ <property name="dest.name" value="Queue"/>
+ <property name="jms.factory.name" value="jms/QCFactory"/>
+ <property name="jms.factory.type" value="javax.jms.QueueConnectionFactory"/>
+ <property name="jms.resource.name" value="jms/SampleQueue"/>
+ <property name="jms.resource.type" value="javax.jms.Queue"/>
+
+ <property name="jdbc.conpool.name" value="ql-jdbc-pool"/>
+ <property name="jdbc.resource.name" value="jdbc/s1qeDB"/>
+ <property name="jdbc.resource.type" value="javax.sql.DataSource"/>
+ <property name="pm.resource.name" value="jdo/s1qePM" />
+ <property name="pm.factory.class"
+ value="com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl" />
+
+ <!-- appclient properties -->
+ <property name="appclient.application.args" value="" />
+
+ <!-- Test Harnes properties -->
+ <property name="build.base.dir"
+ value="${env.APS_HOME}/build/module"/>
+ <property name="build.webapps.dir"
+ value="${env.APS_HOME}/build/wars"/>
+ <property name="build.classes.dir"
+ value="${build.base.dir}/classes"/>
+ <property name="assemble.dir"
+ value="${build.base.dir}/archive"/>
+ <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"
+ value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class" />
+ <property name="appclientjar.classes"
+ value="**/*Local*.class,**/*Home*.class,**/*Remote*.class,**/*Client*.class" />
+ <property name="webclient.war.files"
+ value="${build.classes.dir}"/>
+ <property name="webclient.war.classes"
+ value="**/*Servlet*.class"/>
+
+ <property name="test.name" value=""/>
+ <property name="test.description" value=""/>
+ <property name="test.count" value="1"/>
+
+ <!-- SE/EE specific properties -->
+ <property name="cluster.name" value="cluster1"/>
+ <property name="clustered.server.name" value="server1"/>
+ <property name="clustered.server.name.two" value="server2"/>
+ <property name="nodeagent.name" value="agent1"/>
+ <property name="das.host" value="localhost"/>
+ <property name="das.jmx.port" value="8686"/>
+ <property name="http.listener1.port" value="38080"/>
+ <property name="http.listener2.port" value="38181"/>
+ <property name="orb.listener1.port" value="33700"/>
+ <property name="ssl.port" value="33820"/>
+ <property name="ssl.mutualauth.port" value="33920"/>
+ <property name="jmx.system.connector.port" value="38686"/>
+ <property name="http.listener1.port.two" value="38081"/>
+ <property name="http.listener2.port.two" value="38182"/>
+ <property name="orb.listener1.port.two" value="33701"/>
+ <property name="ssl.port.two" value="33821"/>
+ <property name="ssl.mutualauth.port.two" value="33921"/>
+ <property name="jmx.system.connector.port.two" value="38687"/>
+ <property name="cert.nickname" value="s1as"/>
+</target>
+
+<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.
+ -->
+<target name="setOSConditions">
+ <condition property="isUnix">
+ <os family="unix"/>
+ </condition>
+
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+</target>
+
+<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"
+ 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"
+ 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"/>
+ <property name="TNAMESERV" value="${env.S1AS_HOME}/jdk/bin/tnameserv.exe"/>
+
+ <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"
+ value="${env.S1AS_HOME}/pointbase/server/StartServer.bat"/>
+ <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">
+ <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"/>
+ <property name="CAPTURESCHEMA" value="${env.S1AS_HOME}/bin/capture-schema"/>
+ <property name="CHECKPATCH" value="${env.S1AS_HOME}/bin/checkpatch"/>
+ <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"
+ 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"
+ value="${env.S1AS_HOME}/pointbase/server/StartServer"/>
+ <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
+lines of MANIFEST.MF files since they are very sensitive to it.
+-->
+<target name="fixFiles" depends="setOSConditions" >
+ <antcall target="convUnix" />
+ <antcall target="convWin" />
+</target>
+<target name="convUnix" if="isUnix">
+ <fixcrlf srcdir="."
+ eol="lf" eof="remove"
+ includes="**/*.MF" />
+ <echo message="fixed files for Unix" level="verbose"/>
+</target>
+
+<target name="convWin" if="isWindows">
+ <fixcrlf srcdir="."
+ eol="crlf" eof="asis"
+ includes="**/*.MF" />
+ <echo message="fixed files for Windows" level="verbose"/>
+</target>
+
+<target name="ee-common" depends="setToolProperty">
+</target>
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
new file mode 100644
index 0000000..3bcb9e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run-web.xml
@@ -0,0 +1,112 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="target-to-run" value="sqetests"/>
+
+<target name="runtest" depends="init-common">
+ <record name="runtest.output" action="start" />
+ <parallel>
+<!--
+ <antcall target="startAS"/>
+-->
+ <sequential>
+ <waitfor maxwait="5" maxwaitunit="minute" checkevery="500">
+ <or>
+ <http url="http://localhost:80"/>
+ <http url="http://localhost:1024"/>
+ <http url="http://${http.host}:${http.port}"/>
+ </or>
+ </waitfor>
+ <antcall target="${target-to-run}"/>
+ <antcall target="report"/>
+ <antcall target="mail"/>
+<!--
+ <antcall target="stopAS"/>
+-->
+ </sequential>
+ </parallel>
+ <record name="runtest.output" action="stop" />
+</target>
+
+<!-- Setup and Restart the server instance-->
+<target name="restart-server-instance-common">
+ <antcall target="stopDomain"/>
+ <sleep seconds="15" />
+ <antcall target="startDomain"/>
+</target>
+
+<target name="startDomain" depends="startDomainEmbeddedWebJar"/>
+<target name="stopDomain" depends="stopDomainEmbedded"/>
+
+<!-- CLASSPATH including embedded ant-tasks.jar and uber jar (or static-shell jar) should be set externally -->
+<taskdef name="glassfish-embedded-start" classname="org.glassfish.ant.embedded.tasks.StartServerTask"/>
+<taskdef name="glassfish-embedded-stop" classname="org.glassfish.ant.embedded.tasks.StopServerTask"/>
+
+<target name="startDomainEmbeddedWebJar">
+ <echo> === EMBEDDED STARTING === </echo>
+ <glassfish-embedded-start/>
+ </target>
+
+<target name="stopDomainEmbedded" >
+ <echo> === EMBEDDED STOPING === </echo>
+ <glassfish-embedded-stop/>
+ <sleep seconds="5"/>
+ </target>
+
+<target name="delete-domain-common" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="delete-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="create-domain-common" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="create-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="--adminport ${admin.port}"/>
+ <arg line="--instanceport ${http.port}"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--domainproperties orb.listener.port=${orb.port}" />
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="start-clean-server">
+ <antcall target="stopDomain"/>
+ <antcall target="startDomain"/>
+</target>
+
+
+<target name="restart-instance-common">
+ <antcall target="stopDomain"/>
+ <antcall target="startDomain"/>
+</target>
+
+<macrodef name="run-test">
+ <attribute name="classname"/>
+ <attribute name="classpath"/>
+ <sequential>
+ <java classname="@{classname}" classpath="@{classpath}" fork="true">
+ <jvmarg value="-Das.props=${as.props}"/>
+ </java>
+ </sequential>
+</macrodef>
+
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
new file mode 100644
index 0000000..073df11
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run.xml
@@ -0,0 +1,124 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="target-to-run" value="sqetests"/>
+
+<target name="runtest" depends="init-common">
+ <record name="runtest.output" action="start" />
+ <parallel>
+<!--
+ <antcall target="startAS"/>
+-->
+ <sequential>
+ <waitfor maxwait="5" maxwaitunit="minute" checkevery="500">
+ <or>
+ <http url="http://localhost:80"/>
+ <http url="http://localhost:1024"/>
+ <http url="http://${http.host}:${http.port}"/>
+ </or>
+ </waitfor>
+ <antcall target="${target-to-run}"/>
+ <antcall target="report"/>
+ <antcall target="mail"/>
+<!--
+ <antcall target="stopAS"/>
+-->
+ </sequential>
+ </parallel>
+ <record name="runtest.output" action="stop" />
+</target>
+
+<!-- Setup and Restart the server instance-->
+<target name="restart-server-instance-common">
+ <antcall target="stopDomain"/>
+ <sleep seconds="15" />
+ <antcall target="startDomain"/>
+</target>
+
+<target name="startDomain" depends="startDomainEmbeddedStaticShell, startDomainEmbeddedUberJar"/>
+<target name="stopDomain" depends="stopDomainEmbedded"/>
+
+<!-- CLASSPATH including embedded ant-tasks.jar and uber jar (or static-shell jar) should be set externally -->
+<taskdef name="glassfish-embedded-start" classname="org.glassfish.ant.embedded.tasks.StartServerTask"/>
+<taskdef name="glassfish-embedded-stop" classname="org.glassfish.ant.embedded.tasks.StopServerTask"/>
+
+<target name="startDomainEmbeddedStaticShell" if="env.S1AS_HOME">
+ <echo> === EMBEDDED STARTING WITH GLASSFISH INSTALLATION at ${env.S1AS_HOME} === </echo>
+ <glassfish-embedded-start installRoot="${env.S1AS_HOME}" instanceRoot="${env.S1AS_HOME}/domains/domain1/" configFile="file:///${env.S1AS_HOME}/domains/domain1/config/domain.xml" configFileReadOnly="false" httpPort="-1"/>
+</target>
+
+<target name="startDomainEmbeddedUberJar" unless="env.S1AS_HOME">
+ <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>
+-->
+ </target>
+
+<target name="stopDomainEmbedded" >
+ <echo> === EMBEDDED STOPING === </echo>
+ <glassfish-embedded-stop/>
+ <sleep seconds="5"/>
+ </target>
+
+<target name="delete-domain-common" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="delete-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="create-domain-common" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="create-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="--adminport ${admin.port}"/>
+ <arg line="--instanceport ${http.port}"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--domainproperties orb.listener.port=${orb.port}" />
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="start-clean-server">
+ <antcall target="stopDomain"/>
+ <antcall target="startDomain"/>
+</target>
+
+
+<target name="restart-instance-common">
+ <antcall target="stopDomain"/>
+ <antcall target="startDomain"/>
+</target>
+
+<macrodef name="run-test">
+ <attribute name="classname"/>
+ <attribute name="classpath"/>
+ <sequential>
+ <java classname="@{classname}" classpath="@{classpath}" fork="true">
+ <jvmarg value="-Das.props=${as.props}"/>
+ </java>
+ </sequential>
+</macrodef>
+
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
new file mode 100644
index 0000000..12ef4ba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.properties
@@ -0,0 +1,28 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="web"/>
+<property name="appname" value="${module}-requestdispatcher"/>
+<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="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
new file mode 100644
index 0000000..404c86c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+<!ENTITY embeddedCommonBuild SYSTEM "./../config/embedded-common.xml">
+]>
+
+<project name="webcontainer_unittest" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &embeddedCommonBuild;
+
+ <target name="all" depends="start,build,deploy,run,stop,clean"/>
+
+ <target name="start" depends="init-common">
+ <glassfish-embedded-start/>
+ </target>
+
+ <target name="stop" depends="init-common">
+ <glassfish-embedded-stop/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <delete dir="*tmp"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+
+ </target>
+
+ <target name="build-publish-war" depends="build, publish-war-common" />
+
+ <target name="re-deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <echo message="Deploying ${assemble.dir}/${appname}-web.war from ${basedir}."
+ 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}"/>
+ <arg value="${http.port}"/>
+ <arg value="${contextroot}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </target>
+ <target name="clobber" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/application.xml
new file mode 100755
index 0000000..d18892e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/application.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>simpleservlettest</display-name>
+ <module>
+ <web>
+ <web-uri>web-simple-servlet-web.war</web-uri>
+ <context-root>simpleservlettest</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/sun-web.xml
new file mode 100755
index 0000000..fd6410d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/sun-web.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd">
+
+<sun-web-app>
+<description>tomcat-test</description>
+
+<security-role-mapping>
+ <role-name>tomcat</role-name>
+ <principal-name>tomcat</principal-name>
+ <group-name>tomcat</group-name>
+</security-role-mapping>
+
+</sun-web-app>
+
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
new file mode 100644
index 0000000..f9861df
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/web.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app 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/web-app_2_4.xsd"
+ version="2.4">
+
+ <filter>
+ <filter-name>FilterTest</filter-name>
+ <filter-class>test.FilterTest</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>FilterTest</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</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>
+ <display-name>ServletTest2</display-name>
+ <servlet-name>ServletTest2</servlet-name>
+ <servlet-class>test.ServletTest2</servlet-class>
+ </servlet>
+ <servlet>
+ <display-name>ServletTest3</display-name>
+ <servlet-name>ServletTest3</servlet-name>
+ <servlet-class>test.ServletTest3</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletTest</servlet-name>
+ <url-pattern>/ServletTest</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServletTest2</servlet-name>
+ <url-pattern>/ServletTest2</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServletTest3</servlet-name>
+ <url-pattern>/ServletTest3</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
+
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
new file mode 100755
index 0000000..57a5e16
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/FilterTest.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.servlet.*;
+import javax.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, javax.servlet.ServletException {
+ System.out.println("[Filter.doFilter]");
+
+ ((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS");
+ filterChain.doFilter(request, response);
+
+ }
+
+
+ public void init(javax.servlet.FilterConfig filterConfig) throws javax.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
new file mode 100644
index 0000000..9fe46d3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import org.xml.sax.InputSource;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.SAXException;
+
+// jaxp 1.0.1 imports
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.naming.*;
+import javax.sql.*;
+import java.sql.*;
+
+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]");
+ context = config.getServletContext();
+ System.out.println("[Servlet.init] " + context.getMajorVersion());
+
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("[Servlet.doGet]");
+ doPost(request, response);
+ }
+
+ 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");
+
+ RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2");
+ rd.forward(request, response);
+ }
+
+ public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) {
+ System.out.println("[Servlet.sessionCreated]");
+ }
+
+ public void sessionDestroyed(javax.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
new file mode 100755
index 0000000..f517cce
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest2.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+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]");
+ context = config.getServletContext();
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("[Servlet2.doGet]");
+ doPost(request, response);
+ }
+
+ 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");
+
+ RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3");
+ rd.include(request, response);
+ }
+
+ public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) {
+ System.out.println("[Servlet.sessionCreated]");
+ }
+
+ public void sessionDestroyed(javax.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
new file mode 100644
index 0000000..4b9b240
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest3.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import org.xml.sax.InputSource;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.SAXException;
+
+// jaxp 1.0.1 imports
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.naming.*;
+import javax.sql.*;
+import java.sql.*;
+
+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();
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("[Servlet3.doGet]");
+ doPost(request, response);
+ }
+
+ 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/README b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/README
new file mode 100644
index 0000000..02dfce0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/README
@@ -0,0 +1,85 @@
+UNDER CONSTRUCTION
+
+The HK2 suite is currently under construction, please do not attempt to
+run it yet. Thanks for your understanding.
+
+11/1/2012
+
+----------------------------------------
+Steps for running HK2 Development Tests
+----------------------------------------
+
+1. Set the following variables:
+
+APS_HOME to the location of where v2/appserv-tests are checked out
+S1AS_HOME to <GlassFish install location>/glassfish5/glassfish
+
+2. Make sure ant is in your path.
+
+Also, in some cases the ant test clients run out of memory during the test run.
+If you see this problem, add -Xmx999m to the command that starts the ant java vm, e.g :
+
+ % cat `which ant`
+
+
+ (... towards bottom of ant script)
+
+ "$JAVACMD" -Xmx999m -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@"
+
+3. Install GlassFish by unzipping glassfish.zip for running the tests against Java EE Full Profile, or web.zip for running the tests against the Web Profile.
+
+4. Run the tests.
+
+ 4.1 The "all" target starts the server and the database, runs the tests, and then stops the server and database.
+
+ % ant all
+
+5. The results should look something like this :
+
+ [exec] input file=/Volumes/Fantom1/work/v2/appserv-tests/test_resultsValid.xml
+ [exec]
+ [exec] ************************
+ [exec] PASSED= <total>
+ [exec] ------------ =========
+ [exec] FAILED= 0
+ [exec] ------------ =========
+ [exec] DID NOT RUN= 0
+ [exec] ------------ =========
+ [exec] Total Expected=<total>
+ [exec] ************************
+ [exec]
+
+( <total> is equal to the TOTAL value in the result_count.sh file. We keep this total count up to date based on the total number of test framework PASS assertions in the set of tests run by the ant all target )
+
+
+6. To start the server and Derby database, and to cleanup resultset, do
+
+ % ant setup
+
+7. To stop the server and Derby database, and to report the result, do
+
+ % ant unsetup
+
+Note: partial result will show <total>-<tests-executed> as a DID NOT RUN number
+
+8. Keeping the score...
+
+ 8.1 If an assertion is added to a new test, and the status is not populated from this assertion, no extra change is necessary.
+
+ 8.2 If a status of the new assertion is reported explicitly via call:
+
+ stat.addStatus("XYZ", stat.PASS);
+
+ the resultCount.sh total need to be incremented by one.
+
+ NOTE: the status counter prefers that each status has its own name, so if "XYZ" had been already used, find a different name. If the same test is executed more than once, add some modifier to the name to make it unique.
+
+ 8.3 If a new test suite is added, the resultCount.sh should be incremented by the number of total tests reported by the suite. See the note above for the test reporting rules.
+
+ 8.4 If a test needs to be executed against web.zip, it should be referenced from the "test-lite" target, and its count added to the TOTAL_LITE. Otherwise it should be added to the "test-all" target and TOTAL count be updated.
+
+9. Clustered tests
+
+ Clustered tests are not part of this suite and are located under ee/ directory.
+
+ Only ee/timer tests are automated in their own suite at this time.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml
new file mode 100644
index 0000000..611a245
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../config/common.xml">
+<!ENTITY commonRun SYSTEM "../../config/run.xml">
+<!ENTITY reporting SYSTEM "report.xml">
+<!ENTITY emma SYSTEM "../../config/emma.xml">
+]>
+
+<project name="hk2" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &reporting;
+ &emma;
+
+ <patternset id="emma.instrument.jar.files"/>
+
+ <target name="all">
+
+ <antcall target="setup"/>
+ <antcall target="test-all"/>
+ <antcall target="unsetup"/>
+ <antcall target="report"/>
+ </target>
+
+ <target name="setup">
+
+ <antcall target="start-database"/>
+ <ant target="startDomain"/>
+ <ant target="clean-result"/>
+
+ </target>
+
+ <target name="clean-result">
+
+ <delete>
+ <fileset dir="${env.APS_HOME}" includes="test_results*"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="hk2.output" action="start" />
+
+ </target>
+
+ <target name="test-all">
+ <ant dir="ejb" target="all"/>
+
+ </target>
+
+ <target name="unsetup">
+ <echo message="Stopping app server instance"/>
+ <ant target="stopDomain"/>
+
+ <antcall target="stop-database"/>
+
+ <record name="hk2.output" action="stop" />
+
+ </target>
+
+ <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">
+ <arg line="start-database --dbport ${db.port}"/>
+ </exec>
+ </target>
+
+ <target name="stop-database" depends="init-common">
+ <echo message="Stopping database --dbport ${db.port}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="stop-database --dbport ${db.port}"/>
+ </exec>
+ </target>
+
+ <target name="report-result" depends="init-common">
+ <antcall target="dev-report"/>
+ </target>
+
+ <target name="allowedmethods">
+ <record name="allowedmethods.output" action="start" />
+ <ant dir="allowedmethods" target="all"/>
+ <record name="allowedmethods.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="bmp">
+ <record name="bmp.output" action="start" />
+ <ant dir="bmp" target="all"/>
+ <record name="bmp.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="usage">
+ <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>
+ </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
new file mode 100644
index 0000000..ad13532
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/build.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+<!ENTITY reporting SYSTEM "../report.xml">
+]>
+
+<project name="hk2-ejb" default="usage" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <antcall target="isolation"/>
+ </target>
+
+ <target name="isolation">
+ <record name="isolation.output" action="start" />
+ <ant dir="isolation" target="all"/>
+ <record name="isolation.output" action="stop" />
+ </target>
+
+ <target name="usage">
+ <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
new file mode 100644
index 0000000..dbdc8c4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.properties
@@ -0,0 +1,28 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="hk2-ejb-isolation"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="app.type" value="application"/>
+<property name="application.xml" value="descriptor/application1.xml"/>
+<property name="application-client.xml"
+ value="descriptor/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
new file mode 100644
index 0000000..76a7773
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "build.properties">
+]>
+
+<project name="hk2-ejb-isolation-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb/one/src/main/java"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/**.class" />
+ <param name="appclientjar.classes"
+ value="**/**.class" />
+ </antcall>
+ </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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100755
index 0000000..64198ba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.oracle.s1asdev.hk2.simple.client;
+
+import java.io.*;
+import java.util.*;
+import javax.ejb.EJB;
+import javax.ejb.EJBHome;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import com.oracle.hk2devtest.isolation1.Isolation1;
+
+public class Client {
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @EJB(lookup="java:app/env/forappclient")
+ private static Isolation1 isolation1;
+
+ public static void main (String[] args) {
+
+ stat.addDescription("hk2-ejb-isolation");
+ 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
+ // Object objref = ic.lookup("java:comp/env/ejb/foo");
+
+ stat.addStatus("ejbclient main", stat.PASS);
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejbclient main" , stat.FAIL);
+ }
+
+ return;
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/MANIFEST.MF
new file mode 100644
index 0000000..b3f1de0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.oracle.s1asdev.hk2.simple.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/descriptor/application-client.xml
new file mode 100644
index 0000000..90c21f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/descriptor/application-client.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>hk2-ejb-isolationClient</display-name>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/descriptor/application1.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/descriptor/application1.xml
new file mode 100644
index 0000000..6fa0331
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/descriptor/application1.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>hk2-isolation-isolation1App</display-name>
+ <module>
+ <ejb>hk2-ejb-isolation-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>hk2-ejb-isolation-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/ejb/one/src/main/java/com/oracle/hk2devtest/isolation1/Isolation1.java b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/ejb/one/src/main/java/com/oracle/hk2devtest/isolation1/Isolation1.java
new file mode 100644
index 0000000..701e04d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/ejb/one/src/main/java/com/oracle/hk2devtest/isolation1/Isolation1.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.oracle.hk2devtest.isolation1;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface Isolation1 {
+
+ public String helloWorld();
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/ejb/one/src/main/java/com/oracle/hk2devtest/isolation1/Isolation1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/ejb/one/src/main/java/com/oracle/hk2devtest/isolation1/Isolation1Bean.java
new file mode 100644
index 0000000..e7ac9f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/ejb/one/src/main/java/com/oracle/hk2devtest/isolation1/Isolation1Bean.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.oracle.hk2devtest.isolation1;
+
+import java.io.Serializable;
+
+import javax.ejb.EJB;
+import javax.ejb.LocalBean;
+import javax.ejb.Stateless;
+
+@Stateless
+@LocalBean
+@EJB(name="java:app/env/forappclient", beanInterface=Isolation1.class)
+public class Isolation1Bean implements Isolation1, Serializable {
+
+ public String helloWorld() {
+ return "Hello, World!";
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/report.xml
new file mode 100644
index 0000000..9ad7878
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/report.xml
@@ -0,0 +1,52 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+ <antcall target="transfer"/>
+ <antcall target="report-sh">
+ <param name="type" value="all"/>
+ </antcall>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="transfer">
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+</target>
+
+<target name="report-lite">
+ <antcall target="transfer"/>
+ <antcall target="report-sh">
+ <param name="type" value="lite"/>
+ </antcall>
+</target>
+
+<target name="report-sh">
+<echo message="Comparing results with expected results"/>
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ <arg value="${type}"/>
+ </exec>
+</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/resultCount.sh b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/resultCount.sh
new file mode 100644
index 0000000..bfec2fb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/resultCount.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=1
+
+PASSED=`grep "status value" $FILE | grep "pass" | wc -l`
+FAILED=`grep "status value" $FILE | grep "fail" | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/hk2/count.txt;
+date>>$APS_HOME/devtests/hk2/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/hk2/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/hk2/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/hk2/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/hk2/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/hk2/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/hk2/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/hk2/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/hk2/count.txt;
+echo "************************">>$APS_HOME/devtests/hk2/count.txt;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.properties
new file mode 100644
index 0000000..90a772e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.properties
@@ -0,0 +1,33 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="jaxr"/>
+<property name="app.type" value="application"/>
+<!--======= -->
+<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="jaxrra"/>
+<property name="test.client" value="jaxr.JaxrClient"/>
+<!--<property name="jndi.name" value="MyJaxr"/>
+<property name="provider.url" value="iiop://localhost:${orb.port}"/>
+<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/> -->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml
new file mode 100644
index 0000000..3a06a05
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+<project name="jaxrApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="jaxr"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common"/>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command"
+ value="create-connector-connection-pool
+ --raname jaxr-ra
+ --connectiondefinition javax.xml.registry.ConnectionFactory"/>
+ <param name="operand.props"
+ value="jaxr-pool"/>
+ </antcall>
+ <antcall target="asadmin-common-ignore-fail">
+ <param name="admin.command"
+ value="create-connector-resource
+ --poolname jaxr-pool"/>
+ <param name="operand.props"
+ value="eis/jaxr" />
+ </antcall>
+ <antcall target="reconfig-common" />
+ <echo message="asadmin deploy --user ${admin.user} --password ${admin.password} --host ${admin.host} --port ${admin.port} --target ${appserver.instance.name} --type ${apptype} --retrieve ${assemble.dir} jaxrraApp.ear"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--generatermistubs=true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+<!-- deployed.app defaults to ${assemble.dir}/${appname}App.ear defined in properties.xml-->
+ <arg line="${assemble.dir}/jaxrraApp.ear"/>
+ </exec>
+ <echo message="Deployment on target server ${appserver.instance.name}
+successful"/>
+ </target>
+
+<!-- <antcall target="deploy-common">
+ <param name="generate.stubs" value="true"/>
+ </antcall>
+ </target>
+ -->
+ <target name="run" depends="init-common">
+ <!-- <antcall target="runclient-common"/> -->
+ <antcall target="run-standalone-client"/>
+ </target>
+
+ <!-- =============================================== -->
+ <!-- Target to run the standalone client without ACC -->
+ <!-- =============================================== -->
+ <target name="run-standalone-client" depends="init-common">
+ <property name="jndi.name" value="jaxrra"/>
+ <property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+-->
+ <property name="ctxfactory"
+ value="com.sun.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"/>
+ </java>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/client/MANIFEST.MF
new file mode 100644
index 0000000..74b99ec
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: jaxr.JaxrClient
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application-client.xml
new file mode 100644
index 0000000..ee01e9a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application-client.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-stateless-jaxrraClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/MyJaxr</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>jaxr.JaxrHome</home>
+ <remote>jaxr.JaxrRemote</remote>
+ </ejb-ref>
+</application-client>
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
new file mode 100644
index 0000000..fa9bbc2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>JaxrraApp</display-name>
+ <module>
+ <java>jaxrra-client.jar</java>
+ </module>
+ <module>
+ <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
new file mode 100644
index 0000000..b76a9b3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/ejb-jar.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <display-name>JaxrraApp</display-name>
+ <ejb-name>MyJaxr</ejb-name>
+ <home>jaxr.JaxrHome</home>
+ <remote>jaxr.JaxrRemote</remote>
+ <ejb-class>jaxr.JaxrBean</ejb-class>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
+
+ <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>
+ <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>
+
+ </session>
+
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <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>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..65f2e6a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/MyJaxr</ejb-ref-name>
+ <jndi-name>jaxrra</jndi-name>
+ </ejb-ref>
+</sun-application-client>
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
new file mode 100644
index 0000000..fc597cf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <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>
+ </resource-ref>
+ </ejb>
+
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/Jaxr.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/Jaxr.java
new file mode 100644
index 0000000..c200e6c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/Jaxr.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+import javax.ejb.*;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.io.Serializable;
+
+public interface Jaxr extends EJBObject {
+
+ public String getCompanyInformation(String company) throws RemoteException;
+}
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
new file mode 100644
index 0000000..40dae12
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrBean.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+import javax.xml.registry.*;
+import javax.xml.registry.infomodel.*;
+import java.security.*;
+import java.net.*;
+import java.util.*;
+public class JaxrBean implements SessionBean {
+ private SessionContext sc;
+ private ConnectionFactory cnfct = null;
+ private Connection con = null;
+// private String regurl = "http://www-3.ibm.com/services/uddi/v2beta/inquiryapi";
+// private String regurlp = "https://www-3.ibm.com/services/uddi/v2beta/protect/publishapi";
+ private StringBuffer result = new StringBuffer();
+ 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 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.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);
+ System.out.println("Established security credentials");
+
+
+
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ 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
new file mode 100644
index 0000000..b0c02c7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrClient.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+
+import java.io.*;
+import java.util.*;
+import javax.ejb.EJBHome;
+import jaxr.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+import org.omg.CORBA.ORB;
+
+public class JaxrClient {
+
+ String company = "Sun";
+ String url = null;
+ String ctxFactory = null;
+ String jndiName = null;
+ public static void main (String[] args) {
+ JaxrClient client = new JaxrClient(args);
+ client.doTest();
+ }
+
+ public JaxrClient (String[] args) {
+ if (args.length == 3) {
+ url = args[0];
+ ctxFactory = args[1];
+ jndiName = args[2];
+ }
+ }
+
+ public String doTest() {
+
+ String res = "fail";
+
+ try {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", url);
+ env.put("java.naming.factory.initial", ctxFactory);
+ // Initialize the Context with JNDI specific properties
+ InitialContext context = new InitialContext(env);
+ System.out.println("Context Initialized with " +
+ "URL: " + url + ", Factory: " + ctxFactory);
+ // Create Home object
+ System.out.println("*****"+jndiName);
+ java.lang.Object obj = context.lookup(jndiName);
+ // 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);
+ 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(hr.getCompanyInformation(company));
+ hr.remove();
+ } catch(NamingException ne){
+ System.out.println("Caught exception while initializing context.\n");
+ ne.printStackTrace();
+ System.out.println (" Test Failed !");
+ return res;
+ } catch(Exception re) {
+ re.printStackTrace();
+ System.out.println (" Test Failed !");
+ return res;
+ }
+ res = "pass";
+ System.out.println (" Test Passed !");
+ return res;
+
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrHome.java
new file mode 100644
index 0000000..b99a245
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrHome.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+
+
+public interface JaxrHome extends EJBHome {
+
+ public JaxrRemote create () throws RemoteException, CreateException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrRemote.java
new file mode 100644
index 0000000..de19285
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrRemote.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+import javax.ejb.*;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.io.Serializable;
+
+public interface JaxrRemote extends EJBObject {
+
+ public String getCompanyInformation(String company) throws RemoteException;
+}
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
new file mode 100644
index 0000000..4e89d8f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="jaxr"/>
+<property name="app.type" value="application"/>
+<!--======= -->
+<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="jaxrra"/>
+<property name="test.client" value="jaxr.JaxrClient"/>
+<!--<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"/>
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
new file mode 100644
index 0000000..526dbb2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+<project name="jaxrApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build, setup, deploy,run,undeploy, unsetup"/>
+
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common"/>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="deploy-rar"/>
+ </target>
+
+ <target name="unsetup" depends="init-common">
+ <antcall target="undeploy-rar"/>
+ </target>
+
+ <target name="deploy-rar" depends="init-common">
+ <antcall target="deploy-rar-common">
+ <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>
+
+ <target name="deploy" depends="init-common">
+<exec executable="${ASADMIN}" failonerror="false">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--generatermistubs=true"/>
+ <arg line="--retrieve ${assemble.dir}"/>
+<!-- deployed.app defaults to ${assemble.dir}/${appname}App.ear defined in properties.xml-->
+ <arg line="${assemble.dir}/jaxrraApp.ear"/>
+ </exec>
+ <echo message="Deployment on target server ${appserver.instance.name}
+successful"/>
+ </target>
+
+<!-- <antcall target="deploy-common">
+ <param name="generate.stubs" value="true"/>
+ </antcall>
+ </target>
+ -->
+ <target name="run" depends="init-common">
+ <!-- <antcall target="runclient-common"/> -->
+ <antcall target="run-standalone-client"/>
+ </target>
+
+ <!-- =============================================== -->
+ <!-- Target to run the standalone client without ACC -->
+ <!-- =============================================== -->
+ <target name="run-standalone-client" depends="init-common">
+ <property name="jndi.name" value="jaxrra"/>
+ <property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+-->
+ <property name="ctxfactory"
+ value="com.sun.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"/>
+ </java>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application-client.xml
new file mode 100644
index 0000000..ee01e9a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application-client.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-stateless-jaxrraClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/MyJaxr</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>jaxr.JaxrHome</home>
+ <remote>jaxr.JaxrRemote</remote>
+ </ejb-ref>
+</application-client>
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
new file mode 100644
index 0000000..fa9bbc2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>JaxrraApp</display-name>
+ <module>
+ <java>jaxrra-client.jar</java>
+ </module>
+ <module>
+ <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
new file mode 100644
index 0000000..792806d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/ejb-jar.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <display-name>JaxrraApp</display-name>
+ <ejb-name>MyJaxr</ejb-name>
+ <home>jaxr.JaxrHome</home>
+ <remote>jaxr.JaxrRemote</remote>
+ <ejb-class>jaxr.JaxrBean</ejb-class>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
+
+ <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>
+ <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>
+ </session>
+
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <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>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..65f2e6a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/MyJaxr</ejb-ref-name>
+ <jndi-name>jaxrra</jndi-name>
+ </ejb-ref>
+</sun-application-client>
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
new file mode 100644
index 0000000..ae11330
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <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>
+ </resource-ref>
+ </ejb>
+
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/Jaxr.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/Jaxr.java
new file mode 100644
index 0000000..c200e6c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/Jaxr.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+import javax.ejb.*;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.io.Serializable;
+
+public interface Jaxr extends EJBObject {
+
+ public String getCompanyInformation(String company) throws RemoteException;
+}
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
new file mode 100644
index 0000000..b07d5c3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrBean.java
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+import javax.xml.registry.*;
+import javax.xml.registry.infomodel.*;
+import java.security.*;
+import java.net.*;
+import java.util.*;
+public class JaxrBean implements SessionBean {
+ private SessionContext sc;
+ //private com.sun.jaxr.ra.ebxml.JaxrConnectionFactory cnfct = null;
+ private ConnectionFactory cnfct = null;
+ private Connection con = null;
+// private String regurl = "http://www-3.ibm.com/services/uddi/v2beta/inquiryapi";
+// private String regurlp = "https://www-3.ibm.com/services/uddi/v2beta/protect/publishapi";
+ private StringBuffer result = new StringBuffer();
+ 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://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)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", 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
+
+ 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");
+ 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 (" 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 ---");
+ System.out.println(" About to create an org with name = "+ "SJSAS");
+ createOrg("SJSAS", rs);
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ 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);
+ // Create primary contact, set name
+ User primaryContact = blcm.createUser();
+ PersonName pName = blcm.createPersonName("Jane Doe");
+ primaryContact.setPersonName(pName);
+ org.setPrimaryContact(primaryContact);
+ Collection orgs = new ArrayList();
+ orgs.add(org);
+ BulkResponse response = blcm.saveOrganizations(orgs);
+ Collection exceptions = response.getExceptions();
+ 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) 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");
+ }
+}
+
+
+ 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
new file mode 100644
index 0000000..73c0dba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrClient.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+
+import java.io.*;
+import java.util.*;
+import javax.ejb.EJBHome;
+import jaxr.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+import org.omg.CORBA.ORB;
+
+public class JaxrClient {
+
+ String company = "%Sun%";
+ String url = null;
+ String ctxFactory = null;
+ String jndiName = null;
+ public static void main (String[] args) {
+ JaxrClient client = new JaxrClient(args);
+ client.doTest();
+ }
+
+ public JaxrClient (String[] args) {
+ if (args.length == 3) {
+ url = args[0];
+ ctxFactory = args[1];
+ jndiName = args[2];
+ }
+ }
+
+ public String doTest() {
+
+ String res = "fail";
+
+ try {
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", url);
+ env.put("java.naming.factory.initial", ctxFactory);
+ // Initialize the Context with JNDI specific properties
+ InitialContext context = new InitialContext(env);
+ System.out.println("Context Initialized with " +
+ "URL: " + url + ", Factory: " + ctxFactory);
+ // Create Home object
+ System.out.println("*****"+jndiName);
+ java.lang.Object obj = context.lookup(jndiName);
+ // 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);
+ 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(hr.getCompanyInformation(company));
+ hr.remove();
+ } catch(NamingException ne){
+ System.out.println("Caught exception while initializing context.\n");
+ ne.printStackTrace();
+ System.out.println (" Test Failed !");
+ return res;
+ } catch(Exception re) {
+ re.printStackTrace();
+ System.out.println (" Test Failed !");
+ return res;
+ }
+ res = "pass";
+ System.out.println (" Test Passed !");
+ return res;
+
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrHome.java
new file mode 100644
index 0000000..b99a245
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrHome.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+
+
+public interface JaxrHome extends EJBHome {
+
+ public JaxrRemote create () throws RemoteException, CreateException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrRemote.java
new file mode 100644
index 0000000..de19285
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrRemote.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jaxr;
+
+import javax.ejb.*;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.io.Serializable;
+
+public interface JaxrRemote extends EJBObject {
+
+ public String getCompanyInformation(String company) throws RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jms/JMSXDeliveryCount/ACC1/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jms/JMSXDeliveryCount/ACC1/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..e87ee96
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jms/JMSXDeliveryCount/ACC1/descriptor/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jms/JMSXDeliveryCount/ACC2/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jms/JMSXDeliveryCount/ACC2/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..e87ee96
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jms/JMSXDeliveryCount/ACC2/descriptor/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/README.txt b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/README.txt
new file mode 100644
index 0000000..e468960
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/README.txt
@@ -0,0 +1,7 @@
+NOTE: Only appserver tests should be added in this directory.
+
+The tests in this directory are testing the integration of the Java
+Persistence API (JPA) into the application server. JPA tests can be
+found in the directory ../../entity-persistence-tests.
+To run the tests, simply call "ant" in a directory having a build.xml
+file.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/README.txt b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/README.txt
new file mode 100644
index 0000000..4ac11dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/README.txt
@@ -0,0 +1,4 @@
+This is a TestNG prototype testing the Java Persistence API integration
+into the appserver. The test currently only runs in out-of-container mode,
+i.e. w/o appserver. The intention is to add another client running the
+same tests running with an application server client.
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
new file mode 100644
index 0000000..33d05ef
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb"/>
+<property name="appname" value="ejb30-toplink-essentials-advanced"/>
+<property name="persistence.xml" value="descriptor/persistence.xml"/>
+<property name="app.type" value="application"/>
+<property name="ejb30-persistence" value="true"/>
+<property name="testsuite.id" value="ADVANCED"/>
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
new file mode 100644
index 0000000..747f456
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ooc" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,run,report"/>
+
+ <path id="compile.cp">
+ <pathelement location="${env.S1AS_HOME}/lib/toplink-essentials.jar"/>
+ <pathelement location="${env.APS_HOME}/lib/testng.jar"/>
+ </path>
+
+ <!-- Custom compilation for out-of-cointainer test -->
+ <target name="compile-client-ooc" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <javac destdir="${build.classes.dir}" debug="on">
+ <src path="../framework"/>
+ <src path="client-ooc"/>
+ <classpath>
+ <path refid="compile.cp" />
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- Standard compilation for JPA POJOs -->
+ <target name="compile-ejb" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${persistence.xml}" tofile="${build.classes.dir}/META-INF/persistence.xml"/>
+ </target>
+
+ <target name="compile" depends="compile-ejb, compile-client-ooc">
+ </target>
+
+ <!-- not currently used -->
+ <target name="package-persistence" depends="compile">
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-persistence.jar" update="true">
+ <metainf file="${persistence.xml}"/>
+ <fileset dir="${build.classes.dir}"
+ includes="oracle/toplink/essentials/testing/models/cmp3/advanced/*.class"
+ />
+ </jar>
+ </target>
+
+ <target name="build" depends="compile">
+ </target>
+
+ <path id="run.cp">
+<!-- ${build.classes.dir} not defined during run target???
+ <pathelement location="${build.classes.dir}"/>
+-->
+ <pathelement location="${env.APS_HOME}/build/module/classes"/>
+ <pathelement location="${env.S1AS_HOME}/javadb/lib/derbyclient.jar"/>
+ <path refid="compile.cp"/>
+ </path>
+
+ <target name="run" depends="compile">
+ <java fork="yes"
+ classpathref="run.cp"
+ classname="org.testng.TestNG">
+ <jvmarg value="-ea"/>
+ <arg value="testng.xml"/>
+ <jvmarg value="-javaagent:${env.S1AS_HOME}/lib/toplink-essentials-agent.jar"/>
+ </java>
+ </target>
+
+ <!-- Generate the TestNG report -->
+ <target name="report">
+ <mkdir dir="test-report"/>
+ <junitreport todir="test-report">
+ <fileset dir="test-output">
+ <include name="*.xml"/>
+ </fileset>
+ <report format="noframes" todir="test-report"/>
+ </junitreport>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+
+ <!-- clean-up Java2DB left-overs -->
+ <delete file="createDDL.jdbc"/>
+ <delete file="dropDDL.jdbc"/>
+
+ <!-- clean-up TestNG output -->
+ <delete dir="test-output"/>
+ <delete dir="test-report"/>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/client-ooc/EntityManagerTestNGTestCase.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/client-ooc/EntityManagerTestNGTestCase.java
new file mode 100644
index 0000000..9d1c276
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/client-ooc/EntityManagerTestNGTestCase.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package oracle.toplink.essentials.testing.tests.cmp3.advanced;
+
+import oracle.toplink.essentials.testing.framework.TestNGTestCase;
+import oracle.toplink.essentials.testing.models.cmp3.advanced.Address;
+import oracle.toplink.essentials.testing.models.cmp3.advanced.Employee;
+import oracle.toplink.essentials.testing.models.cmp3.advanced.ModelExamples;
+
+import org.testng.Assert;
+import org.testng.annotations.Configuration;
+import org.testng.annotations.Test;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityNotFoundException;
+import javax.persistence.Query;
+import java.util.List;
+
+/**
+ * TestNG test case(s) for testing entity manager operations using the
+ * TopLink implementation of the Java Persistence API.
+ * The base class TestNGTestCase provides the EntiyManagerFactory setup.
+ */
+public class EntityManagerTestNGTestCase extends TestNGTestCase {
+ private static Integer employeeId;
+
+ @Test
+ public void createEmployee() {
+ EntityManager em = createEntityManager();
+ em.getTransaction().begin();
+ try {
+ Employee employee = ModelExamples.employeeExample1();
+ em.persist(employee);
+ employeeId = employee.getId();
+ em.getTransaction().commit();
+ } catch (RuntimeException e) {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ throw e;
+ }
+ }
+
+ @Test(dependsOnMethods = { "createEmployee" })
+ public void testReadEmployee() {
+ Employee employee = createEntityManager().find(Employee.class, employeeId);
+ Assert.assertTrue(employee.getId() == employeeId, "Error reading Employee");
+ }
+
+ @Test
+ public void testNamedNativeQueryOnAddress() {
+ EntityManager em = createEntityManager();
+ em.getTransaction().begin();
+ try {
+ Address address1 = ModelExamples.addressExample1();
+ em.persist(address1);
+ Address address2 = ModelExamples.addressExample2();
+ em.persist(address2);
+ em.getTransaction().commit();
+ } catch (RuntimeException e) {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ throw e;
+ }
+ Query query = em.createNamedQuery("findAllSQLAddresses");
+ List addresses = query.getResultList();
+ Assert.assertTrue(addresses != null, "Error executing named native query 'findSQLAllAddresses'");
+ }
+
+ @Test(dependsOnMethods = { "testReadEmployee" })
+ public void testNamedQueryOnEmployee() {
+ Query query = createEntityManager().createNamedQuery("findAllEmployeesByFirstName");
+ query.setParameter("firstname", "Brady");
+ Employee employee = (Employee) query.getSingleResult();
+ Assert.assertTrue(employee != null, "Error executing named query 'findAllEmployeesByFirstName'");
+ }
+
+ @Test(dependsOnMethods = { "testNamedQueryOnEmployee" })
+ public void testUpdateEmployee() {
+ EntityManager em = createEntityManager();
+ em.getTransaction().begin();
+ try {
+ Employee employee = em.find(Employee.class, employeeId);
+ employee.setSalary(50000);
+ em.merge(employee);
+ em.getTransaction().commit();
+ } catch (RuntimeException e) {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ throw e;
+ }
+ clearCache();
+ Employee newEmployee = em.find(Employee.class, employeeId);
+ Assert.assertTrue(newEmployee.getSalary() == 50000, "Error updating Employee");
+ }
+
+ @Test
+ public void testRefreshNotManagedEmployee() {
+ EntityManager em = createEntityManager();
+ em.getTransaction().begin();
+ try {
+ Employee emp = new Employee();
+ emp.setFirstName("NotManaged");
+ em.refresh(emp);
+ Assert.fail("entityManager.refresh(notManagedObject) didn't throw exception");
+ } catch (IllegalArgumentException illegalArgumentException) {
+ // expected behaviour
+ } catch (RuntimeException e ) {
+ throw e;
+ } finally {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ }
+ }
+
+ @Test
+ public void testRefreshRemovedEmployee() {
+ // find an existing or create a new Employee
+ String firstName = "testRefreshRemovedEmployee";
+ Employee emp;
+ EntityManager em = createEntityManager();
+ List result = em.createQuery("SELECT OBJECT(e) FROM Employee e WHERE e.firstName = '"+firstName+"'").getResultList();
+ if(!result.isEmpty()) {
+ emp = (Employee)result.get(0);
+ } else {
+ emp = new Employee();
+ emp.setFirstName(firstName);
+ // persist the Employee
+ em.getTransaction().begin();
+ try {
+ em.persist(emp);
+ em.getTransaction().commit();
+ } catch (RuntimeException e) {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ throw e;
+ }
+ }
+
+ em.getTransaction().begin();
+ try{
+ emp = em.find(Employee.class, emp.getId());
+
+ // delete the Employee from the db
+ em.createQuery("DELETE FROM Employee e WHERE e.firstName = '"+firstName+"'").executeUpdate();
+
+ // refresh the Employee - should fail with EntityNotFoundException
+ em.refresh(emp);
+ Assert.fail("entityManager.refresh(removedObject) didn't throw exception");
+ } catch (EntityNotFoundException entityNotFoundException) {
+ // expected behaviour
+ } finally {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ }
+ }
+
+ @Test(dependsOnMethods = { "testUpdateEmployee" })
+ public void testDeleteEmployee() {
+ EntityManager em = createEntityManager();
+ em.getTransaction().begin();
+ try {
+ em.remove(em.find(Employee.class, employeeId));
+ em.getTransaction().commit();
+ } catch (RuntimeException e) {
+ if (em.getTransaction().isActive()){
+ em.getTransaction().rollback();
+ }
+ em.close();
+ throw e;
+ }
+ Assert.assertTrue(em.find(Employee.class, employeeId) == null, "Error deleting Employee");
+ }
+
+}
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
new file mode 100755
index 0000000..5b1ba2e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/descriptor/persistence.xml
@@ -0,0 +1,38 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+ <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
+ <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
+ <class>oracle.toplink.essentials.testing.models.cmp3.advanced.Address</class>
+ <class>oracle.toplink.essentials.testing.models.cmp3.advanced.Employee</class>
+ <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>
+ <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;"/>
+ <property name="toplink.jdbc.user" value="dbuser"/>
+ <property name="toplink.jdbc.password" value="dbpassword"/>
+ <property name="toplink.logging.level" value="INFO"/>
+ <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
+ </properties>
+ </persistence-unit>
+</persistence>
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
new file mode 100755
index 0000000..3769dd6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Address.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import java.io.Serializable;
+import javax.persistence.*;
+import static javax.persistence.GenerationType.*;
+import java.util.*;
+import static javax.persistence.CascadeType.*;
+
+/**
+ * <p><b>Purpose</b>: Represents the mailing address on an Employee
+ * <p><b>Description</b>: Held in a private 1:1 relationship from Employee
+ * @see Employee
+ */
+@Entity
+@Table(name="CMP3_ADDRESS")
+@NamedNativeQuery(
+ name="findAllSQLAddresses",
+ query="select * from CMP3_ADDRESS",
+ resultClass=oracle.toplink.essentials.testing.models.cmp3.advanced.Address.class
+)
+@NamedQuery(
+ 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 String province;
+ private String postalCode;
+ private String country;
+ private Collection<Employee> employees;
+
+ public Address() {
+ city = "";
+ province = "";
+ postalCode = "";
+ street = "";
+ country = "";
+ this.employees = new Vector<Employee>();
+ }
+
+ public Address(String street, String city, String province, String country, String postalCode) {
+ this.street = street;
+ this.city = city;
+ this.province = province;
+ this.country = country;
+ this.postalCode = postalCode;
+ this.employees = new Vector<Employee>();
+ }
+
+ @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;
+ }
+
+ public String getStreet() {
+ return street;
+ }
+
+ public void setStreet(String street) {
+ this.street = street;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ 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;
+ }
+
+ public void setEmployees(Collection<Employee> 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
new file mode 100755
index 0000000..66d5c80
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Employee.java
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import java.util.*;
+import java.io.Serializable;
+import javax.persistence.*;
+import static javax.persistence.GenerationType.*;
+import static javax.persistence.CascadeType.*;
+import static javax.persistence.FetchType.*;
+
+/**
+ * Bean class: EmployeeBean
+ * Remote interface: Employee
+ * Primary key class: EmployeePK
+ * Home interface: EmployeeHome
+ *
+ * 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
+ * XML)
+ */
+@Entity
+@EntityListeners(oracle.toplink.essentials.testing.models.cmp3.advanced.EmployeeListener.class)
+@Table(name="CMP3_EMPLOYEE")
+@SecondaryTable(name="CMP3_SALARY")
+@PrimaryKeyJoinColumn(name="EMP_ID", referencedColumnName="EMP_ID")
+@NamedQueries({
+@NamedQuery(
+ 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"
+),
+@NamedQuery(
+ 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 Collection<Employee> managedEmployees;
+ private Employee manager;
+
+ 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
+ @GeneratedValue(strategy=TABLE, generator="EMPLOYEE_TABLE_GENERATOR")
+ @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;
+ }
+
+ @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 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;
+ }
+
+ @ManyToOne(cascade=PERSIST, fetch=LAZY)
+ @JoinColumn(name="ADDR_ID")
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ @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;
+ }
+
+ public void setManager(Employee manager) {
+ this.manager = manager;
+ }
+
+ @ManyToMany(cascade=PERSIST)
+ @JoinTable(
+ 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;
+ }
+
+ 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;
+ }
+
+ @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;
+ }
+
+ public void addManagedEmployee(Employee emp) {
+ getManagedEmployees().add(emp);
+ emp.setManager(this);
+ }
+
+ public void addPhoneNumber(PhoneNumber phone) {
+ phone.setOwner(this);
+ getPhoneNumbers().add(phone);
+ }
+
+ public void addProject(Project theProject) {
+ getProjects().add(theProject);
+ }
+
+ public void removeManagedEmployee(Employee emp) {
+ getManagedEmployees().remove(emp);
+ }
+
+ 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
+ // equals() in PhoneNumber to remove properly
+ getPhoneNumbers().remove(phone);
+ }
+
+ public void removeProject(Project theProject) {
+ getProjects().remove(theProject);
+ }
+
+ public String toString() {
+ return "Employee: " + getId();
+ }
+
+ public String displayString() {
+ StringBuffer sbuff = new StringBuffer();
+ sbuff.append("Employee ").append(getId()).append(": ").append(getLastName()).append(", ").append(getFirstName()).append(getSalary());
+
+ 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() {
+ return "";
+ }
+}
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
new file mode 100755
index 0000000..e566ddf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmployeeListener.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import javax.persistence.*;
+import java.util.EventListener;
+
+public class EmployeeListener implements EventListener {
+ public static int PRE_PERSIST_COUNT = 0;
+ public static int POST_PERSIST_COUNT = 0;
+ public static int PRE_REMOVE_COUNT = 0;
+ public static int POST_REMOVE_COUNT = 0;
+ public static int PRE_UPDATE_COUNT = 0;
+ public static int POST_UPDATE_COUNT = 0;
+ public static int POST_LOAD_COUNT = 0;
+
+ // 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) {
+ PRE_PERSIST_COUNT++;
+ }
+
+ @PostPersist
+ public void postPersist(Object emp) {
+ POST_PERSIST_COUNT++;
+ }
+
+ @PreRemove
+ public void preRemove(Object emp) {
+ PRE_REMOVE_COUNT++;
+ }
+
+ @PostRemove
+ public void postRemove(Object emp) {
+ POST_REMOVE_COUNT++;
+ }
+
+ @PreUpdate
+ public void preUpdate(Object emp) {
+ PRE_UPDATE_COUNT++;
+ Employee employee = (Employee)emp;
+ if(employee.getFirstName() != null && employee.getFirstName().startsWith(PRE_UPDATE_NAME_PREFIX)) {
+ employee.setFirstName(employee.getFirstName().substring(PRE_UPDATE_NAME_PREFIX.length()));
+ }
+ 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) {
+ POST_UPDATE_COUNT++;
+ }
+
+ @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
new file mode 100755
index 0000000..184b1e8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmploymentPeriod.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import java.sql.Date;
+import java.io.*;
+import javax.persistence.*;
+
+/**
+ * <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
+ * aggregate relationship of Employee
+ * @see Employee
+ */
+@Embeddable
+@Table(name="CMP3_EMPLOYEE")
+public class EmploymentPeriod implements Serializable {
+ private Date startDate;
+ private Date endDate;
+
+ public EmploymentPeriod() {}
+
+ /**
+ * 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
+ * state, or represent the entire instance definition.
+ */
+ public EmploymentPeriod(Date theStartDate, Date theEndDate) {
+ startDate = theStartDate;
+ endDate = theEndDate;
+ }
+
+ @Column(name="S_DATE")
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public void setStartDate(Date date) {
+ this.startDate = date;
+ }
+
+ @Column(name="E_DATE")
+ public Date getEndDate() {
+ return endDate;
+ }
+
+ public void setEndDate(Date date) {
+ this.endDate = date;
+ }
+
+ /**
+ * Print the start & end date
+ */
+ 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
new file mode 100755
index 0000000..e848f92
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/LargeProject.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import javax.persistence.*;
+
+/**
+ * Local interface for the large project bean.
+ * This is the bean's public/local interface for the clients usage.
+ * All locals must extend the javax.ejb.EJBLocalObject.
+ * The bean itself does not have to implement the local interface, but must implement all of the methods.
+ */
+@Entity
+@Table(name="CMP3_LPROJECT")
+@DiscriminatorValue("L")
+@NamedQueries({
+@NamedQuery(
+ 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")
+}
+)
+public class LargeProject extends Project {
+ private double budget;
+ public LargeProject () {
+ super();
+ }
+ public LargeProject (String name) {
+ this();
+ this.setName(name);
+ }
+
+ public double getBudget() {
+ return 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
new file mode 100755
index 0000000..21e877e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/ModelExamples.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import java.sql.Date;
+
+public class ModelExamples {
+
+ public static Employee employeeExample1(){
+ Employee emp = new Employee();
+ emp.setFirstName("Brady");
+ emp.setLastName("Bowaster");
+ emp.setPeriod(new EmploymentPeriod());
+ emp.getPeriod().setStartDate(new Date(System.currentTimeMillis()-1000000));
+ emp.getPeriod().setEndDate(new Date(System.currentTimeMillis()+1000000));
+ emp.setSalary(15000);
+ return emp;
+ }
+
+ public static Employee employeeExample2(){
+ Employee emp = new Employee();
+ emp.setFirstName("Sassly");
+ emp.setLastName("Soosly");
+ emp.setPeriod(new EmploymentPeriod());
+ emp.getPeriod().setStartDate(new Date(System.currentTimeMillis()-3000000));
+ emp.getPeriod().setEndDate(new Date(System.currentTimeMillis()-10000));
+ emp.setSalary(1000);
+ return emp;
+ }
+
+ public static Employee employeeExample3(){
+ Employee emp = new Employee();
+ emp.setFirstName("Lacy");
+ emp.setLastName("Lowry");
+ emp.setPeriod(new EmploymentPeriod());
+ emp.getPeriod().setStartDate(new Date(System.currentTimeMillis()-48000000));
+ emp.getPeriod().setEndDate(new Date(System.currentTimeMillis()+10000000));
+ emp.setSalary(2);
+ return emp;
+ }
+
+ public static Employee employeeExample4(){
+ Employee emp = new Employee();
+ emp.setFirstName("Ralf");
+ emp.setLastName("Guedder");
+ emp.setPeriod(new EmploymentPeriod());
+ emp.getPeriod().setStartDate(new Date(System.currentTimeMillis()-15000000));
+ emp.getPeriod().setEndDate(new Date(System.currentTimeMillis()+15000000));
+ 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");
+ project.setName("Feline Demographics Assesment");
+ project.setBudget(3654563.0);
+ return project;
+ }
+ public static Project projectExample3(){
+ SmallProject project = new SmallProject();
+ project.setDescription("To carefully watch the grass grow.");
+ project.setName("Horticulture Quantification");
+ return project;
+ }
+ public static Address addressExample1(){
+ Address address = new Address();
+ address.setCity("Washabuc");
+ address.setCountry("Canada");
+ address.setPostalCode("K2T3A4");
+ address.setProvince("Ontario");
+ address.setStreet("1734 Wallywoo Drive");
+ return address;
+ }
+
+ public static Address addressExample2(){
+ Address address = new Address();
+ address.setCity("Ekumseekum");
+ address.setCountry("Canada");
+ address.setPostalCode("B2N 2C0");
+ address.setProvince("Nova Scotia");
+ address.setStreet("2 Main");
+ return address;
+ }
+
+ public static Address addressExample3(){
+ Address address = new Address();
+ address.setCity("Shoolee");
+ address.setCountry("Canada");
+ address.setPostalCode("B1M 1C2");
+ address.setProvince("Nova Scotia");
+ address.setStreet("3 Main");
+ return address;
+ }
+
+ public static Address addressExample4(){
+ Address address = new Address();
+ address.setCity("Gander");
+ address.setCountry("Canada");
+ address.setPostalCode("A2C1B1");
+ address.setProvince("Newfoundland");
+ address.setStreet("324 Bay Street");
+ return address;
+ }
+
+ public static Address addressExample5(){
+ Address address = new Address();
+ address.setCity("Goose Bay");
+ address.setCountry("Canada");
+ address.setPostalCode("A0P1S0");
+ address.setProvince("Newfoundland");
+ address.setStreet("360 Hamilton Rd");
+ return address;
+ }
+
+ public static PhoneNumber phoneExample1(){
+ return new PhoneNumber("Work", "613", "6544545");
+ }
+
+ public static PhoneNumber phoneExample2(){
+ return new PhoneNumber("Work", "613", "8885875");
+ }
+
+ public static PhoneNumber phoneExample3(){
+ return new PhoneNumber("Home", "613", "8457451");
+ }
+
+ public static PhoneNumber phoneExample4(){
+ return new PhoneNumber("Cell", "613", "3656856");
+ }
+
+ public static PhoneNumber phoneExample5(){
+ return new PhoneNumber("Cell2", "613", "1254525");
+ }
+
+ public static PhoneNumber phoneExample6(){
+ return new PhoneNumber("Office", "613", "7854652");
+ }
+
+ public static PhoneNumber phoneExample7(){
+ return new PhoneNumber("Reception", "613", "6352145");
+ }
+
+ public static PhoneNumber phoneExample8(){
+ return new PhoneNumber("NextOfKin", "613", "8974562");
+ }
+
+ public static PhoneNumber phoneExample9(){
+ return new PhoneNumber("Old", "613", "3232323");
+ }
+
+}
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
new file mode 100755
index 0000000..2419b49
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumber.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import java.io.*;
+import javax.persistence.*;
+import static javax.persistence.FetchType.*;
+
+/**
+ * <p><b>Purpose</b>: Describes an Employee's phone number.
+ * <p><b>Description</b>: Used in a 1:M relationship from an employee.
+ */
+@IdClass(oracle.toplink.essentials.testing.models.cmp3.advanced.PhoneNumberPK.class)
+@Entity
+@Table(name="CMP3_PHONENUMBER")
+public class PhoneNumber implements Serializable {
+ private String number;
+ private String type;
+ private Employee owner;
+ private Integer id;
+ private String areaCode;
+
+ public PhoneNumber() {
+ this("", "###", "#######");
+ }
+
+ public PhoneNumber(String type, String theAreaCode, String theNumber) {
+ this.type = type;
+ this.areaCode = theAreaCode;
+ this.number = theNumber;
+ this.owner = null;
+ }
+
+ @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 setNumber(String number) {
+ this.number = number;
+ }
+
+ @Id
+ @Column(name="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 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
+ */
+ public String toString() {
+ StringWriter writer = new StringWriter();
+
+ writer.write("PhoneNumber[");
+ writer.write(getType());
+ writer.write("]: (");
+ writer.write(getAreaCode());
+ writer.write(") ");
+
+ int numberLength = this.getNumber().length();
+ writer.write(getNumber().substring(0, Math.min(3, numberLength)));
+ if (numberLength > 3) {
+ writer.write("-");
+ writer.write(getNumber().substring(3, Math.min(7, numberLength)));
+ }
+
+ return writer.toString();
+ }
+
+ /**
+ * Builds the PhoneNumberPK for this class
+ */
+ public PhoneNumberPK buildPK(){
+ PhoneNumberPK pk = new PhoneNumberPK();
+ pk.setId(this.getOwner().getId());
+ pk.setType(this.getType());
+ return pk;
+ }
+}
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
new file mode 100755
index 0000000..50641bb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumberPK.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+public class PhoneNumberPK {
+ public Integer id;
+ public String type;
+
+ public PhoneNumberPK() {}
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * equals: Answer true if the ids are equal
+ */
+ public boolean equals(Object anotherPhoneNumber) {
+ if (anotherPhoneNumber.getClass() != PhoneNumberPK.class) {
+ return false;
+ }
+ return (getId().equals(((PhoneNumberPK)anotherPhoneNumber).getId()));
+ }
+}
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
new file mode 100755
index 0000000..facde80
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Project.java
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import java.util.*;
+import java.io.Serializable;
+import javax.persistence.*;
+import static javax.persistence.GenerationType.*;
+import static javax.persistence.CascadeType.*;
+import static javax.persistence.InheritanceType.*;
+import static javax.persistence.FetchType.*;
+
+/**
+ * Bean class: ProjectBean
+ * Remote interface: Project
+ * Primary key class: ProjectPK
+ * Home interface: ProjectHome
+ *
+ * >Employees have a many-to-many relationship with Projects through the
+ * projects attribute.
+ * >Projects refer to Employees through the employees attribute.
+ */
+@Entity
+@Table(name="CMP3_PROJECT")
+@Inheritance(strategy=JOINED)
+@DiscriminatorColumn(name="PROJ_TYPE")
+@DiscriminatorValue("P")
+@NamedQuery(
+ name="findProjectByName",
+ query="SELECT OBJECT(project) FROM Project project WHERE project.name = :name"
+)
+public class Project implements Serializable {
+ public int pre_update_count = 0;
+ public int post_update_count = 0;
+ public int pre_remove_count = 0;
+ public int post_remove_count = 0;
+ 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 () {
+ this.teamMembers = new Vector<Employee>();
+ }
+
+ @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;
+ }
+
+ @Version
+ @Column(name="VERSION")
+ public int getVersion() {
+ return version;
+ }
+
+ protected void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Column(name="PROJ_NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @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);
+ }
+
+ public void removeTeamMember(Employee employee) {
+ getTeamMembers().remove(employee);
+ }
+
+ public String displayString() {
+ StringBuffer sbuff = new StringBuffer();
+ sbuff.append("Project ").append(getId()).append(": ").append(getName()).append(", ").append(getDescription());
+
+ return sbuff.toString();
+ }
+
+ @PrePersist
+ public void prePersist() {
+ ++pre_persist_count;
+ }
+
+ @PostPersist
+ public void postPersist() {
+ ++post_persist_count;
+ }
+
+ @PreRemove
+ public void preRemove() {
+ ++pre_remove_count;
+ }
+
+ @PostRemove
+ public void postRemove() {
+ ++post_remove_count;
+ }
+
+ @PreUpdate
+ public void preUpdate() {
+ ++pre_update_count;
+ }
+
+ @PostUpdate
+ public void postUpdate() {
+ ++post_update_count;
+ }
+
+ @PostLoad
+ public void postLoad() {
+ ++post_load_count;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/SmallProject.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/SmallProject.java
new file mode 100755
index 0000000..35f9247
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/SmallProject.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.models.cmp3.advanced;
+
+import javax.persistence.*;
+
+/**
+ * Local interface for the small project bean.
+ * This is the bean's public/local interface for the clients usage.
+ * All locals must extend the javax.ejb.EJBLocalObject.
+ * The bean itself does not have to implement the local interface, but must implement all of the methods.
+ */
+@Entity
+@Table(name="CMP3_PROJECT")
+@DiscriminatorValue("S")
+public class SmallProject extends Project {
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/testng.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/testng.xml
new file mode 100644
index 0000000..e04eb81
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/testng.xml
@@ -0,0 +1,26 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<suite name="persistence-test" >
+ <test name="ejb.ejb30-toplink-essentials-advanced" >
+ <classes>
+ <class name="oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerTestNGTestCase" />
+ </classes>
+ </test>
+</suite>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/build.xml
new file mode 100644
index 0000000..3a26cdc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/build.xml
@@ -0,0 +1,33 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="toplink-essentials" default="all">
+
+ <target name="all">
+ <subant target="all">
+ <fileset dir="." includes="*/build.xml"/>
+ </subant>
+ </target>
+
+ <target name="clean">
+ <subant target="clean">
+ <fileset dir="." includes="*/build.xml"/>
+ </subant>
+ </target>
+
+</project>
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
new file mode 100644
index 0000000..5c27887
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/framework/TestNGTestCase.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+
+
+package oracle.toplink.essentials.testing.framework;
+
+import oracle.toplink.essentials.internal.databaseaccess.Platform;
+import oracle.toplink.essentials.threetier.ServerSession;
+
+import org.testng.annotations.Configuration;
+import org.testng.annotations.Test;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * This class holds creates an EntityManagerFactory and provides
+ * convenience methods to access TopLink specific artifacts. The
+ * EntityManagerFactory is created by referencing the PersistenceUnit
+ * "default", which is associated to the JavaDB bundled with the
+ * application server.
+ */
+public abstract class TestNGTestCase {
+
+ private Map propertiesMap = null;
+
+ private EntityManagerFactory emf = null;
+
+ public void clearCache() {
+ try {
+ 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();
+ }
+
+ public Map getDatabaseProperties(){
+ if (propertiesMap == null){
+ propertiesMap = new HashMap();
+ propertiesMap.put("toplink.session.name", "default");
+ }
+ return propertiesMap;
+ }
+
+ public ServerSession 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();
+ }
+
+ @Configuration(beforeTestClass = true)
+ public void setUp(){
+ // Tables are created by Java2DB. Please see the option in persistence.xml!
+ }
+
+ @Configuration(afterTestClass = true)
+ public void tearDown() {
+ clearCache();
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/README b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/README
new file mode 100644
index 0000000..6db1d1e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/README
@@ -0,0 +1,25 @@
+Steps to run the lazyInit devtests
+----------------------------------
+
+1. Create a clean appserver domain. This is to make sure that no applications are deployed in the server and no resources are created.
+
+2. Start the domain.
+
+3. Set S1AS_HOME (=glassfish installation location), APS_HOME(=appserv-tests directory), ANT_HOME, JAVA_HOME variables.
+
+4. cd $APS_HOME
+
+5. ant startDerby
+
+6. cd $APS_HOME/devtests/lazyInit
+
+7. ant runtest all.
+
+Comments.
+--------
+
+- The tests restarts the server many times in between.
+
+- Lazy Initialization is implicitely tested due to the restarts.
+
+- It is ideal to tail the server.log while you run the tests.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml
new file mode 100644
index 0000000..567f4e2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./report.xml">
+]>
+
+<project name="ejb" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <antcall target="startDerby"/>
+ <delete>
+ <fileset dir="${env.APS_HOME}" includes="test_results*"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="lazyinit.output" action="start" />
+ <ant dir="converter" target="all"/>
+ <ant dir="ejbjar" 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="timer" target="all"/>
+ <ant dir="webear" target="all"/>
+ <ant dir="jms-txlookup" target="all"/>
+ <record name="lazyinit.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="usage">
+ <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
new file mode 100644
index 0000000..50e22ae
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/common.xml
@@ -0,0 +1,85 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ This is the common targets for all lazyInit tests
+ imported into all the leaf level build files
+-->
+
+<!-- ================================================================ -->
+
+<!-- Setup and Restart the server instance-->
+<target name="norestart">
+ <echo message="The tests will not restart the server before running" />
+ <property name="no.restart" value="true"/>
+</target>
+
+<target name="pre-start" depends="printmessage">
+ <antcall target="restart-before-test"/>
+</target>
+
+<target name="restart-before-test" unless="no.restart.test">
+ <antcall target="restart-server-internal"/>
+</target>
+
+<target name="restart-server" depends="printmessage">
+ <antcall target="restart-server-internal"/>
+</target>
+
+<target name="restart-server-internal" unless="no.restart">
+ <antcall target="stopDomain"/>
+ <antcall target="startDomain"/>
+</target>
+
+<target name="printmessage" if="no.retstart">
+ <echo message="The test will be run without restarting the server"/>
+</target>
+
+<target name="startDomain" depends="startDomainUnix, startDomainWindows"/>
+
+<target name="startDomainUnix" depends="init-common" if="isUnix">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="startDomainWindows" depends="init-common" if="isWindows">
+ <delete file="${ASADMIN}.marker"/>
+ <exec executable="${ASADMIN}" spawn="true">
+ <!--
+ <arg line="${ASADMIN}"/>
+ -->
+ <arg line="start-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+ <waitfor checkevery="10" maxwait="30" maxwaitunit="second">
+ <available file="${ASADMIN}.marker"/>
+ </waitfor>
+</target>
+
+<target name="stopDomain" depends="init-common">
+ <echo message="run.xml:stopping domain..."/>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="stop-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/RepRunConf.txt b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/RepRunConf.txt
new file mode 100644
index 0000000..c604c61
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/RepRunConf.txt
@@ -0,0 +1 @@
+Test has been reported
\ No newline at end of file
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
new file mode 100644
index 0000000..eaa4b7c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.properties
@@ -0,0 +1,52 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-stateless"/>
+<property name="appname" value="${module}-converter"/>
+
+<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="test.client"
+ 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="app.type" value="application"/>
+
+<!-- ============================================================ -->
+<!-- Standalone Client specific properties which run without ACC -->
+<!-- ============================================================ -->
+<!--
+<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"/>
+-->
+
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
new file mode 100644
index 0000000..6160c43
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonLazyInit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="converterApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonLazyInit;
+ &testproperties;
+
+
+ <target name="all" depends="pre-start,clean,build,setup,deploy,run,undeploy,unsetup"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" if="ee">
+ <antcall target="deploy-jdbc-common">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ <param name="jdbc.conpool.name" value="sqe-timer-pool"/>
+ </antcall>
+ <antcall target="setupTimer">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup" if="ee">
+
+ <antcall target="unsetupTimer">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ </antcall>
+ <antcall target="undeploy-jdbc-common">
+ <param name="jdbc.resource.name" value="jdbc/sqeTimer"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-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"/>
+ <antcall target="restart-server"/>
+ <antcall target="run-standalone-client"/>
+ </target>
+
+ <!-- =============================================== -->
+ <!-- Target to run the standalone client without ACC -->
+ <!-- =============================================== -->
+ <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"
+ value="com.sun.enterprise.naming.SerialInitContextFactory"/>
+<!--
+ <property name="ctxfactory"
+ value="com.sun.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">
+ <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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..2e41fba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/ConverterClient.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.client;
+
+import java.util.Properties;
+import java.math.BigDecimal;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import com.sun.s1peqe.ejb.stateless.converter.ejb.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ * 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.
+ * <p>In this regard, it does the following in order
+ * <ul>
+ * <li>Locates the home interface of the enterprise bean
+ * <li>Gets a reference to the remote interface
+ * <li>Invokes business methods
+ * </ul>
+ * <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");
+ * ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objref, ConverterHome.class);
+ * </pre></blockquote>
+ * <br>
+ * <b>Creating the remote interface:</b>
+ * <blockquote><pre>
+ * 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.yenToEuro(param);
+ * </pre></blockquote>
+ * <br>
+ * <b>Output:</b>
+ * <pre>
+ * 12160.00
+ * 0.77
+ * </pre>
+ *
+ *
+ */
+
+public class ConverterClient {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ ConverterClient() {
+ }
+
+ /**
+ * The main method of the client. This invokes the <code>ConverterBean</code> to use
+ * its services. It then asks the bean to convert 100 dollars to yen and
+ * 100 yen to euro. The results are printed at the terminal where the client is run.
+ * See <code>appclient</code> documentation in SunONE app server to run the clinet.
+ *
+ */
+ public static void main(String[] args) {
+ ConverterClient client = new ConverterClient();
+ client.run(args);
+ }
+
+ private void run(String[] args) {
+ String url = null;
+ String testId = null;
+ String jndiName = null;
+ Context context = null;
+ String ctxFactory = 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];
+ }
+
+ if ( (url == null) || (ctxFactory == null) ) {
+ 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";
+ Properties env = new Properties();
+ env.put("java.naming.provider.url", url);
+ env.put("java.naming.factory.initial", ctxFactory);
+ // Initialize the Context with JNDI specific properties
+ context = new InitialContext(env);
+ System.out.println("Context Initialized with " +
+ "URL: " + url + ", Factory: " + ctxFactory);
+ // Create Home object
+ obj = context.lookup(jndiName);
+ }
+
+ ConverterRemoteHome home =
+ (ConverterRemoteHome) PortableRemoteObject.narrow(obj,
+ ConverterRemoteHome.class);
+
+ ConverterRemote currencyConverter = home.create();
+
+ BigDecimal param = new BigDecimal ("100.00");
+ BigDecimal amount = currencyConverter.dollarToYen(param);
+ System.out.println("\n\n\n===========Beginning Simple Test=====\n\n");
+ System.out.println("$100 is : "+amount+"Yen");
+ amount = currencyConverter.yenToEuro(param);
+ System.out.println("Yen is :"+amount+"Euro");
+ stat.addStatus(testId, stat.PASS);
+ } catch (Exception ex) {
+ stat.addStatus(testId, stat.FAIL);
+ System.err.println("Caught an unexpected exception!");
+ ex.printStackTrace();
+ } finally {
+ stat.printSummary(testId);
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/MANIFEST.MF
new file mode 100644
index 0000000..2c7c0d5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application-client.xml
new file mode 100644
index 0000000..8582ba9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-stateless-converterClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleConverter</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemoteHome</home>
+ <remote>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemote</remote>
+ </ejb-ref>
+</application-client>
+
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
new file mode 100644
index 0000000..dc859fe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>ConverterApp</display-name>
+ <module>
+ <java>ejb-stateless-converter-client.jar</java>
+ </module>
+ <module>
+ <ejb>ejb-stateless-converter-ejb.jar</ejb>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..c9da4c9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <display-name>ConverterApp</display-name>
+ <ejb-name>TheConverter</ejb-name>
+ <home>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemoteHome</home>
+ <remote>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterRemote</remote>
+ <ejb-class>com.sun.s1peqe.ejb.stateless.converter.ejb.ConverterBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Bean</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..b5b84d0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/sun-application-client.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/SimpleConverter</ejb-ref-name>
+ <jndi-name>converter</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..8ed0a3b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>TheConverter</ejb-name>
+ <jndi-name>converter</jndi-name>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..ff375cf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterBean.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.ejb;
+
+import java.util.Collection;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.TimedObject;
+import javax.ejb.TimerService;
+import javax.ejb.Timer;
+import javax.ejb.TimerHandle;
+import javax.ejb.EJBException;
+import java.math.*;
+
+/**
+ * A simple stateless bean for the Converter application. This bean implements all
+ * business method as declared by the remote interface, <code>Converter</code>.
+ *
+ * @see Converter
+ * @see ConverterHome
+ */
+public class ConverterBean implements SessionBean, TimedObject {
+
+ SessionContext sessionContext_;
+
+ BigDecimal yenRate = new BigDecimal("121.6000");
+ BigDecimal euroRate = new BigDecimal("0.0077");
+
+ /**
+ * Returns the yen value for a given dollar amount.
+ * @param dollars dollar amount to be converted to yen.
+ */
+ public BigDecimal dollarToYen(BigDecimal dollars) {
+
+
+ // add some tests to ensure that timer service is working.
+ // Don't want to add an entirely new test yet since the total
+ // 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();
+
+ BigDecimal result = dollars.multiply(yenRate);
+ return result.setScale(2,BigDecimal.ROUND_UP);
+ }
+
+ /**
+ * Returns the euro value for a given yen amount.
+ * @param yen yen amount to be converted to euro.
+ */
+ public BigDecimal yenToEuro(BigDecimal yen) {
+ BigDecimal result = yen.multiply(euroRate);
+ return result.setScale(2,BigDecimal.ROUND_UP);
+ }
+
+ /**
+ * Required by EJB spec.
+ */
+ public ConverterBean() {}
+
+ /**
+ * Creates a bean. Required by EJB spec.
+ * @exception throws CreateException.
+ */
+ public void ejbCreate() {}
+
+ /**
+ * Removes the bean. Required by EJB spec.
+ */
+ public void ejbRemove() {}
+
+ /**
+ * 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.
+ */
+ public void ejbPassivate() {}
+
+ /**
+ * Sets the session context. Required by EJB spec.
+ * @param ctx A SessionContext object.
+ */
+ public void setSessionContext(SessionContext sc) {
+ sessionContext_ = sc;
+ }
+
+ private void testTimerService() throws EJBException {
+
+ String info = "testTimerService";
+
+ TimerService timerService;
+ Timer timer;
+ try {
+ sessionContext_.getUserTransaction().begin();
+ timerService = sessionContext_.getTimerService();
+ timer = timerService.createTimer(10000000, info);
+ sessionContext_.getUserTransaction().commit();
+ System.out.println("Successfully created ejb timer");
+ } catch(Exception e) {
+ try {
+ sessionContext_.getUserTransaction().rollback();
+ } catch(Exception re) {}
+ e.printStackTrace();
+ throw new EJBException(e);
+ }
+
+ try {
+ sessionContext_.getUserTransaction().begin();
+ Collection timers = timerService.getTimers();
+ Timer timer2 = (Timer) timers.iterator().next();
+ if( !timer.equals(timer2) ) {
+ throw new EJBException("incorrect timer found " + timer2);
+ }
+ timer2.cancel();
+ sessionContext_.getUserTransaction().commit();
+ System.out.println("Successfully cancelled timer");
+ } catch(Exception e) {
+ try {
+ sessionContext_.getUserTransaction().rollback();
+ } catch(Exception re) {}
+ e.printStackTrace();
+ throw new EJBException(e);
+ }
+
+ try {
+ sessionContext_.getUserTransaction().begin();
+ Collection timers = timerService.getTimers();
+ if( timers.size() > 0 ) {
+ throw new EJBException("Incorrect number of timers = " +
+ timers.size());
+ }
+ sessionContext_.getUserTransaction().commit();
+ System.out.println("Successfully queried timers");
+ } catch(Exception e) {
+ try {
+ sessionContext_.getUserTransaction().rollback();
+ } catch(Exception re) {}
+ e.printStackTrace();
+ throw new EJBException(e);
+ }
+
+ }
+
+ public void ejbTimeout(Timer t) {}
+
+} // ConverterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterRemote.java
new file mode 100644
index 0000000..eac4529
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterRemote.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.ejb;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+import java.math.*;
+
+/**
+ * Remote interface for the <code>ConverterBean</code>. The remote interface, </code>Converter</code>
+ * defines all possible business methods for the bean. These are methods, going tobe invoked
+ * remotely by clients, once they have a reference to the remote interface.
+ *
+ * Clients generally take the help of JNDI to lookup the bean's home interface and
+ * then use the home interface to obtain references to the bean's remote interface.
+ *
+ * @see ConverterHome
+ * @see ConverterBean
+ */
+public interface ConverterRemote extends EJBObject {
+
+ /**
+ * Returns the yen value for a given dollar amount.
+ * @param dollars dollar amount to be converted to yen.
+ */
+ public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
+
+ /**
+ * Returns the euro value for a given yen amount.
+ * @param yen yen amount to be converted to euro.
+ */
+ public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterRemoteHome.java
new file mode 100644
index 0000000..1c1447a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterRemoteHome.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.stateless.converter.ejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * Home interface for the <code>ConverterBean</code>. Clients generally use home interface
+ * to obtain references to the bean's remote interface, <code>Converter</code>.
+ *
+ * @see Converter
+ * @see ConverterBean
+ */
+public interface ConverterRemoteHome extends EJBHome {
+ /**
+ * Gets a reference to the remote interface of the <code>ConverterBean</code>.
+ * @exception throws CreateException and RemoteException.
+ *
+ */
+ ConverterRemote create() throws RemoteException, CreateException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/Readme.txt b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/Readme.txt
new file mode 100644
index 0000000..c1459a8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/Readme.txt
@@ -0,0 +1,11 @@
+Purpose:
+
+To Test if a standalone ejb-jar can be deployed and run.
+
+Note:
+
+build.xml explained:
+- You will note that the client has been packaged in an ear file and deployed on the server. This has been done for the purpose of retrieving the stubs.
+- It is possible to retrieve the stubs as an AppClient.jar as the application-client.xml file has references to the stateful session bean.
+- The client can be run in two ways: a) Using the AppClient.jar file and the runclient-common target. b) Running it as a standalone java client. The target for the second option has also been provided. The Client.java file is not currently capable of handling the second option. To make it compatible see ejb/stateless/converter sample client.
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/RepRunConf.txt b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/RepRunConf.txt
new file mode 100644
index 0000000..c604c61
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/RepRunConf.txt
@@ -0,0 +1 @@
+Test has been reported
\ No newline at end of file
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
new file mode 100644
index 0000000..c83136a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-stateful"/>
+<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="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="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
new file mode 100644
index 0000000..cfe70af
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="persistence" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,clean,compile,build,deploy,run,undeploy"/>
+ <target name="run-test" depends="clean,compile,build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common" />
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="util"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build-ejb-jar" depends="init-common" >
+ <antcall target="ejb-jar-common" >
+ <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" />
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+<!--
+ 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
+-->
+
+ <target name="setup"/>
+ <target name="unsetup"/>
+
+ <target name="build" depends="init-common">
+<!--
+ <antcall target="build-appclient-ear" />
+-->
+ <antcall target="build-ejb-jar"/>
+ </target>
+
+ <target name="deploy-ejb-jar" depends="init-common">
+ <antcall target="deploy-common">
+ <param name="apptype" value="ejb"/>
+ <param name="deployed.app" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-appclient-ear" depends="init-common">
+ <antcall target="deploy-common" />
+ </target>
+
+ <target name="copy-clientjar-restart-server" depends="init-common">
+ <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-appclient-ear" />
+ <antcall target="copy-clientjar-restart-server"/>
+-->
+ </target>
+
+ <target name="run-acc" depends="init-common" >
+ <antcall target="runclient-common"/>
+ </target>
+
+ <target name="run-standalone" depends="init-common">
+ <property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>
+ <property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
+ <echo message="provider url used is ${provider.url}"/>
+ <echo message="ctxfactory used is com.sun.jndi.cosnaming.CNCtxFactory" />
+ <java classname="examples.sfsb.Client"
+ classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
+ failonerror="true" fork="true">
+ <arg value="${provider.url}"/>
+ <arg value="${ctxfactory}"/>
+ </java>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="restart-server"/>
+ <antcall target="run-standalone" />
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common">
+ <param name="deployedapp.name" value="${appname}-ejb"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..42d8501
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/Client.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package examples.sfsb;
+
+import java.rmi.RemoteException;
+import java.util.Properties;
+
+import javax.ejb.CreateException;
+import javax.ejb.RemoveException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.rmi.PortableRemoteObject;
+
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ * This class illustrates calling a stateful SessionBean and performing
+ * the following exercises:
+ * <ul>
+ * <li> Create a Trader
+ * <li> Buy some shares using the Trader
+ * <li> Sell some shares using the Trader
+ * <li> Remove the Trader
+ * </ul>
+ *
+ */
+public class Client {
+
+ private SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static final String JNDI_NAME = "MyTraderBean";
+
+ private String url;
+ private TraderHome home;
+ private String testId = null;
+
+ public Client(String url)
+ throws NamingException {
+
+ this.url = url;
+
+ // home = lookupHome();
+ }
+
+ public Client () throws javax.naming.NamingException{
+// home = lookupHome();
+ }
+
+ /**
+ * Runs this example from the command line. Example:
+ * <p>
+ * <p>
+ * The parameters are optional, but if any are supplied,
+ * they are interpreted in this order:
+ * <p>
+ */
+ public static void main(String[] args) {
+ log("\nBeginning statefulSession.Client...\n");
+ try{
+ Client client = new Client();
+ client.run();
+ }catch(NamingException ne){
+ }
+}
+
+ 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.");
+
+ try {
+ home = lookupHome();
+ } catch (NamingException ne) {
+ stat.addStatus(testId, stat.FAIL);
+ }
+
+ try {
+ example();
+ 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);
+ stat.addStatus(testId, stat.FAIL);
+ }finally {
+ stat.printSummary(testId);
+ }
+
+ log("\nEnd statefulSession.Client...\n");
+ }
+
+ /**
+ * Runs the example.
+ */
+ public void example()
+ throws CreateException, RemoteException,RemoveException,ProcessingErrorException
+ {
+ String customerName = "Matt";
+
+ // Create a Trader
+ log("Creating trader\n");
+ TraderRemote trader = (TraderRemote) narrow(home.create(), TraderRemote.class);
+
+ // Sell some stock
+ String stockName = "MSFT";
+ int numberOfShares = 200;
+ log("Selling " + numberOfShares + " of " + stockName);
+ TradeResult tr = trader.sell(customerName, stockName, numberOfShares);
+ log(tr.toString());
+
+ // Buy some stock
+ stockName = "BEAS";
+ numberOfShares = 250;
+ log("Buying " + numberOfShares + " of " + stockName);
+ tr = trader.buy(customerName, stockName, numberOfShares);
+ log(tr.toString());
+
+ // Get change in Cash Account from EJBean
+ log("Change in Cash Account: $" + trader.getBalance()
+ + "\n");
+ log("Removing trader\n");
+ trader.remove();
+
+ }
+
+ /**
+ * RMI/IIOP clients should use this narrow function
+ */
+ private Object narrow(Object ref, Class c) {
+ return PortableRemoteObject.narrow(ref, c);
+ }
+
+ /**
+ * Lookup the EJBs home in the JNDI tree
+ */
+ private TraderHome lookupHome()
+ throws NamingException
+ {
+ // Lookup the beans home using JNDI
+
+
+
+ Context ctx = null;
+
+ try {
+ // Initialize the Context with JNDI specific properties
+ ctx = new InitialContext();
+ Object home = ctx.lookup(JNDI_NAME);
+ return (TraderHome) narrow(home, TraderHome.class);
+ } catch (NamingException ne) {
+ log("The client was unable to lookup the EJBHome. Please make sure ");
+ log("that you have deployed the ejb with the JNDI name "+JNDI_NAME+" on the appserver at "+url);
+ throw ne;
+ }
+ }
+
+
+ private static void log(String s) {
+ System.out.println(s);
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/MANIFEST.MF
new file mode 100644
index 0000000..3b74357
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: examples.sfsb.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application-client.xml
new file mode 100644
index 0000000..916ef70
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-stateful-persistenceClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Trader</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>examples.sfsb.TraderHome</home>
+ <remote>examples.sfsb.TraderRemote</remote>
+ </ejb-ref>
+</application-client>
+
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
new file mode 100644
index 0000000..cbd1cd3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>ConverterApp</display-name>
+ <module>
+ <java>ejb-stateful-persistence-client.jar</java>
+ </module>
+<!-- <module>
+ <ejb>ejb-stateful-persistence-ejb.jar</ejb>
+ </module> -->
+</application>
+
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
new file mode 100644
index 0000000..6a764f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/ejb-jar.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!DOCTYPE ejb-jar PUBLIC
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
+'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <ejb-name>statefulSession</ejb-name>
+ <home>examples.sfsb.TraderHome</home>
+ <remote>examples.sfsb.TraderRemote</remote>
+ <ejb-class>examples.sfsb.TraderBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <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>
+ <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>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>statefulSession</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..4e2395d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejb/Trader</ejb-ref-name>
+ <jndi-name>MyTraderBean</jndi-name>
+ </ejb-ref>
+</sun-application-client>
+
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
new file mode 100644
index 0000000..9f2f610
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>statefulSession</ejb-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
new file mode 100644
index 0000000..f760ccb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderBean.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package examples.sfsb;
+
+import javax.ejb.CreateException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * TraderBean is a stateful SessionBean. This EJBean illustrates:
+ * <ul>
+ * <li> Automatic persistence of state between calls to the SessionBean
+ * <li> The ability to look up values from the beans environment
+ * <li> The use of Application-defined exceptions
+ * </ul>
+ *
+ */
+public class TraderBean implements SessionBean {
+
+ static final boolean VERBOSE = true;
+
+ private SessionContext ctx;
+ private Context environment;
+ private double tradingBalance;
+
+ /**
+ * Sets the session context.
+ *
+ * @param ctx SessionContext Context for session
+ */
+ public void setSessionContext(SessionContext ctx) {
+ log("setSessionContext called");
+ this.ctx = ctx;
+ }
+
+ /**
+ * This method is required by the EJB Specification,
+ * but is not used by this example.
+ *
+ */
+ public void ejbActivate() {
+ log("ejbActivate called");
+ }
+
+ /**
+ * This method is required by the EJB Specification,
+ * but is not used by this example.
+ *
+ */
+ public void ejbPassivate() {
+ log("ejbPassivate called");
+ }
+
+ /**
+ * This method is required by the EJB Specification,
+ * but is not used by this example.
+ *
+ */
+ public void ejbRemove() {
+ log("ejbRemove called");
+ }
+
+ /**
+ * 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
+ * the EJBean and calls <code>ejbCreate()</code>.
+ *
+ * @exception javax.ejb.CreateException
+ * if there is a problem creating the bean
+ * @see examples.ejb20.basic.statefulSession.Trader
+ */
+ public void ejbCreate() throws CreateException {
+ log("ejbCreate called");
+ try {
+ InitialContext ic = new InitialContext();
+ environment = (Context) ic.lookup("java:comp/env");
+ } catch (NamingException ne) {
+ throw new CreateException("Could not look up context");
+ }
+ this.tradingBalance = 0.0;
+ }
+
+ /**
+ * Buys shares of a stock for a named customer.
+ *
+ * @param customerName String Customer name
+ * @param stockSymbol String Stock symbol
+ * @param shares int Number of shares to buy
+ * @return TradeResult Trade Result
+ * @exception examples.ejb20.basic.statefulSession.ProcessingErrorException
+ * if there is an error while buying the shares
+ */
+ public TradeResult buy(String customerName, String stockSymbol, int shares)
+ throws ProcessingErrorException
+ {
+ log("buy (" + customerName + ", " + stockSymbol + ", " + shares + ")");
+
+ double price = getStockPrice(stockSymbol);
+ tradingBalance -= (shares * price); // subtract purchases from cash account
+
+ return new TradeResult(shares, price, TradeResult.BUY);
+ }
+
+ /**
+ * Sells shares of a stock for a named customer.
+ *
+ * @param customerName String Customer name
+ * @param stockSymbol String Stock symbol
+ * @param shares int Number of shares to buy
+ * @return TradeResult Trade Result
+ * @exception examples.ejb20.basic.statefulSession.ProcessingErrorException
+ * if there is an error while selling the shares
+ */
+ public TradeResult sell(String customerName, String stockSymbol, int shares)
+ throws ProcessingErrorException
+ {
+ log("sell (" + customerName + ", " + stockSymbol + ", " + shares + ")");
+
+ double price = getStockPrice(stockSymbol);
+ tradingBalance += (shares * price);
+
+ return new TradeResult(shares, price, TradeResult.SELL);
+ }
+
+ /**
+ * Returns the current balance of a trading session.
+ *
+ * @return double Balance
+ */
+ public double getBalance() {
+ return tradingBalance;
+ }
+
+ /**
+ * Returns the stock price for a given stock.
+ *
+ * @param stockSymbol String Stock symbol
+ * @return double Stock price
+ * @exception examples.ejb20.basic.statefulSession.ProcessingErrorException
+ * if there is an error while checking the price
+ */
+ public double getStockPrice(String stockSymbol)
+ throws ProcessingErrorException
+ {
+ try {
+ return ((Double) environment.lookup(stockSymbol)).doubleValue();
+ } catch (NamingException ne) {
+ throw new ProcessingErrorException ("Stock symbol " + stockSymbol +
+ " does not exist");
+ } catch (NumberFormatException nfe) {
+ throw new ProcessingErrorException("Invalid price for stock "+stockSymbol);
+ }
+ }
+
+ private void log(String s) {
+ if(VERBOSE) {
+ System.out.println(s);
+ }
+ }
+}
+
+
+
+
+
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
new file mode 100644
index 0000000..ce39d24
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderHome.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package examples.sfsb;
+
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+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
new file mode 100644
index 0000000..474f2dc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderRemote.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package examples.sfsb;
+
+import javax.ejb.*;
+
+import java.rmi.RemoteException;
+
+
+public interface TraderRemote extends EJBObject {
+
+ public TradeResult buy(String customerName, String stockSymbol, int shares)
+ throws ProcessingErrorException, RemoteException;
+
+ public TradeResult sell(String customerName, String stockSymbol, int shares)
+ throws ProcessingErrorException, RemoteException;
+
+ public double getBalance()
+ throws RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/util/ProcessingErrorException.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/util/ProcessingErrorException.java
new file mode 100644
index 0000000..4c15e4f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/util/ProcessingErrorException.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package examples.sfsb;
+
+public class ProcessingErrorException extends Exception {
+
+ /**
+ * Catches exceptions without a specified string
+ *
+ */
+ public ProcessingErrorException() {}
+
+ /**
+ * Constructs the appropriate exception with the specified string
+ *
+ * @param message Exception message
+ */
+ public ProcessingErrorException(String message) {super(message);}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/util/TradeResult.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/util/TradeResult.java
new file mode 100644
index 0000000..bf630e8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/util/TradeResult.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package examples.sfsb;
+
+import java.io.Serializable;
+
+/**
+ * This class reflects the results of a buy/sell transaction.
+ */
+public final class TradeResult implements Serializable {
+
+ public static final int SELL = 0;
+ public static final int BUY = 1;
+
+ private int numberTraded; // Number of shares really bought or sold
+ private int action; // Whether shares were bought or sold
+ private double price; // Price shares were bought or sold at
+
+ public TradeResult(){
+ }
+
+ /**
+ * Returns the number of shares and sales price for a
+ * buy or sell transaction in a TradeResult object.
+ *
+ * @param numberTraded int Number of shares traded
+ * @param price double Price shares sold at
+ * @param action int Action taken
+ * @return TradeResult
+ */
+ public TradeResult(int numberTraded, double price, int action) {
+ this.numberTraded = numberTraded;
+ this.price = price;
+ this.action = action;
+ }
+
+ public int getNumberTraded() {
+ return numberTraded;
+ }
+
+ public void setNumberTraded( int numberTraded ){
+ this.numberTraded = numberTraded;
+ }
+
+ public int getActionTaken() {
+ return action;
+ }
+
+ public void setActionTaken( int action ){
+ this.action = action;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice( double price ){
+ this.price = price;
+ }
+
+ public String toString() {
+ String result = numberTraded + " shares";
+ if(action == SELL) {
+ result += "sold";
+ } else {
+ result += "bought";
+ }
+ result += " at a price of " + price;
+ return result;
+ }
+}
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
new file mode 100644
index 0000000..4805582
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.properties
@@ -0,0 +1,49 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ws"/>
+<property name="appname" value="${module}-ejbtaxcal"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
+<property name="wsdl-file" value="wsdl/TaxCalEjbService.wsdl"/>
+<property name="client-mapping.xml" value="TaxCalClientMapping.xml"/>
+<property name="ejb-mapping.xml" value="TaxCalMapping.xml"/>
+<property name="webservices.xml" value="descriptor/ejb/webservices.xml"/>
+<!--
+<property name="statetax-ejb-endpoint-url" value="http://${http.host}:${http.port}/statetaxejb"/>
+<property name="fedtax-ejb-endpoint-url" value="http://${http.host}:${http.port}/fedtaxejb"/>
+-->
+<property name="wsdlfile.location" value="wsdl"/>
+
+<!--- servlet based endpoint params -->
+<!--property name="mappingfile.location" value=""/-->
+<property name="wsdlfile.name" value="TaxCalculator.wsdl"/>
+<property name="wsdlfile.location" value="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
new file mode 100644
index 0000000..070bf8c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.xml
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="EjbBasedWebService" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all"
+ depends="pre-start, build, setup, deploy, run, undeploy, unsetup"/>
+ <target name="run-test" depends="clean, build, deploy, run, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </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>
+ </target>
+ <target name="ws-package-appclientjar-common">
+ <mkdir dir="${assemble.dir}"/>
+ <delete file="${appclient.jar}" failonerror="false"/>
+ <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"/>
+ <copy file="${wsdl-file}"
+ tofile="${build.classes.dir}/META-INF/${wsdl-file}"/>
+ <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
+ update="true" includes="${appclientjar.classes}"
+ manifest="./client/MANIFEST.MF">
+
+ <fileset dir="${build.classes.dir}" includes="${client-mapping.xml}"/>
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ <include name="${wsdl-file}"/>
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
+ </target>
+
+ <target name="ws-package-ejb-jar-common" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <delete file="${ejb.jar}" failonerror="false"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/ejb-jar.xml"/>
+ <copy file="${sun-ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"/>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/META-INF/webservices.xml"/>
+ <copy file="${sun-cmp-mappings.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml"
+ failonerror="false"/>
+ <copy file="${wsdl-file}"
+ tofile="${build.classes.dir}/META-INF/${wsdl-file}"
+ failonerror="false"/>
+ <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/>
+ <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true"
+ includes ="${ejbjar.classes}">
+
+ <fileset dir="${build.classes.dir}" includes="${ejb-mapping.xml}"/>
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="ejb-jar.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ <include name="sun-cmp-mappings.xml"/>
+ <include name="webservices.xml"/>
+ <include name="${wsdl-file}"/>
+ <!--<include name="${dbschema}"/>-->
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF"
+ failonerror="false"/>
+ </target>
+
+ <target name="build" depends="init-common,compile">
+ <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">
+ <param name="appclientjar.classes"
+ value="com/sun/s1peqe/webservices/ejb/taxcal/client/*.class" />
+ <param name="appclientjar.files"
+ value="${build.classes.dir}"/>
+ <param name="appclient.jar"
+ value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+
+ <antcall target="ear-common"/>
+ </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"
+ value="http://${http.host}:${http.port}/statetaxejb"/>
+ <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}"/>
+ <echo message="property fedtax-ejb-endpoint-url is set to: ${fedtax-ejb-endpoint-url}"/>
+
+ <antcall target="runclient-common">
+ <param name="appclient.application.args"
+ value="${statetax-ejb-endpoint-url} ${fedtax-ejb-endpoint-url}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+ <!--
+ =======================================================
+ User Defined specific targets
+ =======================================================
+ -->
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/MANIFEST.MF
new file mode 100644
index 0000000..65b3bd4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient
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
new file mode 100644
index 0000000..5c201a9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/TaxCalClient.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.webservices.ejb.taxcal.client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+
+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;
+
+ 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];
+ }
+
+ 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();
+ }
+
+ stat.printSummary(testSuite);
+ }
+
+ public void callStateTaxService() {
+ double income = 85000.00;
+ double deductions = 5000.00;
+
+ //String targetEndpointAddress =
+ // "http://localhost:1024/taxcalculator";
+
+ try {
+
+ StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
+
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ stateTaxEndpoint);
+
+ double stateTax = taxCalIFPort.getStateTax(income, deductions);
+ System.out.println("State tax from ejb based TaxCalService :" + stateTax);
+
+ if(stateTax == 24000.00)
+ stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebservice client failed");
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
+
+ public void callFedTaxService() {
+ double income = 97000.00;
+ double deductions = 7000.00;
+ try {
+
+ FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ fedTaxEndpoint);
+
+ 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
new file mode 100644
index 0000000..9fcebd8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <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
new file mode 100644
index 0000000..4420ebd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <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
new file mode 100644
index 0000000..a888fe6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-sei.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>
+</configuration>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/application.xml
new file mode 100644
index 0000000..3d1cc7b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>TaxCalculatorApp</display-name>
+ <module>
+ <ejb>ws-ejbtaxcal-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>ws-ejbtaxcal-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/client/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/client/application-client.xml
new file mode 100644
index 0000000..7fe5d9c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/client/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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">
+ <description>app client dd for taxcalculator</description>
+ <display-name>ws-ejbtaxcalClient</display-name>
+ <service-ref>
+ <description>taxcal service ref</description>
+ <service-ref-name>service/TaxCalEjbService</service-ref-name>
+ <service-interface>com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalEjbService</service-interface>
+ <wsdl-file>META-INF/wsdl/TaxCalEjbService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>TaxCalClientMapping.xml</jaxrpc-mapping-file>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/client/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/client/sun-application-client.xml
new file mode 100644
index 0000000..0fb10f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/TaxCalEjbService</service-ref-name>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/ejb-jar.xml
new file mode 100644
index 0000000..87e1453
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/ejb-jar.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar version="2.1" 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/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>TaxCalEjb</display-name>
+ <ejb-name>StateTaxEjb</ejb-name>
+ <service-endpoint>com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF</service-endpoint>
+ <ejb-class>com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ <session>
+ <display-name>TaxCalEjb</display-name>
+ <ejb-name>FedTaxEjb</ejb-name>
+ <service-endpoint>com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF</service-endpoint>
+ <ejb-class>com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>StateTaxEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>FedTaxEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/sun-ejb-jar.xml
new file mode 100644
index 0000000..36ddec3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/sun-ejb-jar.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ws-taxcal-ejb.jar</name>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>StateTaxEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>StateTaxIFPort</port-component-name>
+ <endpoint-address-uri>statetaxejb</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ <ejb>
+ <ejb-name>FedTaxEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>FedTaxIFPort</port-component-name>
+ <endpoint-address-uri>fedtaxejb</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/webservices.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/webservices.xml
new file mode 100644
index 0000000..4b03d29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/descriptor/ejb/webservices.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<webservices 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>TaxcalculatorEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/TaxCalEjbService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>TaxCalMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>StateTaxIFPort</port-component-name>
+ <wsdl-port xmlns:taxns="http://tax.org/wsdl">taxns:StateTaxIFPort
+ </wsdl-port>
+ <service-endpoint-interface>com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>StateTaxEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>FedTaxIFPort</port-component-name>
+ <wsdl-port xmlns:taxns="http://tax.org/wsdl">taxns:FedTaxIFPort
+ </wsdl-port>
+ <service-endpoint-interface>com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>FedTaxEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
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
new file mode 100644
index 0000000..36ff3b0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxEjb.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.webservices.ejb.taxcal;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class FedTaxEjb implements SessionBean {
+
+ private SessionContext sc;
+
+ public FedTaxEjb(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In FedTaxEjb::ejbCreate !!");
+ }
+
+ public double getFedTax(double income, double deductions) {
+ return ((income - deductions) * 0.2);
+ }
+
+ 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
new file mode 100644
index 0000000..c37b0cc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxIF.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.webservices.ejb.taxcal;
+
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+
+
+public interface FedTaxIF extends Remote{
+
+ 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
new file mode 100644
index 0000000..293abc0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxEjb.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.webservices.ejb.taxcal;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class StateTaxEjb implements SessionBean {
+
+ private SessionContext sc;
+
+ public StateTaxEjb(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In StateTaxEjb::ejbCreate !!");
+ }
+
+ public double getStateTax(double income, double deductions) {
+ return ((income - deductions) * 0.3);
+ }
+
+ 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
new file mode 100644
index 0000000..2c945f2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxIF.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.webservices.ejb.taxcal;
+
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+
+
+public interface StateTaxIF extends Remote{
+
+ public double getStateTax(double income, double deductions) throws RemoteException;
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/wsdl/TaxCalEjbService.wsdl b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/wsdl/TaxCalEjbService.wsdl
new file mode 100644
index 0000000..5a16761
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/wsdl/TaxCalEjbService.wsdl
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<definitions name="TaxCalEjbService" targetNamespace="http://tax.org/wsdl" xmlns:tns="http://tax.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types/>
+ <message name="FedTaxIF_getFedTax">
+ <part name="double_1" type="xsd:double"/>
+ <part name="double_2" type="xsd:double"/></message>
+ <message name="FedTaxIF_getFedTaxResponse">
+ <part name="result" type="xsd:double"/></message>
+ <message name="StateTaxIF_getStateTax">
+ <part name="double_1" type="xsd:double"/>
+ <part name="double_2" type="xsd:double"/></message>
+ <message name="StateTaxIF_getStateTaxResponse">
+ <part name="result" type="xsd:double"/></message>
+ <portType name="FedTaxIF">
+ <operation name="getFedTax" parameterOrder="double_1 double_2">
+ <input message="tns:FedTaxIF_getFedTax"/>
+ <output message="tns:FedTaxIF_getFedTaxResponse"/></operation></portType>
+ <portType name="StateTaxIF">
+ <operation name="getStateTax" parameterOrder="double_1 double_2">
+ <input message="tns:StateTaxIF_getStateTax"/>
+ <output message="tns:StateTaxIF_getStateTaxResponse"/></operation></portType>
+ <binding name="FedTaxIFBinding" type="tns:FedTaxIF">
+ <operation name="getFedTax">
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></input>
+ <output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></output>
+ <soap:operation soapAction=""/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
+ <binding name="StateTaxIFBinding" type="tns:StateTaxIF">
+ <operation name="getStateTax">
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></input>
+ <output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></output>
+ <soap:operation soapAction=""/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
+ <service name="TaxCalEjbService">
+ <port name="FedTaxIFPort" binding="tns:FedTaxIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port>
+ <port name="StateTaxIFPort" binding="tns:StateTaxIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
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
new file mode 100644
index 0000000..b80be4c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.properties
@@ -0,0 +1,37 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="jms-msgdest-jmsweb"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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="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
new file mode 100644
index 0000000..7c414cb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jms-msgdest-jmsweb-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ <param name="s1astest.classpath" value="${s1astest.classpath}:${env.S1AS_HOME}/lib/install/applications/jmsra/imqjmsra.jar"/>
+ </antcall>
+ </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>
+ </target>
+
+ <target name="build" depends="compile, build-war">
+ <antcall target="build-ear-common">
+ <param name="war.classes"
+ value="**/*Servlet*.class" />
+ <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"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="restart-server"/>
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="${http.host} ${http.port}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant create-resources Create all destinations and connection factories
+ ant delete-resources Delete all destinations and connection factories
+ </echo>
+ </target>
+</project>
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
new file mode 100644
index 0000000..c52d689
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/Client.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.jms.msgdest.jmsweb.client;
+
+import java.net.*;
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private String host;
+ private String port;
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public Client (String[] args) {
+ 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 +
+ "/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);
+ } else {
+ stat.addStatus("jmsweb main", stat.PASS);
+ }
+ } catch (Exception ex) {
+ System.out.println("Jms web test failed.");
+ 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();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while((line = input.readLine()) != null)
+ System.out.println(line);
+ if(code != 200) {
+ System.out.println("Incorrect return code: " + code);
+ }
+ return code;
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/MANIFEST.MF
new file mode 100644
index 0000000..91aff4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.jms.msgdest.jmsweb.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/create_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/create_resources.asadmin
new file mode 100644
index 0000000..fbc8f79
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/create_resources.asadmin
@@ -0,0 +1,13 @@
+create-jms-resource --resourcetype javax.jms.QueueConnectionFactory jms/jms_msgdest_jmsweb_QCF
+
+create-jmsdest --desttype queue jms_msgdest_jmsweb_ServletQueue
+create-jms-resource --resourcetype javax.jms.Queue --property imqDestinationName=jms_msgdest_jmsweb_ServletQueue jms/jms_msgdest_jmsweb_ServletQueue
+
+
+create-jmsdest --desttype queue jms_msgdest_jmsweb_mdbQueue
+create-jms-resource --resourcetype javax.jms.Queue --property imqDestinationName=jms_msgdest_jmsweb_mdbQueue jms/jms_msgdest_jmsweb_mdbQueue
+
+create-jmsdest --desttype queue jms_msgdest_jmsweb_AppclientQueue
+create-jms-resource --resourcetype javax.jms.Queue --property imqDestinationName=jms_msgdest_jmsweb_AppclientQueue jms/jms_msgdest_jmsweb_AppclientQueue
+
+quit
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/delete_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/delete_resources.asadmin
new file mode 100644
index 0000000..8cf14df
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/delete_resources.asadmin
@@ -0,0 +1,12 @@
+delete-jms-resource jms/jms_msgdest_jmsweb_QCF
+
+delete-jms-resource jms/jms_msgdest_jmsweb_ServletQueue
+delete-jmsdest --desttype queue jms_msgdest_jmsweb_ServletQueue
+
+delete-jms-resource jms/jms_msgdest_jmsweb_mdbQueue
+delete-jmsdest --desttype queue jms_msgdest_jmsweb_mdbQueue
+
+delete-jms-resource jms/jms_msgdest_jmsweb_AppclientQueue
+delete-jmsdest --desttype queue jms_msgdest_jmsweb_AppclientQueue
+
+quit
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/application-client.xml
new file mode 100644
index 0000000..0296a98
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/application-client.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>jms-msgdest-jmswebClient</display-name>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/application.xml
new file mode 100644
index 0000000..6f467f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/application.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>jms-msgdest-jmswebApp</display-name>
+ <module>
+ <web>
+ <web-uri>a/b/jms-msgdest-jmsweb-web.war</web-uri>
+ <context-root>jms-msgdest-jmsweb</context-root>
+ </web>
+ </module>
+ <module>
+ <java>jms-msgdest-jmsweb-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..97bcf92
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/sun-application-client.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/sun-web.xml
new file mode 100644
index 0000000..6eacc9a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/sun-web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <jsp-config/>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/web.xml
new file mode 100644
index 0000000..ebc5cac
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/descriptor/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app version="2.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/web-app_2_4.xsd">
+
+ <display-name>jmsweb</display-name>
+ <distributable></distributable>
+ <servlet>
+ <servlet-name>JmsServlet</servlet-name>
+ <servlet-class>com.sun.s1asdev.jms.msgdest.jmsweb.JmsServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>JmsServlet</servlet-name>
+ <url-pattern>/jmsservlet</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/docroot/README b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/docroot/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/docroot/README
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
new file mode 100644
index 0000000..ace6556
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/servlet/JmsServlet.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.jms.msgdest.jmsweb;
+
+import java.io.*;
+import java.rmi.RemoteException;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.*;
+import javax.jms.*;
+import javax.transaction.*;
+import javax.transaction.xa.*;
+
+public class JmsServlet extends HttpServlet {
+
+ private Queue myQueue;
+ 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)
+ context.lookup("java:comp/UserTransaction");
+ userTx.begin();
+ XAQueueConnectionFactory xacf = new com.sun.messaging.XAQueueConnectionFactory();
+ XAQueueSession xasess = xacf.createXAQueueConnection().createXAQueueSession();
+ XAResource xar = xasess.getXAResource();
+
+ System.out.println("Looking up transaction manager");
+
+ TransactionManager txMgr = (TransactionManager) context.lookup("java:appserver/TransactionManager");
+ txMgr.getTransaction().enlistResource(xar);
+ txMgr.getTransaction().delistResource(xar, xar.TMSUCCESS);
+ userTx.commit();
+ System.out.println("Transaction done.");
+
+ qcFactory = (QueueConnectionFactory) context.lookup("jms/jms_msgdest_jmsweb_QCF");
+ myQueue = (Queue) context.lookup("jms/jms_msgdest_jmsweb_ServletQueue");
+
+ userTx.begin();
+
+ sendMessage("this is the jms servlet test");
+
+ userTx.commit();
+
+ userTx.begin();
+
+ recvMessage();
+
+ userTx.commit();
+
+
+ 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("</BODY> </HTML> ");
+
+ }catch (Exception ex) {
+ ex.printStackTrace();
+ System.out.println("jmsservlet test failed");
+ throw new ServletException(ex);
+ }
+ }
+
+ /**
+ * Send a message.
+ */
+ public String sendMessage(String msg) throws JMSException {
+ QueueConnection connection = null;
+ try {
+ connection = qcFactory.createQueueConnection();
+ QueueSession session = connection.createQueueSession
+ (false, Session.AUTO_ACKNOWLEDGE);
+
+ QueueSender sender = session.createSender(myQueue);
+
+ // Send a message.
+ TextMessage message = session.createTextMessage();
+ message.setText(msg);
+ sender.send(message);
+
+ session.close();
+
+ } finally {
+ try {
+ if( connection != null ) {
+ connection.close();
+ }
+ } catch(Exception e) {}
+ }
+ return msg;
+ }
+
+ private void recvMessage() throws JMSException {
+ QueueConnection connection = null;
+ try {
+ connection = qcFactory.createQueueConnection();
+ QueueSession session = connection.createQueueSession
+ (false, Session.AUTO_ACKNOWLEDGE);
+
+ connection.start();
+
+ // Create a message consumer
+ QueueReceiver receiver = session.createReceiver(myQueue);
+ System.out.println("Waiting for message on " + myQueue);
+ Message message = receiver.receive();
+ System.out.println("Received message " + message);
+ } finally {
+ try {
+ if( connection != null ) {
+ connection.close();
+ }
+ } 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
new file mode 100644
index 0000000..cdb8ca1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="jms1" default="usage" basedir=".">
+
+ <property name="jms1-target" value="all"/>
+
+ <target name="run-test">
+ <antcall target="simple">
+ <param name="jms1-target" value="run-test"/>
+ </antcall>
+ </target>
+
+ <target name="all">
+ <antcall target="simple">
+ <param name="jms1-target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="simple">
+ <param name="jms1-target" value="clean"/>
+ </antcall>
+ </target>
+
+ <target name="build">
+ <antcall target="simple">
+ <param name="jms1-target" value="build"/>
+ </antcall>
+ </target>
+
+ <target name="setup">
+ <antcall target="simple">
+ <param name="jms1-target" value="setup"/>
+ </antcall>
+ </target>
+
+ <target name="deploy">
+ <antcall target="simple">
+ <param name="jms1-target" value="deploy"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy">
+ <antcall target="simple">
+ <param name="jms1-target" value="undeploy"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup">
+ <antcall target="simple">
+ <param name="jms1-target" value="unsetup"/>
+ </antcall>
+ </target>
+
+ <target name="run">
+ <antcall target="simple">
+ <param name="jms1-target" value="run"/>
+ </antcall>
+ </target>
+
+ <target name="simple">
+ <record name="simple.output" action="start" />
+ <ant dir="simple" target="${jms1-target}"/>
+ <record name="simple.output" action="stop" />
+ </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>
+ </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
new file mode 100644
index 0000000..4b0b897
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-mdb"/>
+<property name="appname" value="${module}-simple"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..e78ef2e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="simpleApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,build,setup,deploy,run,undeploy,unsetup"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/*Bean*.class" />
+ <param name="appclientjar.classes"
+ value="**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="deploy-jms-common">
+ <param name="dest.name" value="SampleQueue"/>
+ <param name="dest.type" value="queue"/>
+ <param name="jms.resource.name" value="jms/SampleQueue"/>
+ <param name="jms.resource.type" value="javax.jms.Queue"/>
+ <param name="jms.factory.name" value="jms/QCFactory"/>
+ <param name="jms.factory.type" value="javax.jms.QueueConnectionFactory"/>
+ </antcall>
+ <antcall target="deploy-jms-common">
+ <param name="dest.name" value="SampleTopic"/>
+ <param name="dest.type" value="topic"/>
+ <param name="jms.resource.name" value="jms/SampleTopic"/>
+ <param name="jms.resource.type" value="javax.jms.Topic"/>
+ <param name="jms.factory.name" value="jms/TCFactory"/>
+ <param name="jms.factory.type" value="javax.jms.TopicConnectionFactory"/>
+ </antcall>
+ </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 name="unsetup" depends="init-common">
+ <antcall target="undeploy-jms-common">
+ <param name="dest.name" value="SampleQueue"/>
+ <param name="dest.type" value="queue"/>
+ <param name="jms.resource.name" value="jms/SampleQueue"/>
+ <param name="jms.resource.type" value="javax.jms.Queue"/>
+ <param name="jms.factory.name" value="jms/QCFactory"/>
+ <param name="jms.factory.type" value="javax.jms.QueueConnectionFactory"/>
+ </antcall>
+ <antcall target="undeploy-jms-common">
+ <param name="dest.name" value="SampleTopic"/>
+ <param name="dest.type" value="topic"/>
+ <param name="jms.resource.name" value="jms/SampleTopic"/>
+ <param name="jms.resource.type" value="javax.jms.Topic"/>
+ <param name="jms.factory.name" value="jms/TCFactory"/>
+ <param name="jms.factory.type" value="javax.jms.TopicConnectionFactory"/>
+ </antcall>
+ </target>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/MANIFEST.MF
new file mode 100644
index 0000000..dba53b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient
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
new file mode 100644
index 0000000..224011e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/SimpleMessageClient.java
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.mdb.simple.client;
+
+import javax.jms.*;
+import javax.naming.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SimpleMessageClient {
+
+ Context jndiContext = null;
+ QueueConnectionFactory queueConnectionFactory = null;
+ TopicConnectionFactory topicConnectionFactory = null;
+ QueueConnection queueConnection = null;
+ TopicConnection topicConnection=null;
+ QueueSession queueSession = null;
+ Queue queue = null;
+ Topic topic=null;
+ QueueSender queueSender = null;
+ TextMessage message = null;
+ TopicSubscriber subscriber = null;
+ final String MSG_TEXT = new String("Here is a client-acknowledge message");
+ public static final String TOPICCONFAC = "jms/TCFactory";
+ public static final String QUEUECONFAC = "jms/QCFactory";
+ public static final String QUEUE = "jms/SampleQueue";
+ public static final String TOPIC = "jms/SampleTopic";
+ final int NUM_MSGS = 3;
+ private static boolean allDone=false;
+
+ 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();
+
+ }
+
+ public Object jndiLookup(String name)
+ throws NamingException {
+ Object obj = null;
+ if (jndiContext == null) {
+ try {
+ jndiContext = new InitialContext();
+ } catch (NamingException e) {
+ System.err.println("Could not create JNDI API " +
+ "context: " + e.toString());
+ throw e;
+ }
+ }
+ try {
+ obj = jndiContext.lookup(name);
+ } 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);
+ topicConnectionFactory=(TopicConnectionFactory)jndiLookup(TOPICCONFAC);
+ topic=(Topic)jndiLookup(TOPIC);
+ stat.addStatus("simple mdb jndiLookup", stat.PASS);
+ }catch(Throwable e)
+ {
+ stat.addStatus("simple mdb jndiLookup", stat.FAIL);
+ 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);
+
+
+ queueConnection =
+ queueConnectionFactory.createQueueConnection();
+ queueSession =
+ queueConnection.createQueueSession(false,
+ Session.CLIENT_ACKNOWLEDGE);
+ queueSender = queueSession.createSender(queue);
+ message = queueSession.createTextMessage();
+ message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
+ //System.out.println("Created durable queue subscriber,persistent delivery mode");
+
+ 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);
+ Thread.sleep(1000);
+ }
+ 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);
+ } // finally
+ }
+
+ public static void printReport(){
+ if(allDone)
+ stat.printSummary("simpleMdbID");
+ else
+ System.out.println("MessageStream from server not finished");
+ }
+
+
+
+
+ public void recvMessage(){
+ TopicConnection connect=null;
+ /*
+ * Create connection.
+ * Create session from connection; false means session is
+ * not transacted.
+ * Create consumer, then start message delivery.
+ * Receive all text messages from destination until
+ * a 3 messages are received indicating end of
+ * message stream.
+ * Close connection.
+ */
+ System.out.println("********************************");
+ System.out.println("inside recvMessage of mdb appclient");
+ try {
+ connect = topicConnectionFactory.createTopicConnection();
+ TopicSession session = connect.createTopicSession(false,0);
+ subscriber=session.createSubscriber(topic);
+ System.out.println("Started subscriber");
+ connect.start();
+ int msgcount=1;
+ while (true) {
+ Message m = subscriber.receive(10000);
+ System.out.println("Bingo!. got a ack msg back from server");
+ msgcount++;
+ System.out.println("COUNT :"+msgcount);
+ if (m != null) {
+ if (m instanceof TextMessage) {
+ message = (TextMessage) m;
+ System.out.println("Reading message: " +
+ message.getText());
+ String props=message.getStringProperty("MESSAGE_NUM");
+ } else {
+ break;
+
+ }
+ }
+ if(msgcount>=3){
+ System.out.println("All messages from server recieved******************");
+ stat.addStatus("simple mdb recvmessage", stat.PASS);
+ break;
+ }
+ }
+ System.out.println("******************");
+ System.out.println("Messages from MDB finished**");
+ System.out.println("******************");
+ } catch (JMSException e) {
+ System.out.println("Exception occurred: " +
+ e.toString());
+ stat.addStatus("simple mdb recvmessage", stat.FAIL);
+ } catch(Throwable e){
+ e.printStackTrace();
+ }
+ finally {
+ if (connect != null) {
+ try {
+ connect.close();
+ } catch (JMSException e) {}
+ }
+ }
+ allDone=true;
+ }
+ }
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/application-client.xml
new file mode 100644
index 0000000..7166990
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/application-client.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-mdb-simpleClient</display-name>
+ <resource-ref>
+ <res-ref-name>jms/QCFactory</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jms/TCFactory</res-ref-name>
+ <res-type>javax.jms.TopicConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleTopic</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
+ </resource-env-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/application.xml
new file mode 100644
index 0000000..1bd83f5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/application.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>SimpleMessageApp</display-name>
+ <description>Application description</description>
+ <module>
+ <java>ejb-mdb-simple-client.jar</java>
+ </module>
+ <module>
+ <ejb>ejb-mdb-simple-ejb.jar</ejb>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..1315119
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/ejb-jar.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <display-name>SimpleMessageJAR</display-name>
+ <enterprise-beans>
+ <message-driven>
+ <display-name>SimpleMessageEJB</display-name>
+ <ejb-name>SimpleMessageEJB</ejb-name>
+ <ejb-class>com.sun.s1peqe.ejb.mdb.simple.ejb.SimpleMessageBean</ejb-class>
+ <transaction-type>Container</transaction-type>
+ <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
+ <message-driven-destination>
+ <destination-type>javax.jms.Queue</destination-type>
+ <!--<subscription-durability>Durable</subscription-durability>-->
+ </message-driven-destination>
+ <resource-ref>
+ <res-ref-name>jms/QCFactory</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jms/TCFactory</res-ref-name>
+ <res-type>javax.jms.TopicConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleTopic</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
+ </resource-env-ref>
+ </message-driven>
+ </enterprise-beans>
+</ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..d2ba50d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/sun-application-client.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+ <resource-ref>
+ <res-ref-name>jms/TCFactory</res-ref-name>
+ <jndi-name>jms/TCFactory</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jms/QCFactory</res-ref-name>
+ <jndi-name>jms/QCFactory</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleQueue</resource-env-ref-name>
+ <jndi-name>jms/SampleQueue</jndi-name>
+ </resource-env-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleTopic</resource-env-ref-name>
+ <jndi-name>jms/SampleTopic</jndi-name>
+ </resource-env-ref>
+</sun-application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..7f997ce
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>SimpleMessageEJB</ejb-name>
+ <jndi-name>jms/SampleQueue</jndi-name>
+ <bean-pool>
+ <steady-pool-size>5</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
+ <pool-idle-timeout-in-seconds>5</pool-idle-timeout-in-seconds>
+</bean-pool>
+ <mdb-connection-factory>
+ <jndi-name>jms/QCFactory</jndi-name>
+ </mdb-connection-factory>
+ <resource-ref>
+ <res-ref-name>jms/QCFactory</res-ref-name>
+ <jndi-name>jms/QCFactory</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <resource-ref>
+ <res-ref-name>jms/TCFactory</res-ref-name>
+ <jndi-name>jms/TCFactory</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleQueue</resource-env-ref-name>
+ <jndi-name>jms/SampleQueue</jndi-name>
+ </resource-env-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleTopic</resource-env-ref-name>
+ <jndi-name>jms/SampleTopic</jndi-name>
+ </resource-env-ref>
+ </ejb>
+ </enterprise-beans>
+
+ </sun-ejb-jar>
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
new file mode 100644
index 0000000..2e56422
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/ejb/SimpleMessageBean.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.mdb.simple.ejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.ejb.CreateException;
+import javax.naming.*;
+import javax.jms.*;
+import java.util.*;
+
+public class SimpleMessageBean implements MessageDrivenBean,
+ MessageListener {
+
+ private transient MessageDrivenContext mdc = null;
+ private Context context;
+ private TextMessage msg = null;
+ private ArrayList messageList=new ArrayList();
+ public javax.naming.Context jndiContext;
+ private static int beancount=0;
+ public static final String TOPICCONFAC = "jms/TCFactory";
+ public SimpleMessageBean() {
+ beancount++;
+ System.out.println("MESSAGE BEAN:["+beancount+"].SimpleMessageBean()");
+ }
+
+ public void setMessageDrivenContext(MessageDrivenContext mdc) {
+ System.out.println("In "
+ + "MESSAGE BEAN:["+beancount+"].setMessageDrivenContext()");
+ 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()");
+ }
+
+ public void onMessage(Message inMessage) {
+ try {
+ //inMessage.acknowledge();
+ if (inMessage instanceof TextMessage) {
+ msg = (TextMessage) inMessage;
+ System.out.println("MESSAGE BEAN: Message received: "
+ + msg.getText());
+ } else {
+ System.out.println("Message of wrong type: "
+ + inMessage.getClass().getName());
+ }
+ messageList.add(msg);
+ sendMessage(msg);
+ } catch (JMSException e) {
+ e.printStackTrace();
+ } catch (Throwable te) {
+ te.printStackTrace();
+ }
+ } // onMessage
+
+ public void sendMessage(Message message) {
+ 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
+
+ connect = topicfactory.createTopicConnection();
+
+ TopicSession session = connect.createTopicSession(false,0);
+
+ TopicPublisher publisher=session.createPublisher(topic);
+ Thread.sleep(3000);
+ 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()");
+ }
+} // class
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
new file mode 100644
index 0000000..75c2d24
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="jms2" default="usage" basedir=".">
+
+ <property name="jms2-target" value="all"/>
+
+ <target name="run-test">
+ <antcall target="simple">
+ <param name="jms2-target" value="run-test"/>
+ </antcall>
+ </target>
+
+ <target name="all">
+ <antcall target="simple">
+ <param name="jms2-target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="simple">
+ <param name="jms2-target" value="clean"/>
+ </antcall>
+ </target>
+
+ <target name="build">
+ <antcall target="simple">
+ <param name="jms2-target" value="build"/>
+ </antcall>
+ </target>
+
+ <target name="setup">
+ <antcall target="simple">
+ <param name="jms2-target" value="setup"/>
+ </antcall>
+ </target>
+
+ <target name="deploy">
+ <antcall target="simple">
+ <param name="jms2-target" value="deploy"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy">
+ <antcall target="simple">
+ <param name="jms2-target" value="undeploy"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup">
+ <antcall target="simple">
+ <param name="jms2-target" value="unsetup"/>
+ </antcall>
+ </target>
+
+ <target name="run">
+ <antcall target="simple">
+ <param name="jms2-target" value="run"/>
+ </antcall>
+ </target>
+
+ <target name="simple">
+ <record name="simple.output" action="start" />
+ <ant dir="simple" target="${jms2-target}"/>
+ <record name="simple.output" action="stop" />
+ </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>
+ </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
new file mode 100644
index 0000000..4b0b897
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-mdb"/>
+<property name="appname" value="${module}-simple"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..2952d56
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="simpleApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,build,setup,deploy,run,undeploy,unsetup"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="appclientjar.classes"
+ value="**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="deploy-jms-common">
+ <param name="dest.name" value="SampleQueue"/>
+ <param name="dest.type" value="queue"/>
+ <param name="jms.resource.name" value="jms/SampleQueue"/>
+ <param name="jms.resource.type" value="javax.jms.Queue"/>
+ <param name="jms.factory.name" value="jms/QCFactory"/>
+ <param name="jms.factory.type" value="javax.jms.QueueConnectionFactory"/>
+ </antcall>
+ </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 name="unsetup" depends="init-common">
+ <antcall target="undeploy-jms-common">
+ <param name="dest.name" value="SampleQueue"/>
+ <param name="dest.type" value="queue"/>
+ <param name="jms.resource.name" value="jms/SampleQueue"/>
+ <param name="jms.resource.type" value="javax.jms.Queue"/>
+ <param name="jms.factory.name" value="jms/QCFactory"/>
+ <param name="jms.factory.type" value="javax.jms.QueueConnectionFactory"/>
+ </antcall>
+ </target>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/MANIFEST.MF
new file mode 100644
index 0000000..dba53b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient
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
new file mode 100644
index 0000000..7a0ea06
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/SimpleMessageClient.java
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.mdb.simple.client;
+
+import javax.jms.*;
+import javax.naming.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SimpleMessageClient {
+
+ Context jndiContext = null;
+ QueueConnectionFactory queueConnectionFactory = null;
+ QueueConnection queueConnection = null;
+ QueueSession queueSession = null;
+ Queue queue = null;
+ QueueSender queueSender = null;
+ TextMessage message = null;
+ QueueReceiver receiver = null;
+ final String MSG_TEXT = new String("Here is a client-acknowledge message");
+ public static final String QUEUECONFAC = "jms/QCFactory";
+ public static final String QUEUE = "jms/SampleQueue";
+ final int NUM_MSGS = 3;
+ private static boolean allDone=false;
+
+ 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();
+
+ }
+
+ public Object jndiLookup(String name)
+ throws NamingException {
+ Object obj = null;
+ if (jndiContext == null) {
+ try {
+ jndiContext = new InitialContext();
+ } catch (NamingException e) {
+ System.err.println("Could not create JNDI API " +
+ "context: " + e.toString());
+ throw e;
+ }
+ }
+ try {
+ obj = jndiContext.lookup(name);
+ } 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);
+ stat.addStatus("simple mdb jndiLookup", stat.PASS);
+ }catch(Throwable e)
+ {
+ stat.addStatus("simple mdb jndiLookup", stat.FAIL);
+ 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);
+
+
+ queueConnection =
+ queueConnectionFactory.createQueueConnection();
+ queueSession =
+ queueConnection.createQueueSession(false,
+ Session.CLIENT_ACKNOWLEDGE);
+ queueSender = queueSession.createSender(queue);
+ message = queueSession.createTextMessage();
+ message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
+ //System.out.println("Created durable queue subscriber,persistent delivery mode");
+
+ 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);
+ Thread.sleep(1000);
+ }
+ 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);
+ } // finally
+ }
+
+ public static void printReport(){
+ if(allDone)
+ stat.printSummary("simpleMdbID");
+ else
+ System.out.println("MessageStream from server not finished");
+ }
+
+
+
+
+ public void recvMessage(){
+ QueueConnection connect=null;
+ /*
+ * Create connection.
+ * Create session from connection; false means session is
+ * not transacted.
+ * Create consumer, then start message delivery.
+ * Receive all text messages from destination until
+ * a 3 messages are received indicating end of
+ * message stream.
+ * Close connection.
+ */
+ System.out.println("********************************");
+ System.out.println("inside recvMessage of jms2 appclient");
+ try {
+ connect = queueConnectionFactory.createQueueConnection();
+ QueueSession session = connect.createQueueSession(false,0);
+ receiver=session.createReceiver(queue);
+ System.out.println("Started Receiver");
+ connect.start();
+ int msgcount=1;
+ while (true) {
+ Message m = receiver.receive(10000);
+ System.out.println("Bingo!. got a ack msg back from server");
+ msgcount++;
+ System.out.println("COUNT :"+msgcount);
+ if (m != null) {
+ if (m instanceof TextMessage) {
+ message = (TextMessage) m;
+ System.out.println("Reading message: " +
+ message.getText());
+ String props=message.getStringProperty("MESSAGE_NUM");
+ } else {
+ break;
+
+ }
+ }
+ if(msgcount>=3){
+ System.out.println("All messages from server recieved******************");
+ stat.addStatus("simple jms2 recvmessage", stat.PASS);
+ break;
+ }
+ }
+ System.out.println("******************");
+ System.out.println("Messages from Queue finished**");
+ System.out.println("******************");
+ } catch (JMSException e) {
+ System.out.println("Exception occurred: " +
+ e.toString());
+ stat.addStatus("simple jms2 recvmessage", stat.FAIL);
+ } catch(Throwable e){
+ e.printStackTrace();
+ }
+ finally {
+ if (connect != null) {
+ try {
+ connect.close();
+ } catch (JMSException e) {}
+ }
+ }
+ allDone=true;
+ }
+ }
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/application-client.xml
new file mode 100644
index 0000000..1fccea2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/application-client.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-mdb-simpleClient</display-name>
+ <resource-ref>
+ <res-ref-name>jms/QCFactory</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/application.xml
new file mode 100644
index 0000000..3d90775
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/application.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>SimpleMessageApp</display-name>
+ <description>Application description</description>
+ <module>
+ <java>ejb-mdb-simple-client.jar</java>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..843dace
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/descriptor/sun-application-client.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+ <resource-ref>
+ <res-ref-name>jms/QCFactory</res-ref-name>
+ <jndi-name>jms/QCFactory</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/SampleQueue</resource-env-ref-name>
+ <jndi-name>jms/SampleQueue</jndi-name>
+ </resource-env-ref>
+</sun-application-client>
+
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
new file mode 100644
index 0000000..7179b73
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<project name="jms3" default="usage" basedir=".">
+
+ <property name="jms3-target" value="all"/>
+
+ <target name="run-test">
+ <antcall target="simple">
+ <param name="jms3-target" value="run-test"/>
+ </antcall>
+ </target>
+
+ <target name="all">
+ <antcall target="simple">
+ <param name="jms3-target" value="all"/>
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="simple">
+ <param name="jms3-target" value="clean"/>
+ </antcall>
+ </target>
+
+ <target name="build">
+ <antcall target="simple">
+ <param name="jms3-target" value="build"/>
+ </antcall>
+ </target>
+
+ <target name="setup">
+ <antcall target="simple">
+ <param name="jms3-target" value="setup"/>
+ </antcall>
+ </target>
+
+ <target name="deploy">
+ <antcall target="simple">
+ <param name="jms3-target" value="deploy"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy">
+ <antcall target="simple">
+ <param name="jms3-target" value="undeploy"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup">
+ <antcall target="simple">
+ <param name="jms3-target" value="unsetup"/>
+ </antcall>
+ </target>
+
+ <target name="run">
+ <antcall target="simple">
+ <param name="jms3-target" value="run"/>
+ </antcall>
+ </target>
+
+ <target name="simple">
+ <record name="simple.output" action="start" />
+ <ant dir="simple" target="${jms3-target}"/>
+ <record name="simple.output" action="stop" />
+ </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>
+ </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
new file mode 100644
index 0000000..4b0b897
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-mdb"/>
+<property name="appname" value="${module}-simple"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..2f8ff05
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="simpleApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,build,setup,deploy,run,undeploy,unsetup"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ <param name="s1astest.classpath" value="${env.S1AS_HOME}/lib/install/applications/jmsra/imqjmsra.jar:${s1astest.classpath}"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="appclientjar.classes"
+ value="**/*Client*.class" />
+ </antcall>
+ </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 name="unsetup" depends="init-common">
+ </target>
+
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/MANIFEST.MF
new file mode 100644
index 0000000..dba53b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient
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
new file mode 100644
index 0000000..2561998
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/SimpleMessageClient.java
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.ejb.mdb.simple.client;
+
+import javax.jms.*;
+import javax.naming.*;
+import com.sun.messaging.Queue;
+import com.sun.messaging.QueueConnectionFactory;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SimpleMessageClient {
+
+ QueueConnectionFactory queueConnectionFactory = null;
+ QueueConnection queueConnection = null;
+ QueueSession queueSession = null;
+ com.sun.messaging.Queue queue = null;
+ QueueSender queueSender = null;
+ TextMessage message = null;
+ QueueReceiver receiver = null;
+ 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 =
+ 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();
+
+ }
+
+
+ public void setup(){
+ try{
+ queueConnectionFactory=new com.sun.messaging.QueueConnectionFactory();
+ queue = new com.sun.messaging.Queue();
+ queue.setProperty("imqDestinationName", "new_queue_name");
+ }catch(Throwable e)
+ {
+ stat.addStatus("simple jms3 jndiLookup", stat.FAIL);
+ System.out.println("Problem in looking up connection factories");
+ e.printStackTrace();
+ }
+
+ }
+
+
+
+
+ public SimpleMessageClient(){}
+
+
+ public void sendMessage(){
+ try {
+
+
+ queueConnection =
+ queueConnectionFactory.createQueueConnection();
+ queueSession =
+ queueConnection.createQueueSession(false,
+ Session.CLIENT_ACKNOWLEDGE);
+ queueSender = queueSession.createSender(queue);
+ message = queueSession.createTextMessage();
+ message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
+ //System.out.println("Created durable queue subscriber,persistent delivery mode");
+
+ 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);
+ Thread.sleep(1000);
+ }
+ 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);
+ } // finally
+ }
+
+ public static void printReport(){
+ if(allDone)
+ stat.printSummary("simpleMdbID");
+ else
+ System.out.println("MessageStream from server not finished");
+ }
+
+
+
+
+ public void recvMessage(){
+ QueueConnection connect=null;
+ /*
+ * Create connection.
+ * Create session from connection; false means session is
+ * not transacted.
+ * Create consumer, then start message delivery.
+ * Receive all text messages from destination until
+ * a 3 messages are received indicating end of
+ * message stream.
+ * Close connection.
+ */
+ System.out.println("********************************");
+ System.out.println("inside recvMessage of jms3 appclient");
+ try {
+ connect = queueConnectionFactory.createQueueConnection();
+ QueueSession session = connect.createQueueSession(false,0);
+ receiver=session.createReceiver(queue);
+ System.out.println("Started Receiver");
+ connect.start();
+ int msgcount=1;
+ while (true) {
+ Message m = receiver.receive(10000);
+ System.out.println("Bingo!. got a ack msg back from server");
+ msgcount++;
+ System.out.println("COUNT :"+msgcount);
+ if (m != null) {
+ if (m instanceof TextMessage) {
+ message = (TextMessage) m;
+ System.out.println("Reading message: " +
+ message.getText());
+ String props=message.getStringProperty("MESSAGE_NUM");
+ } else {
+ break;
+
+ }
+ }
+ if(msgcount>=3){
+ System.out.println("All messages from server recieved******************");
+ stat.addStatus("simple jms3 recvmessage", stat.PASS);
+ break;
+ }
+ }
+ System.out.println("******************");
+ System.out.println("Messages from Queue finished**");
+ System.out.println("******************");
+ } catch (JMSException e) {
+ System.out.println("Exception occurred: " +
+ e.toString());
+ stat.addStatus("simple jms3 recvmessage", stat.FAIL);
+ } catch(Throwable e){
+ e.printStackTrace();
+ }
+ finally {
+ if (connect != null) {
+ try {
+ connect.close();
+ } catch (JMSException e) {}
+ }
+ }
+ allDone=true;
+ }
+ }
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/application-client.xml
new file mode 100644
index 0000000..8b68c9b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/application-client.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application-client>
+ <display-name>ejb-mdb-simpleClient</display-name>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/application.xml
new file mode 100644
index 0000000..3d90775
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/application.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>SimpleMessageApp</display-name>
+ <description>Application description</description>
+ <module>
+ <java>ejb-mdb-simple-client.jar</java>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..0674853
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/descriptor/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+</sun-application-client>
+
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
new file mode 100644
index 0000000..b80be4c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.properties
@@ -0,0 +1,37 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="jms-msgdest-jmsweb"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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="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
new file mode 100644
index 0000000..ce0cfb8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jms-msgdest-jmsweb-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </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>
+ </target>
+
+ <target name="build" depends="compile, build-war">
+ <antcall target="build-ear-common">
+ <param name="war.classes"
+ value="**/*Servlet*.class" />
+ <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"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="restart-server"/>
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="${http.host} ${http.port}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant create-resources Create all destinations and connection factories
+ ant delete-resources Delete all destinations and connection factories
+ </echo>
+ </target>
+</project>
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
new file mode 100644
index 0000000..c52d689
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/Client.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.jms.msgdest.jmsweb.client;
+
+import java.net.*;
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private String host;
+ private String port;
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public Client (String[] args) {
+ 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 +
+ "/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);
+ } else {
+ stat.addStatus("jmsweb main", stat.PASS);
+ }
+ } catch (Exception ex) {
+ System.out.println("Jms web test failed.");
+ 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();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while((line = input.readLine()) != null)
+ System.out.println(line);
+ if(code != 200) {
+ System.out.println("Incorrect return code: " + code);
+ }
+ return code;
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/MANIFEST.MF
new file mode 100644
index 0000000..91aff4e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.jms.msgdest.jmsweb.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/create_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/create_resources.asadmin
new file mode 100644
index 0000000..fbc8f79
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/create_resources.asadmin
@@ -0,0 +1,13 @@
+create-jms-resource --resourcetype javax.jms.QueueConnectionFactory jms/jms_msgdest_jmsweb_QCF
+
+create-jmsdest --desttype queue jms_msgdest_jmsweb_ServletQueue
+create-jms-resource --resourcetype javax.jms.Queue --property imqDestinationName=jms_msgdest_jmsweb_ServletQueue jms/jms_msgdest_jmsweb_ServletQueue
+
+
+create-jmsdest --desttype queue jms_msgdest_jmsweb_mdbQueue
+create-jms-resource --resourcetype javax.jms.Queue --property imqDestinationName=jms_msgdest_jmsweb_mdbQueue jms/jms_msgdest_jmsweb_mdbQueue
+
+create-jmsdest --desttype queue jms_msgdest_jmsweb_AppclientQueue
+create-jms-resource --resourcetype javax.jms.Queue --property imqDestinationName=jms_msgdest_jmsweb_AppclientQueue jms/jms_msgdest_jmsweb_AppclientQueue
+
+quit
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/delete_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/delete_resources.asadmin
new file mode 100644
index 0000000..8cf14df
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/delete_resources.asadmin
@@ -0,0 +1,12 @@
+delete-jms-resource jms/jms_msgdest_jmsweb_QCF
+
+delete-jms-resource jms/jms_msgdest_jmsweb_ServletQueue
+delete-jmsdest --desttype queue jms_msgdest_jmsweb_ServletQueue
+
+delete-jms-resource jms/jms_msgdest_jmsweb_mdbQueue
+delete-jmsdest --desttype queue jms_msgdest_jmsweb_mdbQueue
+
+delete-jms-resource jms/jms_msgdest_jmsweb_AppclientQueue
+delete-jmsdest --desttype queue jms_msgdest_jmsweb_AppclientQueue
+
+quit
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/application-client.xml
new file mode 100644
index 0000000..0296a98
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/application-client.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>jms-msgdest-jmswebClient</display-name>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/application.xml
new file mode 100644
index 0000000..6f467f8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/application.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>jms-msgdest-jmswebApp</display-name>
+ <module>
+ <web>
+ <web-uri>a/b/jms-msgdest-jmsweb-web.war</web-uri>
+ <context-root>jms-msgdest-jmsweb</context-root>
+ </web>
+ </module>
+ <module>
+ <java>jms-msgdest-jmsweb-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..97bcf92
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/sun-application-client.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/sun-web.xml
new file mode 100644
index 0000000..cdf406d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <resource-ref>
+ <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
+ <jndi-name>jms/jms_msgdest_jmsweb_QCF</jndi-name>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
+ <jndi-name>jms/jms_msgdest_jmsweb_ServletQueue</jndi-name>
+ </resource-env-ref>
+ <jsp-config/>
+</sun-web-app>
+
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
new file mode 100644
index 0000000..7c27c45
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app version="2.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/web-app_2_4.xsd">
+
+ <display-name>jmsweb</display-name>
+ <distributable></distributable>
+ <servlet>
+ <servlet-name>JmsServlet</servlet-name>
+ <servlet-class>com.sun.s1asdev.jms.msgdest.jmsweb.JmsServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>JmsServlet</servlet-name>
+ <url-pattern>/jmsservlet</url-pattern>
+ </servlet-mapping>
+ <resource-ref>
+ <description>description</description>
+ <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+</web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/docroot/README b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/docroot/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/docroot/README
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
new file mode 100644
index 0000000..42f9a2e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/servlet/JmsServlet.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.jms.msgdest.jmsweb;
+
+import java.io.*;
+import java.rmi.RemoteException;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.*;
+import javax.jms.*;
+import javax.transaction.*;
+
+public class JmsServlet extends HttpServlet {
+
+ private Queue myQueue;
+ 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)
+ context.lookup("java:comp/UserTransaction");
+
+ qcFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory");
+ myQueue = (Queue) context.lookup("java:comp/env/jms/MyQueue");
+
+ userTx.begin();
+
+ sendMessage("this is the jms servlet test");
+
+ userTx.commit();
+
+ userTx.begin();
+
+ recvMessage();
+
+ userTx.commit();
+
+ 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("</BODY> </HTML> ");
+
+ }catch (Exception ex) {
+ ex.printStackTrace();
+ System.out.println("jmsservlet test failed");
+ throw new ServletException(ex);
+ }
+ }
+
+ /**
+ * Send a message.
+ */
+ public String sendMessage(String msg) throws JMSException {
+ QueueConnection connection = null;
+ try {
+ connection = qcFactory.createQueueConnection();
+ QueueSession session = connection.createQueueSession
+ (false, Session.AUTO_ACKNOWLEDGE);
+
+ QueueSender sender = session.createSender(myQueue);
+
+ // Send a message.
+ TextMessage message = session.createTextMessage();
+ message.setText(msg);
+ sender.send(message);
+
+ session.close();
+
+ } finally {
+ try {
+ if( connection != null ) {
+ connection.close();
+ }
+ } catch(Exception e) {}
+ }
+ return msg;
+ }
+
+ private void recvMessage() throws JMSException {
+ QueueConnection connection = null;
+ try {
+ connection = qcFactory.createQueueConnection();
+ QueueSession session = connection.createQueueSession
+ (false, Session.AUTO_ACKNOWLEDGE);
+
+ connection.start();
+
+ // Create a message consumer
+ QueueReceiver receiver = session.createReceiver(myQueue);
+ System.out.println("Waiting for message on " + myQueue);
+ Message message = receiver.receive();
+ System.out.println("Received message " + message);
+ } finally {
+ try {
+ if( connection != null ) {
+ connection.close();
+ }
+ } 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
new file mode 100644
index 0000000..d7f14a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.properties
@@ -0,0 +1,33 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="management-mejb"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..dcac6a9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonLazyInit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="management-mejb" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonLazyInit;
+ &testproperties;
+
+ <target name="all" depends="run-test"/>
+ <target name="run-test" depends="pre-start,clean,build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="**/*Client*.class" />
+ </antcall>
+ <antcall target="ear-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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+
+
+</project>
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
new file mode 100644
index 0000000..38112b6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/Client.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.management.mejb.client;
+
+
+import java.util.*;
+import javax.management.*;
+import javax.management.remote.*;
+
+import com.sun.appserv.management.*;
+import com.sun.appserv.management.client.*;
+import com.sun.appserv.management.config.*;
+
+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 =
+ 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;
+ 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);
+
+ 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();
+
+ //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) {
+ re.printStackTrace();
+ res = kTestFailed;
+ return res;
+ }
+
+ 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");
+ stat.addStatus("Mbean Test", stat.FAIL);
+
+ }
+
+ return res;
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/MANIFEST.MF
new file mode 100644
index 0000000..b4bb107
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+Main-Class: com.sun.s1asdev.management.mejb.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/application-client.xml
new file mode 100644
index 0000000..e9aa427
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/application-client.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>management-mejbClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejbs/mejb</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>javax.management.j2ee.ManagementHome</home>
+ <remote>javax.management.j2ee.Management</remote>
+ <ejb-link>MEjbBean</ejb-link>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/application.xml
new file mode 100644
index 0000000..67b56f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/application.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>MEJB Client Application</description>
+ <display-name>mejbClientApp</display-name>
+ <module>
+ <java>management-mejb-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..e0cc83a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejbs/mejb</ejb-ref-name>
+ <jndi-name>ejb/mgmt/MEJB</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
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
new file mode 100644
index 0000000..c5c6ac1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.properties
@@ -0,0 +1,31 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="jdbc"/>
+<property name="appname" value="${module}-onlygetconnection-servlet"/>
+<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="web.xml" value="descriptor/web.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="contextroot" value="onlygetconnectionservlet"/>
+<property name="apptype" value="web"/>
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
new file mode 100644
index 0000000..2dde385
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jdbc-onlygetconnectionservletApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start, build,deploy, run, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/servlet/*.class"/>
+ </antcall>
+ <antcall target="appclient-jar-common"/>
+ <antcall target="ear-common"/>
+
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-jdbc-common">
+ <param name="jdbc.resource.name" value="jdbc/onlygetconnectionservlet"/>
+ <param name="jdbc.conpool.name" value="jdbc-onlygetconnectionservlet-pool"/>
+ </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"/>
+ </antcall>
+<antcall target="deploy-common"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="restart-server"/>
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/create.sql"/>
+ </antcall>
+ <antcall target="runclient-common"/>
+
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/drop.sql"/>
+ </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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..d9ac9ae
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/Client.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.jdbc.onlygetconnectionservlet.client;
+
+import javax.naming.*;
+import java.rmi.*;
+import java.util.*;
+import java.net.*;
+import java.io.*;
+
+import com.sun.s1asdev.jdbc.onlygetconnectionservlet.servlet.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ public static void main(String[] args)
+ throws Exception {
+
+ 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);
+ } else {
+ stat.addStatus(testSuite+" test1 : ", stat.FAIL);
+ }
+
+ stat.printSummary();
+
+ }
+
+ public boolean doTest() throws Exception {
+
+ boolean pass = false;
+ boolean fail = false;
+
+ HttpURLConnection conn = null;
+ try {
+ conn =(HttpURLConnection) new URL("http://localhost:8080/" +
+ "onlygetconnectionservlet/onlygetconnectionservlet").openConnection();
+
+ InputStream sis = conn.getInputStream();
+ BufferedReader in = new BufferedReader( new InputStreamReader(sis) );
+ System.out.println( conn.getResponseMessage() );
+ String op = null;
+ System.out.println(" Reading response");
+ while( (op = in.readLine()) != null ) {
+ System.out.println(op);
+ if (op.indexOf("PASSED") != -1) {
+ pass = true;
+ }
+ if (op.indexOf("FAILED") != -1) {
+ fail = true;
+ }
+ }
+ } catch( Exception e ) {
+ e.printStackTrace();
+ } finally {
+ conn.disconnect();
+ }
+ return pass && !fail;
+
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/MANIFEST.MF
new file mode 100644
index 0000000..2b0d36f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: com.sun.s1asdev.jdbc.onlygetconnectionservlet.client.Client
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/application-client.xml
new file mode 100644
index 0000000..bee3457
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/application-client.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN' 'http://java.sun.com/dtd/application-client_1_3.dtd'>
+
+<application-client>
+ <display-name>jdbc-onlygetconnectionservletClient</display-name>
+</application-client>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/application.xml
new file mode 100644
index 0000000..72a84e1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/application.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>onlygetconnectionservlet</display-name>
+ <module>
+ <web>
+ <web-uri>jdbc-onlygetconnection-servlet-web.war</web-uri>
+ <context-root>onlygetconnectionservlet</context-root>
+ </web>
+ </module>
+ <module>
+ <java>jdbc-onlygetconnection-servlet-client.jar</java>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..350e391
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/sun-application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!-- -->
+
+<sun-application-client>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/sun-web.xml
new file mode 100644
index 0000000..e2d4d21
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/sun-web.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <class-loader delegate="true"/>
+ <jsp-config/>
+ <resource-ref>
+ <res-ref-name>jdbc/onlygetconnectionservlet</res-ref-name>
+ <jndi-name>jdbc/onlygetconnectionservlet</jndi-name>
+ <default-resource-principal>
+ <name>dbuser</name>
+ <password>dbpassword</password>
+ </default-resource-principal>
+ </resource-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/web.xml
new file mode 100644
index 0000000..a9b8ca6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/descriptor/web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app>
+ <display-name>onlygetconnectionservlet</display-name>
+ <distributable></distributable>
+ <servlet>
+ <servlet-name>onlygetconnectionservlet</servlet-name>
+ <servlet-class>com.sun.s1asdev.jdbc.onlygetconnectionservlet.servlet.OnlyGetConnectionServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>onlygetconnectionservlet</servlet-name>
+ <url-pattern>/onlygetconnectionservlet</url-pattern>
+ </servlet-mapping>
+ <resource-ref>
+ <res-ref-name>jdbc/onlygetconnectionservlet</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+</web-app>
+
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
new file mode 100644
index 0000000..94adaf3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.jdbc.onlygetconnectionservlet.servlet;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.transaction.*;
+import javax.sql.*;
+import java.sql.*;
+import java.io.*;
+import javax.naming.InitialContext;
+
+/**
+ * Collection of getConnection tests using a servlet
+ *
+ * @author aditya.gore@sun.com
+ */
+
+public class OnlyGetConnectionServlet extends HttpServlet {
+
+ private DataSource ds;
+ private PrintWriter out;
+ private UserTransaction utx;
+
+ public void doGet( HttpServletRequest req, HttpServletResponse resp )
+ throws IOException, ServletException
+ {
+System.out.println(" @@@@ in doGet");
+ out = resp.getWriter();
+ writeHeader();
+
+ try {
+ InitialContext ctx = new InitialContext();
+ ds = (DataSource) ctx.lookup("java:comp/env/jdbc/onlygetconnectionservlet");
+ utx = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
+ } catch(Exception e) {
+ e.printStackTrace( out );
+ return;
+ }
+
+// out.println("-----Test1----");
+// test1();
+// out.println("--------------");
+// out.println("-----Test1----");
+// test2();
+// out.println("--------------");
+ test2();
+
+ writeFooter();
+ }
+
+ private void test1() {
+ Connection con = null;
+ Statement stmt = null;
+ ResultSet rs = null;
+
+ try {
+ con = ds.getConnection();
+ stmt = con.createStatement();
+ rs = stmt.executeQuery("SELECT * FROM ONLYGETCONNECTION");
+ out.println("test1 :: PASSED");
+ } catch(Exception e) {
+ e.printStackTrace( out );
+ return;
+ } finally {
+ if ( rs != null ) { try { rs.close(); }catch( Exception e) {} }
+ if ( stmt != null ) { try { stmt.close(); }catch( Exception e) {} }
+ if ( con != null ) { try { con.close(); }catch( Exception e) {} }
+ }
+ }
+
+ private void test2() {
+ Connection con = null;
+ Statement stmt = null;
+ ResultSet rs = null;
+
+ try {
+ utx.begin();
+ con = ds.getConnection();
+ try {
+ Thread.sleep( 5000 );
+ } catch(Exception e) {
+ }
+ stmt = con.createStatement();
+ rs = stmt.executeQuery("SELECT * FROM ONLYGETCONNECTION");
+ utx.commit();
+ out.println("test2 :: PASSED");
+ } catch(Exception e) {
+ e.printStackTrace( out );
+ return;
+ } finally {
+ if ( rs != null ) { try { rs.close(); }catch( Exception e) {} }
+ if ( stmt != null ) { try { stmt.close(); }catch( Exception e) {} }
+ if ( con != null ) { try { con.close(); }catch( Exception e) {} }
+ }
+ }
+
+ private void writeHeader() {
+ out.println( "<html>" );
+ out.println( "<head><title>onlygetconnectionservlet results</title></head>");
+ out.println( "<body>");
+ }
+
+ private void writeFooter() {
+ out.println( "</body>");
+ out.println( "</html>");
+ }
+}
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
new file mode 100644
index 0000000..eb9516e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/create.sql
@@ -0,0 +1,8 @@
+DROP TABLE ONLYGETCONNECTION;
+CREATE TABLE ONLYGETCONNECTION(
+ name char(20),
+ num integer
+);
+
+INSERT INTO ONLYGETCONNECTION values ('abcd', 120);
+INSERT INTO ONLYGETCONNECTION values ('pqrs', 220);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/drop.sql b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/drop.sql
new file mode 100644
index 0000000..79d7352
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/drop.sql
@@ -0,0 +1 @@
+drop table ONLYGETCONNECTION;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/report.xml
new file mode 100644
index 0000000..0271520
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/report.xml
@@ -0,0 +1,48 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="report-sh" depends="init-common,compile-report" unless="ee">
+ <java classname="ResultsProducer" fork="true" failonerror="true" maxmemory="128M" classpath="${build.classes.dir}">
+ <arg value="${env.APS_HOME}/test_resultsValid.xml"/>
+ <arg value="25"/>
+ <arg value="${env.APS_HOME}/devtests/lazyInit/count.txt"/>
+ </java>
+</target>
+
+<target name="compile-report">
+ <antcall target="compile-common">
+ <param name="src" value="${env.APS_HOME}/util/results"/>
+ </antcall>
+</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/resultCount.sh b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/resultCount.sh
new file mode 100644
index 0000000..c099fb0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/resultCount.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=24
+PASSED=`grep "pass" $FILE | wc -l`
+FAILED=`grep "fail" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/lazyInit/count.txt;
+date>>$APS_HOME/devtests/lazyInit/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/lazyInit/count.txt;
+echo "************************">>$APS_HOME/devtests/lazyInit/count.txt;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/RepRunConf.txt b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/RepRunConf.txt
new file mode 100644
index 0000000..c604c61
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/RepRunConf.txt
@@ -0,0 +1 @@
+Test has been reported
\ No newline at end of file
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
new file mode 100644
index 0000000..1e57a79
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/WebTest.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+import java.lang.*;
+import java.io.*;
+import java.net.*;
+
+import com.sun.ejte.ccl.reporter.*;
+
+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";
+ private static final int PORT = 7007;
+ private ServerSocket ss = null;
+
+ public WebTest() {
+ try {
+ ss = new ServerSocket(PORT, 0, InetAddress.getByName(HOST));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void run() {
+ try {
+ stat.addDescription("SocketImpl Test");
+ Socket s = ss.accept();
+ s.setSoLinger(false, 10);
+ InputStream is = s.getInputStream();
+ OutputStream os = s.getOutputStream();
+ int count = 1;
+ 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);
+ 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);
+ } catch (Exception ex) {
+ stat.addStatus("SocketImpl SocketImpl", stat.FAIL);
+ ex.printStackTrace();
+ }
+ stat.addStatus("SocketImpl SocketImpl", stat.PASS);
+ }
+
+ public static void main(String args[])
+ {
+
+ // 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];
+ String portS = args[1];
+ String contextRoot = args[2];
+
+ int port = new Integer(portS).intValue();
+ String name;
+
+ WebTest test = new WebTest();
+ test.start();
+
+ try {
+ goGet(host, port, "FILTER", contextRoot + "/ServletTest" );
+ Thread.sleep(2000);
+ //Thread.currentThread().join();
+ } catch (Throwable t) {
+ System.out.println(t.getMessage());
+ }
+
+ if (count != EXPECTED_COUNT){
+ stat.addStatus("Test standalonewarUNPREDICTED-FAILURE",
+ stat.FAIL);
+ }
+ stat.printSummary("web/standalonewar---> expect " + EXPECTED_COUNT);
+ }
+
+ private static void goGet(String host, int port,
+ String result, String contextPath)
+ throws Exception
+ {
+ long time = System.currentTimeMillis();
+ Socket s = new Socket(host, port);
+ OutputStream os = s.getOutputStream();
+
+ System.out.println(("GET " + contextPath + " HTTP/1.1\n"));
+ 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));
+ String line = null;
+
+ try{
+ int index;
+ while ((line = bis.readLine()) != null) {
+ index = line.indexOf(result);
+ System.out.println(line);
+ 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);
+ }
+ count++;
+ }
+ }
+ } catch( Exception ex){
+ 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
new file mode 100644
index 0000000..12ef4ba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.properties
@@ -0,0 +1,28 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="web"/>
+<property name="appname" value="${module}-requestdispatcher"/>
+<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="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
new file mode 100644
index 0000000..9797169
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webcontainer_unittest" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start, build,deploy, run, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+
+ <javac
+ srcdir="."
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="WebTest.java"/>
+
+ </target>
+
+ <target name="build-publish-war" depends="build, publish-war-common" />
+
+ <target name="re-deploy" depends="init-common">
+ <antcall target="deploy-war-common"/>
+ </target>
+
+ <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">
+ <arg value="${http.host}"/>
+ <arg value="${http.port}"/>
+ <arg value="${contextroot}"/>
+ <classpath>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="."/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/application.xml
new file mode 100755
index 0000000..c96c4d7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/application.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>simpleservlettest</display-name>
+ <module>
+ <web>
+ <web-uri>web-simple-servlet-web.war</web-uri>
+ <context-root>simpleservlettest</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/sun-web.xml
new file mode 100755
index 0000000..685031d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/sun-web.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+<description>tomcat-test</description>
+
+<security-role-mapping>
+ <role-name>tomcat</role-name>
+ <principal-name>tomcat</principal-name>
+ <group-name>tomcat</group-name>
+</security-role-mapping>
+
+</sun-web-app>
+
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
new file mode 100644
index 0000000..6fb56fc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/web.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app 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/web-app_2_4.xsd"
+ version="2.4">
+
+ <filter>
+ <filter-name>FilterTest</filter-name>
+ <filter-class>test.FilterTest</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>FilterTest</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</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>
+ <display-name>ServletTest2</display-name>
+ <servlet-name>ServletTest2</servlet-name>
+ <servlet-class>test.ServletTest2</servlet-class>
+ </servlet>
+ <servlet>
+ <display-name>ServletTest3</display-name>
+ <servlet-name>ServletTest3</servlet-name>
+ <servlet-class>test.ServletTest3</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletTest</servlet-name>
+ <url-pattern>/ServletTest</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServletTest2</servlet-name>
+ <url-pattern>/ServletTest2</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServletTest3</servlet-name>
+ <url-pattern>/ServletTest3</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
+
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
new file mode 100755
index 0000000..c2ad7b8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/FilterTest.java
@@ -0,0 +1,229 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+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;
+ private static int DEFAULT_SEND_BUFFER_SIZE;
+ private static int DEFAULT_TRAFFIC_CLASS;
+ private static boolean DEFAULT_KEEP_ALIVE;
+ private static boolean DEFAULT_OOB_INLINE;
+ private static int DEFAULT_SO_LINGER;
+ private static boolean DEFAULT_TCP_NO_DELAY;
+
+ private static final int PORT = 7007;
+ private static final String HOST = "localhost";
+
+ 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, javax.servlet.ServletException {
+ System.out.println("[Filter.doFilter]");
+
+ try {
+ java.net.Socket socket = new java.net.Socket();
+ DEFAULT_REUSE_ADDRESS = socket.getReuseAddress();
+ DEFAULT_RECEIVE_BUFFER_SIZE = socket.getReceiveBufferSize();
+ DEFAULT_SEND_BUFFER_SIZE = socket.getSendBufferSize();
+ DEFAULT_KEEP_ALIVE = socket.getKeepAlive();
+ DEFAULT_OOB_INLINE = socket.getOOBInline();
+ DEFAULT_SO_LINGER = socket.getSoLinger();
+ DEFAULT_TCP_NO_DELAY = socket.getTcpNoDelay();
+ DEFAULT_TRAFFIC_CLASS = socket.getTrafficClass();
+ socket.setReceiveBufferSize(DEFAULT_RECEIVE_BUFFER_SIZE);
+ socket.setSendBufferSize(DEFAULT_SEND_BUFFER_SIZE);
+
+ if (tested == false) {
+ test();
+ tested = true;
+ }
+ }catch (Exception e) {
+ e.printStackTrace();
+ throw new ServletException(e.getMessage());
+ }
+
+ System.out.println("PROCEEDING WITH THE TEST");
+
+ ((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS");
+ filterChain.doFilter(request, response);
+
+ }
+
+
+ public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException {
+ System.out.println("[Filter.init]");
+ context = filterConfig.getServletContext();
+ }
+
+
+ public void test() {
+ InetSocketAddress isa;
+ try {
+ isa = new InetSocketAddress(InetAddress.getByName(HOST), PORT);
+ } catch (UnknownHostException ex) {
+ ex.printStackTrace();
+ throw new RuntimeException (ex);
+ }
+ Socket s = new Socket();
+ try {
+ s.connect(isa, 1000);
+ testSocketConnection();
+ InputStream is = s.getInputStream();
+ OutputStream os = s.getOutputStream();
+ int count = 1;
+ while (true){
+ int available = is.available();
+ if (available > 0 || count == 6 || count > 10) {
+ if (count == 6) {
+ try {
+ s.setSoTimeout(3000);
+ System.out.println("Blocking call...");
+ is.read();
+ throw new RuntimeException("Should have timed out");
+ } catch (java.net.SocketTimeoutException ie) {
+ System.out.println("Expected exception");
+ ie.printStackTrace();
+ }
+ os.write(count++);
+ }
+ int i = is.read();
+ System.out.println(i);
+ if (count != i && count < 11 ) throw new RuntimeException("Wrong Data, Expected : " + count + " Got: "+ i);
+ 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;
+ } else {
+ throw new RuntimeException(ex);
+ }
+ } finally {
+ try {
+ s.close();
+ } catch (IOException ex) {
+ throw new RuntimeException("Close Failed");
+ }
+ }
+ }
+
+ private void testSocketConnection() {
+ try {
+ Socket s1 = new Socket(InetAddress.getByName(HOST), PORT);
+ System.out.println("Local :" + s1.getLocalSocketAddress());
+ s1.close();
+ Socket s2 = new Socket(InetAddress.getByName(HOST), PORT, false);
+ System.out.println("Local:" + s2.getLocalSocketAddress());
+ s2.close();
+ Socket s3 = new Socket(InetAddress.getByName(HOST), PORT, InetAddress.getByName(HOST), 8600);
+ System.out.println("Remote:" + s3.getRemoteSocketAddress());
+ s3.close();
+ Socket s4 = new Socket(Proxy.NO_PROXY);
+ s4.connect(new InetSocketAddress(HOST, PORT));
+ System.out.println("Remote: " + s4.getRemoteSocketAddress());
+ s4.close();
+ Socket s5 = new Socket(HOST, PORT);
+ System.out.println("Local:" + s5.getLocalSocketAddress());
+ s5.close();
+ Socket s6 = new Socket();
+ s6.bind(null);
+ System.out.println("Local:" + s6.getLocalSocketAddress());
+ s6.close();
+ try {
+ Socket s7 = new Socket(HOST, PORT + 1);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ Socket s = new Socket();
+ int rsize = s.getReceiveBufferSize();
+ s.setReceiveBufferSize(1000);
+ 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();
+ 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");
+ System.out.println("Port : " + s.getLocalPort());
+ 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();
+ s.setReuseAddress(!b);
+ if (s.getReuseAddress() == b) throw new RuntimeException("ReuseADDR not set");
+ int i = s.getSoLinger();
+ if (i != -1 ) {
+ s.setSoLinger(false, 0);
+ if (s.getSoLinger() != -1) throw new RuntimeException("Linger not set");
+ } else {
+ s.setSoLinger(true, 1000);
+ if (s.getSoLinger() != 1000) throw new RuntimeException("Linger not set");
+ }
+ 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();
+
+
+ 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);
+
+ s.setSendBufferSize(1000);
+ s.getSendBufferSize();
+ } catch (RuntimeException e){
+ throw e;
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ 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
new file mode 100644
index 0000000..1a54454
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import org.xml.sax.InputSource;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.SAXException;
+
+// jaxp 1.0.1 imports
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.naming.*;
+import javax.sql.*;
+import java.sql.*;
+
+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]");
+ context = config.getServletContext();
+ System.out.println("[Servlet.init] " + context.getMajorVersion());
+
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("[Servlet.doGet]");
+ doPost(request, response);
+ }
+
+ 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");
+
+ RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2");
+ rd.forward(request, response);
+ }
+
+ public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) {
+ System.out.println("[Servlet.sessionCreated]");
+ }
+
+ public void sessionDestroyed(javax.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
new file mode 100755
index 0000000..50fb997
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest2.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+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]");
+ context = config.getServletContext();
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("[Servlet2.doGet]");
+ doPost(request, response);
+ }
+
+ 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");
+
+ RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3");
+ rd.include(request, response);
+ }
+
+ public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent) {
+ System.out.println("[Servlet.sessionCreated]");
+ }
+
+ public void sessionDestroyed(javax.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
new file mode 100644
index 0000000..ee720ad
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest3.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package test;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import org.xml.sax.InputSource;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.SAXException;
+
+// jaxp 1.0.1 imports
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.naming.*;
+import javax.sql.*;
+import java.sql.*;
+
+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();
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("[Servlet3.doGet]");
+ doPost(request, response);
+ }
+
+ 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
new file mode 100644
index 0000000..88836a2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.properties
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ejb-timer-restore"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..4630104
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+<project name="ejb-timer-restore-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonlazyinit;
+ &testproperties;
+
+ <target name="all" depends="pre-start,clean,build,create-resources,deploy,run,undeploy,delete-resources"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/**.class" />
+ <param name="appclientjar.classes"
+ value="**/*Client*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="create-resources" depends="init-common">
+ <antcall target="asadmin-batch-common">
+ <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"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="restart-server"/>
+ <antcall target="runclient-common"/>
+ <antcall target="restart-server"/>
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="restore"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ <echo>
+ ant create-resources Create all destinations and connection factories
+ ant delete-resources Delete all destinations and connection factories
+ </echo>
+ </target>
+</project>
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
new file mode 100644
index 0000000..678984d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/Client.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.timer.restore.client;
+
+import java.io.Serializable;
+import javax.naming.*;
+import javax.jms.*;
+import javax.ejb.*;
+import javax.rmi.PortableRemoteObject;
+import java.rmi.NoSuchObjectException;
+import java.util.HashSet;
+import java.util.Set;
+import com.sun.s1asdev.ejb.timer.restore.TimerSession;
+import com.sun.s1asdev.ejb.timer.restore.TimerSessionHome;
+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 =
+ new SimpleReporterAdapter("appserv-tests");
+
+ String jndiName = "ejb/ejb_timer_sessiontimer_TimerSession";
+ boolean afterRestart = false;
+
+
+ public static void main(String args[]) {
+
+ stat.addDescription("ejb-timer-sessiontimer");
+ Client client = new Client(args);
+ client.doTest();
+ stat.printSummary("ejb-timer-sessiontimer");
+ }
+
+ public Client(String args[]) {
+ for (int i=0; i<args.length; i++) {
+ System.err.println("ARGS: " + args[i]);
+ }
+
+ if( args.length == 1) {
+ afterRestart = args[0].equalsIgnoreCase("restore");
+ }
+ }
+
+ public String doTest() {
+ String result = kTestPassed;
+ QueueConnection connection = null;
+ TimerSession remoteObj = null;
+
+ String testName = jndiName;
+ String ejbName = "ejbs/Timer";
+
+ 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---" +
+ objref.getClass().getClassLoader());
+ System.out.println("---ejb classname---" +
+ objref.getClass().getName());
+ System.out.println("---TimerSessionHome---" +
+ TimerSessionHome.class.getClassLoader());
+ System.err.println("Looked up home!!");
+
+
+
+ TimerSessionHome home = (TimerSessionHome)
+ PortableRemoteObject.narrow(objref, TimerSessionHome.class);
+
+ remoteObj = home.create();
+ String otherServer1 = "foo";
+
+ if( afterRestart ) {
+
+ 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");
+
+ // 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,
+ "other_timer7");
+
+ remoteObj.createTimerInOtherServer
+ (otherServer1, "other_timer8",
+ 10000000000L, 0,
+ "other_timer8");
+
+ remoteObj.createTimerInOtherServer
+ (otherServer1, "other_timer9",
+ 1000, 10000000000L,
+ "other_timer9");
+
+
+ remoteObj.createTimerInOtherServer
+ (otherServer1, "other_timer10",
+ 100000000, 1000,
+ "other_timer10");
+
+ remoteObj.createTimerInOtherServer
+ (otherServer1, "other_timer11",
+ 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.
+
+ 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);
+
+ Queue queue = (Queue) ic.lookup("java:comp/env/jms/MyQueue");
+ System.out.println (" queue = " + queue);
+
+ connection = qcFactory.createQueueConnection();
+ QueueSession session =
+ connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ QueueReceiver receiver = session.createReceiver(queue);
+ connection.start();
+
+ Set toReceive = new HashSet();
+ Set received = new HashSet();
+ if( afterRestart ) {
+ toReceive.add("timer2");
+ toReceive.add("timer4");
+ toReceive.add("timer5");
+
+ // migrated timers
+ toReceive.add("other_timer7");
+ toReceive.add("other_timer9");
+ toReceive.add("other_timer11");
+
+ } else {
+ toReceive.add("timer1");
+ toReceive.add("timer4");
+ toReceive.add("timer5");
+ toReceive.add("timer6");
+ }
+
+ 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()) )
+ )
+ ) {
+ throw new Exception("Received a invalid message " +
+ message + " TimeOut failed!!");
+ }
+
+ received.add(textMsg.getText());
+ toReceive.remove(textMsg.getText());
+ System.out.println("Received Message : " +
+ textMsg.getText());
+ 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();
+ result = kTestFailed;
+ stat.addStatus("sessiontimer " + testName, stat.FAIL);
+ }
+ finally {
+ try {
+ if(connection != null)
+ connection.close();
+ ((EJBObject)remoteObj).remove();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/MANIFEST.MF
new file mode 100644
index 0000000..314be97
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+Main-Class: com.sun.s1asdev.ejb.timer.restore.client.Client
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/create_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/create_resources.asadmin
new file mode 100644
index 0000000..730d4db
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/create_resources.asadmin
@@ -0,0 +1,7 @@
+create-jms-resource --restype javax.jms.QueueConnectionFactory jms/ejb_timer_restore_TQCF
+
+create-jmsdest --desttype queue ejb_timer_restore_TQueue
+create-jms-resource --restype javax.jms.Queue --property imqDestinationName=ejb_timer_restore_TQueue jms/ejb_timer_restore_TQueue
+
+
+quit
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/delete_resources.asadmin b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/delete_resources.asadmin
new file mode 100644
index 0000000..794766a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/delete_resources.asadmin
@@ -0,0 +1,6 @@
+delete-jms-resource jms/ejb_timer_restore_TQCF
+
+delete-jms-resource jms/ejb_timer_restore_TQueue
+delete-jmsdest --desttype queue ejb_timer_restore_TQueue
+
+quit
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/application-client.xml
new file mode 100644
index 0000000..cb52dbb
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/application-client.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>ejb-timer-restoreClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejbs/Timer</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>com.sun.s1asdev.ejb.timer.restore.TimerSessionHome</home>
+ <remote>com.sun.s1asdev.ejb.timer.restore.TimerSession</remote>
+ <ejb-link>TimerSessionEJB</ejb-link>
+ </ejb-ref>
+ <resource-ref>
+ <description>description</description>
+ <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/application.xml
new file mode 100644
index 0000000..3d01eb4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>SimpleTimer Application description</description>
+ <display-name>restore</display-name>
+ <module>
+ <ejb>ejb-timer-restore-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>ejb-timer-restore-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..0d0f2ff
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/ejb-jar.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar version="2.1" 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/ejb-jar_2_1.xsd">
+ <display-name>TimerSessionEjbJar</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>TimerSessionEJB</ejb-name>
+ <home>com.sun.s1asdev.ejb.timer.restore.TimerSessionHome</home>
+ <remote>com.sun.s1asdev.ejb.timer.restore.TimerSession</remote>
+ <ejb-class>com.sun.s1asdev.ejb.timer.restore.TimerSessionEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <resource-ref>
+ <description>description</description>
+ <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
+ <res-type>javax.jms.QueueConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+ </resource-env-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>TimerSessionEJB</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TimerSessionEJB</ejb-name>
+ <method-name>ejbTimeout</method-name>
+ <method-params>
+ <method-param>javax.ejb.Timer</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>RequiresNew</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>TimerSessionEJB</ejb-name>
+ <method-name>migrateTimersFrom</method-name>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
+ </method>
+ <trans-attribute>NotSupported</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..1cb9721
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-application-client.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <resource-ref>
+ <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
+ <jndi-name>jms/ejb_timer_restore_TQCF</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejbs/Timer</ejb-ref-name>
+ <jndi-name>ejb/ejb_timer_restore_TimerSession</jndi-name>
+ </ejb-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
+ <jndi-name>jms/ejb_timer_restore_TQueue</jndi-name>
+ </resource-env-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..390b7f6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>TimerSessionEJB</ejb-name>
+ <jndi-name>ejb/ejb_timer_restore_TimerSession</jndi-name>
+ <resource-ref>
+ <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
+ <jndi-name>jms/ejb_timer_restore_TQCF</jndi-name>
+ <default-resource-principal>
+ <name>guest</name>
+ <password>guest</password>
+ </default-resource-principal>
+ </resource-ref>
+ <resource-env-ref>
+ <resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
+ <jndi-name>jms/ejb_timer_restore_TQueue</jndi-name>
+ </resource-env-ref>
+ <gen-classes/>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
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
new file mode 100644
index 0000000..d0014ae
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSession.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.timer.restore;
+
+import javax.ejb.*;
+import java.rmi.RemoteException;
+
+public interface TimerSession extends EJBObject {
+
+ public TimerHandle createTimer(long initialDelay, long interval, String msg) throws RemoteException;
+
+ public void deleteTimers() throws RemoteException;
+
+ public void migrateTimersFrom(String owner) throws RemoteException;
+
+ 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
new file mode 100644
index 0000000..2456888
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionEJB.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.timer.restore;
+
+import java.util.Iterator;
+import java.util.Collection;
+import java.util.Date;
+
+import javax.ejb.TimedObject;
+import javax.ejb.Timer;
+import javax.ejb.TimerHandle;
+import javax.ejb.TimerService;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBContext;
+import javax.ejb.EJBException;
+import javax.jms.Session;
+import java.rmi.RemoteException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueConnection;
+import javax.jms.Queue;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.JMSException;
+import javax.jms.TextMessage;
+import javax.naming.*;
+
+import com.sun.ejb.containers.TimerBean;
+
+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 ) {
+ timer = timerService.createTimer(initialDelay, msg);
+ } else {
+ timer = timerService.createTimer(initialDelay, interval,
+ msg);
+ }
+ return timer.getHandle();
+ }
+
+ 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),
+ intervalDuration,
+ info);
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new EJBException(e);
+ }
+
+ }
+
+ public void migrateTimersFrom(String owner) {
+
+ TimerBean.testMigrate(owner);
+
+ }
+
+ public void deleteTimers() {
+
+ java.util.Collection timers = context.getTimerService().getTimers();
+ for(Iterator iter = timers.iterator(); iter.hasNext();) {
+ Timer t = (Timer) iter.next();
+ System.out.println("Cancelling timer " + t);
+ t.cancel();
+ }
+
+ }
+
+ // 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");
+ sender.send(message);
+ System.out.println("Time out message sent");
+ } catch(NamingException e) {
+ e.printStackTrace();
+ } catch(JMSException e) {
+ e.printStackTrace();
+ }
+ finally {
+ try {
+ if(connection != null) {
+ connection.close();
+ connection = null;
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ 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
new file mode 100644
index 0000000..05a407f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionHome.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.timer.restore;
+
+import java.rmi.RemoteException;
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+
+public interface TimerSessionHome extends EJBHome {
+ TimerSession create() throws CreateException, RemoteException;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/application.xml
new file mode 100644
index 0000000..cca7790
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/application.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>subclassing</display-name>
+ <module>
+ <ejb>subclassingEjb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>subclassing.war</web-uri>
+ <context-root>subclassing</context-root>
+ </web>
+ </module>
+</application>
+
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
new file mode 100755
index 0000000..e2cc75d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.properties
@@ -0,0 +1,30 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="web"/>
+<property name="appname" value="${module}-subclassing"/>
+<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="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
new file mode 100644
index 0000000..b7691cf
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonlazyinit SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-ejbsubclassingApp" default="usage" basedir=".">
+
+ &commonSetup;
+ &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"/>
+ </antcall>
+ <antcall target="deploy-jdbc-common">
+ <param name="jdbc.conpool.name" value="ejb-subclassing-pool"/>
+ <param name="jdbc.resource.name" value="jdbc/ejb-subclassing"/>
+ </antcall>
+ </target>
+
+ <target name="unsetup">
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/dropBankTables.sql"/>
+ </antcall>
+
+ <antcall target="undeploy-jdbc-common">
+ <param name="jdbc.conpool.name" value="ejb-subclassing-pool"/>
+ <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"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <property name="hasWebclient" value="yes"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes" value="**/*.class"/>
+ </antcall>
+ <antcall target="ear-common"/>
+ </target>
+
+ <target name="deploy-ear" depends="init-common">
+ <antcall target="deploy-verify-common"/>
+ </target>
+
+ <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>
+ </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>
+ </target>
+
+ <target name="undeploy-ear" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="undeploy-war" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/application.xml
new file mode 100755
index 0000000..e6c2a04
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/application.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <icon>
+ <small-icon></small-icon>
+ <large-icon></large-icon>
+ </icon>
+ <display-name>subclassing</display-name>
+ <module>
+ <ejb>web-subclassing-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>web-subclassing-web.war</web-uri>
+ <context-root>subclassing</context-root>
+ </web>
+ </module>
+</application>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..343b216
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/ejb-jar.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <description>no description</description>
+ <display-name>CustomerJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <description>no description</description>
+ <display-name>CustomerSavingsEJB</display-name>
+ <ejb-name>CustomerSavingsEJB</ejb-name>
+ <home>samples.ejb.subclassing.ejb.CustomerSavingsHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerSavings</remote>
+ <ejb-class>samples.ejb.subclassing.ejb.CustomerSavingsEJB</ejb-class>
+ <persistence-type>Bean</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <resource-ref>
+ <res-ref-name>jdbc/SimpleBank</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ </entity>
+ <entity>
+ <description>no description</description>
+ <display-name>CustomerCheckingEJB</display-name>
+ <ejb-name>CustomerCheckingEJB</ejb-name>
+ <home>samples.ejb.subclassing.ejb.CustomerCheckingHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerChecking</remote>
+ <ejb-class>samples.ejb.subclassing.ejb.CustomerCheckingEJB</ejb-class>
+ <persistence-type>Bean</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <resource-ref>
+ <res-ref-name>jdbc/SimpleBank</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>CustomerSavingsEJB</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>NotSupported</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>CustomerCheckingEJB</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>NotSupported</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
+
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
new file mode 100755
index 0000000..7d86af5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>web-subclassing-ejb.jar</name>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>CustomerSavingsEJB</ejb-name>
+ <jndi-name>ejb/customerSavings</jndi-name>
+ <resource-ref>
+ <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>
+ </ejb>
+ <ejb>
+ <ejb-name>CustomerCheckingEJB</ejb-name>
+ <jndi-name>ejb/customerChecking</jndi-name>
+ <resource-ref>
+ <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>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-web.xml
new file mode 100755
index 0000000..69f1956
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-web.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerSavings</ejb-ref-name>
+ <jndi-name>ejb/customerSavings</jndi-name>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerChecking</ejb-ref-name>
+ <jndi-name>ejb/customerChecking</jndi-name>
+ </ejb-ref>
+ <class-loader delegate="true"/>
+ <jsp-config/>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/web.xml
new file mode 100644
index 0000000..fe3d2e1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/web.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app>
+ <display-name>subclassing</display-name>
+ <distributable></distributable>
+ <servlet>
+ <servlet-name>SimpleBankServlet</servlet-name>
+ <servlet-class>samples.ejb.subclassing.servlet.SimpleBankServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SimpleBankServlet</servlet-name>
+ <url-pattern>/servlet/SimpleBankServlet</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name></realm-name>
+ <form-login-config>
+ <form-login-page></form-login-page>
+ <form-error-page></form-error-page>
+ </form-login-config>
+ </login-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerSavings</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>samples.ejb.subclassing.ejb.CustomerSavingsHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerSavings</remote>
+ <ejb-link>CustomerSavingsEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerChecking</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>samples.ejb.subclassing.ejb.CustomerCheckingHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerChecking</remote>
+ <ejb-link>CustomerCheckingEJB</ejb-link>
+ </ejb-ref>
+</web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankAdd.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankAdd.jsp
new file mode 100644
index 0000000..1ac976e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankAdd.jsp
@@ -0,0 +1,74 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%
+ String message = (String)request.getAttribute("message");
+%>
+ <html>
+ <head>
+ <title>Simple Bank Application</title>
+ </head>
+ <body>
+ <b><%=message%></b>
+ <table border="1">
+ <form method="post" action="/subclassing/servlet/SimpleBankServlet">
+ <tr>
+ <td>Social Security Number</td>
+ <td><input type="text" name="SSN"></td>
+ </tr>
+ <tr>
+ <td>Last Name</td>
+ <td><input type="text" name="lastName"></td>
+ </tr>
+ <tr>
+ <td>First Name</td>
+ <td><input type="text" name="firstName"></td>
+ </tr>
+ <tr>
+ <td>Address1</td>
+ <td><input type="text" name="address1"></td>
+ </tr>
+ <tr>
+ <td>Address2</td>
+ <td><input type="text" name="address2"></td>
+ </tr>
+ <tr>
+ <td>City</td>
+ <td><input type="text" name="city"></td>
+ </tr>
+ <tr>
+ <td>State</td>
+ <td><input type="text" name="state" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Zip Code</td>
+ <td><input type="text" name="zipCode"></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="submit" name="action" value="<%=message%>">
+ </td>
+ </tr>
+ </form>
+ </table>
+ <a href="/subclassing/index.html">Return to Main Page</a>
+ </body>
+ </html>
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankDelete.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankDelete.jsp
new file mode 100644
index 0000000..bc33cb4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankDelete.jsp
@@ -0,0 +1,93 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%
+ String SSN = (String)request.getAttribute("SSN");
+ String lastName = (String)request.getAttribute("lastName");
+ String firstName = (String)request.getAttribute("firstName");
+ String address1 = (String)request.getAttribute("address1");
+ String address2 = (String)request.getAttribute("address2");
+ String city = (String)request.getAttribute("city");
+ String state = (String)request.getAttribute("state");
+ String zipCode = (String)request.getAttribute("zipCode");
+ String currentSavingsBalance = (String)request.getAttribute("currentSavingsBalance");
+ String currentCheckingBalance = (String)request.getAttribute("currentCheckingBalance");
+ String message = (String)request.getAttribute("message");
+%>
+ <html>
+ <head>
+ <title>Simple Bank Application</title>
+ </head>
+ <body>
+ <%=message%>
+ <table border="1">
+ <form method="post" action="/subclassing/servlet/SimpleBankServlet">
+ <tr>
+ <td>Social Security Number</td>
+ <td><%=SSN%></td>
+ </tr>
+ <tr>
+ <td>Last Name</td>
+ <td><%=lastName%></td>
+ </tr>
+ <tr>
+ <td>First Name</td>
+ <td><%=firstName%></td>
+ </tr>
+ <tr>
+ <td>Address1</td>
+ <td><%=address1%></td>
+ </tr>
+ <tr>
+ <td>Address2</td>
+ <td><%=address2%></td>
+ </tr>
+ <tr>
+ <td>City</td>
+ <td><%=city%></td>
+ </tr>
+ <tr>
+ <td>State</td>
+ <td><%=state%></td>
+ </tr>
+ <tr>
+ <td>Zip Code</td>
+ <td><%=zipCode%></td>
+ </tr>
+ <tr>
+ <td>Savings Balance</td>
+ <td><%=currentSavingsBalance%></td>
+ </tr>
+ <tr>
+ <td>Checking Balance</td>
+ <td><%=currentCheckingBalance%></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="submit" name="action" value="<%=message%>">
+ </td>
+ </tr>
+ <input type="hidden" name="SSN" value="<%=SSN%>">
+ </form>
+ </table>
+ <a href="/subclassing/index.html">Return to Main Page</a>
+ </body>
+ </html>
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankEdit.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankEdit.jsp
new file mode 100644
index 0000000..83f9c84
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankEdit.jsp
@@ -0,0 +1,88 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%
+ String SSN = (String)request.getAttribute("SSN");
+ String lastName = (String)request.getAttribute("lastName");
+ String firstName = (String)request.getAttribute("firstName");
+ String address1 = (String)request.getAttribute("address1");
+ String address2 = (String)request.getAttribute("address2");
+ String city = (String)request.getAttribute("city");
+ String state = (String)request.getAttribute("state");
+ String zipCode = (String)request.getAttribute("zipCode");
+ String currentSavingsBalance = (String)request.getAttribute("currentSavingsBalance");
+ String currentCheckingBalance = (String)request.getAttribute("currentCheckingBalance");
+%>
+ <html>
+ <head>
+ <title>Simple Bank Application</title>
+ </head>
+ <body>
+ <table border="1">
+ <form method="post" action="/subclassing/servlet/SimpleBankServlet">
+ <tr>
+ <td>Social Security Number</td>
+ <td>Name</td>
+ <td>Address</td>
+ </tr>
+ <tr>
+ <td>
+ <%=SSN%>
+ </td>
+ <td>
+ <%=firstName%> <%=lastName%>
+ </td>
+ <td>
+ <%=address1%>, <%=address2%>, <%=city%>, <%=state%>, <%=zipCode%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Savings Account<br>
+ <input type=radio checked name=operationSavings value=credit>Credit
+ <input type=radio name=operationSavings value=debit>Debit<br>
+ $<input type="text" name="amountSavings" value="0">
+ </td>
+ <td>
+ Checking Account<br>
+ <input type=radio checked name=operationChecking value=credit>Credit
+ <input type=radio name=operationChecking value=debit>Debit<br>
+ $<input type="text" name="amountChecking" value="0">
+ </td>
+ <td>
+ <input type=submit name="action" value="Update">
+ </td>
+ </tr>
+ <tr>
+ <td colspan=3>
+ Savings Balance :
+ <%=currentSavingsBalance%>
+
+ Checking Balance :
+ <%=currentCheckingBalance%>
+ </td>
+ </tr>
+ <input type="hidden" name="SSN" value="<%=SSN%>">
+ </form>
+ </table>
+ <a href="/subclassing/index.html">Lookup another customer</a>
+ </body>
+ </html>
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankMessage.jsp b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankMessage.jsp
new file mode 100644
index 0000000..b3ae831
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/SimpleBankMessage.jsp
@@ -0,0 +1,29 @@
+<%--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+--%>
+
+<%
+ String message = (String)request.getAttribute("message");
+%>
+
+<html>
+ <head><title>SimpleBank Application</title></head>
+ <body>
+ <center><%=message%></center><br>
+ <a href="/subclassing/index.html">Return to Main Page</a>
+ </body>
+</html>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/index.html b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/index.html
new file mode 100644
index 0000000..2c46a9e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/docroot/index.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<title>Simple Bank Application</title>
+</head>
+
+<body>
+ <H1>Simple Bank Application</H1><br><br>
+ <form method="post" action="/subclassing/servlet/SimpleBankServlet">
+ Customer Social Security Number
+ <input type="text" name="SSN">
+ <br>
+ <input type="submit" name="action" value="Create">
+ <input type="submit" name="action" value="Edit">
+ <input type="submit" name="action" value="Delete">
+ </form>
+</body>
+
+</html>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb-jar.xml
new file mode 100644
index 0000000..343b216
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb-jar.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<ejb-jar>
+ <description>no description</description>
+ <display-name>CustomerJAR</display-name>
+ <enterprise-beans>
+ <entity>
+ <description>no description</description>
+ <display-name>CustomerSavingsEJB</display-name>
+ <ejb-name>CustomerSavingsEJB</ejb-name>
+ <home>samples.ejb.subclassing.ejb.CustomerSavingsHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerSavings</remote>
+ <ejb-class>samples.ejb.subclassing.ejb.CustomerSavingsEJB</ejb-class>
+ <persistence-type>Bean</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <resource-ref>
+ <res-ref-name>jdbc/SimpleBank</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ </entity>
+ <entity>
+ <description>no description</description>
+ <display-name>CustomerCheckingEJB</display-name>
+ <ejb-name>CustomerCheckingEJB</ejb-name>
+ <home>samples.ejb.subclassing.ejb.CustomerCheckingHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerChecking</remote>
+ <ejb-class>samples.ejb.subclassing.ejb.CustomerCheckingEJB</ejb-class>
+ <persistence-type>Bean</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ <resource-ref>
+ <res-ref-name>jdbc/SimpleBank</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ </entity>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>CustomerSavingsEJB</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>NotSupported</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>CustomerCheckingEJB</ejb-name>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>NotSupported</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</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
new file mode 100644
index 0000000..7a6bf17
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/Customer.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface Customer extends javax.ejb.EJBObject
+{
+ public String getLastName() throws RemoteException;
+
+ public String getFirstName() throws RemoteException;
+
+ public String getAddress1() throws RemoteException;
+
+ public String getAddress2() throws RemoteException;
+
+ public String getCity() throws RemoteException;
+
+ public String getState() throws RemoteException;
+
+ public String getZipCode() throws RemoteException;
+
+ public String getSSN() throws RemoteException;
+
+ public long getSavingsBalance() throws RemoteException;
+
+ public long getCheckingBalance() throws RemoteException;
+
+ public void doCredit(long amount, String accountType) throws RemoteException;
+
+ public void doDebit(long amount, String accountType) throws RemoteException;
+
+}
+
+
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
new file mode 100644
index 0000000..c607812
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerChecking.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerChecking extends Customer
+{
+}
+
+
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
new file mode 100644
index 0000000..8879baa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingEJB.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.DataSource;
+
+public class CustomerCheckingEJB extends CustomerEJB
+{
+ public String ejbFindByPrimaryKey(String SSN) throws FinderException
+ {
+ System.out.println("In ejbFindbyPrimaryKey method");
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ System.out.println("Got connection. Conn = " + conn);
+ Statement statement = conn.createStatement();
+ String query = "SELECT * FROM customer2 where SSN = '" + SSN + "'";
+ ResultSet results = statement.executeQuery(query);
+ conn.close();
+ if (results.next())
+ {
+ return SSN;
+ } else {
+ System.out.println("ERROR!! No entry matching the entered Social Security Number!");
+ return "";
+ }
+ } catch (SQLException e) {
+ System.out.println("SQLException occured in ejbFindbyPrimaryKey method.");
+ return "";
+ }
+ }
+
+ public String ejbCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ System.out.println("In ejbCreate method");
+ System.out.println("Params = " + SSN + ":" + lastName + ":" + firstName + ":" + address1 + ":" + address2 + ":" + city + ":" + state + ":" + zipCode);
+ this.SSN = SSN;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.address1 = address1;
+ this.address2 = address2;
+ this.city = city;
+ this.state = state;
+ this.zipCode = zipCode;
+
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ PreparedStatement statement = null;
+ statement = conn.prepareStatement(
+ "INSERT INTO customer2 " +
+ "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "
+ );
+ statement.setString(1, SSN);
+ statement.setString(2, lastName);
+ statement.setString(3, firstName);
+ statement.setString(4, address1);
+ statement.setString(5, address2);
+ statement.setString(6, city);
+ statement.setString(7, state);
+ statement.setString(8, zipCode);
+ statement.setLong(9, 0);
+ statement.setLong(10, 0);
+ statement.executeUpdate();
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbCreate method");
+ e.printStackTrace();
+ return SSN;
+ }
+ return SSN;
+ }
+
+ public void ejbPostCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ return;
+ }
+
+}
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingHome.java
new file mode 100644
index 0000000..465c83b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingHome.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerCheckingHome extends CustomerHome {
+ public CustomerChecking create(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode) throws RemoteException,javax.ejb.CreateException;
+
+ public CustomerChecking findByPrimaryKey(String SSN) throws RemoteException,javax.ejb.FinderException;
+}
+
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
new file mode 100644
index 0000000..56c27da
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerEJB.java
@@ -0,0 +1,217 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.DataSource;
+
+public class CustomerEJB implements javax.ejb.EntityBean
+{
+ //database fields
+ String SSN;
+ String firstName;
+ String lastName;
+ String address1;
+ String address2;
+ String city;
+ String state;
+ String zipCode;
+ long savingsBalance;
+ long checkingBalance;
+ EntityContext ejbContext = null;
+ InitialContext ic = null;
+ DataSource dataSource = null;
+
+ public static final String SAVINGS = "savings";
+ public static final String CHECKING = "checking";
+
+ public String getFirstName()
+ {
+ return firstName;
+ }
+
+ public String getLastName()
+ {
+ return lastName;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public String getAddress2()
+ {
+ return address2;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public String getState()
+ {
+ return state;
+ }
+
+ public String getZipCode()
+ {
+ return zipCode;
+ }
+
+ public String getSSN()
+ {
+ return this.SSN;
+ }
+
+ public long getSavingsBalance()
+ {
+ return savingsBalance;
+ }
+
+ public long getCheckingBalance()
+ {
+ return checkingBalance;
+ }
+
+ public void doCredit(long amount, String accountType)
+ {
+ if (accountType.equals(SAVINGS) && amount>0)
+ this.savingsBalance = this.savingsBalance + amount + 1;
+ else if (accountType.equals(CHECKING))
+ this.checkingBalance = this.checkingBalance + amount;
+ }
+
+ public void doDebit(long amount, String accountType)
+ {
+ if (accountType.equals(SAVINGS))
+ this.savingsBalance = this.savingsBalance - amount;
+ else if (accountType.equals(CHECKING))
+ this.checkingBalance = this.checkingBalance - amount;
+ }
+
+ public void setEntityContext(EntityContext cntx)
+ {
+ ejbContext = cntx;
+ try {
+ ic = new InitialContext();
+ dataSource = (DataSource)ic.lookup("java:comp/env/jdbc/SimpleBank");
+ } catch (NamingException e) {
+ System.out.println("Naming exception occured while trying to lookup the datasource");
+ e.printStackTrace();
+ }
+ }
+
+ public void unsetEntityContext()
+ {
+ ejbContext = null;
+ }
+
+ public void ejbRemove()
+ {
+ System.out.println("In ejbRemove method");
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ String primaryKey = (String)ejbContext.getPrimaryKey();
+ Statement statement = conn.createStatement();
+ String query = "DELETE FROM customer2 where SSN = '" + primaryKey + "'";
+ statement.executeUpdate(query);
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbRemove method");
+ e.printStackTrace();
+ }
+
+ }
+
+ public void ejbStore()
+ {
+ System.out.println("In ejbStore method");
+ System.out.println("SavingsBalance = " + this.savingsBalance);
+ System.out.println("CheckingBalance = " + this.checkingBalance);
+ try {
+ Connection conn = null;
+ String primaryKey = (String)ejbContext.getPrimaryKey();
+ System.out.println("Primarykey = " + primaryKey);
+ conn = dataSource.getConnection();
+ PreparedStatement statement = null;
+ statement = conn.prepareStatement(
+ "UPDATE customer2 " +
+ "set lastName = ?, firstName = ?, address1 = ?, address2 = ?, " +
+ "city = ?, state = ?, zipCode = ?, savingsBalance = ?, checkingBalance = ? " +
+ "where SSN = ?"
+ );
+ statement.setString(1, this.lastName);
+ statement.setString(2, this.firstName);
+ statement.setString(3, this.address1);
+ statement.setString(4, this.address2);
+ statement.setString(5, this.city);
+ statement.setString(6, this.state);
+ statement.setString(7, this.zipCode);
+ statement.setLong(8, this.savingsBalance);
+ statement.setLong(9, this.checkingBalance);
+ statement.setString(10, primaryKey);
+ statement.executeUpdate();
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbStore method");
+ e.printStackTrace();
+ }
+
+ }
+
+ public void ejbLoad()
+ {
+ try {
+ Connection conn = null;
+ String primaryKey = (String)ejbContext.getPrimaryKey();
+ conn = dataSource.getConnection();
+ Statement statement = conn.createStatement();
+ String query = "SELECT * FROM customer2 where SSN = '" + primaryKey + "'";
+ ResultSet results = statement.executeQuery(query);
+ if (results.next())
+ {
+ this.SSN = results.getString("SSN");
+ this.lastName = results.getString("lastName");
+ this.firstName = results.getString("firstName");
+ this.address1 = results.getString("address1");
+ this.address2 = results.getString("address2");
+ this.city = results.getString("city");
+ this.state = results.getString("state");
+ this.zipCode = results.getString("zipCode");
+ this.savingsBalance = results.getLong("savingsBalance");
+ this.checkingBalance = results.getLong("checkingBalance");
+ } else {
+ System.out.println("ERROR!! No entry matching the entered Social Security Number!");
+ }
+ conn.close();
+ } 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/CustomerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerHome.java
new file mode 100644
index 0000000..231617f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerHome.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerHome extends javax.ejb.EJBHome {
+}
+
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
new file mode 100644
index 0000000..eea3192
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavings.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerSavings extends Customer
+{
+}
+
+
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
new file mode 100644
index 0000000..1e241c7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsEJB.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.DataSource;
+
+public class CustomerSavingsEJB extends CustomerEJB
+{
+
+ public String ejbFindByPrimaryKey(String SSN) throws FinderException
+ {
+ System.out.println("In ejbFindbyPrimaryKey method");
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ System.out.println("Got connection. Conn = " + conn);
+ Statement statement = conn.createStatement();
+ String query = "SELECT * FROM customer2 where SSN = '" + SSN + "'";
+ ResultSet results = statement.executeQuery(query);
+ conn.close();
+ if (results.next())
+ {
+ return SSN;
+ } else {
+ System.out.println("ERROR!! No entry matching the entered Social Security Number!");
+ return "";
+ }
+ } catch (SQLException e) {
+ System.out.println("SQLException occured in ejbFindbyPrimaryKey method.");
+ return "";
+ }
+ }
+
+ public String ejbCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ System.out.println("In ejbCreate method");
+ System.out.println("Params = " + SSN + ":" + lastName + ":" + firstName + ":" + address1 + ":" + address2 + ":" + city + ":" + state + ":" + zipCode);
+ this.SSN = SSN;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.address1 = address1;
+ this.address2 = address2;
+ this.city = city;
+ this.state = state;
+ this.zipCode = zipCode;
+
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ PreparedStatement statement = null;
+ statement = conn.prepareStatement(
+ "INSERT INTO customer2 " +
+ "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "
+ );
+ statement.setString(1, SSN);
+ statement.setString(2, lastName);
+ statement.setString(3, firstName);
+ statement.setString(4, address1);
+ statement.setString(5, address2);
+ statement.setString(6, city);
+ statement.setString(7, state);
+ statement.setString(8, zipCode);
+ statement.setLong(9, 0);
+ statement.setLong(10, 0);
+ statement.executeUpdate();
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbCreate method");
+ e.printStackTrace();
+ return SSN;
+ }
+ return SSN;
+ }
+
+ public void ejbPostCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ return;
+ }
+
+}
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsHome.java
new file mode 100644
index 0000000..a2476a2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsHome.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerSavingsHome extends CustomerHome {
+ public CustomerSavings create(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode) throws RemoteException,javax.ejb.CreateException;
+
+ public CustomerSavings findByPrimaryKey(String SSN) throws RemoteException,javax.ejb.FinderException;
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/LICENSE.md b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/LICENSE.md
new file mode 100644
index 0000000..e0358f9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/LICENSE.md
@@ -0,0 +1,29 @@
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/README.md b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/README.md
new file mode 100644
index 0000000..766dda6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/README.md
@@ -0,0 +1 @@
+This directory contains sample code and hence files within this directory and below are covered under EDL 1.0.
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
new file mode 100644
index 0000000..d4ad2e8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/Customer.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface Customer extends javax.ejb.EJBObject
+{
+ public String getLastName() throws RemoteException;
+
+ public String getFirstName() throws RemoteException;
+
+ public String getAddress1() throws RemoteException;
+
+ public String getAddress2() throws RemoteException;
+
+ public String getCity() throws RemoteException;
+
+ public String getState() throws RemoteException;
+
+ public String getZipCode() throws RemoteException;
+
+ public String getSSN() throws RemoteException;
+
+ public long getSavingsBalance() throws RemoteException;
+
+ public long getCheckingBalance() throws RemoteException;
+
+ public void doCredit(long amount, String accountType) throws RemoteException;
+
+ public void doDebit(long amount, String accountType) throws RemoteException;
+
+}
+
+
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
new file mode 100644
index 0000000..8a1a39d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerChecking.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerChecking extends Customer
+{
+}
+
+
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
new file mode 100644
index 0000000..18616ba
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.DataSource;
+
+public class CustomerCheckingEJB extends CustomerEJB
+{
+ public String ejbFindByPrimaryKey(String SSN) throws FinderException
+ {
+ System.out.println("In ejbFindbyPrimaryKey method");
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ System.out.println("Got connection. Conn = " + conn);
+ Statement statement = conn.createStatement();
+ String query = "SELECT * FROM customer2 where SSN = '" + SSN + "'";
+ ResultSet results = statement.executeQuery(query);
+ conn.close();
+ if (results.next())
+ {
+ return SSN;
+ } else {
+ System.out.println("ERROR!! No entry matching the entered Social Security Number!");
+ return "";
+ }
+ } catch (SQLException e) {
+ System.out.println("SQLException occured in ejbFindbyPrimaryKey method.");
+ return "";
+ }
+ }
+
+ public String ejbCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ System.out.println("In ejbCreate method");
+ System.out.println("Params = " + SSN + ":" + lastName + ":" + firstName + ":" + address1 + ":" + address2 + ":" + city + ":" + state + ":" + zipCode);
+ this.SSN = SSN;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.address1 = address1;
+ this.address2 = address2;
+ this.city = city;
+ this.state = state;
+ this.zipCode = zipCode;
+
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ PreparedStatement statement = null;
+ statement = conn.prepareStatement(
+ "INSERT INTO customer2 " +
+ "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "
+ );
+ statement.setString(1, SSN);
+ statement.setString(2, lastName);
+ statement.setString(3, firstName);
+ statement.setString(4, address1);
+ statement.setString(5, address2);
+ statement.setString(6, city);
+ statement.setString(7, state);
+ statement.setString(8, zipCode);
+ statement.setLong(9, 0);
+ statement.setLong(10, 0);
+ statement.executeUpdate();
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbCreate method");
+ e.printStackTrace();
+ return SSN;
+ }
+ return SSN;
+ }
+
+ public void ejbPostCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ return;
+ }
+
+}
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingHome.java
new file mode 100644
index 0000000..92e5b99
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingHome.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerCheckingHome extends CustomerHome {
+ public CustomerChecking create(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode) throws RemoteException,javax.ejb.CreateException;
+
+ public CustomerChecking findByPrimaryKey(String SSN) throws RemoteException,javax.ejb.FinderException;
+}
+
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
new file mode 100644
index 0000000..b95f506
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerEJB.java
@@ -0,0 +1,211 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.DataSource;
+
+public class CustomerEJB implements javax.ejb.EntityBean
+{
+ //database fields
+ String SSN;
+ String firstName;
+ String lastName;
+ String address1;
+ String address2;
+ String city;
+ String state;
+ String zipCode;
+ long savingsBalance;
+ long checkingBalance;
+ EntityContext ejbContext = null;
+ InitialContext ic = null;
+ DataSource dataSource = null;
+
+ public static final String SAVINGS = "savings";
+ public static final String CHECKING = "checking";
+
+ public String getFirstName()
+ {
+ return firstName;
+ }
+
+ public String getLastName()
+ {
+ return lastName;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public String getAddress2()
+ {
+ return address2;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public String getState()
+ {
+ return state;
+ }
+
+ public String getZipCode()
+ {
+ return zipCode;
+ }
+
+ public String getSSN()
+ {
+ return this.SSN;
+ }
+
+ public long getSavingsBalance()
+ {
+ return savingsBalance;
+ }
+
+ public long getCheckingBalance()
+ {
+ return checkingBalance;
+ }
+
+ public void doCredit(long amount, String accountType)
+ {
+ if (accountType.equals(SAVINGS) && amount>0)
+ this.savingsBalance = this.savingsBalance + amount + 1;
+ else if (accountType.equals(CHECKING))
+ this.checkingBalance = this.checkingBalance + amount;
+ }
+
+ public void doDebit(long amount, String accountType)
+ {
+ if (accountType.equals(SAVINGS))
+ this.savingsBalance = this.savingsBalance - amount;
+ else if (accountType.equals(CHECKING))
+ this.checkingBalance = this.checkingBalance - amount;
+ }
+
+ public void setEntityContext(EntityContext cntx)
+ {
+ ejbContext = cntx;
+ try {
+ ic = new InitialContext();
+ dataSource = (DataSource)ic.lookup("java:comp/env/jdbc/SimpleBank");
+ } catch (NamingException e) {
+ System.out.println("Naming exception occured while trying to lookup the datasource");
+ e.printStackTrace();
+ }
+ }
+
+ public void unsetEntityContext()
+ {
+ ejbContext = null;
+ }
+
+ public void ejbRemove()
+ {
+ System.out.println("In ejbRemove method");
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ String primaryKey = (String)ejbContext.getPrimaryKey();
+ Statement statement = conn.createStatement();
+ String query = "DELETE FROM customer2 where SSN = '" + primaryKey + "'";
+ statement.executeUpdate(query);
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbRemove method");
+ e.printStackTrace();
+ }
+
+ }
+
+ public void ejbStore()
+ {
+ System.out.println("In ejbStore method");
+ System.out.println("SavingsBalance = " + this.savingsBalance);
+ System.out.println("CheckingBalance = " + this.checkingBalance);
+ try {
+ Connection conn = null;
+ String primaryKey = (String)ejbContext.getPrimaryKey();
+ System.out.println("Primarykey = " + primaryKey);
+ conn = dataSource.getConnection();
+ PreparedStatement statement = null;
+ statement = conn.prepareStatement(
+ "UPDATE customer2 " +
+ "set lastName = ?, firstName = ?, address1 = ?, address2 = ?, " +
+ "city = ?, state = ?, zipCode = ?, savingsBalance = ?, checkingBalance = ? " +
+ "where SSN = ?"
+ );
+ statement.setString(1, this.lastName);
+ statement.setString(2, this.firstName);
+ statement.setString(3, this.address1);
+ statement.setString(4, this.address2);
+ statement.setString(5, this.city);
+ statement.setString(6, this.state);
+ statement.setString(7, this.zipCode);
+ statement.setLong(8, this.savingsBalance);
+ statement.setLong(9, this.checkingBalance);
+ statement.setString(10, primaryKey);
+ statement.executeUpdate();
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbStore method");
+ e.printStackTrace();
+ }
+
+ }
+
+ public void ejbLoad()
+ {
+ try {
+ Connection conn = null;
+ String primaryKey = (String)ejbContext.getPrimaryKey();
+ conn = dataSource.getConnection();
+ Statement statement = conn.createStatement();
+ String query = "SELECT * FROM customer2 where SSN = '" + primaryKey + "'";
+ ResultSet results = statement.executeQuery(query);
+ if (results.next())
+ {
+ this.SSN = results.getString("SSN");
+ this.lastName = results.getString("lastName");
+ this.firstName = results.getString("firstName");
+ this.address1 = results.getString("address1");
+ this.address2 = results.getString("address2");
+ this.city = results.getString("city");
+ this.state = results.getString("state");
+ this.zipCode = results.getString("zipCode");
+ this.savingsBalance = results.getLong("savingsBalance");
+ this.checkingBalance = results.getLong("checkingBalance");
+ } else {
+ System.out.println("ERROR!! No entry matching the entered Social Security Number!");
+ }
+ conn.close();
+ } 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/CustomerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerHome.java
new file mode 100644
index 0000000..fa81eea
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerHome.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerHome extends javax.ejb.EJBHome {
+}
+
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
new file mode 100644
index 0000000..d27d99c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavings.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerSavings extends Customer
+{
+}
+
+
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
new file mode 100644
index 0000000..c7dd64d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import javax.ejb.*;
+import javax.naming.*;
+import java.sql.*;
+import javax.sql.DataSource;
+
+public class CustomerSavingsEJB extends CustomerEJB
+{
+
+ public String ejbFindByPrimaryKey(String SSN) throws FinderException
+ {
+ System.out.println("In ejbFindbyPrimaryKey method");
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ System.out.println("Got connection. Conn = " + conn);
+ Statement statement = conn.createStatement();
+ String query = "SELECT * FROM customer2 where SSN = '" + SSN + "'";
+ ResultSet results = statement.executeQuery(query);
+ conn.close();
+ if (results.next())
+ {
+ return SSN;
+ } else {
+ System.out.println("ERROR!! No entry matching the entered Social Security Number!");
+ return "";
+ }
+ } catch (SQLException e) {
+ System.out.println("SQLException occured in ejbFindbyPrimaryKey method.");
+ return "";
+ }
+ }
+
+ public String ejbCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ System.out.println("In ejbCreate method");
+ System.out.println("Params = " + SSN + ":" + lastName + ":" + firstName + ":" + address1 + ":" + address2 + ":" + city + ":" + state + ":" + zipCode);
+ this.SSN = SSN;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.address1 = address1;
+ this.address2 = address2;
+ this.city = city;
+ this.state = state;
+ this.zipCode = zipCode;
+
+ try {
+ Connection conn = null;
+ conn = dataSource.getConnection();
+ PreparedStatement statement = null;
+ statement = conn.prepareStatement(
+ "INSERT INTO customer2 " +
+ "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "
+ );
+ statement.setString(1, SSN);
+ statement.setString(2, lastName);
+ statement.setString(3, firstName);
+ statement.setString(4, address1);
+ statement.setString(5, address2);
+ statement.setString(6, city);
+ statement.setString(7, state);
+ statement.setString(8, zipCode);
+ statement.setLong(9, 0);
+ statement.setLong(10, 0);
+ statement.executeUpdate();
+ conn.close();
+ } catch (SQLException e) {
+ System.out.println("SQL exception occured in ejbCreate method");
+ e.printStackTrace();
+ return SSN;
+ }
+ return SSN;
+ }
+
+ public void ejbPostCreate(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode)
+ {
+ return;
+ }
+
+}
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsHome.java
new file mode 100644
index 0000000..b0553dd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsHome.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.ejb;
+
+import java.rmi.RemoteException;
+
+public interface CustomerSavingsHome extends CustomerHome {
+ public CustomerSavings create(String SSN, String lastName, String firstName, String address1, String address2, String city, String state, String zipCode) throws RemoteException,javax.ejb.CreateException;
+
+ public CustomerSavings findByPrimaryKey(String SSN) throws RemoteException,javax.ejb.FinderException;
+}
+
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
new file mode 100644
index 0000000..bbb7973
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/servlet/SimpleBankServlet.java
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package samples.ejb.subclassing.servlet;
+
+import java.io.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.naming.*;
+import javax.servlet.http.*;
+import javax.rmi.PortableRemoteObject;
+import javax.ejb.*;
+
+import samples.ejb.subclassing.ejb.*;
+
+public class SimpleBankServlet extends HttpServlet {
+
+
+ InitialContext initContext = null;
+ CustomerSavingsHome customerSavingsHome = null;
+ CustomerCheckingHome customerCheckingHome = null;
+ CustomerSavings customerSavings = null;
+ CustomerChecking customerChecking = null;
+ Hashtable env = new java.util.Hashtable(1);
+ String JNDIName = null;
+ Object objref = null;
+
+ public void init()
+ {
+ doLookup();
+ }
+
+ 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 {
+ System.out.println("SimpleBankServlet is executing");
+ String SSN = request.getParameter("SSN");
+
+ String message = "";
+ String jsp = "";
+ String lastName = "";
+ String firstName = "";
+ String address1 = "";
+ String address2 = "";
+ String city = "";
+ String state = "";
+ 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"))
+ {
+ System.out.println("Add Customer button pressed");
+ SSN = request.getParameter("SSN");
+ lastName = request.getParameter("lastName");
+ firstName = request.getParameter("firstName");
+ address1 = request.getParameter("address1");
+ address2 = request.getParameter("address2");
+ city = request.getParameter("city");
+ state = request.getParameter("state");
+ zipCode = request.getParameter("zipCode");
+
+ try {
+ System.out.println("Creating the customer savings remote bean");
+ customerSavings = customerSavingsHome.create(SSN, lastName, firstName, address1, address2, city, state, zipCode);
+ } catch (Exception e) {
+ System.out.println("Could not create the customer savings remote bean : " + e.toString());
+ return;
+ }
+ message = "Customer Added.";
+ jsp = "/SimpleBankMessage.jsp";
+ }
+ else if (action.equals("Edit"))
+ {
+ try {
+ System.out.println("Finding the customer savings remote bean");
+ customerSavings = customerSavingsHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer remote bean : " + e.toString());
+ return;
+ }
+ jsp = "/SimpleBankEdit.jsp";
+ }
+ else if (action.equals("Delete"))
+ {
+ try {
+ System.out.println("Finding the customer savings remote bean");
+ customerSavings = customerSavingsHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer savings remote bean : " + e.toString());
+ return;
+ }
+ message = "Delete Customer";
+ jsp = "/SimpleBankDelete.jsp";
+ }
+ else if (action.equals("Delete Customer"))
+ {
+ try {
+ customerSavingsHome.findByPrimaryKey(SSN).remove();
+ } catch (Exception e) {
+ System.out.println("Could not delete the customer savings bean : " + e.toString());
+ return;
+ }
+ message = "Customer Deleted.";
+ jsp = "/SimpleBankMessage.jsp";
+ }
+
+
+ else if (action.equals("Update"))
+ {
+ try {
+ System.out.println("Finding the customersavings remote bean");
+ customerSavings = (CustomerSavings)customerSavingsHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer savings remote bean : " + e.toString());
+ return;
+ }
+
+ try {
+ System.out.println("Finding the customerchecking remote bean");
+ customerChecking = (CustomerChecking)customerCheckingHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer checking remote bean : " + e.toString());
+ return;
+ }
+
+ System.out.println("Transaction Complete");
+ String operationSavings = request.getParameter("operationSavings");
+ System.out.println("operationSavings = " + operationSavings);
+ String operationChecking = request.getParameter("operationChecking");
+ System.out.println("operationChecking = " + operationChecking);
+ String amountSavings = request.getParameter("amountSavings");
+ String amountChecking = request.getParameter("amountChecking");
+ if (operationSavings.equals("credit"))
+ {
+ customerSavings.doCredit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ customerChecking.doCredit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ } else {
+ customerSavings.doDebit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ customerChecking.doDebit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ }
+ if (operationChecking.equals("credit"))
+ {
+ customerChecking.doCredit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ customerSavings.doCredit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ } else {
+ customerChecking.doDebit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ customerSavings.doDebit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ }
+ jsp = "/SimpleBankEdit.jsp";
+ }
+
+ if (customerSavings != null)
+ {
+ lastName = customerSavings.getLastName();
+ firstName = customerSavings.getFirstName();
+ address1 = customerSavings.getAddress1();
+ address2 = customerSavings.getAddress2();
+ city = customerSavings.getCity();
+ state = customerSavings.getState();
+ zipCode = customerSavings.getZipCode();
+ SSN = customerSavings.getSSN();
+ currentSavingsBalance = customerSavings.getSavingsBalance();
+ currentCheckingBalance = customerSavings.getCheckingBalance();
+ }
+
+ System.out.println("storing the values in the request object");
+ request.setAttribute("lastName", lastName);
+ request.setAttribute("firstName", firstName);
+ request.setAttribute("address1", address1);
+ request.setAttribute("address2", address2);
+ request.setAttribute("city", city);
+ request.setAttribute("state", state);
+ request.setAttribute("zipCode", zipCode);
+ request.setAttribute("SSN", SSN);
+ request.setAttribute("currentSavingsBalance", String.valueOf(currentSavingsBalance));
+ request.setAttribute("currentCheckingBalance", String.valueOf(currentCheckingBalance));
+ request.setAttribute("message", message);
+ response.setContentType("text/html");
+ RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(jsp);
+ dispatcher.include(request, response);
+ return;
+ }
+
+ public void doLookup()
+ {
+ try {
+ initContext = new javax.naming.InitialContext();
+ } catch (Exception e) {
+ System.out.println("Exception occured when creating InitialContext: " + e.toString());
+ return;
+ }
+
+ try {
+ System.out.println("Looking up customer savings bean home interface");
+ JNDIName = "java:comp/env/ejb/customerSavings";
+ System.out.println("Looking up: " + JNDIName);
+ objref = initContext.lookup(JNDIName);
+ customerSavingsHome = (CustomerSavingsHome)PortableRemoteObject.narrow(objref, CustomerSavingsHome.class);
+ } catch (Exception e) {
+ System.out.println("Customer savings bean home not found - Is the bean registered with JNDI? : " + e.toString());
+ return;
+ }
+
+ try {
+ System.out.println("Looking up customer checking bean home interface");
+ JNDIName = "java:comp/env/ejb/customerChecking";
+ System.out.println("Looking up: " + JNDIName);
+ objref = initContext.lookup(JNDIName);
+ customerCheckingHome = (CustomerCheckingHome)PortableRemoteObject.narrow(objref, CustomerCheckingHome.class);
+ } catch (Exception e) {
+ System.out.println("Customer checking bean home not found - Is the bean registered with JNDI? : " + e.toString());
+ return;
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/script.txt b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/script.txt
new file mode 100644
index 0000000..bc39a87
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/script.txt
@@ -0,0 +1,46 @@
+GET /subclassing/index.html HTTP/1.0
+Cookie: JSESSIONID=FC7758D53B1842E32F3DBD22FAC98A73
+If-Modified-Since: Fri, 14 Feb 2003 03:42:17 GMT; length=453
+Host: dsingh:1024
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
+User-Agent: Mozilla/4.79C-CCK-MCD [en] (X11; U; SunOS 5.8 sun4u)1.0
+Accept-Language: en
+Proxy-Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Charset: iso-8859-1,*,utf-8
+
+
+!
+!POST /subclassing/servlet/SimpleBankServlet HTTP/1.0
+Cookie: JSESSIONID=FC7758D53B1842E32F3DBD22FAC98A73
+Host: dsingh:1024
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
+User-Agent: Mozilla/4.79C-CCK-MCD [en] (X11; U; SunOS 5.8 sun4u)1.0
+Content-Length: 27
+Accept-Language: en
+Proxy-Connection: Keep-Alive
+Accept-Encoding: gzip
+Content-Type: application/x-www-form-urlencoded
+Accept-Charset: iso-8859-1,*,utf-8
+Referer: http://dsingh:1024/subclassing/index.html
+
+SSN=123456789&action=Create
+
+!
+!POST /subclassing/servlet/SimpleBankServlet HTTP/1.0
+Cookie: JSESSIONID=FC7758D53B1842E32F3DBD22FAC98A73
+Host: dsingh:1024
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
+User-Agent: Mozilla/4.79C-CCK-MCD [en] (X11; U; SunOS 5.8 sun4u)1.0
+Content-Length: 126
+Accept-Language: en
+Proxy-Connection: Keep-Alive
+Accept-Encoding: gzip
+Content-Type: application/x-www-form-urlencoded
+Accept-Charset: iso-8859-1,*,utf-8
+Referer: http://dsingh:1024/subclassing/servlet/SimpleBankServlet
+
+SSN=123456789&lastName=deepa&firstName=singh&address1=120&address2=e&city=sunnyvale&state=ca&zipCode=94087&action=Add+Customer
+
+!
+!
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
new file mode 100644
index 0000000..d8e8547
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/servlet/SimpleBankServlet.java
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package samples.ejb.subclassing.servlet;
+
+import java.io.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.naming.*;
+import javax.servlet.http.*;
+import javax.rmi.PortableRemoteObject;
+import javax.ejb.*;
+
+import samples.ejb.subclassing.ejb.*;
+
+public class SimpleBankServlet extends HttpServlet {
+
+
+ InitialContext initContext = null;
+ CustomerSavingsHome customerSavingsHome = null;
+ CustomerCheckingHome customerCheckingHome = null;
+ CustomerSavings customerSavings = null;
+ CustomerChecking customerChecking = null;
+ Hashtable env = new java.util.Hashtable(1);
+ String JNDIName = null;
+ Object objref = null;
+
+ public void init()
+ {
+ doLookup();
+ }
+
+ 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 {
+ System.out.println("SimpleBankServlet is executing");
+ String SSN = request.getParameter("SSN");
+
+ String message = "";
+ String jsp = "";
+ String lastName = "";
+ String firstName = "";
+ String address1 = "";
+ String address2 = "";
+ String city = "";
+ String state = "";
+ 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"))
+ {
+ System.out.println("Add Customer button pressed");
+ SSN = request.getParameter("SSN");
+ lastName = request.getParameter("lastName");
+ firstName = request.getParameter("firstName");
+ address1 = request.getParameter("address1");
+ address2 = request.getParameter("address2");
+ city = request.getParameter("city");
+ state = request.getParameter("state");
+ zipCode = request.getParameter("zipCode");
+
+ try {
+ System.out.println("Creating the customer savings remote bean");
+ customerSavings = customerSavingsHome.create(SSN, lastName, firstName, address1, address2, city, state, zipCode);
+ } catch (Exception e) {
+ System.out.println("Could not create the customer savings remote bean : " + e.toString());
+ return;
+ }
+ message = "Customer Added.";
+ jsp = "/SimpleBankMessage.jsp";
+ }
+ else if (action.equals("Edit"))
+ {
+ try {
+ System.out.println("Finding the customer savings remote bean");
+ customerSavings = customerSavingsHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer remote bean : " + e.toString());
+ return;
+ }
+ jsp = "/SimpleBankEdit.jsp";
+ }
+ else if (action.equals("Delete"))
+ {
+ try {
+ System.out.println("Finding the customer savings remote bean");
+ customerSavings = customerSavingsHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer savings remote bean : " + e.toString());
+ return;
+ }
+ message = "Delete Customer";
+ jsp = "/SimpleBankDelete.jsp";
+ }
+ else if (action.equals("Delete Customer"))
+ {
+ try {
+ customerSavingsHome.findByPrimaryKey(SSN).remove();
+ } catch (Exception e) {
+ System.out.println("Could not delete the customer savings bean : " + e.toString());
+ return;
+ }
+ message = "Customer Deleted.";
+ jsp = "/SimpleBankMessage.jsp";
+ }
+
+
+ else if (action.equals("Update"))
+ {
+ try {
+ System.out.println("Finding the customersavings remote bean");
+ customerSavings = (CustomerSavings)customerSavingsHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer savings remote bean : " + e.toString());
+ return;
+ }
+
+ try {
+ System.out.println("Finding the customerchecking remote bean");
+ customerChecking = (CustomerChecking)customerCheckingHome.findByPrimaryKey(SSN);
+ } catch (Exception e) {
+ System.out.println("Could not find the customer checking remote bean : " + e.toString());
+ return;
+ }
+
+ System.out.println("Transaction Complete");
+ String operationSavings = request.getParameter("operationSavings");
+ System.out.println("operationSavings = " + operationSavings);
+ String operationChecking = request.getParameter("operationChecking");
+ System.out.println("operationChecking = " + operationChecking);
+ String amountSavings = request.getParameter("amountSavings");
+ String amountChecking = request.getParameter("amountChecking");
+ if (operationSavings.equals("credit"))
+ {
+ customerSavings.doCredit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ customerChecking.doCredit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ } else {
+ customerSavings.doDebit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ customerChecking.doDebit(Long.parseLong(amountSavings), CustomerEJB.SAVINGS);
+ }
+ if (operationChecking.equals("credit"))
+ {
+ customerChecking.doCredit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ customerSavings.doCredit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ } else {
+ customerChecking.doDebit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ customerSavings.doDebit(Long.parseLong(amountChecking), CustomerEJB.CHECKING);
+ }
+ jsp = "/SimpleBankEdit.jsp";
+ }
+
+ if (customerSavings != null)
+ {
+ lastName = customerSavings.getLastName();
+ firstName = customerSavings.getFirstName();
+ address1 = customerSavings.getAddress1();
+ address2 = customerSavings.getAddress2();
+ city = customerSavings.getCity();
+ state = customerSavings.getState();
+ zipCode = customerSavings.getZipCode();
+ SSN = customerSavings.getSSN();
+ currentSavingsBalance = customerSavings.getSavingsBalance();
+ currentCheckingBalance = customerSavings.getCheckingBalance();
+ }
+
+ System.out.println("storing the values in the request object");
+ request.setAttribute("lastName", lastName);
+ request.setAttribute("firstName", firstName);
+ request.setAttribute("address1", address1);
+ request.setAttribute("address2", address2);
+ request.setAttribute("city", city);
+ request.setAttribute("state", state);
+ request.setAttribute("zipCode", zipCode);
+ request.setAttribute("SSN", SSN);
+ request.setAttribute("currentSavingsBalance", String.valueOf(currentSavingsBalance));
+ request.setAttribute("currentCheckingBalance", String.valueOf(currentCheckingBalance));
+ request.setAttribute("message", message);
+ response.setContentType("text/html");
+ RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(jsp);
+ dispatcher.include(request, response);
+ return;
+ }
+
+ public void doLookup()
+ {
+ try {
+ initContext = new javax.naming.InitialContext();
+ } catch (Exception e) {
+ System.out.println("Exception occured when creating InitialContext: " + e.toString());
+ return;
+ }
+
+ try {
+ System.out.println("Looking up customer savings bean home interface");
+ JNDIName = "java:comp/env/ejb/customerSavings";
+ System.out.println("Looking up: " + JNDIName);
+ objref = initContext.lookup(JNDIName);
+ customerSavingsHome = (CustomerSavingsHome)PortableRemoteObject.narrow(objref, CustomerSavingsHome.class);
+ } catch (Exception e) {
+ System.out.println("Customer savings bean home not found - Is the bean registered with JNDI? : " + e.toString());
+ return;
+ }
+
+ try {
+ System.out.println("Looking up customer checking bean home interface");
+ JNDIName = "java:comp/env/ejb/customerChecking";
+ System.out.println("Looking up: " + JNDIName);
+ objref = initContext.lookup(JNDIName);
+ customerCheckingHome = (CustomerCheckingHome)PortableRemoteObject.narrow(objref, CustomerCheckingHome.class);
+ } catch (Exception e) {
+ System.out.println("Customer checking bean home not found - Is the bean registered with JNDI? : " + e.toString());
+ return;
+ }
+ }
+}
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
new file mode 100755
index 0000000..df9df34
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/dropBankTables.sql
@@ -0,0 +1 @@
+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
new file mode 100644
index 0000000..6ef75c3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/simpleBank.sql
@@ -0,0 +1,17 @@
+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),
+ savingsbalance number(10) ,
+ checkingbalance number(10) );
+
+insert into customer2 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 5123, 1234);
+
+commit;
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
new file mode 100644
index 0000000..e0ad088
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-ejb-jar.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>subclassing.jar</name>
+ <unique-id>1</unique-id>
+ <ejb>
+ <ejb-name>CustomerSavingsEJB</ejb-name>
+ <jndi-name>ejb/customerSavings</jndi-name>
+ <resource-ref>
+ <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>
+ </ejb>
+ <ejb>
+ <ejb-name>CustomerCheckingEJB</ejb-name>
+ <jndi-name>ejb/customerChecking</jndi-name>
+ <resource-ref>
+ <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>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-web.xml
new file mode 100644
index 0000000..6eb1c08
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-web.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerSavings</ejb-ref-name>
+ <jndi-name>ejb/customerSavings</jndi-name>
+ </ejb-ref>
+
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerChecking</ejb-ref-name>
+ <jndi-name>ejb/customerChecking</jndi-name>
+ </ejb-ref>
+ <class-loader delegate="true"/>
+ <jsp-config/>
+</sun-web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/web.xml
new file mode 100644
index 0000000..fe3d2e1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/web.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd'>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app>
+ <display-name>subclassing</display-name>
+ <distributable></distributable>
+ <servlet>
+ <servlet-name>SimpleBankServlet</servlet-name>
+ <servlet-class>samples.ejb.subclassing.servlet.SimpleBankServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SimpleBankServlet</servlet-name>
+ <url-pattern>/servlet/SimpleBankServlet</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name></realm-name>
+ <form-login-config>
+ <form-login-page></form-login-page>
+ <form-error-page></form-error-page>
+ </form-login-config>
+ </login-config>
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerSavings</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>samples.ejb.subclassing.ejb.CustomerSavingsHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerSavings</remote>
+ <ejb-link>CustomerSavingsEJB</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>ejb/customerChecking</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>samples.ejb.subclassing.ejb.CustomerCheckingHome</home>
+ <remote>samples.ejb.subclassing.ejb.CustomerChecking</remote>
+ <ejb-link>CustomerCheckingEJB</ejb-link>
+ </ejb-ref>
+</web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/orb_integration_resultCount.sh b/appserver/tests/v2-tests/appserv-tests/devtests/orb_integration_resultCount.sh
new file mode 100644
index 0000000..a43999f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/orb_integration_resultCount.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=42
+PASSED=`grep "pass" $FILE | wc -l`
+FAILED=`grep "fail" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/ejb/count.txt;
+date>>$APS_HOME/devtests/ejb/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/ejb/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/ejb/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/ejb/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/ejb/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/ejb/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/ejb/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/ejb/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/ejb/count.txt;
+echo "************************">>$APS_HOME/devtests/ejb/count.txt;
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
new file mode 100644
index 0000000..be211d7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/build.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./../report.xml">
+]>
+
+<project name="cmp" default="usage" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <antcall target="ejb30"/>
+ </target>
+
+ <target name="ejb30">
+ <record name="ejb30-persistence.output" action="start" />
+ <ant dir="ejb30" target="all"/>
+ <record name="ejb30-persistence.output" action="stop" />
+ </target>
+
+ <target name="usage">
+ <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/ReadMe b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ReadMe
new file mode 100644
index 0000000..173f264
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ReadMe
@@ -0,0 +1 @@
+This devtest basically tests the deployment of persistence descriptor and entity annotations in ejb container. As a deployment process, persistence descriptor(XML) will be read, annotations will be read and merged into the descriptor.
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
new file mode 100644
index 0000000..3310bb0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.properties
@@ -0,0 +1,38 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="persistence-annotation-ejb30"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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
new file mode 100644
index 0000000..8aaf53e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="persistence-annotation-ejb30" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="build-ear-common">
+ <param name="ejbjar.classes"
+ value="**/**.class,**/*.dbschema" />
+ <param name="appclientjar.classes"
+ value="**/**.class"/>
+ </antcall>
+ </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 name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100755
index 0000000..04d25a5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session.client;
+
+import java.io.*;
+import java.util.*;
+import javax.ejb.EJB;
+import com.sun.s1asdev.ejb.ejb30.hello.session.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+
+ stat.addDescription("ejb-ejb30-hello-session");
+ 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;
+
+ public void doTest() {
+
+ try {
+
+ System.out.println("invoking stateful");
+ sful.hello();
+
+ System.out.println("invoking stateless");
+ sless.hello();
+
+ System.out.println("test complete");
+
+ stat.addStatus("local main", stat.PASS);
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("local main" , stat.FAIL);
+ }
+
+ return;
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/MANIFEST.MF
new file mode 100644
index 0000000..4be683b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.ejb.ejb30.hello.session.client.Client
+Class-Path: reporter.jar
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/descriptor/application.xml
new file mode 100644
index 0000000..21e68d7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application>
+ <display-name>persistence-annotation-ejb30App</display-name>
+ <module>
+ <ejb>persistence-annotation-ejb30-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>persistence-annotation-ejb30-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/descriptor/persistence-orm.xml b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/descriptor/persistence-orm.xml
new file mode 100644
index 0000000..ba041ce
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/descriptor/persistence-orm.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<persistence-jar xmlns="http://java.sun.com/xml/ns/persistence_ORM">
+ <class name="com.acme.DeliveryService">
+ <entity>
+ <entity-type>CMP</entity-type>
+ <access>PROPERTY</access>
+ <version>3</version>
+ </entity>
+ <property name="serviceName">
+ <id>
+ <generate>NONE</generate>
+ <generator></generator>
+ </id>
+ </property>
+ <property name="priceCategory">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basic">
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ <property name="customers">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="many-to-many">
+ <target-entity>com.acme.Customer</target-entity>
+ <mapped-by></mapped-by>
+ <fetch>LAZY</fetch>
+ </mapping>
+ <association-table>
+ <table>
+ <name></name>
+ <catalog></catalog>
+ <schema>TEST1</schema>
+ </table>
+ </association-table>
+ </property>
+ </class>
+ <class name="com.acme.Address">
+ <entity>
+ <entity-type>CMP</entity-type>
+ <access>PROPERTY</access>
+ <version>3</version>
+ </entity>
+ <property name="id">
+ <id>
+ <generate>AUTO</generate>
+ <generator></generator>
+ </id>
+ </property>
+ <property name="version">
+ <version>true</version>
+ </property>
+ <property name="street">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basic">
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ </class>
+ <class name="com.acme.Order">
+ <entity>
+ <entity-type>CMP</entity-type>
+ <access>PROPERTY</access>
+ <version>3</version>
+ </entity>
+ <property name="id">
+ <id>
+ <generate>AUTO</generate>
+ <generator></generator>
+ </id>
+ </property>
+ <property name="version">
+ <version>true</version>
+ </property>
+ <property name="itemId">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basic">
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ <property name="quantity">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basic">
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ <property name="customer">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="many-to-one">
+ <target-entity></target-entity>
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ </class>
+ <class name="com.acme.Customer">
+ <entity>
+ <entity-type>CMP</entity-type>
+ <access>FIELD</access>
+ <version>3</version>
+ </entity>
+ <property name="id">
+ <id>
+ <generate>AUTO</generate>
+ <generator></generator>
+ </id>
+ </property>
+ <property name="version">
+ <version>true</version>
+ </property>
+ <property name="address">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="many-to-one">
+ <target-entity></target-entity>
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ <property name="description">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basic">
+ <fetch>EAGER</fetch>
+ </mapping>
+ </property>
+ <property name="orders">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="one-to-many">
+ <target-entity>com.acme.Order</target-entity>
+ <mapped-by>customer</mapped-by>
+ <fetch>LAZY</fetch>
+ </mapping>
+ </property>
+ <property name="serviceOptions">
+ <mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="many-to-many">
+ <target-entity></target-entity>
+ <mapped-by>customers</mapped-by>
+ <fetch>LAZY</fetch>
+ </mapping>
+ </property>
+ </class>
+</persistence-jar>
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
new file mode 100644
index 0000000..1e10e1c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Address.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Order.java
+ *
+ * Created on February 23, 2005, 8:31 PM
+ */
+
+package com.acme;
+
+import javax.persistence.*;
+import static javax.persistence.GeneratorType.*;
+import static javax.persistence.AccessType.*;
+
+/**
+ *
+ * @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;
+ }
+}
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
new file mode 100644
index 0000000..ca7b505
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Customer.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Employee.java
+ *
+ * Created on February 23, 2005, 8:22 PM
+ */
+
+package com.acme;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Vector;
+import javax.persistence.*;
+import static javax.persistence.GeneratorType.*;
+import static javax.persistence.AccessType.*;
+/**
+ *
+ * @author ss141213
+ */
+@Entity(access=FIELD)
+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();
+}
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
new file mode 100644
index 0000000..249ef15
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/DeliveryService.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * DeliveryService.java
+ *
+ * Created on February 23, 2005, 8:38 PM
+ */
+
+package com.acme;
+import java.util.Collection;
+import javax.persistence.*;
+import static javax.persistence.GeneratorType.*;
+import static javax.persistence.AccessType.*;
+
+/**
+ *
+ * @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")
+ @AssociationTable(table=@Table(schema="TEST1"))
+ 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
new file mode 100644
index 0000000..32325a4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/EmploymentPeriod.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * EmploymentPeriod.java
+ *
+ * Created on February 23, 2005, 8:22 PM
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session;
+
+import java.io.*;
+import java.util.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Vector;
+import javax.persistence.*;
+import static javax.persistence.GeneratorType.*;
+import static javax.persistence.AccessType.*;
+/**
+ *
+ * @author ss141213
+ */
+@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; }
+}
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
new file mode 100644
index 0000000..4848e8d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Order.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * Order.java
+ *
+ * Created on February 23, 2005, 8:35 PM
+ */
+
+package com.acme;
+import javax.persistence.*;
+import static javax.persistence.GeneratorType.*;
+import static javax.persistence.AccessType.*;
+
+/**
+ *
+ * @author ss141213
+ */
+@Entity
+public class Order {
+ private Long id;
+ private int version;
+ private int itemId;
+ private int quantity;
+ private Customer customer;
+ @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;
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Sful.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Sful.java
new file mode 100644
index 0000000..bb8488f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Sful.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session;
+
+// Remote business interface
+public interface Sful
+{
+ public String hello();
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/SfulEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/SfulEJB.java
new file mode 100644
index 0000000..8ecc9aa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/SfulEJB.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session;
+
+import javax.ejb.Stateful;
+import javax.ejb.RemoteInterface;
+
+@Stateful
+@RemoteInterface({Sful.class})
+public class SfulEJB implements Sful
+{
+
+ public String hello() {
+ System.out.println("In SfulEJB:hello()");
+ return "hello";
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Sless.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Sless.java
new file mode 100644
index 0000000..75f4b03
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Sless.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session;
+
+// Remote business interface
+
+public interface Sless
+{
+ public String hello();
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/SlessEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/SlessEJB.java
new file mode 100644
index 0000000..b779eb6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/SlessEJB.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session;
+
+import javax.ejb.Stateless;
+import javax.ejb.RemoteInterface;
+@Stateless
+@RemoteInterface({Sless.class})
+public class SlessEJB implements Sless
+{
+ public String hello() {
+ System.out.println("In SlessEJB:hello()");
+ return "hello";
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/sql/persistence-annotation-ejb30App_persistence-annotation-ejb30-ejb.dbschema b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/sql/persistence-annotation-ejb30App_persistence-annotation-ejb30-ejb.dbschema
new file mode 100644
index 0000000..1b47757
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/sql/persistence-annotation-ejb30App_persistence-annotation-ejb30-ejb.dbschema
@@ -0,0 +1,1607 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement-1840833406">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl23814595">
+ <tables>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection25292276">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl23814595"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="5" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-1291537816">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl10498262">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1291537816"/>
+ </element>
+ <table>ADDRESS</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5442802">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl10498262"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1885992127">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl30423630">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1885992127"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier31594013">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection7598296">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl30423630"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1885992351">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl29787757">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1885992351"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer10">
+ <value>10</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier29664748">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
+ <value>0</value>
+ </OBJECT>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1291537816"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1291537816"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1885992127">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl29080316">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1885992127"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10194937">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection30633470">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl10498262"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1885992351"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl10498262"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1291537816"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17388264">
+ <name>ADDRESS</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection31131058">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl10498262"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1885992127"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection25899876">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl10498262"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="3" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1885992351"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement708215602">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl19008310">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement708215602"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier919246">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1291537816"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement2029007433">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl14741677">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement2029007433"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
+ <value>255</value>
+ </OBJECT>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30994786">
+ <name>STREET</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer255"/>
+ </_precision>
+ <_type>1</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1291537816"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement441923530">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </element>
+ <table>CUSTOMER</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection25109548">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement369690032">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl27803692">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement369690032"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4123674">
+ <name>ADDRESS</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection24749215">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl27803692"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement1326317266">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl17912146">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement1326317266"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier28117049">
+ <name>ADDRESS_ID;ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1139689994">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl16183734">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1139689994"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier7806641">
+ <name>ADDRESS_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1885992351"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1269166751">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl8392793">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1269166751"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier28399835">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection19333383">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl8392793"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1269166527">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4239745">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1269166527"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier21344303">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1269166751">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl3276579">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1269166751"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6649557">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15453627">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1269166527"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier22862272">
+ <name>CUSTOMER</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection25610032">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1269166751"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement369690032">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl14418506">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement369690032"/>
+ </element>
+ <_unique>false</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1732792">
+ <name>ADDRESS</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection17818297">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1139689994"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection31090332">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl30369327"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="4" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1269166527"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1868990100">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl31352855">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1868990100"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8639354">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement622110648">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl11604935">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement622110648"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier25793043">
+ <name>DESCRIPTION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>1</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement441923530"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1139689994"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement260596405">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13969258">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement260596405"/>
+ </element>
+ <table>DELIVERYSERVICE</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15354046">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13969258"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1873323052">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl964388">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1873323052"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1690810">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection7658284">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl964388"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1040393447">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl30397362">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1040393447"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier22245100">
+ <name>SERVICENAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>1</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement260596405"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement260596405"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1873323052">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl9924771">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1873323052"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier6559246">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection32961147">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13969258"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1040393447"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13969258"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement260596405"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14941604">
+ <name>DELIVERYSERVICE</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection25613444">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13969258"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1873323052"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection32380043">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl13969258"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1040393447"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-359372370">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1583728">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-359372370"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier9052195">
+ <name>PRICECATEGORY</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement260596405"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement383744552">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </element>
+ <table>DELIVERYSERVICE_CUSTOMER</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection18481629">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement1450628324">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl10770980">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement1450628324"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1712121">
+ <name>CUSTOMER</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection11037970">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl10770980"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1281407601">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl19481516">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1281407601"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier1699198">
+ <name>CUSTOMERS_ID;ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-475993237">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl3614661">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-475993237"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier18089737">
+ <name>CUSTOMERS_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1269166527"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1375295793">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl31056505">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-1375295793"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier27503148">
+ <name>SERVICEOPTIONS</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection26269921">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl31056505"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1162960836">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl33116517">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement-1162960836"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier21943671">
+ <name>SERVICEOPTIONS_SERVICENAME;SERVICENAME</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1886734032">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10838548">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1886734032"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier30021000">
+ <name>SERVICEOPTIONS_SERVICENAME</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>1</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1040393447"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier4961129">
+ <name>DELIVERYSERVICE_CUSTOMER</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection274614">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1450628324">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl32489992">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1450628324"/>
+ </element>
+ <_unique>false</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier28039881">
+ <name>CUSTOMER</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16916276">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-475993237"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1375295793">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl27844531">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1375295793"/>
+ </element>
+ <_unique>false</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier32932466">
+ <name>SERVICEOPTIONS</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection5156931">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1886734032"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement383744552"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection27890503">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl4446747"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-475993237"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1886734032"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-546656574">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </element>
+ <table>ORDER</table>
+ <keys>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection23361497">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ForeignKeyElement" ID="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-646697590">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl17023643">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ForeignKeyElement-646697590"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier31292357">
+ <name>CUSTOMER</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection32609788">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.ForeignKeyElementImpl17023643"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement" ID="com.sun.forte4j.modules.dbmodel.ColumnPairElement886106580">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnPairElementImpl32032133">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnPairElement886106580"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier16754411">
+ <name>CUSTOMER_ID;ID</name>
+ </OBJECT>
+ </_name>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ <_localColumn>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1455479792">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl2608483">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1455479792"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier18690598">
+ <name>CUSTOMER_ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </_localColumn>
+ <_referencedColumn>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1269166527"/>
+ </_referencedColumn>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnPairElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1070037159">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl29859324">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement1070037159"/>
+ </element>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5584739">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <_primary>true</_primary>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection28169315">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl29859324"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1070036935">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl10966839">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1070036935"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5179475">
+ <name>ID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ <_associatedIndex>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement1070037159">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl11240282">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1070037159"/>
+ </element>
+ <_unique>true</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier3980107">
+ <name>PK</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection16606885">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1070036935"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </_associatedIndex>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </keys>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier19679080">
+ <name>ORDER</name>
+ </OBJECT>
+ </_name>
+ <indexes>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection17711949">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement1070037159"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-646697590">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl272782">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-646697590"/>
+ </element>
+ <_unique>false</_unique>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier21248000">
+ <name>CUSTOMER</name>
+ </OBJECT>
+ </_name>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6159089">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1455479792"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ <tei>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </tei>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </indexes>
+ <isTable>true</isTable>
+ <columns>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1456470">
+ <owner>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl15607307"/>
+ </owner>
+ <_elms>
+ <ARRAY SIZE="5" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ <ROW ROW="0">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1070036935"/>
+ </ROW>
+ <ROW ROW="1">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1628469876">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl28881851">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1628469876"/>
+ </element>
+ <_isNullable>false</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier18871377">
+ <name>VERSION</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="2">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1757090359">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl14744748">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1757090359"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15512561">
+ <name>QUANTITY</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="3">
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1658176486">
+ <impl>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl1690651">
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1658176486"/>
+ </element>
+ <_isNullable>true</_isNullable>
+ <_length>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_length>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier27737392">
+ <name>ITEMID</name>
+ </OBJECT>
+ </_name>
+ <_precision>
+ <OBJECT REFERENCE="java.lang.Integer10"/>
+ </_precision>
+ <_type>4</_type>
+ <_scale>
+ <OBJECT REFERENCE="java.lang.Integer0"/>
+ </_scale>
+ </OBJECT>
+ </impl>
+ <declaringTable>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-546656574"/>
+ </declaringTable>
+ </OBJECT>
+ </ROW>
+ <ROW ROW="4">
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1455479792"/>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </columns>
+ </OBJECT>
+ </impl>
+ </OBJECT>
+ </ROW>
+ </ARRAY>
+ </_elms>
+ <_template>
+ <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
+ </ARRAY>
+ </_template>
+ </OBJECT>
+ </tables>
+ <_name>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10626673">
+ <name>TEST1</name>
+ </OBJECT>
+ </_name>
+ <_driverVersion>4.8RE</_driverVersion>
+ <_catalog>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier25819220">
+ <name></name>
+ </OBJECT>
+ </_catalog>
+ <element>
+ <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-1840833406"/>
+ </element>
+ <_databaseProductVersion>4.8RE</_databaseProductVersion>
+ <_driver>com.pointbase.jdbc.jdbcUniversalDriver</_driver>
+ <_databaseProductName>PointBase</_databaseProductName>
+ <_schema>
+ <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier17726622">
+ <name>TEST1</name>
+ </OBJECT>
+ </_schema>
+ <_url>jdbc:pointbase:sample</_url>
+ <_driverName>PointBase JDBC Driver</_driverName>
+ <_username>PBPUBLIC</_username>
+ </OBJECT>
+ </impl>
+ <versionNo>2</versionNo>
+</OBJECT>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/report.xml
new file mode 100644
index 0000000..084ab1f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/report.xml
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <exec executable="sh">
+ <arg value="${result_count.sh}"/>
+ </exec>
+</target>
+
+
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
new file mode 100644
index 0000000..1347bb6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/build.properties
@@ -0,0 +1,37 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="mail-session"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ 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="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="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/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/build.xml
new file mode 100644
index 0000000..08928bc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ <!ENTITY commonSetup SYSTEM "../../../config/properties.xml">
+ <!ENTITY commonBuild SYSTEM "../../../config/common.xml">
+ <!ENTITY testproperties SYSTEM "./build.properties">
+ ]>
+
+<project name="mail-session-App" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="build" depends="compile">
+ <!--build and package .war first so it doesn't contain ejb bean !-->
+ <!--classes that have @Stateless/@Stateul !-->
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="true"/>
+ </antcall>
+
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="**/*Client*.class"/>
+ </antcall>
+
+
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="**/Hello**.class"/>
+ </antcall>
+ <antcall target="ear-common"/>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="${http.host} ${http.port}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+</project>
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
new file mode 100644
index 0000000..a3e2247
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/Client.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.mail.MailSessionDefinition;
+import javax.mail.MailSessionDefinitions;
+import javax.naming.InitialContext;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+
+@MailSessionDefinitions(
+ value = {
+ @MailSessionDefinition(description = "Mail Session Description 1",
+ name = "java:global/mail/Appclient_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {
+ "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",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {
+ "mail.imap.class=com.sun.mail.imap.IMAPStore",
+ "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
+ }
+
+ ),
+ @MailSessionDefinition(
+ name = "java:app/mail/Application_Level_MailSession_Partial",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ properties = {
+ "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",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {
+ "mail.imap.class=com.sun.mail.imap.IMAPStore",
+ "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
+ }
+ )
+ }
+)
+
+public class Client {
+
+ private String host;
+ private String port;
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ public Client(String[] args) {
+ host = (args.length > 0) ? args[0] : "localhost";
+ port = (args.length > 1) ? args[1] : "4848";
+ }
+
+ public static void main(String[] args) {
+ stat.addDescription("mail-sessionclient");
+ Client client = new Client(args);
+ client.doTest();
+ stat.printSummary("mail-sessionID");
+ }
+
+ public void doTest() {
+
+ String env = null;
+ try {
+
+ boolean moduleds = lookupMailSession("java:module/mail/moduleds", true);
+
+ boolean appds = lookupMailSession("java:app/mail/appclient/appds", true);
+
+ boolean globalds = lookupMailSession("java:global/mail/ts/mail-session/appclient/globalds", true);
+
+ boolean comp = lookupMailSession("java:comp/env/Appclient_MailSession", true);
+
+ boolean globalAppclient = lookupMailSession("java:global/mail/Appclient_MailSession", true);
+
+ boolean globalServlet_MailSession = lookupMailSession("java:global/env/Servlet_MailSession", true);
+
+ boolean globalHelloSfulEJB = lookupMailSession("java:global/mail/HelloStatefulEJB_MailSession", true);
+
+ boolean appHelloStatefulEjb = lookupMailSession("java:app/mail/HelloStatefulEJB_MailSession", true);
+
+ boolean globalHelloEJB = lookupMailSession("java:global/mail/HelloEJB_MailSession", true);
+
+ boolean globalHelloStateful_MS_MailSession = lookupMailSession("java:global/mail/HelloStatefulEJB_MS_MailSession", true);
+
+ boolean globalHello_MS_MailSession = lookupMailSession("java:global/mail/HelloEJB_MS_MailSession", true);
+
+ boolean appLevelMailSessionMerge = lookupMailSession("java:app/mail/Application_Level_MailSession_Partial", true);
+
+ boolean appLevelMailSessionOverride = lookupMailSession("java:app/mail/Application_Level_MailSession_Override", true);
+
+ if (moduleds && appds && globalds && comp && globalAppclient && globalServlet_MailSession && globalHelloSfulEJB &&
+ globalHelloEJB && globalHelloStateful_MS_MailSession
+ && globalHello_MS_MailSession && appHelloStatefulEjb && appLevelMailSessionMerge && appLevelMailSessionOverride) {
+ System.out.println("AppClient successful lookup of mail-session !");
+ stat.addStatus("Mai-Session-appclient-test", stat.PASS);
+ } else {
+ System.out.println("AppClient lookup not successful");
+ stat.addStatus("Mai-Session-appclient-test", stat.FAIL);
+ throw new RuntimeException("Appclient failure during lookup of mail-session");
+ }
+
+ String url = "http://" + host + ":" + port +
+ "/mail-session/servlet";
+ System.out.println("invoking Mai-Session test servlet at " + url);
+ int code = invokeServlet(url);
+
+
+ if (code != 200) {
+ System.out.println("Incorrect return code: " + code);
+ stat.addStatus("Mai-Session-web-ejb-test", stat.FAIL);
+ } else {
+ stat.addStatus("Mai-Session-web-ejb-test", stat.PASS);
+ }
+ } catch (Exception ex) {
+ System.out.println("Mai-Session web & ejb test failed.");
+ stat.addStatus("Mai-Session-web-ejb-test", stat.FAIL);
+ ex.printStackTrace();
+ }
+
+ return;
+
+ }
+
+ private boolean lookupMailSession(String mailSessionName, boolean expectSuccess) {
+ try {
+ InitialContext ic = new InitialContext();
+ Object ds = ic.lookup(mailSessionName);
+ return true;
+ } catch (Exception e) {
+ if (expectSuccess) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+ }
+
+ 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();
+ BufferedReader input = new BufferedReader(new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null)
+ System.out.println(line);
+ if (code != 200) {
+ System.out.println("Incorrect return code: " + code);
+ }
+ return code;
+ }
+
+}
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/MANIFEST.MF
new file mode 100644
index 0000000..a85eaaa
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
+Main-Class: com.sun.s1asdev.ejb.ejb30.hello.session3.Client
+Class-Path: reporter.jar
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
new file mode 100644
index 0000000..9207e57
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application-client.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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"
+ 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>
+</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
new file mode 100644
index 0000000..2f80245
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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"
+ version="7">
+ <display-name>mail-sessionApp</display-name>
+ <module>
+ <java>mail-session-client.jar</java>
+ </module>
+ <module>
+ <ejb>mail-session-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>mail-session-web.war</web-uri>
+ <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>
+</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
new file mode 100644
index 0000000..6022607
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/ejb-jar.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ <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"
+ version="3.2">
+ <module-name>mail-session-ejb</module-name>
+ <enterprise-beans>
+ <session>
+ <description>my statefuul bean description</description>
+ <display-name>HelloStatefulEJB</display-name>
+ <ejb-name>HelloStatefulEJB</ejb-name>
+ <business-local>com.sun.s1asdev.ejb.ejb30.hello.session3.HelloStateful</business-local>
+ <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>
+ </session>
+ <session>
+ <description>my stateless bean description</description>
+ <display-name>HelloEJB</display-name>
+ <ejb-name>HelloEJB</ejb-name>
+ <business-local>com.sun.s1asdev.ejb.ejb30.hello.session3.Hello</business-local>
+ <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>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..93d75fe
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/sun-application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN"
+ "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<sun-application-client>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/sun-web.xml
new file mode 100644
index 0000000..9ea4c19
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/sun-web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN'
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+ 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+
+<sun-web-app>
+ <session-config>
+ <session-manager/>
+ </session-config>
+ <class-loader delegate="true"/>
+ <jsp-config/>
+</sun-web-app>
+
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
new file mode 100644
index 0000000..12707f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/web.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<web-app 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 web-app_3_1.xsd"
+ version="3.1">
+
+ <display-name>mail-session</display-name>
+ <distributable></distributable>
+ <servlet>
+ <servlet-name>Servlet</servlet-name>
+ <servlet-class>com.sun.s1asdev.ejb.ejb30.hello.session3.Servlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <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>
+</web-app>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/Hello.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/Hello.java
new file mode 100644
index 0000000..cb59612
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/Hello.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+public interface Hello {
+
+ public void hello();
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloEJB.java
new file mode 100644
index 0000000..f6d76af
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloEJB.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+import javax.mail.MailSessionDefinition;
+import javax.mail.MailSessionDefinitions;
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+
+
+@MailSessionDefinitions(
+ value = {
+ @MailSessionDefinition(description = "Mail Session Description 1",
+ name = "java:global/env/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 1",
+ name = "java:comp/env/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 1",
+ name = "java:global/mail/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+
+ @MailSessionDefinition(description = "Mail Session Description 2",
+ name = "java:comp/mail/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 3",
+ name = "java:app/mail/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 4",
+ name = "java:module/mail/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 4",
+ name = "java:module/env/HelloEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 4",
+ name = "java:global/env/HelloStatefulEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 4",
+ name = "java:app/env/HelloStatefulEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ )
+ }
+)
+
+@Stateless
+public class HelloEJB implements Hello {
+
+ public void hello() {
+
+ boolean global = lookupMailSession("java:global/env/HelloEJB_MailSession", true);
+
+ boolean comp = lookupMailSession("java:comp/env/HelloEJB_MailSession", true);
+
+ boolean moduleHelloEjb = lookupMailSession("java:module/env/HelloEJB_MailSession", true);
+
+ boolean globalHelloStatefulEJB = lookupMailSession("java:global/env/HelloStatefulEJB_MailSession", true);
+
+ boolean compHelloStatefulEJB = lookupMailSession("java:comp/env/HelloStatefulEJB_MailSession", false);
+
+ boolean appHelloStatefulEjb = lookupMailSession("java:app/env/HelloStatefulEJB_MailSession", true);
+
+ boolean globalServlet = lookupMailSession("java:global/env/Servlet_MailSession", true);
+
+ boolean compServlet = lookupMailSession("java:comp/env/Servlet_MailSession", false);
+
+ boolean appServlet = lookupMailSession("java:app/env/Servlet_MailSession", true);
+
+ boolean moduleServlet = lookupMailSession("java:module/env/Servlet_MailSession", false);
+
+ boolean globalServlet_MS_MailSession = lookupMailSession("java:global/env/Servlet_MS_MailSession", true);
+
+ boolean compServlet_MS_MailSession = lookupMailSession("java:comp/env/Servlet_MS_MailSession", false);
+
+ boolean globalHelloStateful_MS_MailSession = lookupMailSession("java:global/env/HelloStatefulEJB_MS_MailSession", true);
+
+ boolean compHelloStateful_MS_MailSession = lookupMailSession("java:comp/env/HelloStatefulEJB_MS_MailSession", false);
+
+ boolean globalHello_MS_MailSession = lookupMailSession("java:global/env/HelloEJB_MS_MailSession", true);
+
+ boolean compHello_MS_MailSession = lookupMailSession("java:comp/env/HelloEJB_MS_MailSession", false);
+
+ if (global && comp && globalHelloStatefulEJB && !compHelloStatefulEJB && globalServlet
+ && !compServlet && appServlet && globalServlet_MS_MailSession && !compServlet_MS_MailSession
+ && globalHelloStateful_MS_MailSession && !compHelloStateful_MS_MailSession &&
+ globalHello_MS_MailSession && compHello_MS_MailSession && appHelloStatefulEjb &&
+ moduleHelloEjb && !moduleServlet) {
+ System.out.println("HelloEJB successful mail-session lookup !");
+ } else {
+ System.out.println("HelloEJB mail-session lookup failure");
+ throw new RuntimeException("HelloEJB failure");
+ }
+
+
+ System.out.println("In HelloEJB::hello()");
+ }
+
+ private boolean lookupMailSession(String mailSessionName, boolean expectSuccess) {
+ try {
+ InitialContext ic = new InitialContext();
+ Object ds = ic.lookup(mailSessionName);
+ return true;
+ } catch (Exception e) {
+ if (expectSuccess) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloStateful.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloStateful.java
new file mode 100644
index 0000000..1161672
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloStateful.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+public interface HelloStateful {
+
+ public void hello();
+
+ public void sleepFor(int sec);
+
+ public void ping();
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloStatefulEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloStatefulEJB.java
new file mode 100644
index 0000000..d3f5337
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/ejb/HelloStatefulEJB.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+import javax.annotation.PostConstruct;
+import javax.mail.MailSessionDefinition;
+import javax.mail.MailSessionDefinitions;
+import javax.ejb.Stateful;
+import javax.naming.InitialContext;
+
+@MailSessionDefinitions(
+ value = {
+ @MailSessionDefinition(description = "Mail Session Description 1",
+ name = "java:global/mail/HelloStatefulEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+
+ @MailSessionDefinition(description = "Mail Session Description 3",
+ name = "java:app/mail/HelloStatefulEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 4",
+ name = "java:module/mail/HelloStatefulEJB_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ )
+ }
+)
+@Stateful
+public class HelloStatefulEJB implements HelloStateful {
+
+
+ @PostConstruct
+ public void postConstruction() {
+ System.out.println("In HelloStatefulEJB::postConstruction()");
+ }
+
+ public void hello() {
+ boolean global = lookupMailSession("java:global/mail/HelloStatefulEJB_MailSession", true);
+ boolean appHelloStatefulEjb = lookupMailSession("java:app/mail/HelloStatefulEJB_MailSession", true);
+
+ boolean globalHelloEJB = lookupMailSession("java:global/mail/HelloEJB_MailSession", true);
+ boolean moduleHelloEjb = lookupMailSession("java:module/mail/HelloEJB_MailSession", true);
+
+ boolean globalServlet = lookupMailSession("java:global/env/Servlet_MailSession", true);
+ boolean appServlet = lookupMailSession("java:app/env/Servlet_MailSession", true);
+ boolean moduleServlet = lookupMailSession("java:module/mail/Servlet_MailSession", false);
+
+ boolean globalServlet_MS_MailSession = lookupMailSession("java:global/mail/Servlet_MS_MailSession", true);
+
+ boolean globalHelloStateful_MS_MailSession = lookupMailSession("java:global/mail/HelloStatefulEJB_MS_MailSession", true);
+
+ boolean globalHello_MS_MailSession = lookupMailSession("java:global/mail/HelloEJB_MS_MailSession", true);
+
+ boolean globalAppLevel_MS_MailSession = lookupMailSession("java:global/mail/Application_Level_MailSession", true);
+ boolean appAppLevel_MS_MailSession = lookupMailSession("java:app/mail/Application_Level_MailSession", true);
+
+ if (global && globalHelloEJB && globalServlet && appServlet &&
+ globalServlet_MS_MailSession && globalHelloStateful_MS_MailSession
+ && globalHello_MS_MailSession && appHelloStatefulEjb && moduleHelloEjb && !moduleServlet
+ && globalAppLevel_MS_MailSession && appAppLevel_MS_MailSession) {
+ System.out.println("StatefulEJB mail-session Success");
+
+ } else {
+ System.out.println("StatefulEJB mail-session Failure");
+ throw new RuntimeException("StatefulEJB mail-session Failure");
+ }
+ }
+
+ public void sleepFor(int sec) {
+ try {
+ for (int i = 0; i < sec; i++) {
+ Thread.currentThread().sleep(1000);
+ }
+ } catch (Exception ex) {
+ }
+ }
+
+ public void ping() {
+ }
+
+ private boolean lookupMailSession(String mailSessionName, boolean expectSuccess) {
+ try {
+ InitialContext ic = new InitialContext();
+ Object ds = ic.lookup(mailSessionName);
+ return true;
+ } catch (Exception e) {
+ if (expectSuccess) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/Hello.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/Hello.java
new file mode 100644
index 0000000..cb59612
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/Hello.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+public interface Hello {
+
+ public void hello();
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/HelloStateful.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/HelloStateful.java
new file mode 100644
index 0000000..1161672
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/HelloStateful.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+public interface HelloStateful {
+
+ public void hello();
+
+ public void sleepFor(int sec);
+
+ public void ping();
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/Servlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/Servlet.java
new file mode 100644
index 0000000..2aee0fc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/servlet/Servlet.java
@@ -0,0 +1,255 @@
+/*
+ * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1asdev.ejb.ejb30.hello.session3;
+
+import javax.annotation.Resource;
+import javax.mail.MailSessionDefinition;
+import javax.mail.MailSessionDefinitions;
+import javax.ejb.EJB;
+import javax.ejb.EJBException;
+import javax.ejb.EJBs;
+import javax.naming.InitialContext;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.UserTransaction;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+@EJB(name = "helloStateless3", beanInterface = Hello.class)
+@EJBs({@EJB(name = "helloStateless4", beanName = "HelloEJB",
+ beanInterface = Hello.class),
+ @EJB(name = "helloStateful3", beanInterface = HelloStateful.class)})
+
+
+@MailSessionDefinitions(
+ value = {
+
+ @MailSessionDefinition(description = "Mail Session Description 1",
+ name = "java:global/mail/MySession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+
+ @MailSessionDefinition(description = "Mail Session Description 3",
+ name = "java:app/mail/MySession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 4",
+ name = "java:module/mail/MySession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 5",
+ name = "java:global/env/Servlet_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ ),
+ @MailSessionDefinition(description = "Mail Session Description 5",
+ name = "java:app/env/Servlet_MailSession",
+ storeProtocol = "IMAP",
+ transportProtocol = "SMTP",
+ host = "localhost",
+ user = "naman",
+ password = "naman",
+ from = "naman.mehta@oracle.com",
+ properties = {"property1=10;property2=20"}
+ )
+ }
+)
+@WebServlet(name = "Servlet",
+ urlPatterns = {"/servlet"}
+)
+public class Servlet extends HttpServlet {
+
+ private
+ @EJB
+ Hello helloStateless;
+ private
+ @EJB(beanName = "HelloStatefulEJB")
+ HelloStateful helloStateful;
+
+ /*
+ private Hello helloStateless2;
+ private HelloStateful helloStateful2;
+
+ */
+ private
+ @Resource
+ UserTransaction ut;
+
+ public void init(ServletConfig config) throws ServletException {
+
+ super.init(config);
+ System.out.println("In Mail-Session-Test::servlet... init()");
+ }
+
+ public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+
+ resp.setContentType("text/html");
+ PrintWriter out = resp.getWriter();
+
+ try {
+
+ InitialContext ic = new InitialContext();
+
+ boolean global = lookupMailSession("java:global/mail/MySession", true);
+
+ boolean app = lookupMailSession("java:app/mail/MySession", true);
+
+ boolean module = lookupMailSession("java:module/mail/MySession", true);
+
+ boolean globalHelloSfulEJB = lookupMailSession("java:global/mail/HelloStatefulEJB_MailSession", true);
+
+ boolean appHelloStatefulEjb = lookupMailSession("java:app/mail/HelloStatefulEJB_MailSession", true);
+
+ boolean globalHelloEJB = lookupMailSession("java:global/mail/HelloEJB_MailSession", true);
+
+ boolean moduleHelloEjb = lookupMailSession("java:module/mail/HelloEJB_MailSession", false);
+
+ boolean globalServlet_MS_MailSession = lookupMailSession("java:global/mail/Servlet_MS_MailSession", true);
+
+ boolean globalHelloStateful_MS_MailSession = lookupMailSession("java:global/mail/HelloStatefulEJB_MS_MailSession", true);
+
+ boolean globalHello_MS_MailSession = lookupMailSession("java:global/mail/HelloEJB_MS_MailSession", true);
+
+ if (global && app && globalHelloSfulEJB && globalServlet_MS_MailSession && globalHelloEJB && globalHelloStateful_MS_MailSession
+ && globalHello_MS_MailSession && appHelloStatefulEjb && !moduleHelloEjb && module) {
+ System.out.println("Servlet successful lookup of mail-sessions !");
+ } else {
+ throw new RuntimeException("Servlet failure ");
+ }
+
+
+ System.out.println("beginning tx");
+ ut.begin();
+
+ // invoke method on the EJB
+ System.out.println("invoking stateless ejb");
+ helloStateless.hello();
+
+ System.out.println("committing tx");
+ ut.commit();
+ System.out.println("committed tx");
+
+
+ System.out.println("invoking stateless ejb");
+ helloStateful.hello();
+
+ System.out.println("successfully invoked ejbs");
+
+ System.out.println("accessing connections");
+ try {
+ MyThread thread = new MyThread(helloStateful);
+ thread.start();
+
+ sleepFor(2);
+ helloStateful.ping();
+ //throw new EJBException("Did not get ConcurrentAccessException");
+ } catch (javax.ejb.ConcurrentAccessException conEx) {
+ ; //Everything is fine
+ } catch (Throwable th) {
+ throw new EJBException("Got some wierd exception: " + th);
+ }
+
+ System.out.println("successfully accessed mail-session definitions");
+
+ out.println("<HTML> <HEAD> <TITLE> JMS Servlet Output </TITLE> </HEAD> <BODY BGCOLOR=white>");
+ out.println("<CENTER> <FONT size=+1 COLOR=blue>DatabaseServlet :: 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("</BODY> </HTML> ");
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.out.println("Mail-Session-Test servlet test failed");
+ throw new ServletException(ex);
+ }
+ }
+
+
+ public void destroy() {
+ System.out.println("in Mail-Session-Test client::servlet destroy");
+ }
+
+ class MyThread extends Thread {
+ HelloStateful ref;
+
+ MyThread(HelloStateful ref) {
+ this.ref = ref;
+ }
+
+ public void run() {
+ try {
+ ref.sleepFor(2);
+ } catch (Throwable th) {
+ throw new RuntimeException("Could not invoke waitfor() method");
+ }
+ }
+ }
+
+
+ private void sleepFor(int sec) {
+ try {
+ for (int i = 0; i < sec; i++) {
+ Thread.currentThread().sleep(1000);
+ System.out.println("[" + i + "/" + sec + "]: Sleeping....");
+ }
+ } catch (Exception ex) {
+ }
+ }
+
+ private boolean lookupMailSession(String mailSessionName, boolean expectSuccess) {
+ try {
+ InitialContext ic = new InitialContext();
+ Object ds = ic.lookup(mailSessionName);
+ return true;
+ } catch (Exception e) {
+ if (expectSuccess) {
+ e.printStackTrace();
+ }
+ return false;
+ }
+ }
+
+
+}
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
new file mode 100644
index 0000000..944a2e3
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/AdminObjectResourceDeployerTest.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * MailResourceDeployerTest.java
+ *
+ * Created on December 10, 2003, 11:55 AM
+ */
+
+package com.sun.enterprise.resource;
+
+import junit.framework.*;
+import junit.textui.TestRunner;
+import com.sun.enterprise.ManagementObjectManager;
+import com.sun.enterprise.Switch;
+import com.sun.enterprise.config.serverbeans.AdminObjectResource;
+import com.sun.enterprise.management.util.J2EEManagementObjectManager;
+import com.sun.enterprise.config.serverbeans.MailResource;
+import com.sun.enterprise.repository.IASJ2EEResourceFactoryImpl;
+import com.sun.enterprise.repository.J2EEResource;
+import java.util.logging.Logger;
+
+/**
+ * Unit test for ConnectorConnectionPoolDeployer.
+ *
+ * @author Rob Ruyak
+ */
+public class AdminObjectResourceDeployerTest extends TestCase {
+
+ AdminObjectResourceDeployer deployer;
+ AdminObjectResource resource;
+
+ /** Creates a new instance of ConnectorConnectionPoolDeployerTest */
+ public AdminObjectResourceDeployerTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResource() {
+ try {
+ deployer.deployResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResourceWithNull() {
+ try {
+ //This should print the following log:
+ //INFO: CORE5005: Error in resource deploy.
+ deployer.deployResource(null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResourceNotEnabled() {
+ try {
+ //This should print the following log:
+ //INFO: CORE5039: Resource named [jndi-name]
+ //[Type: mail-resource] is disabled. It was not loaded.
+ resource.setEnabled(false);
+ deployer.deployResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ protected void setUp() {
+ //initialize the dummy deployer object
+ deployer = new AdminObjectResourceDeployer() {
+ Switch getAppServerSwitchObject() {
+ return new Switch() {
+ public ManagementObjectManager getManagementObjectManager() {
+ return new J2EEManagementObjectManager() {
+ public void registerAdminObjectResource(String name,
+ String raName, String type, String [] names,
+ String [] values) {
+ System.out.println("Jsr77 Registration Complete...");
+ }
+ };
+ }
+ };
+ }
+ };
+
+ //initialize the dummy resource object
+ resource = new AdminObjectResource();
+ resource.setJndiName("javamail/Tester");
+ resource.setEnabled(true);
+ }
+
+ protected void tearDown() {
+ }
+
+ public static junit.framework.Test suite() {
+ TestSuite suite = new TestSuite(AdminObjectResourceDeployerTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception {
+ final TestRunner runner= new TestRunner();
+ final TestResult result =
+ runner.doRun(AdminObjectResourceDeployerTest.suite(), false);
+ System.exit(result.errorCount() + result.failureCount());
+ }
+}
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
new file mode 100644
index 0000000..97ae3a8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/ConnectorConnectionPoolDeployerTest.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * MailResourceDeployerTest.java
+ *
+ * Created on December 10, 2003, 11:55 AM
+ */
+
+package com.sun.enterprise.resource;
+
+import junit.framework.*;
+import junit.textui.TestRunner;
+import com.sun.enterprise.ManagementObjectManager;
+import com.sun.enterprise.Switch;
+import com.sun.enterprise.config.serverbeans.ConnectorConnectionPool;
+import com.sun.enterprise.management.util.J2EEManagementObjectManager;
+import com.sun.enterprise.repository.IASJ2EEResourceFactoryImpl;
+import com.sun.enterprise.repository.J2EEResource;
+import java.util.logging.Logger;
+
+/**
+ * Unit test for ConnectorConnectionPoolDeployer.
+ *
+ * @author Rob Ruyak
+ */
+public class ConnectorConnectionPoolDeployerTest extends TestCase {
+
+ ConnectorConnectionPoolDeployer deployer;
+ ConnectorConnectionPool resource;
+
+ /** Creates a new instance of MailResourceDeployerTest */
+ public ConnectorConnectionPoolDeployerTest(String name) {
+ super(name);
+ }
+
+ //TODO: Should ther be a unit test for null resources passed to the
+ //deploy method???
+
+ /**
+ * Tests the deployResource method.
+ *
+ public void testDeployResourceWithNull() {
+ try {
+ deployer.deployResource(null);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+ **/
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResource() {
+ try {
+ deployer.deployResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResourceWithNull() {
+ try {
+ //This should print the following log:
+ //INFO: CORE5005: Error in resource deploy.
+ deployer.deployResource(null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResourceNotEnabled() {
+ try {
+ //This should print the following log:
+ //INFO: CORE5039: Resource named [jndi-name]
+ //[Type: mail-resource] is disabled. It was not loaded.
+ resource.setEnabled(false);
+ deployer.deployResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ protected void setUp() {
+ //initialize the dummy deployer object
+ deployer = new ConnectorConnectionPoolDeployer () {
+ Switch getAppServerSwitchObject() {
+ return new Switch() {
+ public ManagementObjectManager getManagementObjectManager() {
+ return new J2EEManagementObjectManager() {
+ public void registerJMSResource(String name,
+ String resType, String username,
+ String password, String[] propNames,
+ String[] propValues) {
+ System.out.println("Jsr77 Registration Complete...");
+ }
+ };
+ }
+ };
+ }
+ };
+
+ //initialize the dummy resource object
+ resource = new ConnectorConnectionPool();
+ resource.setName("jms/Tester");
+ resource.setEnabled(true);
+ }
+
+ protected void tearDown() {
+ }
+
+ public static junit.framework.Test suite() {
+ TestSuite suite = new TestSuite(ConnectorConnectionPoolDeployerTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception {
+ final TestRunner runner= new TestRunner();
+ final TestResult result =
+ runner.doRun(ConnectorConnectionPoolDeployerTest.suite(), false);
+ System.exit(result.errorCount() + result.failureCount());
+ }
+}
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
new file mode 100644
index 0000000..79ba87d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/GlobalResourceDeployerTest.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * MailResourceDeployerTest.java
+ *
+ * Created on December 10, 2003, 11:55 AM
+ */
+
+package com.sun.enterprise.resource;
+
+import com.sun.enterprise.config.serverbeans.ElementProperty;
+import java.util.Properties;
+import junit.framework.*;
+import junit.textui.TestRunner;
+
+/**
+ * Unit test for ConnectorConnectionPoolDeployer.
+ *
+ * @author Rob Ruyak
+ */
+public class GlobalResourceDeployerTest extends TestCase {
+
+ MailResourceDeployer deployer;
+ ElementProperty [] testProps;
+ String [] testNames;
+ String [] testValues;
+
+ /** Creates a new instance of ConnectorConnectionPoolDeployerTest */
+ public GlobalResourceDeployerTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests the getPropNamesAsStrArr method.
+ *
+ */
+ public void testGetPropNamesAsStrArr() {
+ String [] result = deployer.getPropNamesAsStrArr(testProps);
+ assertNotNull(result);
+ assertEquals(result[0], testNames[0]);
+ assertEquals(result[1], testNames[1]);
+ assertEquals(result[2], testNames[2]);
+ }
+
+ /**
+ * Tests the getPropNamesAsStrArr method with null param.
+ *
+ */
+ public void testGetPropNamesAsStrArrWithNull() {
+ String [] result = deployer.getPropNamesAsStrArr(null);
+ assertNull(result);
+ }
+
+ /**
+ * Tests the getPropValuesAsStrArr method.
+ *
+ */
+ public void testGetPropValuesAsStrArr() {
+ String [] result = deployer.getPropValuesAsStrArr(testProps);
+ assertNotNull(result);
+ assertEquals(result[0], testValues[0]);
+ assertEquals(result[1], testValues[1]);
+ assertEquals(result[2], testValues[2]);
+ }
+
+ /**
+ * Tests the getPropValuesAsStrArr method with null param.
+ */
+ public void testGetPropValuesAsStrArrWithNull() {
+ String [] result = deployer.getPropValuesAsStrArr(null);
+ assertNull(result);
+ }
+
+ protected void setUp() {
+ deployer = new MailResourceDeployer();
+ ElementProperty prop1 = new ElementProperty();
+ prop1.setName("user");
+ prop1.setValue("admin");
+ ElementProperty prop2 = new ElementProperty();
+ prop2.setName("password");
+ prop2.setValue("adminadmin");
+ ElementProperty prop3 = new ElementProperty();
+ prop3.setName("status");
+ prop3.setValue("enabled");
+ testProps = new ElementProperty[] {prop1, prop2, prop3};
+ testNames = new String[] {"user","password","status"};
+ testValues = new String[] {"admin","adminadmin","enabled"};
+ }
+
+ protected void tearDown() {
+ }
+
+ public static junit.framework.Test suite() {
+ TestSuite suite = new TestSuite(GlobalResourceDeployerTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception {
+ final TestRunner runner= new TestRunner();
+ final TestResult result =
+ runner.doRun(GlobalResourceDeployerTest.suite(), false);
+ System.exit(result.errorCount() + result.failureCount());
+ }
+}
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
new file mode 100644
index 0000000..bae2dfd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/MailResourceDeployerTest.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * MailResourceDeployerTest.java
+ *
+ * Created on December 10, 2003, 11:55 AM
+ */
+
+package com.sun.enterprise.resource;
+
+import junit.framework.*;
+import junit.textui.TestRunner;
+import com.sun.enterprise.ManagementObjectManager;
+import com.sun.enterprise.Switch;
+import com.sun.enterprise.management.util.J2EEManagementObjectManager;
+import com.sun.enterprise.config.serverbeans.MailResource;
+import com.sun.enterprise.repository.IASJ2EEResourceFactoryImpl;
+import com.sun.enterprise.repository.J2EEResource;
+import java.util.logging.Logger;
+
+/**
+ * Unit test for MailResourceDeployer.
+ *
+ * @author Rob Ruyak
+ */
+public class MailResourceDeployerTest extends TestCase {
+
+ MailResourceDeployer deployer;
+ MailResource resource;
+
+ /** Creates a new instance of MailResourceDeployerTest */
+ public MailResourceDeployerTest(String name) {
+ super(name);
+ }
+
+ //TODO: Should ther be a unit test for null resources passed to the
+ //deploy method???
+
+ /**
+ * Tests the deployResource method.
+ *
+ public void testDeployResourceWithNull() {
+ try {
+ deployer.deployResource(null);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+ **/
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResource() {
+ try {
+ deployer.deployResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResourceWithNull() {
+ try {
+ //This should print the following log:
+ //INFO: CORE5005: Error in resource deploy.
+ deployer.deployResource(null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the deployResource method.
+ */
+ public void testDeployResourceNotEnabled() {
+ try {
+ //This should print the following log:
+ //INFO: CORE5039: Resource named [jndi-name]
+ //[Type: mail-resource] is disabled. It was not loaded.
+ resource.setEnabled(false);
+ deployer.deployResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+ }
+
+ /**
+ * Tests the method for installing a mail resource.
+ */
+ public void testInstallResource() {
+ try {
+ deployer.installResource(resource);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception caught -> " + e.getMessage());
+ }
+
+ }
+
+ protected void setUp() {
+ //initialize the dummy deployer object
+ deployer = new MailResourceDeployer () {
+ Switch getAppServerSwitchObject() {
+ return new Switch() {
+ public ManagementObjectManager getManagementObjectManager() {
+ return new J2EEManagementObjectManager() {
+ public void registerJavaMailResource(String name) {
+ System.out.println("Jsr77 Registration Complete...");
+ }
+ };
+ }
+ public ResourceInstaller getResourceInstaller() {
+ return new ResourceInstaller() {
+ public void installMailResource(
+ com.sun.enterprise.repository.MailResource
+ mailRes) {
+ System.out.println("Installed into Runtime...");
+ }
+ };
+ }
+ };
+ }
+ };
+
+ //initialize the dummy resource object
+ resource = new MailResource();
+ resource.setJndiName("javamail/Tester");
+ resource.setEnabled(true);
+ }
+
+ protected void tearDown() {
+ }
+
+ public static junit.framework.Test suite() {
+ TestSuite suite = new TestSuite(MailResourceDeployerTest.class);
+ return suite;
+ }
+
+ public static void main(String args[]) throws Exception {
+ final TestRunner runner= new TestRunner();
+ final TestResult result =
+ runner.doRun(MailResourceDeployerTest.suite(), false);
+ System.exit(result.errorCount() + result.failureCount());
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/README b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/README
new file mode 100644
index 0000000..4d93aac
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/README
@@ -0,0 +1,7 @@
+Instructions for running the devtests of selfmanagement
+
+1. asant all
+
+2. Test Results can be seen in the .output files.
+
+These tests are to be run only on Linux/Solaris.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml
new file mode 100644
index 0000000..77ec5c1
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./report.xml">
+]>
+
+<project name="selfmanagement" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <delete>
+ <fileset dir="/space/" includes="selfmanagementResult.txt"/>
+ </delete>
+ <delete>
+ <fileset dir="." includes="*.output"/>
+ </delete>
+ <record name="selfmanagement.output" action="start" />
+ <ant dir="tmonitor" target="all"/>
+ <ant dir="tlifecycle" target="all"/>
+ <ant dir="ttimer" target="all"/>
+ <ant dir="tnative" target="all"/>
+ <record name="selfmanagement.output" action="stop" />
+ <antcall target="report-sh"/>
+ <!--<delete>
+ <fileset dir="/space/" includes="selfmanagementResult.txt"/>
+ </delete>-->
+ </target>
+
+ <target name="usage">
+ <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
new file mode 100644
index 0000000..59131f0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/common.xml
@@ -0,0 +1,195 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!--
+ This is the common targets for all selfmanagement tests
+-->
+
+<!-- ================================================================ -->
+
+<!-- Setup and Restart the server instance-->
+<target name="norestart">
+ <echo message="The tests will not restart the server before running" />
+ <property name="no.restart" value="true"/>
+</target>
+
+<target name="pre-start" depends="printmessage">
+ <antcall target="restart-before-test"/>
+</target>
+
+<target name="restart-before-test" unless="no.restart.test">
+ <antcall target="restart-server-internal"/>
+</target>
+
+<target name="restart-server" depends="printmessage">
+ <antcall target="restart-server-internal"/>
+</target>
+
+<target name="restart-server-internal" unless="no.restart">
+ <antcall target="stopDomain"/>
+ <antcall target="startDomain"/>
+</target>
+
+<target name="printmessage" if="no.retstart">
+ <echo message="The test will be run without restarting the server"/>
+</target>
+
+<target name="startDomain" depends="startDomainUnix, startDomainWindows"/>
+
+<target name="startDomainUnix" depends="init-common" if="isUnix">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-domain"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="startDomainWindows" depends="init-common" if="isWindows">
+ <exec executable="start" failonerror="true">
+ <arg line="${ASADMIN}"/>
+ <arg line="start-domain"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--password ${admin.password}"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<target name="stopDomain" depends="init-common">
+ <echo message="run.xml:stopping domain..."/>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="stop-domain"/>
+ <arg line="--domaindir ${admin.domain.dir}"/>
+ <arg line="${admin.domain}"/>
+ </exec>
+</target>
+
+<!-- ================================================================ -->
+<!-- Target to create a Self Management Rule,after creating event and action mbeans -->
+<!-- ================================================================ -->
+
+<target name="deploy-selfmgmt-rule-common" depends="init-common">
+ <antcall target="create-event-mbean-common" />
+ <antcall target="create-action-mbean-common" />
+ <antcall target="create-management-rule-common" />
+</target>
+
+<target name="create-event-mbean-common" depends="init-common">
+<echo message="created Event MBean ${event.mbean.impl.class.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-mbean"/>
+ <arg line="${as.props}"/> <!-- To set user, password, host and port properties -->
+ <arg line="--name ${event.mbean.name}"/>
+ <arg line="${event.mbean.attribute}"/>
+ <arg line="${event.mbean.impl.class.name}"/>
+ </exec>
+</target>
+
+<target name="create-action-mbean-common" depends="init-common">
+<echo message="created Action MBean ${action.mbean.impl.class.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-mbean"/>
+ <arg line="${as.props}"/> <!-- To set user, password, host and port properties -->
+ <arg line="--name ${action.mbean.name}"/>
+ <arg line="${action.mbean.impl.class.name}"/>
+ </exec>
+</target>
+
+<target name="create-management-rule-common" depends="init-common">
+<echo message="created Self Management Rule ${selfmanagement.rule.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="create-management-rule"/>
+ <arg line="${as.props}"/> <!-- To set user, password, host and port properties -->
+ <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="${selfmanagement.rule.name}"/>
+ </exec>
+</target>
+
+<target name="undeploy-selfmgmt-rule-common" depends="init-common">
+ <antcall target="delete-event-mbean-common" />
+ <antcall target="delete-action-mbean-common" />
+</target>
+
+<target name="delete-management-rule-common" depends="init-common">
+<echo message="deleted Self Management Rule ${selfmanagement.rule.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-management-rule"/>
+ <arg line="${as.props}"/> <!-- To set user, password, host and port properties -->
+ <arg line="${selfmanagement.rule.name}"/>
+ </exec>
+</target>
+
+<target name="delete-event-mbean-common" depends="init-common">
+<echo message="deleted Event MBean ${event.mbean.name}"
+ level="verbose"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-mbean"/>
+ <arg line="${as.props}"/> <!-- To set user, password, host and port properties -->
+ <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"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="delete-mbean"/>
+ <arg line="${as.props}"/> <!-- To set user, password, host and port properties -->
+ <arg line="${action.mbean.name}"/>
+ </exec>
+</target>
+
+<target name="deploy-selfmgmt-jar-common" depends="init-common">
+ <copy file="${assemble.dir}/${appclient.jar.name}"
+ tofile="${app.lib}/${appclient.jar.name}"
+ overwrite="true" />
+ <copy file="${env.APS_HOME}/lib/reporter.jar"
+ tofile="${app.lib}/reporter.jar"
+ overwrite="true" />
+</target>
+
+<target name="delete-selfmanagement-jar" depends="init-common">
+ <delete file="${assemble.dir}/${appclient.jar.name}"/>
+ <delete file="${env.APS_HOME}/../../publish/glassfish/lib/${appclient.jar.name}"/>
+ <delete file="${app.lib}/reporter.jar"/>
+ <!--<delete file="/space/selfmanagementResult.txt"/>-->
+</target>
+
+<target name="run-selfmanagement-client-common" depends="init-common">
+ <echo message="appclient -client ${appclient.jar}"/>
+ <exec executable="${APPCLIENT}" failonerror="true">
+ <arg line="-client ${appclient.jar}"/>
+ <arg line="${as.props}"/>
+ </exec>
+
+<!-- confirming report generation... -->
+<!-- <antcall target="checkReporting-common">
+ <param name="test.name" value="${appname}"/>
+ <param name="test.description" value="${test.description}"/>
+ </antcall>-->
+</target>
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/report.xml
new file mode 100644
index 0000000..b228941
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/report.xml
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="report-sh">
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ </exec>
+</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/resultCount.sh b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/resultCount.sh
new file mode 100644
index 0000000..7034e79
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/resultCount.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v. 2.0, which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# This Source Code may also be made available under the following Secondary
+# Licenses when the conditions for such availability set forth in the
+# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+# version 2 with the GNU Classpath Exception, which is available at
+# https://www.gnu.org/software/classpath/license.html.
+#
+# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+#
+
+FILE=/space/selfmanagementResult.txt
+echo "input file=$FILE"
+
+TOTAL=12
+PASSED=`grep "PASSED" $FILE | wc -l`
+FAILED=`grep "FAILED" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+echo "Please see /space/selfmanagementResult.txt for details"
+
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
new file mode 100644
index 0000000..dd77b04
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReady.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tlifecycle.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 {
+ FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
+ if(notification != null) {
+ if(notification.getType().equals(JMX_LIFECYCLE_READY)) {
+ out.write("Lifecycle Ready Event - Test PASSED\n");
+ }
+ } else {
+ out.write("Lifecycle Ready Event - Test FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..b7bfeff
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReadyMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..d9531a2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdown.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tlifecycle.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 {
+ FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
+ if(notification != null) {
+ if(notification.getType().equals(JMX_LIFECYCLE_SHUTDOWN)) {
+ out.write("Lifecycle Shutdown Event - Test PASSED\n");
+ }
+ } else {
+ out.write("Lifecycle Shutdown Event - Test FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..6ba7281
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdownMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..923679c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTermination.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tlifecycle.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 {
+ FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
+ if(notification != null) {
+ if(notification.getType().equals(JMX_LIFECYCLE_TERMINATION)) {
+ out.write("Lifecycle Termination Event - Test PASSED\n");
+ }
+ } else {
+ out.write("Lifecycle Event - Test FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..33466c8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTerminationMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..3e17e0a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.properties
@@ -0,0 +1,50 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="tlifecycle"/>
+<property name="appname" value="${module}"/>
+<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="appclientjar.files" value="${build.classes.dir}"/>
+<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"/>
+<property name="app.lib" value="${env.APS_HOME}/../../publish/glassfish/lib/"/>
+
+<property name="action1.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tlifecycle.action.LifecycleReady"/>
+<property name="action1.mbean.name" value="LifecycleReadyActionBean"/>
+<property name="action2.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tlifecycle.action.LifecycleShutdown"/>
+<property name="action2.mbean.name" value="LifecycleShutdownActionBean"/>
+<property name="action3.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tlifecycle.action.LifecycleTermination"/>
+<property name="action3.mbean.name" value="LifecycleTerminationActionBean"/>
+
+<property name="selfmanagement.rule.eventtype" value="lifecycle"/>
+<property name="selfmanagement.rule.eventloglevel" value="INFO"/>
+<property name="selfmanagement.rule1.eventproperties" value="name=ready"/>
+<property name="selfmanagement.rule2.eventproperties" value="name=shutdown"/>
+<property name="selfmanagement.rule3.eventproperties" value="name=termination"/>
+
+<property name="selfmanagement.rule1.name" value="LifecycleRule1"/>
+<property name="selfmanagement.rule2.name" value="LifecycleRule2"/>
+<property name="selfmanagement.rule3.name" value="LifecycleRule3"/>
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
new file mode 100644
index 0000000..01ac8b5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY commonSelfMgmt SYSTEM "file:./../common.xml">
+]>
+
+<project name="lifecycle" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &commonSelfMgmt;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+ <target name="run-test" depends="build,deploy,run,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="clean">
+ <antcall target="compile-common">
+ <param name="src" value="action"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes" value="**/Lifecycle*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-selfmgmt-jar-common">
+ </antcall>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="create-action-mbean-common">
+ <param name="action.mbean.name" value="${action1.mbean.name}"/>
+ <param name="action.mbean.impl.class.name" value="${action1.mbean.impl.class.name}"/>
+ </antcall>
+ <antcall target="create-action-mbean-common">
+ <param name="action.mbean.name" value="${action2.mbean.name}"/>
+ <param name="action.mbean.impl.class.name" value="${action2.mbean.impl.class.name}"/>
+ </antcall>
+ <antcall target="create-action-mbean-common">
+ <param name="action.mbean.name" value="${action3.mbean.name}"/>
+ <param name="action.mbean.impl.class.name" value="${action3.mbean.impl.class.name}"/>
+ </antcall>
+ <antcall target="create-management-rule-common">
+ <param name="action.mbean.name" value="${action1.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule1.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="create-management-rule-common">
+ <param name="action.mbean.name" value="${action2.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule2.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule2.name}"/>
+ </antcall>
+ <antcall target="create-management-rule-common">
+ <param name="action.mbean.name" value="${action3.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule3.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule3.name}"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="startDomain"/>
+ <antcall target="setup"/>
+ <antcall target="restart-server"/>
+ <sleep seconds="40"/>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="stopDomain"/>
+ <sleep seconds="40"/>
+ <antcall target="startDomain"/>
+ </target>
+
+ <target name="unsetup" depends="init-common">
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule2.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule3.name}"/>
+ </antcall>
+ <antcall target="restart-server"/>
+ <antcall target="delete-action-mbean-common">
+ <param name="action.mbean.name" value="${action1.mbean.name}"/>
+ </antcall>
+ <antcall target="delete-action-mbean-common">
+ <param name="action.mbean.name" value="${action2.mbean.name}"/>
+ </antcall>
+ <antcall target="delete-action-mbean-common">
+ <param name="action.mbean.name" value="${action3.mbean.name}"/>
+ </antcall>
+ <antcall target="delete-selfmanagement-jar"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="unsetup"/>
+ <antcall target="stopDomain"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/client/MANIFEST.MF
new file mode 100644
index 0000000..7ee9819
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/application-client.xml
new file mode 100644
index 0000000..7e79ffd
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>tlifecycle</display-name>
+ <ejb-ref>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/application.xml
new file mode 100644
index 0000000..e186ad5
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/application.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>test life cycle event</description>
+ <display-name>tlifecycle</display-name>
+ <module>
+ <java>tlifecycle-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..5c93ae9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/sun-application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
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
new file mode 100644
index 0000000..b255d6e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHigh.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.action;
+
+import javax.management.*;
+import java.io.*;
+
+public class GaugeHigh implements NotificationListener, com.sun.s1peqe.selfmanagement.tmonitor.action.GaugeHighMBean {
+ private final String JMX_MONITOR_GAUGE_HIGH = "jmx.monitor.gauge.high";
+ public GaugeHigh() {
+ }
+
+ 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_HIGH)) {
+ out.write("Gauge Monitor Test - High - PASSED\n");
+ }
+ } else {
+ out.write("Gauge Monitor Test - High - FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..b9dd217
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHighMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..e787d4d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLow.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 {
+ FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
+ if(notification != null) {
+ if(notification.getType().equals(JMX_MONITOR_GAUGE_LOW)) {
+ out.write("Gauge Monitor Test - Low - PASSED\n");
+ }
+ } else {
+ out.write("Gauge Monitor Test - Low - FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..487e123
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLowMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..4ec16f4
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/Hello.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 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)) {
+ 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.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
new file mode 100644
index 0000000..0a2d901
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/HelloMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..8bb735c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDiffer.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.action;
+
+import javax.management.*;
+import java.io.*;
+
+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() {
+ }
+ 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_STRING_DIFFERS)) {
+ out.write("String Monitor Test - Differs - PASSED\n");
+ }
+ } else {
+ out.write("String Monitor Test - Differs - FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..5eae75a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDifferMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..842a47c
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatch.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.action;
+
+import javax.management.*;
+import java.io.*;
+
+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() {
+ }
+ 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_STRING_MATCHES)) {
+ out.write("String Monitor Test - Matches - PASSED\n");
+ }
+ } else {
+ out.write("String Monitor Test - Matches - FAILED\n");
+ }
+ out.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
+
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
new file mode 100644
index 0000000..caa5f2f
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatchMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..7e72e40
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.properties
@@ -0,0 +1,88 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="tmonitor"/>
+<property name="appname" value="${module}"/>
+<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"/>
+<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="appclient.jar" value="${assemble}/${module}-client.jar"/>
+<property name="appclient.jar.name" value="${module}-client.jar"/>
+<property name="app.type" value="application"/>
+<property name="app.lib" value="${env.APS_HOME}/../../publish/glassfish/lib/"/>
+
+<property name="counter.event.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.event.Hello"/>
+<property name="counter.event.mbean.name" value="CounterEventBean"/>
+<property name="counter.action.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.action.Hello"/>
+<property name="counter.action.mbean.name" value="CounterActionBean"/>
+<property name="gauge.event1.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.event.GaugeHigh"/>
+<property name="gauge.event1.mbean.name" value="GaugeHighEventBean"/>
+<property name="gauge.action1.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.action.GaugeHigh"/>
+<property name="gauge.action1.mbean.name" value="GaugeHighActionBean"/>
+<property name="gauge.event2.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.event.GaugeLow"/>
+<property name="gauge.event2.mbean.name" value="GaugeLowEventBean"/>
+<property name="gauge.action2.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.action.GaugeLow"/>
+<property name="gauge.action2.mbean.name" value="GaugeLowActionBean"/>
+<property name="string.event1.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.event.StringMatch"/>
+<property name="string.event1.mbean.name" value="StringMatchEventBean"/>
+<property name="string.action1.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.action.StringMatch"/>
+<property name="string.action1.mbean.name" value="StringMatchActionBean"/>
+<property name="string.event2.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.event.StringDiffer"/>
+<property name="string.event2.mbean.name" value="StringDifferEventBean"/>
+<property name="string.action2.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tmonitor.action.StringDiffer"/>
+<property name="string.action2.mbean.name" value="StringDifferActionBean"/>
+
+<property name="selfmanagement.rule.eventtype" value="monitor"/>
+<property name="selfmanagement.rule.eventloglevel" value="INFO"/>
+
+<property name="selfmanagement.rule.monitor.type.counter" value="countermonitor"/>
+<property name="selfmanagement.rule.monitor.type.gauge" value="gaugemonitor"/>
+<property name="selfmanagement.rule.monitor.type.string" value="stringmonitor"/>
+
+<property name="selfmanagement.rule.monitor.initthreshold.counter" value="5"/>
+<property name="selfmanagement.rule.monitor.numbertype.counter" value="long"/>
+<property name="selfmanagement.rule.monitor.lowthreshold.gauge" value="2"/>
+<property name="selfmanagement.rule.monitor.highthreshold.gauge" value="3"/>
+<property name="selfmanagement.rule.monitor.numbertype.gauge" value="double"/>
+<property name="selfmanagement.rule.monitor.stringtocompare.string" value="sublimation"/>
+<property name="selfmanagement.rule1.monitor.stringnotify.string" value="notifymatch"/>
+<property name="selfmanagement.rule2.monitor.stringnotify.string" value="notifydiffer"/>
+
+<property name="selfmanagement.rule.monitor.observedattribute" value="Value"/>
+
+<property name="selfmanagement.rule1.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.counter}:initthreshold=${selfmanagement.rule.monitor.initthreshold.counter}:numbertype=${selfmanagement.rule.monitor.numbertype.counter}:observedobject=user\:impl\-class\-name\=${counter.event.mbean.impl.class.name}\,name\=${counter.event.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute}"/>
+
+<property name="selfmanagement.rule2.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.gauge}:lowthreshold=${selfmanagement.rule.monitor.lowthreshold.gauge}:highthreshold=${selfmanagement.rule.monitor.highthreshold.gauge}:numbertype=${selfmanagement.rule.monitor.numbertype.gauge}:observedobject=user\:impl\-class\-name\=${gauge.event1.mbean.impl.class.name}\,name\=${gauge.event1.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute}"/>
+
+<property name="selfmanagement.rule3.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.gauge}:lowthreshold=${selfmanagement.rule.monitor.lowthreshold.gauge}:highthreshold=${selfmanagement.rule.monitor.highthreshold.gauge}:numbertype=${selfmanagement.rule.monitor.numbertype.gauge}:observedobject=user\:impl\-class\-name\=${gauge.event2.mbean.impl.class.name}\,name\=${gauge.event2.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute}"/>
+
+<property name="selfmanagement.rule4.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.string}:stringtocompare=${selfmanagement.rule.monitor.stringtocompare.string}:stringnotify=${selfmanagement.rule1.monitor.stringnotify.string}:observedobject=user\:impl\-class\-name\=${string.event1.mbean.impl.class.name}\,name\=${string.event1.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute}"/>
+
+<property name="selfmanagement.rule5.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.string}:stringtocompare=${selfmanagement.rule.monitor.stringtocompare.string}:stringnotify=${selfmanagement.rule2.monitor.stringnotify.string}:observedobject=user\:impl\-class\-name\=${string.event2.mbean.impl.class.name}\,name\=${string.event2.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute}"/>
+
+<property name="selfmanagement.rule1.name" value="CounterRule"/>
+<property name="selfmanagement.rule2.name" value="GaugeHighRule"/>
+<property name="selfmanagement.rule3.name" value="GaugeLowRule"/>
+<property name="selfmanagement.rule4.name" value="StringMatchRule"/>
+<property name="selfmanagement.rule5.name" value="StringDifferRule"/>
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
new file mode 100644
index 0000000..44b3c1b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY commonSelfMgmt SYSTEM "file:./../common.xml">
+]>
+
+<project name="countmonitor" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &commonSelfMgmt;
+
+ <target name="all" depends="run-test"/>
+ <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="clean">
+ <antcall target="compile-common">
+ <param name="src" value="event"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="action"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes" value="**/*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-selfmgmt-jar-common">
+ </antcall>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${counter.event.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${counter.event.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${counter.action.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${counter.action.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule1.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${gauge.event1.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${gauge.event1.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${gauge.action1.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${gauge.action1.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule2.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule2.name}"/>
+ </antcall>
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${gauge.event2.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${gauge.event2.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${gauge.action2.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${gauge.action2.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule3.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule3.name}"/>
+ </antcall>
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${string.event1.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${string.event1.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${string.action1.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${string.action1.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule4.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule4.name}"/>
+ </antcall>
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${string.event2.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${string.event2.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${string.action2.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${string.action2.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule5.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule5.name}"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="startDomain"/>
+ <antcall target="setup"/>
+ <antcall target="restart-server"/>
+ <sleep seconds="40"/>
+ </target>
+
+ <target name="unsetup" depends="init-common">
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule2.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule3.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule4.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule5.name}"/>
+ </antcall>
+ <antcall target="restart-server"/>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${counter.event.mbean.name}"/>
+ <param name="action.mbean.name" value="${counter.action.mbean.name}"/>
+ </antcall>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${gauge.event1.mbean.name}"/>
+ <param name="action.mbean.name" value="${gauge.action1.mbean.name}"/>
+ </antcall>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${gauge.event2.mbean.name}"/>
+ <param name="action.mbean.name" value="${gauge.action2.mbean.name}"/>
+ </antcall>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${string.event1.mbean.name}"/>
+ <param name="action.mbean.name" value="${string.action1.mbean.name}"/>
+ </antcall>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${string.event2.mbean.name}"/>
+ <param name="action.mbean.name" value="${string.action2.mbean.name}"/>
+ </antcall>
+
+ <antcall target="delete-selfmanagement-jar"/>
+ <antcall target="stopDomain"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="unsetup"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/client/MANIFEST.MF
new file mode 100644
index 0000000..7ee9819
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/application-client.xml
new file mode 100644
index 0000000..c4c4ca0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>tmonitor</display-name>
+ <ejb-ref>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/application.xml
new file mode 100644
index 0000000..897f7f2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/application.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>test monitor events</description>
+ <display-name>tmonitor</display-name>
+ <module>
+ <java>tmonitor-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..5c93ae9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/sun-application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
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
new file mode 100644
index 0000000..15a0c73
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHigh.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..4455da8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHighMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..04c38d6
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLow.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..c5cb375
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLowMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..bce9b25
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/Hello.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.event;
+
+public class Hello implements com.sun.s1peqe.selfmanagement.tmonitor.event.HelloMBean {
+
+ public Hello() {}
+
+ public long getValue() {
+
+ return this.value;
+ }
+
+ private long value = 10;
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/HelloMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/HelloMBean.java
new file mode 100644
index 0000000..8518e44
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/HelloMBean.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tmonitor.event;
+
+public interface HelloMBean {
+
+ public long getValue();
+}
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
new file mode 100644
index 0000000..fc79cd2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDiffer.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..e41c116
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDifferMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..061fb03
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatch.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..d4f68a8
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatchMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..35fde5b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtil.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tnative.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 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) ||
+ 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.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
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
new file mode 100644
index 0000000..13c7d7b
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtilMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..e6a4bfc
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpace.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tnative.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 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)) {
+ 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.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
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
new file mode 100644
index 0000000..5409aa2
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpaceMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..a19277d
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtil.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.tnative.action;
+
+import javax.management.*;
+import java.io.*;
+
+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 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)) {
+ 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.flush();
+ out.close();
+ } catch (Exception ex) { }
+ }
+}
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
new file mode 100644
index 0000000..6184730
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtilMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..97d6b1a
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.properties
@@ -0,0 +1,76 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="tnative"/>
+<property name="appname" value="${module}"/>
+<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"/>
+<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="appclient.jar" value="${assemble}/${module}-client.jar"/>
+<property name="appclient.jar.name" value="${module}-client.jar"/>
+<property name="app.type" value="application"/>
+<property name="app.lib" value="${env.APS_HOME}/../../publish/glassfish/lib/"/>
+
+<property name="disk.event.mbean.impl.class.name" value="com.sun.enterprise.ee.selfmanagement.mbeans.DiskToolkit"/>
+<property name="disk.event.mbean.name" value="DiskEventBean"/>
+<property name="disk.event.mbean.attribute.name" value="PartitionSpace"/>
+<property name="disk.event.mbean.attribute.value" value="\/root"/>
+<property name="disk.action.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tnative.action.DiskSpace"/>
+<property name="disk.action.mbean.name" value="CustomDiskActionBean"/>
+<property name="memory.event.mbean.impl.class.name" value="com.sun.enterprise.ee.selfmanagement.mbeans.Memory"/>
+<property name="memory.event.mbean.name" value="MemoryEventBean"/>
+<property name="memory.action.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tnative.action.MemoryUtil"/>
+<property name="memory.action.mbean.name" value="CustomMemoryActionBean"/>
+<property name="cpu.event.mbean.impl.class.name" value="com.sun.enterprise.ee.selfmanagement.mbeans.CPU"/>
+<property name="cpu.event.mbean.name" value="CPUEventBean"/>
+<property name="cpu.action.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.tnative.action.CpuUtil"/>
+<property name="cpu.action.mbean.name" value="CustomCpuActionBean"/>
+
+
+<property name="selfmanagement.rule.eventtype" value="monitor"/>
+<property name="selfmanagement.rule.eventloglevel" value="INFO"/>
+
+<property name="selfmanagement.rule.monitor.type.counter" value="countermonitor"/>
+<property name="selfmanagement.rule.monitor.type.gauge" value="gaugemonitor"/>
+
+<property name="selfmanagement.rule.monitor.initthreshold.counter" value="0"/>
+<property name="selfmanagement.rule.monitor.numbertype.counter" value="long"/>
+
+<property name="selfmanagement.rule.monitor.highthreshold.gauge" value="1"/>
+<property name="selfmanagement.rule.monitor.lowthreshold.gauge" value="0"/>
+<property name="selfmanagement.rule.monitor.numbertype.gauge" value="double"/>
+
+<property name="selfmanagement.rule.monitor.observedattribute.disk" value="DiskFree"/>
+<property name="selfmanagement.rule.monitor.observedattribute.memory" value="FreeMemory"/>
+<property name="selfmanagement.rule.monitor.observedattribute.cpu" value="CpuUtilization"/>
+
+<property name="selfmanagement.rule1.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.counter}:initthreshold=${selfmanagement.rule.monitor.initthreshold.counter}:numbertype=${selfmanagement.rule.monitor.numbertype.counter}:observedobject=user\:impl\-class\-name\=${disk.event.mbean.impl.class.name}\,name\=${disk.event.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute.disk}"/>
+
+<property name="selfmanagement.rule2.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.counter}:initthreshold=${selfmanagement.rule.monitor.initthreshold.counter}:numbertype=${selfmanagement.rule.monitor.numbertype.counter}:observedobject=user\:impl\-class\-name\=${memory.event.mbean.impl.class.name}\,name\=${memory.event.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute.memory}"/>
+
+<property name="selfmanagement.rule3.eventproperties" value="monitortype=${selfmanagement.rule.monitor.type.gauge}:lowthreshold=${selfmanagement.rule.monitor.lowthreshold.gauge}:highthreshold=${selfmanagement.rule.monitor.highthreshold.gauge}:numbertype=${selfmanagement.rule.monitor.numbertype.gauge}:observedobject=user\:impl\-class\-name\=${cpu.event.mbean.impl.class.name}\,name\=${cpu.event.mbean.name}\,server\=server:observedattribute=${selfmanagement.rule.monitor.observedattribute.cpu}"/>
+
+<property name="selfmanagement.rule1.name" value="DiskRule"/>
+<property name="selfmanagement.rule2.name" value="MemoryUtilRule"/>
+<property name="selfmanagement.rule3.name" value="CpuUtilRule"/>
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
new file mode 100644
index 0000000..391fd87
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY commonSelfMgmt SYSTEM "file:./../common.xml">
+]>
+
+<project name="native" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &commonSelfMgmt;
+
+ <target name="all" depends="run-test"/>
+ <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="clean">
+ <antcall target="compile-common">
+ <param name="src" value="action"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes" value="**/*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-selfmgmt-jar-common">
+ </antcall>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${disk.event.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${disk.event.mbean.name}"/>
+ <param name="event.mbean.attribute" value="--attributes ${disk.event.mbean.attribute.name}=${disk.event.mbean.attribute.value}"/>
+ <param name="action.mbean.impl.class.name" value="${disk.action.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${disk.action.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule1.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${memory.event.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${memory.event.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${memory.action.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${memory.action.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule2.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule2.name}"/>
+ </antcall>
+ <antcall target="deploy-selfmgmt-rule-common">
+ <param name="event.mbean.impl.class.name" value="${cpu.event.mbean.impl.class.name}"/>
+ <param name="event.mbean.name" value="${cpu.event.mbean.name}"/>
+ <param name="event.mbean.attribute" value=""/>
+ <param name="action.mbean.impl.class.name" value="${cpu.action.mbean.impl.class.name}"/>
+ <param name="action.mbean.name" value="${cpu.action.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule3.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule3.name}"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="startDomain"/>
+ <antcall target="setup"/>
+ <antcall target="restart-server"/>
+ <sleep seconds="40"/>
+ </target>
+
+ <target name="unsetup" depends="init-common">
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule2.name}"/>
+ </antcall>
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule3.name}"/>
+ </antcall>
+ <antcall target="restart-server"/>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${disk.event.mbean.name}"/>
+ <param name="action.mbean.name" value="${disk.action.mbean.name}"/>
+ </antcall>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${memory.event.mbean.name}"/>
+ <param name="action.mbean.name" value="${memory.action.mbean.name}"/>
+ </antcall>
+ <antcall target="undeploy-selfmgmt-rule-common">
+ <param name="event.mbean.name" value="${cpu.event.mbean.name}"/>
+ <param name="action.mbean.name" value="${cpu.action.mbean.name}"/>
+ </antcall>
+ <antcall target="delete-selfmanagement-jar"/>
+ <antcall target="stopDomain"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="unsetup"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/client/MANIFEST.MF
new file mode 100644
index 0000000..7ee9819
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/application-client.xml
new file mode 100644
index 0000000..f88b8f7
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>tnative</display-name>
+ <ejb-ref>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/application.xml
new file mode 100644
index 0000000..8fa3c31
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/application.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>test cpu, disk and memory events</description>
+ <display-name>tnative</display-name>
+ <module>
+ <java>tnative-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..5c93ae9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/sun-application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
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
new file mode 100644
index 0000000..cc8e773
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrence.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package com.sun.s1peqe.selfmanagement.ttimer.action;
+
+import javax.management.*;
+import java.io.*;
+import java.util.Timer;
+import java.util.TimerTask;
+
+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(){
+ new NotifThread(this, TIMER_NO_OF_OCCURRENCES).start();
+ }
+ public int getNumberOfOccurrences() {
+ return this.incOccurrences;
+ }
+
+ public synchronized void handleNotification(Notification notification,
+ Object handback) {
+ try {
+ if(notification != null) {
+ if(notification.getType().equals(JMX_TIMER)) {
+ incOccurrences++;
+ }
+ }
+ } catch (Exception ex) { }
+ }
+}
+
+class NotifThread extends Thread {
+ private int expectedOccurrences;
+ private TimerOccurrence timerMBean;
+ NotifThread(TimerOccurrence t, int n) {
+ this.expectedOccurrences = n;
+ this.timerMBean = t;
+ }
+
+ public void run() {
+ try {
+ System.out.println("Now going to sleep for 40 secs...");
+ sleep(60000);
+ FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
+ if(timerMBean.getNumberOfOccurrences() != expectedOccurrences) {
+ out.write("Timer Event - Test FAILED\n");
+ } else {
+ out.write("Timer Event - Test PASSED\n");
+ }
+ out.flush();
+ out.close();
+ } catch(InterruptedException ex) {
+ } catch(Exception ex) {}
+
+ }
+
+}
+
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
new file mode 100644
index 0000000..f976601
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrenceMBean.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+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
new file mode 100644
index 0000000..3cd0c0e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.properties
@@ -0,0 +1,48 @@
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+
+<property name="module" value="ttimer"/>
+<property name="appname" value="${module}"/>
+<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="appclientjar.files" value="${build.classes.dir}"/>
+<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"/>
+<property name="app.lib" value="${env.APS_HOME}/../../publish/glassfish/lib/"/>
+
+<property name="action1.mbean.impl.class.name" value="com.sun.s1peqe.selfmanagement.ttimer.action.TimerOccurrence"/>
+<property name="action1.mbean.name" value="TimerOccurrenceActionBean"/>
+<property name="selfmanagement.rule.eventtype" value="timer"/>
+<property name="selfmanagement.rule.eventloglevel" value="INFO"/>
+
+<property name="selfmanagement.timer.pattern" value="MM\/dd\/yyyy\/HH\:mm\:ss"/>
+<property name="selfmanagement.timer.datestring" value="10\/11\/2005\/10\:50\:00"/>
+<property name="selfmanagement.timer.period" value="3000"/>
+<property name="selfmanagement.timer.numberofoccurrences" value="3"/>
+<property name="selfmanagement.timer.message" value="TimerInvoked\!\!\!"/>
+
+<property name="selfmanagement.rule1.eventproperties" value="pattern=${selfmanagement.timer.pattern}:datestring=${selfmanagement.timer.datestring}:period=${selfmanagement.timer.period}:numberofoccurrences=${selfmanagement.timer.numberofoccurrences}:message=${selfmanagement.timer.message}"/>
+
+<property name="selfmanagement.rule1.name" value="TimerOccurrenceRule"/>
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
new file mode 100644
index 0000000..f3cf812
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project [
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+<!ENTITY commonSelfMgmt SYSTEM "file:./../common.xml">
+]>
+
+<project name="timer" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &commonSelfMgmt;
+
+ <target name="all" depends="run-test"/>
+ <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="clean">
+ <antcall target="compile-common">
+ <param name="src" value="action"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="compile">
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes" value="**/*.class" />
+ </antcall>
+ </target>
+
+ <target name="deploy" depends="init-common">
+ <antcall target="deploy-selfmgmt-jar-common"/>
+ </target>
+
+ <target name="setup" depends="init-common">
+ <antcall target="create-action-mbean-common">
+ <param name="action.mbean.name" value="${action1.mbean.name}"/>
+ <param name="action.mbean.impl.class.name" value="${action1.mbean.impl.class.name}"/>
+ </antcall>
+ <antcall target="create-management-rule-common">
+ <param name="action.mbean.name" value="${action1.mbean.name}"/>
+ <param name="selfmanagement.rule.eventproperties" value="${selfmanagement.rule1.eventproperties}"/>
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="startDomain"/>
+ <antcall target="setup"/>
+ <antcall target="restart-server"/>
+ <sleep seconds="80"/>
+ </target>
+
+ <target name="unsetup" depends="init-common">
+ <antcall target="delete-management-rule-common">
+ <param name="selfmanagement.rule.name" value="${selfmanagement.rule1.name}"/>
+ </antcall>
+ <antcall target="restart-server"/>
+ <antcall target="delete-action-mbean-common">
+ <param name="action.mbean.name" value="${action1.mbean.name}"/>
+ </antcall>
+ <antcall target="delete-selfmanagement-jar"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="unsetup"/>
+ <antcall target="stopDomain"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/client/MANIFEST.MF b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/client/MANIFEST.MF
new file mode 100644
index 0000000..4e9f349
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant 1.5.1
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/application-client.xml
new file mode 100644
index 0000000..7374a59
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/application-client.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<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>ttimer</display-name>
+</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/application.xml
new file mode 100644
index 0000000..208f7b0
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/application.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<application 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_1_4.xsd">
+ <description>Test Timer Application</description>
+ <display-name>ttimer</display-name>
+ <module>
+ <java>ttimer-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..5c93ae9
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/sun-application-client.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/sun-application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/sun-application.xml
new file mode 100644
index 0000000..a956f32
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/descriptor/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+
+<sun-application/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/tools/README b/appserver/tests/v2-tests/appserv-tests/devtests/tools/README
new file mode 100644
index 0000000..8c1e22e
--- /dev/null
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/tools/README
@@ -0,0 +1 @@
+unit tests for tools (e.g. verifier, deploytool)