[jboss-cvs] JBossAS SVN: r67781 - in branches/JBPAPP_4_2_0_GA_CP/ejb3: src/resources/test and 21 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 3 11:47:32 EST 2007
Author: bdecoste
Date: 2007-12-03 11:47:32 -0500 (Mon, 03 Dec 2007)
New Revision: 67781
Added:
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1023/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1023/ejbthree1023-aop.xml
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1090/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1090/ejbthree1090-ejb3-interceptors-aop.xml
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1092/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1092/META-INF/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocalBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocalBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/TestInterceptor.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/unit/DefaultLocalInterfaceWovenBeanTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBusinessRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/unit/GetEjbObjectWithNo21ViewUnitTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Calculator.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonBase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Tester.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/TesterBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/unit/DefaultLocalBusinessUnitTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/AopInterceptor.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/Ejb3Interceptor.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/unit/InterceptorsUnitTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/AbstractRemoveBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Delegate.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/DelegateBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21View.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewHome.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Remove.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessLocal.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessRemote.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatefulRemoveBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatelessRemoveBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/unit/RemoveMethodUnitTestCase.java
Modified:
branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml
Log:
[JBPAPP-478] merged tests
Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml 2007-12-03 16:42:57 UTC (rev 67780)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml 2007-12-03 16:47:32 UTC (rev 67781)
@@ -951,6 +951,9 @@
</jar>
</target>
+ <target name="threadlocal" depends="compile-classes">
+ </target>
+
<target name="timer"
description="Builds all jar files."
depends="compile-classes">
@@ -1806,6 +1809,14 @@
</fileset>
</jar>
</target>
+
+ <target name="ejbthree785" depends="compile-classes">
+ <build-simple-jar name="ejbthree785"/>
+ </target>
+
+ <target name="ejbthree786" depends="compile-classes">
+ <build-simple-jar name="ejbthree786"/>
+ </target>
<target name="ejbthree832"
description="Builds all jar files."
@@ -1848,6 +1859,13 @@
<build-simple-jar name="ejbthree963"/>
</target>
+
+ <target name="ejbthree986"
+ description="Builds a simple jar files."
+ depends="compile-classes">
+
+ <build-simple-jar name="ejbthree986"/>
+ </target>
<target name="ejbthree994"
description="Builds a simple jar files."
@@ -1861,7 +1879,39 @@
</fileset>
</copy>
</target>
+
+ <target name="ejbthree1023"
+ description="Builds a simple jar files."
+ depends="compile-classes">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/ejbthree1023.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/ejbthree1023/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/ejbthree1023">
+ <include name="*.xml"/>
+ </fileset>
+ </jar>
+
+ </target>
+
+ <target name="ejbthree1025"
+ description="Builds a simple jar files."
+ depends="compile-classes">
+
+ <build-simple-jar name="ejbthree1025"/>
+ </target>
+
+ <target name="ejbthree1057" depends="compile-classes">
+ <build-simple-jar name="ejbthree1057"/>
+ </target>
+ <target name="ejbthree1062" depends="compile-classes">
+ <build-simple-jar name="ejbthree1062"/>
+ </target>
+
<target name="jbas4489"
description="Builds a simple jar files."
depends="compile-classes">
@@ -2670,6 +2720,22 @@
</jar>
</target>
+ <target name="ejbthree1090"
+ description="Builds all jar files."
+ depends="compile-classes">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/ejbthree1090-test.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/ejbthree1090/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/ejbthree1090">
+ <include name="*.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
<target name="ejbcontext"
description="Builds all jar files."
depends="compile-classes">
@@ -2827,6 +2893,22 @@
<copy file="${build.lib}/stateless-test.jar" tofile="${build.lib}/stateless-test.ejb3"/>
</target>
+
+ <target name="ejbthree1092"
+ description="Builds all jar files."
+ depends="compile-classes">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/ejbthree1092-test.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/ejbthree1092/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/ejbthree1092">
+ <include name="META-INF/*.xml"/>
+ </fileset>
+ </jar>
+ </target>
<target name="statelesscreation"
description="Builds all jar files."
@@ -3381,10 +3463,10 @@
</jar>
</target>
- <target name="jars" depends="mdbsessionpoolclear, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, invalidtxmdb, descriptortypo, libdeployment, homeinterface, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
+ <target name="jars" depends="ejbthree1090, mdbsessionpoolclear, ejbthree1092, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, invalidtxmdb, descriptortypo, libdeployment, homeinterface, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440,
- ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751, ejbthree832, ejbthree921,
- ejbthree959, ejbthree963, ejbthree994,
+ ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751, ejbthree785, ejbthree786, ejbthree832, ejbthree921,
+ ejbthree959, ejbthree963, ejbthree994, ejbthree1023, ejbthree1025, ejbthree1057, ejbthree1062,
jbas4489,
aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency, jaxws,
pkg, securitydomain, enventry,
@@ -3425,6 +3507,9 @@
<condition property="client.run.classpath" value="iiop.client.classpath">
<equals arg1="${test}" arg2="iiop"/>
</condition>
+ <condition property="client.run.classpath" value="dd.classpath">
+ <equals arg1="${test}" arg2="threadlocal"/>
+ </condition>
<condition property="client.run.classpath" value="client.classpath">
<not>
<isset property="client.run.classpath"/>
@@ -3669,6 +3754,7 @@
</target>
<target name="tests" depends="init" description="Execute all tests">
+ <antcall target="simple-tests" inheritRefs="true"/>
<antcall target="ejb-tests" inheritRefs="true"/>
<antcall target="entity-tests" inheritRefs="true"/>
<antcall target="ssl-simple-test" inheritRefs="true"/>
@@ -3691,6 +3777,13 @@
<antcall target="no-start-jboss-iiop-tests" inheritRefs="true"/>
</target>
+ <target name="simple-tests" depends="init">
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="threadlocal"/>
+ </antcall>
+ </target>
+
+
<target name="ejb-tests" depends="init" description="Execute all tests">
<start-jboss conf="all" host="${node0}" jboss.dist="${ejb3.dist}" jvmargs="${ejb3.jboss.jvmargs}"/>
@@ -3715,6 +3808,9 @@
<target name="no-start-jboss-ejb-tests" depends="init" description="Execute all tests">
<antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1090"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="arjuna"/>
</antcall>
<antcall target="test" inheritRefs="true">
@@ -3933,6 +4029,12 @@
<param name="test" value="ejbthree751"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree785"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree786"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="ejbthree832"/>
</antcall>
<antcall target="test" inheritRefs="true">
@@ -3945,6 +4047,27 @@
<param name="test" value="ejbthree994"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1023"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1025"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1057"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1058"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1060"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1062"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="statelesscreation"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="jbas4489"/>
</antcall>
</target>
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1023/ejbthree1023-aop.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1023/ejbthree1023-aop.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1023/ejbthree1023-aop.xml 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,8 @@
+<aop>
+ <bind pointcut="execution(* org.jboss.ejb3.test.ejbthree1023.AnnotatedLocalBean->woven())">
+ <interceptor class="org.jboss.ejb3.test.ejbthree1023.TestInterceptor"/>
+ </bind>
+ <bind pointcut="execution(* org.jboss.ejb3.test.ejbthree1023.DefaultLocalBean->woven())">
+ <interceptor class="org.jboss.ejb3.test.ejbthree1023.TestInterceptor"/>
+ </bind>
+</aop>
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1090/ejbthree1090-ejb3-interceptors-aop.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1090/ejbthree1090-ejb3-interceptors-aop.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1090/ejbthree1090-ejb3-interceptors-aop.xml 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE aop PUBLIC
+ "-//JBoss//DTD JBOSS AOP 1.0//EN"
+ "http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
+
+<aop>
+ <interceptor class="org.jboss.ejb3.test.ejbthree1090.AopInterceptor" scope="PER_VM"/>
+
+ <domain name="Test Base Stateful Bean">
+ <bind pointcut="execution(public * *->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+ <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+ <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+ </bind>
+ <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+ <interceptor-ref name="Basic Authorization"/>
+ </bind>
+ <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+ </bind>
+ <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
+ </bind>
+ <bind pointcut="execution(public * *->@javax.ejb.Remove(..))">
+ <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
+ </bind>
+ <bind pointcut="execution(public * *->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
+ <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+ <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+ <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+ </bind>
+ <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
+ </bind>
+ <bind pointcut="execution(public * *->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+ <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
+ </bind>
+
+ <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
+ <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
+ </bind>
+
+ <bind pointcut="execution(public * *->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+ </bind>
+
+ <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+ @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+ </annotation>
+
+ </domain>
+
+ <domain name="Test Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
+
+ <bind pointcut="execution(public * *->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.test.ejbthree1090.AopInterceptor"/>
+ </bind>
+
+ <!-- NON Clustered cache configuration -->
+ <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
+ @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+ </annotation>
+ <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
+ @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
+ </annotation>
+ <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
+ @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
+ </annotation>
+
+ <!-- Clustered cache configuration -->
+ <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
+ @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+ </annotation>
+ <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
+ @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
+ </annotation>
+
+ <annotation expr="!class(@javax.interceptors.Interceptors)">
+ @javax.interceptor.Interceptors (value={org.jboss.ejb3.test.ejbthree1090.Ejb3Interceptor.class})
+ </annotation>
+ </domain>
+
+</aop>
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<jboss
+ 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://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+ <enterprise-beans>
+ <session>
+ <ejb-name>StatelessBean</ejb-name>
+ <clustered>true</clustered>
+ <!--cluster-config>
+ <partition-name>DefaultPartition</partition-name>
+ <load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</load-balance-policy>
+ </cluster-config-->
+ </session>
+ </enterprise-beans>
+</jboss>
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+import javax.ejb.Local;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Local
+public interface AnnotatedLocal
+{
+ void woven();
+ void notWoven();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocalBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocalBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/AnnotatedLocalBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+import javax.ejb.Stateless;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class AnnotatedLocalBean implements AnnotatedLocal
+{
+ public static boolean woven;
+ public static boolean notWoven;
+
+ public void notWoven()
+ {
+ notWoven = true;
+ }
+
+ public void woven()
+ {
+ woven = true;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface DefaultLocal
+{
+ void woven();
+ void notWoven();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocalBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocalBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/DefaultLocalBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+import javax.ejb.Stateless;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class DefaultLocalBean implements DefaultLocal
+{
+ public static boolean woven;
+ public static boolean notWoven;
+
+ public void notWoven()
+ {
+ notWoven = true;
+ }
+
+ public void woven()
+ {
+ woven = true;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,137 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+
+import org.jboss.aop.Advised;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class FacadeBean implements FacadeRemote
+{
+ public void callWovenBeanWithAnnotatedLocal() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+ AnnotatedLocal local = (AnnotatedLocal)ctx.lookup("AnnotatedLocalBean/local");
+
+ if (!Advised.class.isAssignableFrom(AnnotatedLocalBean.class))
+ {
+ throw new RuntimeException("AnnotatedLocalBean was not woven");
+ }
+
+ AnnotatedLocalBean.woven = false;
+ AnnotatedLocalBean.notWoven = false;
+ TestInterceptor.invoked = false;
+
+ local.woven();
+
+ if (!AnnotatedLocalBean.woven)
+ {
+ throw new RuntimeException("woven was not called");
+ }
+ if (AnnotatedLocalBean.notWoven)
+ {
+ throw new RuntimeException("notWoven was called");
+ }
+ if (!TestInterceptor.invoked)
+ {
+ throw new RuntimeException("TestInterceptor was not invoked");
+ }
+
+ AnnotatedLocalBean.woven = false;
+ AnnotatedLocalBean.notWoven = false;
+ TestInterceptor.invoked = false;
+
+ local.notWoven();
+
+ if (AnnotatedLocalBean.woven)
+ {
+ throw new RuntimeException("woven was called");
+ }
+ if (!AnnotatedLocalBean.notWoven)
+ {
+ throw new RuntimeException("notWoven was not called");
+ }
+ if (TestInterceptor.invoked)
+ {
+ throw new RuntimeException("TestInterceptor was invoked");
+ }
+
+ }
+
+ public void callWovenBeanWithDefaultLocal() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+ DefaultLocal local = (DefaultLocal)ctx.lookup("DefaultLocalBean/local");
+
+ if (!Advised.class.isAssignableFrom(DefaultLocalBean.class))
+ {
+ throw new RuntimeException("DefaultLocalBean was not woven");
+ }
+
+ DefaultLocalBean.woven = false;
+ DefaultLocalBean.notWoven = false;
+ TestInterceptor.invoked = false;
+
+ local.woven();
+
+ if (!DefaultLocalBean.woven)
+ {
+ throw new RuntimeException("woven was not called");
+ }
+ if (DefaultLocalBean.notWoven)
+ {
+ throw new RuntimeException("notWoven was called");
+ }
+ if (!TestInterceptor.invoked)
+ {
+ throw new RuntimeException("TestInterceptor was not invoked");
+ }
+
+ DefaultLocalBean.woven = false;
+ DefaultLocalBean.notWoven = false;
+ TestInterceptor.invoked = false;
+
+ local.notWoven();
+
+ if (DefaultLocalBean.woven)
+ {
+ throw new RuntimeException("woven was called");
+ }
+ if (!DefaultLocalBean.notWoven)
+ {
+ throw new RuntimeException("notWoven was not called");
+ }
+ if (TestInterceptor.invoked)
+ {
+ throw new RuntimeException("TestInterceptor was invoked");
+ }
+
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/FacadeRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+import javax.ejb.Remote;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Remote
+public interface FacadeRemote
+{
+ void callWovenBeanWithAnnotatedLocal() throws Exception;
+ void callWovenBeanWithDefaultLocal() throws Exception;
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/TestInterceptor.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/TestInterceptor.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/TestInterceptor.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor implements Interceptor
+{
+ public static boolean invoked;
+ public String getName()
+ {
+ return null;
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ invoked = true;
+ return invocation.invokeNext();
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/unit/DefaultLocalInterfaceWovenBeanTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/unit/DefaultLocalInterfaceWovenBeanTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1023/unit/DefaultLocalInterfaceWovenBeanTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,141 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1023.unit;
+
+import javax.management.Attribute;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.ejb3.test.ejbthree1023.FacadeRemote;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DefaultLocalInterfaceWovenBeanTestCase extends JBossTestCase
+{
+
+ public DefaultLocalInterfaceWovenBeanTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testAnnotatedLocalInterfaceWovenBean() throws Exception
+ {
+ //Just a sanity test
+ InitialContext ctx = getInitialContext();
+ FacadeRemote facade = (FacadeRemote)ctx.lookup("FacadeBean/remote");
+ facade.callWovenBeanWithAnnotatedLocal();
+ }
+
+ public void testDefaultLocalInterfaceWovenBean() throws Exception
+ {
+ //The real test for this issue
+ InitialContext ctx = getInitialContext();
+ FacadeRemote facade = (FacadeRemote)ctx.lookup("FacadeBean/remote");
+ facade.callWovenBeanWithDefaultLocal();
+ }
+
+ public static Test suite() throws Exception
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new TestSuite(DefaultLocalInterfaceWovenBeanTestCase.class));
+
+ AOPTestSetup setup = new AOPTestSetup(suite, "ejbthree1023.jar");
+ return setup;
+ }
+
+ static class AOPTestSetup extends JBossTestSetup
+ {
+ public static String ASPECT_MANAGER_NAME = "jboss.aop:service=AspectManager";
+
+ private String jar;
+ private String originalInclude;
+
+ // Create an initializer for the test suite
+ AOPTestSetup(TestSuite suite, String jar) throws Exception
+ {
+ super(suite);
+ this.jar = jar;
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ ObjectName aspectManager = new ObjectName(ASPECT_MANAGER_NAME);
+
+ originalInclude = (String)getServer().getAttribute(aspectManager, "Include");
+ Attribute include = new Attribute("Include", originalInclude + ", org.jboss.ejb3.test.");
+ getServer().setAttribute(aspectManager, include);
+
+ Attribute enableTransformer = new Attribute("EnableTransformer", Boolean.TRUE);
+ getServer().setAttribute(aspectManager, enableTransformer);
+ try
+ {
+ redeploy(jar);
+ }
+ catch(Exception e)
+ {
+ // Reset the EnableTransformer to false
+ try
+ {
+ enableTransformer = new Attribute("EnableTransformer", Boolean.FALSE);
+ getServer().setAttribute(aspectManager, enableTransformer);
+ }
+ catch(Exception ex)
+ {
+ getLog().error("Failed to set EnableTransformer to false", ex);
+ }
+ throw e;
+ }
+ }
+ protected void tearDown() throws Exception
+ {
+ Exception undeployException = null;
+ try
+ {
+ undeploy(jar);
+ }
+ catch(Exception e)
+ {
+ undeployException = e;
+ }
+ ObjectName aspectManager = new ObjectName(ASPECT_MANAGER_NAME);
+
+ Attribute include = new Attribute("Include", originalInclude);
+ getServer().setAttribute(aspectManager, include);
+
+
+ Attribute enableTransformer = new Attribute("EnableTransformer", Boolean.FALSE);
+ getServer().setAttribute(aspectManager, enableTransformer);
+ if( undeployException != null )
+ throw undeployException;
+ super.tearDown();
+ }
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1025;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 64470 $
+ */
+public interface OrderService
+{
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1025;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * This is an illegal construct.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 64470 $
+ */
+ at Stateless
+ at Local
+ at Remote
+public class OrderServiceBean implements OrderService
+{
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1025.unit;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 64470 $
+ */
+public class FailLocalRemoteNotSpecifiedUnitTestCase extends JBossTestCase
+{
+ public FailLocalRemoteNotSpecifiedUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ // do not deploy any jars
+ return getDeploySetup(FailLocalRemoteNotSpecifiedUnitTestCase.class, null);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ undeploy("ejbthree1025.jar");
+ super.tearDown();
+ }
+
+ public void testDeploymentFailure() throws Exception
+ {
+ try
+ {
+ redeploy("ejbthree1025.jar");
+ fail("should throw an exception");
+ }
+ catch(Exception e)
+ {
+ // TODO: check exception
+ }
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1057;
+
+import javax.ejb.EJB;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+
+/**
+ * A DelegateBean.
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(DelegateBusinessRemote.class)
+ at RemoteBinding(jndiBinding = DelegateBusinessRemote.JNDI_NAME_REMOTE)
+public class DelegateBean implements DelegateBusinessRemote
+{
+
+ // Instance Members
+ @EJB
+ TestBusinessLocal bean;
+
+ // Required Implementations
+
+ public EJBLocalObject testGetEjbLocalObject()
+ {
+ return bean.testGetEjbLocalObject();
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBusinessRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBusinessRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/DelegateBusinessRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1057;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ *
+ * A DelegateBusinessRemote.
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com>ALR</a>
+ * @version $Revision: $
+ */
+public interface DelegateBusinessRemote
+{
+ public static String JNDI_NAME_REMOTE = "DelegateBean/remote";
+
+ EJBLocalObject testGetEjbLocalObject();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1057;
+
+import javax.annotation.Resource;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+
+ at Stateless
+ at Local(TestBusinessLocal.class)
+ at Remote(TestBusinessRemote.class)
+ at LocalBinding(jndiBinding=TestBusinessLocal.JNDI_NAME_LOCAL)
+ at RemoteBinding(jndiBinding=TestBusinessRemote.JNDI_NAME_REMOTE)
+public class TestBusinessBean implements TestBusinessLocal, TestBusinessRemote
+{
+
+ // Instance Members
+ @Resource
+ private SessionContext ctx;
+
+ // Required Implementations
+
+ public EJBLocalObject testGetEjbLocalObject()
+ {
+ return ctx.getEJBLocalObject();
+ }
+
+ public EJBObject testGetEjbObject()
+ {
+ return ctx.getEJBObject();
+ }
+
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1057;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ * A TestBusinessLocal.
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestBusinessLocal
+{
+ public static final String JNDI_NAME_LOCAL = "TestBean/local";
+
+ EJBLocalObject testGetEjbLocalObject();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/TestBusinessRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1057;
+
+import javax.ejb.EJBObject;
+
+/**
+ * A TestBusinessRemote.
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestBusinessRemote
+{
+ public static final String JNDI_NAME_REMOTE = "TestBean/remote";
+
+ EJBObject testGetEjbObject();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/unit/GetEjbObjectWithNo21ViewUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/unit/GetEjbObjectWithNo21ViewUnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1057/unit/GetEjbObjectWithNo21ViewUnitTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1057.unit;
+
+import javax.ejb.EJBException;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.naming.NameNotFoundException;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1057.DelegateBusinessRemote;
+import org.jboss.ejb3.test.ejbthree1057.TestBusinessRemote;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * A GetEjbObjectWithNo21ViewUnitTestCase.
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class GetEjbObjectWithNo21ViewUnitTestCase extends JBossTestCase
+{
+
+ // Constructor
+
+ public GetEjbObjectWithNo21ViewUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ // Test Suite
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(GetEjbObjectWithNo21ViewUnitTestCase.class, "ejbthree1057.jar");
+ }
+
+ // Tests
+
+ /**
+ * Ensures that a call to SessionContext.getEJBObject fails when
+ * no EJB 2.1 view is defined
+ */
+ public void testGetEjbObjectWithNo21ViewFails() throws Exception
+ {
+ // Obtain test bean
+ TestBusinessRemote bean = null;
+ try
+ {
+ bean = (TestBusinessRemote) this.getInitialContext().lookup(TestBusinessRemote.JNDI_NAME_REMOTE);
+ }
+ catch (NameNotFoundException nnfe)
+ {
+ log.error("Could not obtain " + TestBusinessRemote.class.getName() + " from expected location "
+ + TestBusinessRemote.JNDI_NAME_REMOTE);
+ }
+
+ // Attempt to obtain EJBObject
+ EJBObject obj = null;
+ try
+ {
+ obj = bean.testGetEjbObject();
+ }
+ catch (EJBException ejbe)
+ {
+ if (ejbe.getCause() instanceof IllegalStateException)
+ {
+ log.info("Expected exception " + ejbe.getClass().getName() + " encountered.");
+ return;
+ }
+ }
+
+ // Should not be reached; fail the test
+ fail("Should have received exception while attempting to invoke SessionContext.getEJBObject().");
+ }
+
+ /**
+ * Ensures that a call to SessionContext.getEJBLocalObject fails when
+ * no EJB 2.1 view is defined
+ */
+ public void testGetEjbLocalObjectWithNo21ViewFails() throws Exception
+ {
+ // Obtain test bean
+ DelegateBusinessRemote bean = null;
+ try
+ {
+ bean = (DelegateBusinessRemote) this.getInitialContext().lookup(DelegateBusinessRemote.JNDI_NAME_REMOTE);
+ }
+ catch (NameNotFoundException nnfe)
+ {
+ log.error("Could not obtain " + DelegateBusinessRemote.class.getName() + " from expected location "
+ + DelegateBusinessRemote.JNDI_NAME_REMOTE);
+ }
+
+ // Attempt to obtain EJBObject
+ EJBLocalObject obj = null;
+ try
+ {
+ obj = bean.testGetEjbLocalObject();
+ }
+ catch (Exception e)
+ {
+ if (e.getCause() instanceof IllegalStateException)
+ {
+ log.info("Expected exception " + e.getClass().getName() + " encountered.");
+ return;
+ }
+ }
+
+ // Should not be reached; fail the test
+ fail("Should have received exception while attempting to invoke SessionContext.getEJBLocalObject().");
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Calculator.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Calculator.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Calculator.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public interface Calculator extends SuperInterface
+{
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+
+/**
+ * The calculator bean extends one interface and a superclass.
+ * The calculator interface extends the super interface implemented by the superclass, so
+ * in effect the calculator bean only implements the calculator interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+ at Stateless
+ at Local
+public class CalculatorBean extends SuperBean implements Calculator
+{
+ public int add(int a, int b)
+ {
+ return a + b;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonBase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonBase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonBase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+/**
+ * A common base for beans that implements an interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public abstract class CommonBase implements CommonInterface
+{
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public interface CommonInterface
+{
+ String sayHiTo(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+import javax.ejb.Stateless;
+
+/**
+ * This bean only implements one interface, so that interface
+ * should become the local business interface (4.6.6)
+ *
+ * But it extends a common base which also implements an interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+ at Stateless
+public class MyStatelessBean extends CommonBase implements MyStatelessLocal
+{
+ public String sayHiTo(String name)
+ {
+ return "Hi " + name;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+/**
+ * This business interface should not be annotated.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public interface MyStatelessLocal
+{
+ String sayHiTo(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public abstract class SuperBean implements SuperInterface
+{
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public interface SuperInterface
+{
+ int add(int a, int b);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Tester.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Tester.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/Tester.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+import javax.ejb.Remote;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+ at Remote
+public interface Tester extends CommonInterface, SuperInterface
+{
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/TesterBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/TesterBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/TesterBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+ at Stateless
+public class TesterBean implements Tester
+{
+ @EJB
+ private Calculator calculator;
+
+ @EJB
+ private MyStatelessLocal bean;
+
+ public int add(int a, int b)
+ {
+ return calculator.add(a, b);
+ }
+
+ public String sayHiTo(String name)
+ {
+ return bean.sayHiTo(name);
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/unit/DefaultLocalBusinessUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/unit/DefaultLocalBusinessUnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1062/unit/DefaultLocalBusinessUnitTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree1062.unit;
+
+import java.util.Date;
+
+import javax.naming.NameNotFoundException;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1062.Tester;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * If bean class implements a single interface, that interface is assumed to be the busi-
+ * ness interface of the bean. This business interface will be a local interface unless the
+ * interface is designated as a remote business interface by use of the Remote annota-
+ * tion on the bean class or interface or by means of the deployment descriptor.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 66585 $
+ */
+public class DefaultLocalBusinessUnitTestCase extends JBossTestCase
+{
+ public DefaultLocalBusinessUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(DefaultLocalBusinessUnitTestCase.class, "ejbthree1062.jar");
+ }
+
+ public void testCalculator() throws Exception
+ {
+ // Guard for errors
+ try
+ {
+ getInitialContext().lookup("CalculatorBean/local");
+ }
+ catch(NameNotFoundException e)
+ {
+ fail("CalculatorBean was not deployed properly");
+ }
+ Tester tester = (Tester) getInitialContext().lookup("TesterBean/remote");
+ int actual = tester.add(1, 2);
+ assertEquals(3, actual);
+ }
+
+ public void testSayHiTo() throws Exception
+ {
+ // Guard for errors
+ try
+ {
+ getInitialContext().lookup("MyStatelessBean/local");
+ }
+ catch(NameNotFoundException e)
+ {
+ fail("MyStatelessBean was not deployed properly");
+ }
+ Tester tester = (Tester) getInitialContext().lookup("TesterBean/remote");
+ Date date = new Date();
+ String expected = "Hi " + date;
+ String actual = tester.sayHiTo(date.toString());
+ assertEquals(expected, actual);
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/AopInterceptor.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/AopInterceptor.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/AopInterceptor.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1090;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class AopInterceptor implements Interceptor, java.io.Serializable
+{
+ private static final Logger log = Logger.getLogger(AopInterceptor.class);
+
+ public AopInterceptor()
+ {
+ }
+
+ public String getName()
+ {
+ return "AopInterceptor";
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ log.info("*** Intercepting in AopInterceptor" );
+ invocation.invokeNext();
+ return ":Aop Intercepted";
+ }
+ finally
+ {
+ }
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/Ejb3Interceptor.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/Ejb3Interceptor.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/Ejb3Interceptor.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1090;
+
+import java.io.Serializable;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 57207 $
+ */
+public class Ejb3Interceptor implements Serializable
+{
+ private static final Logger log = Logger.getLogger(Ejb3Interceptor.class);
+
+ private static boolean called = false;
+
+ public Ejb3Interceptor()
+ {
+ }
+
+ @AroundInvoke
+ public Object intercept(InvocationContext ctx) throws Exception
+ {
+ try
+ {
+ log.info("*** Intercepting in Ejb3Interceptor");
+ // This is to skip the second instance of the interceptor due to @Interceptors being TYPE and METHOD
+ if (called)
+ {
+ return ctx.proceed();
+ }
+ else
+ {
+ called = true;
+ return "Ejb3 Intercepted" + ctx.proceed();
+ }
+ }
+ finally
+ {
+ }
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1090;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+
+import org.jboss.annotation.ejb.AspectDomain;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version $Revision: 60233 $
+ */
+ at Stateful
+ at Remote(StatefulRemote.class)
+ at AspectDomain("Test Stateful Bean")
+//@javax.interceptor.Interceptors(value={org.jboss.ejb3.test.ejbthree1090.Ejb3Interceptor.class})
+public class StatefulBean
+ implements StatefulRemote
+{
+ private static final Logger log = Logger.getLogger(StatefulBean.class);
+
+ public String test() throws Exception
+ {
+ return "Not intercepted";
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/StatefulRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1090;
+
+
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatefulRemote
+{
+ public String test() throws Exception;
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/unit/InterceptorsUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/unit/InterceptorsUnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1090/unit/InterceptorsUnitTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1090.unit;
+
+import org.jboss.ejb3.test.ejbthree1090.StatefulRemote;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+import junit.framework.Test;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version $Revision: 60233 $
+ */
+public class InterceptorsUnitTestCase
+extends JBossTestCase
+{
+ private static final Logger log = Logger.getLogger(InterceptorsUnitTestCase.class);
+
+ public InterceptorsUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testAspectDomain() throws Exception
+ {
+ StatefulRemote stateful = (StatefulRemote)getInitialContext().lookup("StatefulBean/remote");
+ String result = stateful.test();
+ System.out.println(result);
+ assertEquals("Ejb3 Intercepted:Aop Intercepted", result);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(InterceptorsUnitTestCase.class, "ejbthree1090-test.jar");
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1092;
+
+import javax.ejb.Stateless;
+import javax.ejb.Remote;
+
+import org.jboss.annotation.ejb.Clustered;
+import org.jboss.ha.framework.interfaces.RandomRobin;
+import org.jboss.ha.framework.interfaces.RoundRobin;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateless
+ at Remote(StatelessRemote.class)
+ at Clustered(loadBalancePolicy = RandomRobin.class)
+public class StatelessBean implements StatelessRemote
+{
+ private static final Logger log = Logger.getLogger(StatelessBean.class);
+
+ public void test(int count)
+ {
+ log.info("****************** test " + count);
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1092;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatelessRemote
+{
+ void test(int count);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.test.ejbthree1092.unit;
+
+import org.jboss.ejb3.test.ejbthree1092.StatelessRemote;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+import junit.framework.Test;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class StatelessTestCase extends JBossTestCase
+{
+ private static final Logger log = Logger.getLogger(StatelessTestCase.class);
+
+ public StatelessTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testLoadBalanceOverride() throws Exception
+ {
+ StatelessRemote stateless = (StatelessRemote) getInitialContext().lookup("StatelessBean/remote");
+ assertNotNull(stateless);
+
+ for(int i = 0 ; i < 20 ; ++i)
+ {
+ stateless.test(i);
+ Thread.sleep(500);
+ }
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(StatelessTestCase.class, ""); //"ejbthree1092-test.jar");
+ }
+}
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree785;
+
+/**
+ * This one implements the business interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 65821 $
+ */
+public class AbstractStatelessBean implements MyStatelessRemote, MyStatelessLocal
+{
+ public String sayHiTo(String name)
+ {
+ return "Hi " + name;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree785;
+
+import javax.ejb.Local;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 65821 $
+ */
+ at Local
+public interface MyStateless
+{
+ String sayHiTo(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree785;
+
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author <a href="mailto:alr at alrubinger.com">ALR</a>
+ * @version $Revision: 65821 $
+ */
+ at Stateless
+ at RemoteBinding(jndiBinding = MyStatelessBean.JNDI_NAME_REMOTE)
+ at LocalBinding(jndiBinding = MyStatelessBean.JNDI_NAME_LOCAL)
+public class MyStatelessBean extends AbstractStatelessBean
+{
+ public static final String JNDI_NAME_REMOTE = "MyStatelessBean/remote";
+
+ public static final String JNDI_NAME_LOCAL = "MyStatelessBean/local";
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree785;
+
+import javax.ejb.Local;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Local
+public interface MyStatelessLocal
+{
+ String sayHiTo(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree785;
+
+import javax.ejb.Remote;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 65821 $
+ */
+ at Remote
+public interface MyStatelessRemote
+{
+ String sayHiTo(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,15 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree785;
+
+import javax.ejb.Remote;
+
+ at Remote
+public interface Tester
+{
+ String sayHiTo(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree785;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+
+ at Stateless
+ at RemoteBinding(jndiBinding = TesterBean.JNDI_NAME)
+public class TesterBean implements Tester
+{
+ // Class Members
+ public static final String JNDI_NAME = "TesterBean/remote";
+
+ @EJB
+ private MyStatelessLocal local;
+
+ public String sayHiTo(String name)
+ {
+ return local.sayHiTo(name);
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, 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.ejb3.test.ejbthree785.unit;
+
+import java.util.Date;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree785.MyStatelessBean;
+import org.jboss.ejb3.test.ejbthree785.MyStatelessLocal;
+import org.jboss.ejb3.test.ejbthree785.MyStatelessRemote;
+import org.jboss.ejb3.test.ejbthree785.Tester;
+import org.jboss.ejb3.test.ejbthree785.TesterBean;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Test to see if a super can have the business interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author <a href="mailto:alr at alrubinger.com">ALR</a>
+ * @version $Revision: 65821 $
+ */
+public class SuperBeanTesterUnitTestCase extends JBossTestCase
+{
+
+ public SuperBeanTesterUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Ensures that a remote view of a business interface
+ * implemented by a superclass of an EJB's Implementation
+ * Class is deployed and invokable
+ *
+ * @throws Exception
+ */
+ public void testSuperRemoteInvokable() throws Exception
+ {
+ MyStatelessRemote session = (MyStatelessRemote) getInitialContext().lookup(MyStatelessBean.JNDI_NAME_REMOTE);
+ Date date = new Date();
+ String expected = "Hi " + date.toString();
+ String actual = session.sayHiTo(date.toString());
+ assertEquals(expected, actual);
+ }
+
+ /**
+ * Ensures that a local view of a business interface
+ * implemented by a superclass of an EJB's Implementation
+ * Class is deployed; won't be invokable as unit test runs in separate JVM
+ *
+ * @throws Exception
+ */
+ public void testSuperLocalDeployed() throws Exception
+ {
+ MyStatelessLocal session = (MyStatelessLocal) getInitialContext().lookup(MyStatelessBean.JNDI_NAME_LOCAL);
+ assertNotNull(session);
+ }
+
+ /**
+ * Ensures that dependencies may be made upon EJBs with @Local implemented by
+ * superclass of an EJB's Implementation Class, and that invocation succeeds.
+ *
+ * @throws Exception
+ */
+ public void testSuperLocalViaRemoteDelegate() throws Exception
+ {
+ Tester session = (Tester) getInitialContext().lookup(TesterBean.JNDI_NAME);
+ Date date = new Date();
+ String expected = "Hi " + date.toString();
+ String actual = session.sayHiTo(date.toString());
+ assertEquals(expected, actual);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(SuperBeanTesterUnitTestCase.class, "ejbthree785.jar");
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/AbstractRemoveBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/AbstractRemoveBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/AbstractRemoveBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree786;
+
+/**
+ *
+ * AbstractRemoveBean.
+ *
+ * @author <a href="arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class AbstractRemoveBean implements Remove
+{
+ // Class Members
+ public static final String RETURN_STRING = "Remove";
+
+ // Required Implementations
+ public String remove()
+ {
+ return AbstractRemoveBean.RETURN_STRING;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Delegate.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Delegate.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Delegate.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree786;
+
+import javax.ejb.Remote;
+
+/**
+ * A Delegate to invoke upon local views of the Remove EJBs
+ *
+ * @author <a href="arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Remote
+public interface Delegate
+{
+ String invokeStatelessRemove();
+
+ String invokeStatefulRemove();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/DelegateBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/DelegateBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/DelegateBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree786;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+
+ at Stateless
+ at RemoteBinding(jndiBinding = DelegateBean.JNDI_NAME_REMOTE)
+public class DelegateBean implements Delegate
+{
+ // Class Members
+ public static final String JNDI_NAME_REMOTE = "DelegateBean/remote";
+
+ // Instance Members
+
+ @EJB
+ private RemoveStatefulLocal stateful;
+
+ @EJB
+ private RemoveStatelessLocal stateless;
+
+ // Required Implementations
+
+ public String invokeStatefulRemove()
+ {
+ return stateful.remove();
+ }
+
+ public String invokeStatelessRemove()
+ {
+ return stateless.remove();
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21View.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21View.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21View.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree786;
+
+import javax.ejb.EJBObject;
+import javax.ejb.Remote;
+
+/**
+ * An Ejb21View.
+ *
+ * @author <a href="arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+//@Remote
+public interface Ejb21View extends EJBObject
+{
+ String test();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree786;
+
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+
+ at Stateful
+ at Remote(Ejb21View.class)
+ at RemoteHome(Ejb21ViewHome.class)
+ at RemoteBinding(jndiBinding = Ejb21ViewBean.JNDI_NAME_REMOTE)
+public class Ejb21ViewBean
+{
+
+ // Class Members
+
+ public static final String JNDI_NAME_REMOTE = "Ejb21ViewBean/remote";
+
+ public static final String TEST_STRING = "Test";
+
+ // Required Implementations
+
+ public String test()
+ {
+ return Ejb21ViewBean.TEST_STRING;
+ }
+
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewHome.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewHome.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Ejb21ViewHome.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * @author carlo
+ *
+ */
+public interface Ejb21ViewHome extends EJBHome
+{
+ Ejb21View create() throws CreateException, RemoteException;
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Remove.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Remove.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/Remove.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+/**
+ * Defines a method named "remove" of return type "String"
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface Remove
+{
+ String remove();
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import javax.ejb.Local;
+
+/**
+ * Local implementation of "Remove"
+ *
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Local
+public interface RemoveStatefulLocal extends Remove
+{
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatefulRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import javax.ejb.Remote;
+
+/**
+ * Remote implementation of "Remove"
+ *
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Remote
+public interface RemoveStatefulRemote extends Remove
+{
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessLocal.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessLocal.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessLocal.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import javax.ejb.Local;
+
+/**
+ * Local implementation of "Remove"
+ *
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Local
+public interface RemoveStatelessLocal extends Remove
+{
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessRemote.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessRemote.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/RemoveStatelessRemote.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import javax.ejb.Remote;
+
+/**
+ * Remote implementation of "Remove"
+ *
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Remote
+public interface RemoveStatelessRemote extends Remove
+{
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatefulRemoveBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatefulRemoveBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatefulRemoveBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import javax.ejb.Stateful;
+
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+
+/**
+ * Defines a custom "remove" method that is not associated w/ EJBOBject/EJBLocalObject.remove
+ *
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at LocalBinding(jndiBinding = StatefulRemoveBean.JNDI_NAME_LOCAL)
+ at RemoteBinding(jndiBinding = StatefulRemoveBean.JNDI_NAME_REMOTE)
+public class StatefulRemoveBean extends AbstractRemoveBean implements RemoveStatefulRemote, RemoveStatefulLocal
+{
+ // Class Members
+ public static final String JNDI_NAME_REMOTE = "StatefulRemoveBean/remote";
+
+ public static final String JNDI_NAME_LOCAL = "StatefulRemoveBean/local";
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatelessRemoveBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatelessRemoveBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/StatelessRemoveBean.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786;
+
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+
+/**
+ * Defines a custom "remove" method that is not associated w/ EJBOBject/EJBLocalObject.remove
+ *
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at LocalBinding(jndiBinding = StatelessRemoveBean.JNDI_NAME_LOCAL)
+ at RemoteBinding(jndiBinding = StatelessRemoveBean.JNDI_NAME_REMOTE)
+public class StatelessRemoveBean extends AbstractRemoveBean implements RemoveStatelessRemote, RemoveStatelessLocal
+{
+ // Class Members
+ public static final String JNDI_NAME_REMOTE = "StatelessRemoveBean/remote";
+
+ public static final String JNDI_NAME_LOCAL = "StatelessRemoveBean/local";
+}
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/unit/RemoveMethodUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/unit/RemoveMethodUnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/ejbthree786/unit/RemoveMethodUnitTestCase.java 2007-12-03 16:47:32 UTC (rev 67781)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, 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.ejb3.test.ejbthree786.unit;
+
+import javax.ejb.EJBObject;
+import javax.ejb.NoSuchEJBException;
+import javax.rmi.PortableRemoteObject;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree786.AbstractRemoveBean;
+import org.jboss.ejb3.test.ejbthree786.Delegate;
+import org.jboss.ejb3.test.ejbthree786.DelegateBean;
+import org.jboss.ejb3.test.ejbthree786.Ejb21View;
+import org.jboss.ejb3.test.ejbthree786.Ejb21ViewBean;
+import org.jboss.ejb3.test.ejbthree786.Ejb21ViewHome;
+import org.jboss.ejb3.test.ejbthree786.RemoveStatefulRemote;
+import org.jboss.ejb3.test.ejbthree786.RemoveStatelessRemote;
+import org.jboss.ejb3.test.ejbthree786.StatefulRemoveBean;
+import org.jboss.ejb3.test.ejbthree786.StatelessRemoveBean;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * We want a remove action on a backing bean.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author <a href="mailto:arubinge at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class RemoveMethodUnitTestCase extends JBossTestCase
+{
+
+ public RemoveMethodUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testRemoveStatefulRemote() throws Exception
+ {
+ RemoveStatefulRemote session = (RemoveStatefulRemote) getInitialContext().lookup(
+ StatefulRemoveBean.JNDI_NAME_REMOTE);
+ String result = session.remove();
+ assertEquals(AbstractRemoveBean.RETURN_STRING, result);
+ }
+
+ public void testRemoveStatelessRemote() throws Exception
+ {
+ RemoveStatelessRemote session = (RemoveStatelessRemote) getInitialContext().lookup(
+ StatelessRemoveBean.JNDI_NAME_REMOTE);
+ String result = session.remove();
+ assertEquals(AbstractRemoveBean.RETURN_STRING, result);
+ }
+
+ public void testRemoveStatefulLocalViaDelegate() throws Exception
+ {
+ Delegate session = (Delegate) getInitialContext().lookup(DelegateBean.JNDI_NAME_REMOTE);
+ String result = session.invokeStatefulRemove();
+ assertEquals(AbstractRemoveBean.RETURN_STRING, result);
+ }
+
+ public void testRemoveStatelessLocalViaDelegate() throws Exception
+ {
+ Delegate session = (Delegate) getInitialContext().lookup(DelegateBean.JNDI_NAME_REMOTE);
+ String result = session.invokeStatelessRemove();
+ assertEquals(AbstractRemoveBean.RETURN_STRING, result);
+ }
+
+ public void testExplicitExtensionEjbObjectInProxy() throws Exception
+ {
+ // Obtain stub
+ //Ejb21View session = (Ejb21View) getInitialContext().lookup(Ejb21ViewBean.JNDI_NAME_REMOTE);
+ Object obj = getInitialContext().lookup("Ejb21ViewBean/home");
+ Ejb21ViewHome home = (Ejb21ViewHome) PortableRemoteObject.narrow(obj, Ejb21ViewHome.class);
+ Ejb21View session = home.create();
+
+ // Ensure EJBObject
+ assertTrue(session instanceof EJBObject);
+
+ // Cast and remove appropriately, ensuring removed
+ boolean removed = false;
+ String result = session.test();
+ assertEquals(Ejb21ViewBean.TEST_STRING, result);
+ session.remove();
+ try
+ {
+ session.test();
+ }
+ catch (NoSuchEJBException nsee)
+ {
+ removed = true;
+ }
+ assertTrue(removed);
+
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(RemoveMethodUnitTestCase.class, "ejbthree786.jar");
+ }
+}
More information about the jboss-cvs-commits
mailing list