[jboss-cvs] JBossAS SVN: r62385 - in tags: EMBEDDED_JBOSS_BETA_2/embedded and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 17 20:11:16 EDT 2007


Author: bill.burke at jboss.com
Date: 2007-04-17 20:11:16 -0400 (Tue, 17 Apr 2007)
New Revision: 62385

Added:
   tags/EMBEDDED_JBOSS_BETA_2/
   tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml
   tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html
   tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/roles.properties
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/users.properties
Removed:
   tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml
   tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html
   tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties
   tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java
Log:


Copied: tags/EMBEDDED_JBOSS_BETA_2 (from rev 62375, trunk)

Deleted: tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml
===================================================================
--- trunk/embedded/build-test.xml	2007-04-16 21:47:26 UTC (rev 62375)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml	2007-04-18 00:11:16 UTC (rev 62385)
@@ -1,315 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-        <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
-        <!ENTITY modules SYSTEM "../tools/etc/buildmagic/modules.ent">
-        ]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id: build.xml 57108 2006-09-23 20:55:54Z scott.stark at jboss.org $ -->
-
-<project default="main" name="JBoss/EJB3X">
-   <import file="../tools/etc/buildmagic/build-common.xml"/>
-
-   <target name="init">
-
-
-      <!-- =================== -->
-      <!-- Basic Configuration -->
-      <!-- =================== -->
-
-      <!-- ========= -->
-      <!-- Libraries -->
-      <!-- ========= -->
-
-      &libraries;
-
-
-      <!-- The combined library classpath -->
-      <path id="library.classpath">
-         <path refid="junit.junit.classpath"/>
-         <path refid="jboss.test.classpath"/>
-      </path>
-
-      <!-- ======= -->
-      <!-- Modules -->
-      <!-- ======= -->
-
-      &modules;
-
-      <!-- The combined dependent module classpath -->
-      <path id="dependentmodule.classpath">
-         <pathelement location="output/lib/embedded-jboss/bootstrap"/>
-         <fileset dir="output/lib/embedded-jboss/lib">
-            <include name="*.jar"/>
-         </fileset>
-      </path>
-
-      <!-- ===== -->
-      <!-- Tasks -->
-      <!-- ===== -->
-
-      <!-- Where source files live -->
-      <property name="source.java" value="src/test/java"/>
-      <property name="source.stylesheets" value="../testsuite/src/stylesheets"/>
-      <property name="resources" value="src/test/resources"/>
-
-      <!-- Where build generated files will go -->
-      <property name="build.reports" value="output/reports"/>
-      <property name="build.testlog" value="output/log"/>
-      <property name="build.classes" value="output/test-classes"/>
-      <property name="build.lib" value="output/test-lib"/>
-      <property name="build.stylesheets" value="output/stylesheets"/>
-
-
-      <!-- The combined thirdparty classpath -->
-      <path id="thirdparty.classpath">
-         <path refid="library.classpath"/>
-         <path refid="dependentmodule.classpath"/>
-      </path>
-
-      <!-- classpath and local.classpath must have a value using with a path -->
-      <property name="classpath" value=""/>
-      <property name="local.classpath" value=""/>
-
-      <!-- The classpath required to build classes. -->
-      <path id="javac.classpath">
-         <pathelement path="${classpath}"/>
-         <pathelement path="${local.classpath}"/>
-         <path refid="thirdparty.classpath"/>
-      </path>
-
-      <!-- The classpath required to build javadocs. -->
-      <path id="javadoc.classpath">
-         <path refid="javac.classpath"/>
-      </path>
-
-      <!-- Packages to include when generating api documentation -->
-      <property name="javadoc.packages" value="javax.*"/>
-
-      <!-- Override JUnit defaults -->
-      <property name="junit.timeout" value="240000"/>
-      <!-- 4 minutes -->
-      <property name="junit.batchtest.todir" value="${build.reports}"/>
-      <property name="junit.jvm.options" value="-Ddummy"/>
-      <!-- ======================================================== -->
-      <!-- Initialization                                           -->
-      <!-- ======================================================== -->
-      <tstamp>
-         <format property="TIMENOW" pattern="yyyy-MM-dd.HH-mm" timezone="GMT"/>
-      </tstamp>
-   </target>
-
-
-   <!-- ================================================================== -->
-   <!-- Compile                                                            -->
-   <!-- ================================================================== -->
-
-   <!--
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-   <target name="compile"
-           description="Compile all source files."
-           depends="compile-classes"/>
-
-   <!-- Compile all class files -->
-   <target name="compile-classes" depends="init">
-      <mkdir dir="${build.classes}"/>
-      <javac destdir="${build.classes}"
-             optimize="${javac.optimize}"
-             source="1.5"
-             debug="${javac.debug}"
-             depend="${javac.depend}"
-             verbose="${javac.verbose}"
-             deprecation="${javac.deprecation}"
-             includeAntRuntime="${javac.include.ant.runtime}"
-             includeJavaRuntime="${javac.include.java.runtime}"
-             failonerror="${javac.fail.onerror}">
-         <src path="${source.java}"/>
-         <classpath refid="javac.classpath"/>
-      </javac>
-   </target>
-
-   <target name="compile-stylesheets">
-      <mkdir dir="${build.stylesheets}"/>
-      <copy todir="${build.stylesheets}" filtering="yes">
-         <fileset dir="${source.stylesheets}">
-            <include name="**/*"/>
-         </fileset>
-      </copy>
-   </target>
-
-
-   <target name="jars" depends="compile">
-      <mkdir dir="${build.lib}"/>
-      <jar jarfile="${build.lib}/bootstrap-test.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/embedded/test/bootstrap/**/*.class"/>
-            <include name="org/jboss/embedded/test/jndibootstrap/**/*.class"/>
-         </fileset>
-      </jar>
-      <jar jarfile="${build.lib}/ejb-test.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/embedded/test/ejb/**/*.class"/>
-         </fileset>
-         <fileset dir="${resources}/ejb">
-            <include name="META-INF/persistence.xml"/>
-         </fileset>
-      </jar>
-      <jar jarfile="${build.lib}/mdb-test.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/embedded/test/mdb/**/*.class"/>
-         </fileset>
-         <fileset dir="${resources}/mdb">
-            <include name="mdbtest-service.xml"/>
-         </fileset>
-      </jar>
-      <jar jarfile="${build.lib}/remote-test.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/embedded/test/remote/**/*.class"/>
-         </fileset>
-      </jar>
-      <war warfile="${build.lib}/war-scan.war"
-         webxml="${resources}/war-scan/web.xml">
-         <lib dir="${build.lib}">
-            <include name="ejb-test.jar"/>
-         </lib>
-         <fileset dir="${source.java}/org/jboss/embedded/test/ejb/unit">
-            <include name="EjbTestCase.jsp"/>
-         </fileset>
-      </war>
-      <war warfile="${build.lib}/war-resource.war"
-         webxml="${resources}/war-resource/web.xml">
-         <lib dir="${build.lib}">
-            <include name="ejb-test.jar"/>
-         </lib>
-         <fileset dir="${source.java}/org/jboss/embedded/test/ejb/unit">
-            <include name="EjbTestCase.jsp"/>
-         </fileset>
-      </war>
-      <war warfile="${build.lib}/war-security.war"
-         webxml="${resources}/war-security/WEB-INF/web.xml">
-         <fileset dir="${resources}/war-security">
-            <include name="*.html"/>
-            <include name="*.jsp"/>
-         </fileset>
-      </war>
-
-
-   </target>
-
-   <target name="main"
-      description="Executes the default target (most)."
-      depends="jars"/>
-
-
-
-   <target name="test" depends="init" if="test"
-      description="Execute all tests in the given test directory.">
-      <mkdir dir="${build.reports}"/>
-      <mkdir dir="${build.testlog}"/>
-      <!-- Remove the test.log so each run has a fresh log -->
-      <delete file="${build.testlog}/test.log"/>
-      <path id="test.classpath">
-         <fileset dir="${build.lib}">
-            <include name="*.jar"/>
-         </fileset>
-         <path refid="thirdparty.classpath"/>
-      </path>
-      <junit dir="${module.output}"
-         printsummary="yes"
-         haltonerror="false"
-         haltonfailure="false"
-         fork="true">
-
-         <sysproperty key="jbosstest.deploy.dir" value="test-lib"/>
-         <sysproperty key="build.testlog" value="${build.testlog}"/>
-         <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
-         <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
-         <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
-
-         <classpath>
-            <path refid="test.classpath"/>
-         </classpath>
-
-         <formatter type="plain" usefile="true"/>
-         <formatter type="xml" usefile="true"/>
-
-         <batchtest todir="${build.reports}"
-            haltonerror="false"
-            haltonfailure="false"
-            fork="true">
-
-            <fileset dir="${build.classes}">
-               <include name="org/jboss/embedded/test/${test}/unit/*TestCase.class"/>
-            </fileset>
-         </batchtest>
-      </junit>
-   </target>
-
-
-
-   <target name="tests-report-html" depends="compile-stylesheets">
-      <mkdir dir="${build.reports}/html"/>
-
-      <junitreport todir="${build.reports}">
-         <fileset dir="${build.reports}">
-            <include name="TEST-*.xml"/>
-         </fileset>
-         <report format="frames"
-            todir="${build.reports}/html"
-            styledir="${build.stylesheets}"
-            />
-      </junitreport>
-   </target>
-
-  <target name="tests-report-text" depends="tests-report-html">
-    <mkdir dir="${build.reports}/text"/>
-
-    <style basedir="${build.reports}"
-      destdir="${build.reports}/text"
-      extension=".txt"
-      style="${build.stylesheets}/summary1b.xsl"
-      includes="TESTS-TestSuites.xml">
-      <param name="thedate" expression="${TIMENOW}"/>
-      <param name="java_version" expression="${java.version}"/>
-      <param name="java_vendor" expression="${java.vendor}"/>
-      <param name="java_vm_specification_version" expression="${java.vm.specification.version}"/>
-      <param name="java_vm_version" expression="${java.vm.version}"/>
-      <param name="java_vm_name" expression="${java.vm.name}"/>
-      <param name="java_vm_info" expression="${java.vm.info}"/>
-      <param name="java_specification_version" expression="${java.specification.version}"/>
-      <param name="java_class_version" expression="${java.class.version}"/>
-      <param name="os_name" expression="${os.name}"/>
-      <param name="os_arch" expression="${os.arch}"/>
-      <param name="os_version" expression="${os.version}"/>
-      <param name="builduid" expression="${TIMENOW}"/>
-      <param name="results_web" expression="${results_web}"/>
-    </style>
-  </target>
-
-
-   <target name="tests-report-clean">
-      <delete dir="${build.reports}"/>
-   </target>
-
-   <target name="clean"
-           description="Cleans up most generated files." depends="init">
-      <delete dir="${build.classes}"/>
-      <delete dir="${build.lib}"/>
-      <delete dir="${build.reports}"/>
-   </target>
-
-</project>

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml (from rev 62378, trunk/embedded/build-test.xml)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/build-test.xml	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+        <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
+        <!ENTITY modules SYSTEM "../tools/etc/buildmagic/modules.ent">
+        ]>
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--  JBoss, the OpenSource J2EE webOS                                      -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
+
+<!-- $Id: build.xml 57108 2006-09-23 20:55:54Z scott.stark at jboss.org $ -->
+
+<project default="main" name="JBoss/EJB3X">
+   <import file="../tools/etc/buildmagic/build-common.xml"/>
+
+   <target name="init">
+
+
+      <!-- =================== -->
+      <!-- Basic Configuration -->
+      <!-- =================== -->
+
+      <!-- ========= -->
+      <!-- Libraries -->
+      <!-- ========= -->
+
+      &libraries;
+
+
+      <!-- The combined library classpath -->
+      <path id="library.classpath">
+         <path refid="junit.junit.classpath"/>
+         <path refid="jboss.test.classpath"/>
+      </path>
+
+      <!-- ======= -->
+      <!-- Modules -->
+      <!-- ======= -->
+
+      &modules;
+
+      <!-- The combined dependent module classpath -->
+      <path id="dependentmodule.classpath">
+         <pathelement location="output/lib/embedded-jboss/bootstrap"/>
+         <fileset dir="output/lib/embedded-jboss/lib">
+            <include name="*.jar"/>
+         </fileset>
+      </path>
+
+      <!-- ===== -->
+      <!-- Tasks -->
+      <!-- ===== -->
+
+      <!-- Where source files live -->
+      <property name="source.java" value="src/test/java"/>
+      <property name="source.stylesheets" value="../testsuite/src/stylesheets"/>
+      <property name="resources" value="src/test/resources"/>
+
+      <!-- Where build generated files will go -->
+      <property name="build.reports" value="output/reports"/>
+      <property name="build.testlog" value="output/log"/>
+      <property name="build.classes" value="output/test-classes"/>
+      <property name="build.lib" value="output/test-lib"/>
+      <property name="build.stylesheets" value="output/stylesheets"/>
+
+
+      <!-- The combined thirdparty classpath -->
+      <path id="thirdparty.classpath">
+         <path refid="library.classpath"/>
+         <path refid="dependentmodule.classpath"/>
+      </path>
+
+      <!-- classpath and local.classpath must have a value using with a path -->
+      <property name="classpath" value=""/>
+      <property name="local.classpath" value=""/>
+
+      <!-- The classpath required to build classes. -->
+      <path id="javac.classpath">
+         <pathelement path="${classpath}"/>
+         <pathelement path="${local.classpath}"/>
+         <path refid="thirdparty.classpath"/>
+      </path>
+
+      <!-- The classpath required to build javadocs. -->
+      <path id="javadoc.classpath">
+         <path refid="javac.classpath"/>
+      </path>
+
+      <!-- Packages to include when generating api documentation -->
+      <property name="javadoc.packages" value="javax.*"/>
+
+      <!-- Override JUnit defaults -->
+      <property name="junit.timeout" value="240000"/>
+      <!-- 4 minutes -->
+      <property name="junit.batchtest.todir" value="${build.reports}"/>
+      <property name="junit.jvm.options" value="-Ddummy"/>
+      <!-- ======================================================== -->
+      <!-- Initialization                                           -->
+      <!-- ======================================================== -->
+      <tstamp>
+         <format property="TIMENOW" pattern="yyyy-MM-dd.HH-mm" timezone="GMT"/>
+      </tstamp>
+   </target>
+
+
+   <!-- ================================================================== -->
+   <!-- Compile                                                            -->
+   <!-- ================================================================== -->
+
+   <!--
+     | Compile everything.
+     |
+     | This target should depend on other compile-* targets for each 
+     | different type of compile that needs to be performed, short of
+     | documentation compiles.
+   -->
+
+   <target name="compile"
+           description="Compile all source files."
+           depends="compile-classes"/>
+
+   <!-- Compile all class files -->
+   <target name="compile-classes" depends="init">
+      <mkdir dir="${build.classes}"/>
+      <javac destdir="${build.classes}"
+             optimize="${javac.optimize}"
+             source="1.5"
+             debug="${javac.debug}"
+             depend="${javac.depend}"
+             verbose="${javac.verbose}"
+             deprecation="${javac.deprecation}"
+             includeAntRuntime="${javac.include.ant.runtime}"
+             includeJavaRuntime="${javac.include.java.runtime}"
+             failonerror="${javac.fail.onerror}">
+         <src path="${source.java}"/>
+         <classpath refid="javac.classpath"/>
+      </javac>
+   </target>
+
+   <target name="compile-stylesheets">
+      <mkdir dir="${build.stylesheets}"/>
+      <copy todir="${build.stylesheets}" filtering="yes">
+         <fileset dir="${source.stylesheets}">
+            <include name="**/*"/>
+         </fileset>
+      </copy>
+   </target>
+
+
+   <target name="jars" depends="compile">
+      <mkdir dir="${build.lib}"/>
+      <jar jarfile="${build.lib}/bootstrap-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/embedded/test/bootstrap/**/*.class"/>
+            <include name="org/jboss/embedded/test/jndibootstrap/**/*.class"/>
+         </fileset>
+      </jar>
+      <jar jarfile="${build.lib}/ejb-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/embedded/test/ejb/**/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/ejb">
+            <include name="META-INF/persistence.xml"/>
+            <include name="*.properties"/>
+         </fileset>
+      </jar>
+      <jar jarfile="${build.lib}/mdb-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/embedded/test/mdb/**/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/mdb">
+            <include name="mdbtest-service.xml"/>
+         </fileset>
+      </jar>
+      <jar jarfile="${build.lib}/remote-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/embedded/test/remote/**/*.class"/>
+         </fileset>
+      </jar>
+      <war warfile="${build.lib}/war-scan.war"
+         webxml="${resources}/war-scan/web.xml">
+         <lib dir="${build.lib}">
+            <include name="ejb-test.jar"/>
+         </lib>
+         <fileset dir="${source.java}/org/jboss/embedded/test/ejb/unit">
+            <include name="EjbTestCase.jsp"/>
+         </fileset>
+      </war>
+      <war warfile="${build.lib}/war-resource.war"
+         webxml="${resources}/war-resource/web.xml">
+         <lib dir="${build.lib}">
+            <include name="ejb-test.jar"/>
+         </lib>
+         <fileset dir="${source.java}/org/jboss/embedded/test/ejb/unit">
+            <include name="EjbTestCase.jsp"/>
+         </fileset>
+      </war>
+      <war warfile="${build.lib}/war-security.war"
+         webxml="${resources}/war-security/WEB-INF/web.xml">
+         <fileset dir="${resources}/war-security">
+            <include name="*.html"/>
+            <include name="*.jsp"/>
+         </fileset>
+      </war>
+
+
+   </target>
+
+   <target name="main"
+      description="Executes the default target (most)."
+      depends="jars"/>
+
+
+
+   <target name="test" depends="init" if="test"
+      description="Execute all tests in the given test directory.">
+      <mkdir dir="${build.reports}"/>
+      <mkdir dir="${build.testlog}"/>
+      <!-- Remove the test.log so each run has a fresh log -->
+      <delete file="${build.testlog}/test.log"/>
+      <path id="test.classpath">
+         <fileset dir="${build.lib}">
+            <include name="*.jar"/>
+         </fileset>
+         <path refid="thirdparty.classpath"/>
+      </path>
+      <junit dir="${module.output}"
+         printsummary="yes"
+         haltonerror="false"
+         haltonfailure="false"
+         fork="true">
+
+         <sysproperty key="jbosstest.deploy.dir" value="test-lib"/>
+         <sysproperty key="build.testlog" value="${build.testlog}"/>
+         <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
+         <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
+         <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
+
+         <classpath>
+            <path refid="test.classpath"/>
+         </classpath>
+
+         <formatter type="plain" usefile="true"/>
+         <formatter type="xml" usefile="true"/>
+
+         <batchtest todir="${build.reports}"
+            haltonerror="false"
+            haltonfailure="false"
+            fork="true">
+
+            <fileset dir="${build.classes}">
+               <include name="org/jboss/embedded/test/${test}/unit/*TestCase.class"/>
+            </fileset>
+         </batchtest>
+      </junit>
+   </target>
+
+
+
+   <target name="tests-report-html" depends="compile-stylesheets">
+      <mkdir dir="${build.reports}/html"/>
+
+      <junitreport todir="${build.reports}">
+         <fileset dir="${build.reports}">
+            <include name="TEST-*.xml"/>
+         </fileset>
+         <report format="frames"
+            todir="${build.reports}/html"
+            styledir="${build.stylesheets}"
+            />
+      </junitreport>
+   </target>
+
+  <target name="tests-report-text" depends="tests-report-html">
+    <mkdir dir="${build.reports}/text"/>
+
+    <style basedir="${build.reports}"
+      destdir="${build.reports}/text"
+      extension=".txt"
+      style="${build.stylesheets}/summary1b.xsl"
+      includes="TESTS-TestSuites.xml">
+      <param name="thedate" expression="${TIMENOW}"/>
+      <param name="java_version" expression="${java.version}"/>
+      <param name="java_vendor" expression="${java.vendor}"/>
+      <param name="java_vm_specification_version" expression="${java.vm.specification.version}"/>
+      <param name="java_vm_version" expression="${java.vm.version}"/>
+      <param name="java_vm_name" expression="${java.vm.name}"/>
+      <param name="java_vm_info" expression="${java.vm.info}"/>
+      <param name="java_specification_version" expression="${java.specification.version}"/>
+      <param name="java_class_version" expression="${java.class.version}"/>
+      <param name="os_name" expression="${os.name}"/>
+      <param name="os_arch" expression="${os.arch}"/>
+      <param name="os_version" expression="${os.version}"/>
+      <param name="builduid" expression="${TIMENOW}"/>
+      <param name="results_web" expression="${results_web}"/>
+    </style>
+  </target>
+
+
+   <target name="tests-report-clean">
+      <delete dir="${build.reports}"/>
+   </target>
+
+   <target name="clean"
+           description="Cleans up most generated files." depends="init">
+      <delete dir="${build.classes}"/>
+      <delete dir="${build.lib}"/>
+      <delete dir="${build.reports}"/>
+   </target>
+
+</project>

Deleted: tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/README.html	2007-04-16 21:47:26 UTC (rev 62375)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html	2007-04-18 00:11:16 UTC (rev 62385)
@@ -1,45 +0,0 @@
-<html>
-<body>
-<p>
-<h2> Using Embedded JBoss with Tomcat 5.5</h2>
-
-</p><p>
-This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things to Tomcat.  The examples here show a few different ways:
-</p><p>
-<ul>
-<li> <i>scan.webinf.lib.war</i> Ant target builds an embedded-jboss.war file in the build directory.  This war's <a href="resources/scan.webinf.lib.xml">web.xml</a> is set up so that every jar in WEB-INF/lib of the war file is scanned for possible JBoss deployments.</li>
-<li> <i>finegrain.war</i> Ant target builds the war.  This war's <a href="resources/finegrain.web.xml">web.xml</a> sets up a Listener that explicitly loads one particular resource from the ServletContext.</li>
-<li> <i>builtin.war</i> Ant target just builds a regular war file.  No special things were configured in web.xml.  For this example, you need to turn on default scanning at the Tomcat level.  Here's how.</li>
-</ul>
-</p><p>
-</p><p>
-<h2> Scanning every WAR by default</h2>
-
-</p><p>
-Perhaps the simplest way to deploy your EJBs, datasources, and other JBoss components is to put these .jars and files directly in the <tt>WEB-INF/lib</tt> and <tt>WEB-INF/classes</tt> directories of your deployed web apps.  You can have Embedded JBoss automatically scan each and every web app Tomcat deploys for JBoss components.  To do this you modify the default context configuration file of tomcat located in <tt>apache-tomcat/conf/context.xml</tt> and add the Embedded JBoss <tt>org.jboss.embedded.tomcat.WebinfScanner</tt> listener class.
-</p><p>
-<b>context.xml</b>
-<pre>
-&lt;!-- The contents of this file will be loaded for each web application --&gt;
-&lt;Context&gt;
-
-    &lt;!-- Default set of monitored resources --&gt;
-    &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
-
-    &lt;!-- Uncomment this to disable session persistence across Tomcat restarts --&gt;
-    &lt;!--
-    &lt;Manager pathname="" /&gt;
-    --&gt;
-</pre>
-<b><pre>
-  &lt;Listener className="org.jboss.embedded.tomcat.WebinfScanner" /&gt;</pre></b>
-<pre>
-
-&lt;/Context&gt;
-</pre>
-</p><p>
-The advantage of this approach is that you do not have to put any special configuration in your WAR files to deploy JBoss components.  The disadvantage is that deployment time may slow down as deployers like the EJB3 container need to scan every .jar file for classes annotated with EJB3 annotations.
-</p><p>
-</p>
-</body>
-</html>

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html (from rev 62382, trunk/embedded/docs/tutorial/tomcat/README.html)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.html	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,22 @@
+<html>
+<body>
+<p>
+<h2> Using Embedded JBoss with Tomcat 5.5</h2>
+
+</p><p>
+This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things to Tomcat.  The examples here show a few different ways:
+</p><p>
+<ul>
+<li> <i>scan.webinf.lib.war</i> Ant target builds an embedded-jboss.war file in the build directory.  This war's <a href="resources/scan.webinf.lib.xml">web.xml</a> is set up so that every jar in WEB-INF/lib of the war file is scanned for possible JBoss deployments.</li>
+<li> <i>finegrain.war</i> Ant target builds the war.  This war's <a href="resources/finegrain.web.xml">web.xml</a> sets up a Listener that explicitly loads one particular resource from the ServletContext.</li>
+<li> <i>builtin.war</i> Ant target just builds a regular war file.  No special things were configured in web.xml.  For this example, you need to turn on default scanning at the Tomcat level.  Here's how.</li>
+</ul>
+</p><p>
+After deploying the WAR to Tomcat, you can access <a href="http://localhost:8080/embedded-jboss/EmbeddedJBoss.jsp">EmbeddedJBoss.jsp</a> to test the example.
+</p><p>
+</p><p>
+<b>PLEASE NOTE</b>: To find out more on how to install and bootstrap Embedded JBoss in Tomcat, please see our <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">Wiki</a>
+</p><p>
+</p>
+</body>
+</html>

Deleted: tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/README.wiki	2007-04-16 21:47:26 UTC (rev 62375)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki	2007-04-18 00:11:16 UTC (rev 62385)
@@ -1,35 +0,0 @@
-!!! Using Embedded JBoss with Tomcat 5.5
-
-This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things to Tomcat.  The examples here show a few different ways:
-
-* ''scan.webinf.lib.war'' Ant target builds an embedded-jboss.war file in the build directory.  This war's [web.xml|resources/scan.webinf.lib.xml] is set up so that every jar in WEB-INF/lib of the war file is scanned for possible JBoss deployments.
-* ''finegrain.war'' Ant target builds the war.  This war's [web.xml|resources/finegrain.web.xml] sets up a Listener that explicitly loads one particular resource from the ServletContext.
-* ''builtin.war'' Ant target just builds a regular war file.  No special things were configured in web.xml.  For this example, you need to turn on default scanning at the Tomcat level.  Here's how.
-
-
-!!! Scanning every WAR by default
-
-Perhaps the simplest way to deploy your EJBs, datasources, and other JBoss components is to put these .jars and files directly in the {{WEB-INF/lib}} and {{WEB-INF/classes}} directories of your deployed web apps.  You can have Embedded JBoss automatically scan each and every web app Tomcat deploys for JBoss components.  To do this you modify the default context configuration file of tomcat located in {{apache-tomcat/conf/context.xml}} and add the Embedded JBoss {{org.jboss.embedded.tomcat.WebinfScanner}} listener class.
-
-__context.xml__
-{{{
-<!-- The contents of this file will be loaded for each web application -->
-<Context>
-
-    <!-- Default set of monitored resources -->
-    <WatchedResource>WEB-INF/web.xml</WatchedResource>
-
-    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
-    <!--
-    <Manager pathname="" />
-    -->
-}}}
-__{{{
-  <Listener className="org.jboss.embedded.tomcat.WebinfScanner" />}}}__
-{{{
-
-</Context>
-}}}
-
-The advantage of this approach is that you do not have to put any special configuration in your WAR files to deploy JBoss components.  The disadvantage is that deployment time may slow down as deployers like the EJB3 container need to scan every .jar file for classes annotated with EJB3 annotations.
-

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki (from rev 62382, trunk/embedded/docs/tutorial/tomcat/README.wiki)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/docs/tutorial/tomcat/README.wiki	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,13 @@
+!!! Using Embedded JBoss with Tomcat 5.5
+
+This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things to Tomcat.  The examples here show a few different ways:
+
+* ''scan.webinf.lib.war'' Ant target builds an embedded-jboss.war file in the build directory.  This war's [web.xml|resources/scan.webinf.lib.xml] is set up so that every jar in WEB-INF/lib of the war file is scanned for possible JBoss deployments.
+* ''finegrain.war'' Ant target builds the war.  This war's [web.xml|resources/finegrain.web.xml] sets up a Listener that explicitly loads one particular resource from the ServletContext.
+* ''builtin.war'' Ant target just builds a regular war file.  No special things were configured in web.xml.  For this example, you need to turn on default scanning at the Tomcat level.  Here's how.
+
+After deploying the WAR to Tomcat, you can access [EmbeddedJBoss.jsp|http://localhost:8080/embedded-jboss/EmbeddedJBoss.jsp] to test the example.
+
+
+__PLEASE NOTE__: To find out more on how to install and bootstrap Embedded JBoss in Tomcat, please see our [Wiki|http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss]
+

Deleted: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties
===================================================================
--- trunk/embedded/src/main/resources/javase/jndi.properties	2007-04-16 21:47:26 UTC (rev 62375)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties	2007-04-18 00:11:16 UTC (rev 62385)
@@ -1,4 +0,0 @@
-# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
-#
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties (from rev 62378, trunk/embedded/src/main/resources/javase/jndi.properties)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/main/resources/javase/jndi.properties	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,4 @@
+# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
+#
+java.naming.factory.initial=org.jboss.naming.JBossRemotingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java (from rev 62378, trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.embedded.test.ejb;
+
+import javax.annotation.security.RolesAllowed;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface Secured
+{
+   @RolesAllowed("Allowed")
+   void allowed();
+
+   @RolesAllowed("Nobody")
+   void nobody();
+}

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java (from rev 62378, trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.embedded.test.ejb;
+
+import org.jboss.annotation.security.SecurityDomain;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at SecurityDomain("other")
+ at Stateless
+public class SecuredBean implements Secured
+{
+   @RolesAllowed("allowed")
+   public void allowed()
+   {
+
+   }
+
+   @RolesAllowed("nobody")
+   public void nobody()
+   {
+
+   }
+}

Deleted: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java	2007-04-16 21:47:26 UTC (rev 62375)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java	2007-04-18 00:11:16 UTC (rev 62385)
@@ -1,158 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.embedded.test.ejb.unit;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.extensions.TestSetup;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.adapters.JMXKernel;
-import org.jboss.embedded.DeploymentGroup;
-import org.jboss.embedded.test.ejb.DAO;
-import org.jboss.embedded.test.ejb.Customer;
-import org.jboss.deployers.spi.DeploymentException;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.MalformedObjectNameException;
-import javax.naming.InitialContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class EjbTestCase extends TestCase
-{
-   public EjbTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(EjbTestCase.class);
-
-
-      // setup test so that embedded JBoss is started/stopped once for all tests here.
-      TestSetup wrapper = new TestSetup(suite)
-      {
-         protected void setUp()
-         {
-            long start = System.currentTimeMillis();
-            try
-            {
-               startupEmbeddedJboss();
-            }
-            finally
-            {
-               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
-            }
-
-         }
-
-         protected void tearDown()
-         {
-            shutdownEmbeddedJboss();
-         }
-      };
-
-      return wrapper;
-   }
-
-   public static void startupEmbeddedJboss()
-   {
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Failed to bootstrap", e);
-      }
-   }
-
-   public static void shutdownEmbeddedJboss()
-   {
-      Bootstrap.getInstance().shutdown();
-   }
-
-   private static void outputJNDI()
-           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
-      {
-      MBeanServer server = getMBeanServer();
-      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
-      System.out.println(xml);
-   }
-
-   private static MBeanServer getMBeanServer()
-   {
-      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-      MBeanServer server = jmxKernel.getMbeanServer();
-      return server;
-   }
-
-
-   public void testSimpleEjb() throws Exception
-   {
-      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-      group.addClasspath("ejb-test.jar");
-      group.process();
-
-      outputJNDI();
-      InitialContext ctx = new InitialContext();
-      DAO dao = (DAO)ctx.lookup("DAOBean/local");
-      Customer cust = dao.createCustomer("Bill");
-      cust = dao.findCustomer("Bill");
-      assert cust != null;
-      assert cust.getName().equals("Bill");
-
-      group.undeploy();
-
-
-   }
-
-    public void testSimpleEjb2() throws Exception
-    {
-       DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-       group.addClasspath("ejb-test.jar");
-       group.process();
-
-       outputJNDI();
-       InitialContext ctx = new InitialContext();
-       DAO dao = (DAO)ctx.lookup("DAOBean/local");
-       Customer cust = dao.createCustomer("Bill");
-       cust = dao.findCustomer("Bill");
-       assert cust != null;
-       assert cust.getName().equals("Bill");
-
-       group.undeploy();
-
-
-    }
-}

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java (from rev 62378, trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1,205 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.embedded.test.ejb.unit;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.extensions.TestSetup;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.adapters.JMXKernel;
+import org.jboss.embedded.DeploymentGroup;
+import org.jboss.embedded.test.ejb.DAO;
+import org.jboss.embedded.test.ejb.Customer;
+import org.jboss.embedded.test.ejb.Secured;
+import org.jboss.deployers.spi.DeploymentException;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.ReflectionException;
+import javax.management.MalformedObjectNameException;
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.ejb.EJBAccessException;
+import java.util.Hashtable;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class EjbTestCase extends TestCase
+{
+   public EjbTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(EjbTestCase.class);
+
+
+      // setup test so that embedded JBoss is started/stopped once for all tests here.
+      TestSetup wrapper = new TestSetup(suite)
+      {
+         protected void setUp()
+         {
+            long start = System.currentTimeMillis();
+            try
+            {
+               startupEmbeddedJboss();
+            }
+            finally
+            {
+               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
+            }
+
+         }
+
+         protected void tearDown()
+         {
+            shutdownEmbeddedJboss();
+         }
+      };
+
+      return wrapper;
+   }
+
+   public static void startupEmbeddedJboss()
+   {
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Failed to bootstrap", e);
+      }
+   }
+
+   public static void shutdownEmbeddedJboss()
+   {
+      Bootstrap.getInstance().shutdown();
+   }
+
+   private static void outputJNDI()
+           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
+      {
+      MBeanServer server = getMBeanServer();
+      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
+      System.out.println(xml);
+   }
+
+   private static MBeanServer getMBeanServer()
+   {
+      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+      MBeanServer server = jmxKernel.getMbeanServer();
+      return server;
+   }
+
+
+   public void testSimpleEjb() throws Exception
+   {
+      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+      group.addClasspath("ejb-test.jar");
+      group.process();
+
+      outputJNDI();
+      InitialContext ctx = new InitialContext();
+      DAO dao = (DAO)ctx.lookup("DAOBean/local");
+      Customer cust = dao.createCustomer("Bill");
+      cust = dao.findCustomer("Bill");
+      assert cust != null;
+      assert cust.getName().equals("Bill");
+
+      group.undeploy();
+
+
+   }
+
+    public void testSimpleEjb2() throws Exception
+    {
+       DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+       group.addClasspath("ejb-test.jar");
+       group.process();
+
+       outputJNDI();
+       InitialContext ctx = new InitialContext();
+       DAO dao = (DAO)ctx.lookup("DAOBean/local");
+       Customer cust = dao.createCustomer("Bill");
+       cust = dao.findCustomer("Bill");
+       assert cust != null;
+       assert cust.getName().equals("Bill");
+
+       group.undeploy();
+
+
+    }
+
+   public void testSecurity() throws Exception
+   {
+      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+      group.addClasspath("ejb-test.jar");
+      group.process();
+
+      Hashtable env = new Hashtable();
+      env.put(Context.SECURITY_PRINCIPAL, "scott");
+      env.put(Context.SECURITY_CREDENTIALS, "invalidpassword");
+
+      InitialContext ctx = new InitialContext(env);
+      Secured secured = (Secured)ctx.lookup("SecuredBean/local");
+      boolean exceptionThrown = false;
+      try
+      {
+         secured.allowed();
+      }
+      catch (EJBAccessException ignored)
+      {
+         exceptionThrown = true;
+      }
+      assertTrue("Security exception not thrown for invalid password", exceptionThrown);
+      env.put(Context.SECURITY_CREDENTIALS, "password");
+      ctx = new InitialContext(env);
+
+      secured.allowed();
+
+      exceptionThrown = false;
+      try
+      {
+         secured.nobody();
+      }
+      catch (EJBAccessException ignored)
+      {
+         exceptionThrown = true;
+      }
+      assertTrue("Security exception not thrown for invalid role", exceptionThrown);
+
+      group.undeploy();
+
+
+   }
+}

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/roles.properties (from rev 62378, trunk/embedded/src/test/resources/ejb/roles.properties)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/roles.properties	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/roles.properties	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1 @@
+scott=allowed

Copied: tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/users.properties (from rev 62378, trunk/embedded/src/test/resources/ejb/users.properties)
===================================================================
--- tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/users.properties	                        (rev 0)
+++ tags/EMBEDDED_JBOSS_BETA_2/embedded/src/test/resources/ejb/users.properties	2007-04-18 00:11:16 UTC (rev 62385)
@@ -0,0 +1 @@
+scott=password




More information about the jboss-cvs-commits mailing list