[jboss-cvs] JBossAS SVN: r84539 - in projects/ejb3/trunk: timerservice-mk2 and 26 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 20 10:09:13 EST 2009


Author: wolfc
Date: 2009-02-20 10:09:12 -0500 (Fri, 20 Feb 2009)
New Revision: 84539

Added:
   projects/ejb3/trunk/timerservice-mk2/
   projects/ejb3/trunk/timerservice-mk2/.classpath
   projects/ejb3/trunk/timerservice-mk2/.project
   projects/ejb3/trunk/timerservice-mk2/.settings/
   projects/ejb3/trunk/timerservice-mk2/.settings/org.eclipse.jdt.core.prefs
   projects/ejb3/trunk/timerservice-mk2/.settings/org.maven.ide.eclipse.prefs
   projects/ejb3/trunk/timerservice-mk2/pom.xml
   projects/ejb3/trunk/timerservice-mk2/src/
   projects/ejb3/trunk/timerservice-mk2/src/main/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerHandleImpl.java
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerImpl.java
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceFactoryImpl.java
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceImpl.java
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/persistence/
   projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/persistence/TimerEntity.java
   projects/ejb3/trunk/timerservice-mk2/src/main/resources/
   projects/ejb3/trunk/timerservice-mk2/src/test/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/AbstractTimerTestCase.java
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/HSQLDBService.java
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleClassLoaderDeployer.java
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleDataSourceDependencyResolver.java
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleJavaEEModuleInformer.java
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/simple/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/simple/unit/
   projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/simple/unit/SimpleTimerTestCase.java
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/jboss-beans.xml
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/persistence.xml
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/annotationhandler.xml
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/deploy/
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/deploy/jpa-deployers-beans.xml
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/jndi.properties
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/log4j.xml
Removed:
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/transactionmanager.xml
Modified:
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap.xml
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/hsqldb.xml
   projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/maindeployer.xml
Log:
EJBTHREE-1733: initial setup (only does single action timer)


Property changes on: projects/ejb3/trunk/timerservice-mk2
___________________________________________________________________
Name: svn:ignore
   + eclipse-target
FileHandler@*
target


Added: projects/ejb3/trunk/timerservice-mk2/.classpath
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/.classpath	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/.classpath	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,81 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/test/java" output="eclipse-target/tests-classes"/>
+  <classpathentry kind="src" path="src/test/resources" output="eclipse-target/tests-classes" excluding="**/*.java"/>
+  <classpathentry kind="output" path="eclipse-target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar" sourcepath="M2_REPO/apache-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar" sourcepath="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar" sourcepath="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar" sourcepath="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/hsqldb/hsqldb/1.8.0.8-brew/hsqldb-1.8.0.8-brew.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar" sourcepath="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.GA/jboss-aop-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.GA/jboss-aop-2.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.0.CR2/jboss-aop-mc-int-2.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.0.CR2/jboss-aop-mc-int-2.0.0.CR2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/0.1.0-SNAPSHOT/jboss-bootstrap-0.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/0.1.0-SNAPSHOT/jboss-bootstrap-0.1.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.CR5/jboss-classloader-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.CR5/jboss-classloader-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.CR5/jboss-classloading-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.CR5/jboss-classloading-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.0.0.CR2/jboss-classloading-spi-5.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.0.0.CR2/jboss-classloading-spi-5.0.0.CR2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.CR5/jboss-classloading-vfs-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.CR5/jboss-classloading-vfs-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR5/jboss-dependency-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR5/jboss-dependency-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.0.CR5/jboss-deployers-client-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.0.CR5/jboss-deployers-client-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.CR5/jboss-deployers-client-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.CR5/jboss-deployers-client-spi-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.0.CR5/jboss-deployers-core-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.0.CR5/jboss-deployers-core-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.CR5/jboss-deployers-core-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.CR5/jboss-deployers-core-spi-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.0.CR5/jboss-deployers-impl-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.0.CR5/jboss-deployers-impl-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.CR5/jboss-deployers-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.CR5/jboss-deployers-spi-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.CR5/jboss-deployers-structure-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.CR5/jboss-deployers-structure-spi-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.0.CR5/jboss-deployers-vfs-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.0.CR5/jboss-deployers-vfs-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.CR5/jboss-deployers-vfs-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.CR5/jboss-deployers-vfs-spi-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-api/3.1.0-SNAPSHOT/jboss-ejb3-api-3.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-api/3.1.0-SNAPSHOT/jboss-ejb3-api-3.1.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-jta-profile/0.1.0-SNAPSHOT/jboss-ejb3-jta-profile-0.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-jta-profile/0.1.0-SNAPSHOT/jboss-ejb3-jta-profile-0.1.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxrpc/2.0.3.GA/jboss-jaxrpc-2.0.3.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxws/3.0.1-native-2.0.4.GA/jboss-jaxws-3.0.1-native-2.0.4.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.CR1/jboss-jca-api-1.5.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.CR1/jboss-jca-api-1.5.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.CR1/jboss-jms-api-1.1.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.CR1/jboss-jms-api-1.1.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0-SNAPSHOT/jboss-jpa-deployers-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0-SNAPSHOT/jboss-jpa-deployers-1.0.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jpa/jboss-jpa-mcint/1.0.0-SNAPSHOT/jboss-jpa-mcint-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/jpa/jboss-jpa-mcint/1.0.0-SNAPSHOT/jboss-jpa-mcint-1.0.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.CR5/jboss-kernel-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.CR5/jboss-kernel-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.0.0.CR4/jboss-managed-2.0.0.CR4.jar" sourcepath="M2_REPO/org/jboss/man/jboss-managed/2.0.0.CR4/jboss-managed-2.0.0.CR4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.0.CR3/jboss-mdr-2.0.0.CR3.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.0.CR3/jboss-mdr-2.0.0.CR3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.CR16/jboss-metadata-1.0.0.CR16.jar" sourcepath="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.CR16/jboss-metadata-1.0.0.CR16-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.CR4/jboss-metatype-2.0.0.CR4.jar" sourcepath="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.CR4/jboss-metatype-2.0.0.CR4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR2/jboss-transaction-api-1.0.1.CR2.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR2/jboss-transaction-api-1.0.1.CR2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.0.3.GA/jboss-transaction-spi-5.0.3.GA.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.0.3.GA/jboss-transaction-spi-5.0.3.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.CR5/jboss-vfs-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.0.0.CR5/jboss-vfs-2.0.0.CR5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossts/jbossjta/4.4.0.GA/jbossjta-4.4.0.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossts/jbossjta-integration/4.4.0.GA/jbossjta-integration-4.4.0.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.3.GA/jbossws-spi-1.0.3.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnpserver/5.0.0.CR1/jnpserver-5.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/naming/jnpserver/5.0.0.CR1/jnpserver-5.0.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar" sourcepath="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.0.GA/slf4j-jboss-logging-1.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.0.GA/slf4j-jboss-logging-1.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/trove/trove/1.0.2/trove-1.0.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+</classpath>
\ No newline at end of file

Added: projects/ejb3/trunk/timerservice-mk2/.project
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/.project	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/.project	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,18 @@
+<projectDescription>
+  <name>jboss-ejb3-timerservice-mk2</name>
+  <comment>JBoss EJB 3.x TimerService Mark 2 is an implementation based on
+    the venerable JBoss AS timer service meant for use in EJB 2.</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.maven.ide.eclipse.maven2Builder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.maven.ide.eclipse.maven2Nature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: projects/ejb3/trunk/timerservice-mk2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/.settings/org.eclipse.jdt.core.prefs	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,5 @@
+#Thu Feb 12 11:28:22 CET 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: projects/ejb3/trunk/timerservice-mk2/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/.settings/org.maven.ide.eclipse.prefs	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,8 @@
+#Thu Feb 12 11:37:46 CET 2009
+activeProfiles=eclipse
+eclipse.preferences.version=1
+fullBuildGoals=
+includeModules=false
+resolveWorkspaceProjects=false
+resourceFilterGoals=
+version=1

Added: projects/ejb3/trunk/timerservice-mk2/pom.xml
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/pom.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,177 @@
+<!--
+  vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.jboss.ejb3</groupId>
+    <artifactId>jboss-ejb3-build</artifactId>
+    <version>1.0.2-SNAPSHOT</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- Maven POM Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Information -->
+  <artifactId>jboss-ejb3-timerservice-mk2</artifactId>
+  <packaging>jar</packaging>
+  <version>0.1.0-SNAPSHOT</version>
+  <name>JBoss EJB 3.x TimerService Mark 2</name>
+  <description>
+    JBoss EJB 3.x TimerService Mark 2 is an implementation based on
+    the venerable JBoss AS timer service meant for use in EJB 2.
+  </description>
+  <url>http://labs.jboss.com/jbossejb3/</url>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+          <executable>${JDK6_HOME}/bin/javac</executable>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>enforce-jdk6</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <requireProperty>
+                  <property>env.JDK6_HOME</property>
+                  <message>JDK6_HOME is not set</message>
+                </requireProperty>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>once</forkMode>
+          <jvm>${JDK6_HOME}/bin/java</jvm>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <!-- For 'mocking' a DataSource we use Hypersonic -->
+    <dependency>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <version>1.8.0.8-brew</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <!-- JPA 1.0 -->
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>ejb3-persistence</artifactId>
+      <version>1.0.2.GA</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap</artifactId>
+      <version>0.1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs</artifactId>
+      <version>${version.org.jboss.deployers}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-api</artifactId>
+      <version>3.1.0-SNAPSHOT</version>
+    </dependency>    
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-jta-profile</artifactId>
+      <version>0.1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>    
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-timerservice-spi</artifactId>
+      <version>[0,)</version>
+      <exclusions>
+        <!-- Make sure the EJB 3.0 API doesn't get in here -->
+        <exclusion>
+          <groupId>org.jboss.javaee</groupId>
+          <artifactId>jboss-ejb-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jpa</groupId>
+      <artifactId>jboss-jpa-deployers</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+      <exclusions>
+        <!-- Make sure the EJB 3.0 API doesn't get in here -->
+        <exclusion>
+          <groupId>org.jboss.javaee</groupId>
+          <artifactId>jboss-ejb-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jpa</groupId>
+      <artifactId>jboss-jpa-mcint</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.naming</groupId>
+      <artifactId>jnpserver</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.slf4j</groupId>
+      <artifactId>slf4j-jboss-logging</artifactId>
+      <version>1.0.0.GA</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+<!--
+  <profiles>
+    <profile>
+      <id>jdk6</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+    </profile>
+  </profiles>
+-->
+</project>

Added: projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerHandleImpl.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerHandleImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerHandleImpl.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2;
+
+import java.util.UUID;
+
+import javax.ejb.EJBException;
+import javax.ejb.NoSuchObjectLocalException;
+import javax.ejb.Timer;
+import javax.ejb.TimerHandle;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class TimerHandleImpl implements TimerHandle
+{
+   private static final long serialVersionUID = 1L;
+
+   private UUID id;
+   private transient TimerServiceImpl service;
+   
+   /**
+    * For serialization only 
+    */
+   public TimerHandleImpl()
+   {
+      
+   }
+   
+   protected TimerHandleImpl(UUID id, TimerServiceImpl service)
+   {
+      this.id = id;
+      this.service = service;
+   }
+   
+   public Timer getTimer() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      if(service == null)
+         throw new IllegalStateException("serialization NYI");
+      return service.getTimer(this);
+   }
+}

Added: projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerImpl.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerImpl.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,455 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2;
+
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.ACTIVE;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.CANCELED;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.CANCELED_IN_TX;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.CREATED;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.EXPIRED;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.IN_TIMEOUT;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.RETRY_TIMEOUT;
+import static org.jboss.ejb3.timerservice.mk2.TimerImpl.State.STARTED_IN_TX;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.UUID;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+import javax.ejb.EJBException;
+import javax.ejb.NoSuchObjectLocalException;
+import javax.ejb.ScheduleExpression;
+import javax.ejb.Timer;
+import javax.ejb.TimerHandle;
+import javax.transaction.RollbackException;
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+
+import org.jboss.ejb3.timerservice.spi.TimedObjectInvoker;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class TimerImpl implements Timer
+{
+   private static final Logger log = Logger.getLogger(TimerImpl.class);
+   
+   private State timerState;
+   private TimerServiceImpl timerService;
+   private TimedObjectInvoker timedObjectInvoker;
+   private UUID id;
+   private Serializable info;
+   private TimerHandleImpl handle;
+
+   private Date initialExpiration;
+   private long intervalDuration;
+   private long nextExpiration;
+
+   private ScheduledFuture<?> future;
+
+
+   /**
+    * Timer states and their allowed transitions
+    * <p/>
+    * CREATED  - on create
+    * CREATED -> STARTED_IN_TX - when strated with Tx
+    * CREATED -> ACTIVE  - when started without Tx
+    * STARTED_IN_TX -> ACTIVE - on Tx commit
+    * STARTED_IN_TX -> CANCELED - on Tx rollback
+    * ACTIVE -> CANCELED_IN_TX - on cancel() with Tx
+    * ACTIVE -> CANCELED - on cancel() without Tx
+    * CANCELED_IN_TX -> CANCELED - on Tx commit
+    * CANCELED_IN_TX -> ACTIVE - on Tx rollback
+    * ACTIVE -> IN_TIMEOUT - on TimerTask run
+    * IN_TIMEOUT -> ACTIVE - on Tx commit if intervalDuration > 0
+    * IN_TIMEOUT -> EXPIRED -> on Tx commit if intervalDuration == 0
+    * IN_TIMEOUT -> RETRY_TIMEOUT -> on Tx rollback
+    * RETRY_TIMEOUT -> ACTIVE -> on Tx commit/rollback if intervalDuration > 0
+    * RETRY_TIMEOUT -> EXPIRED -> on Tx commit/rollback if intervalDuration == 0
+    */
+   static enum State {
+      CREATED,
+      STARTED_IN_TX,
+      ACTIVE,
+      CANCELED_IN_TX,
+      CANCELED,
+      EXPIRED,
+      IN_TIMEOUT,
+      RETRY_TIMEOUT
+   };
+   
+   class TimerSynchronization implements Synchronization
+   {
+      public void afterCompletion(int status)
+      {
+         if (status == Status.STATUS_COMMITTED)
+         {
+            log.debug("commit: " + this);
+
+            switch (timerState)
+            {
+               case STARTED_IN_TX:
+                  scheduleTimeout();
+                  setTimerState(ACTIVE);
+                  break;
+
+               case CANCELED_IN_TX:
+                  cancelTimer();
+                  break;
+
+               case IN_TIMEOUT:
+               case RETRY_TIMEOUT:
+                  if(intervalDuration == 0)
+                  {
+                     setTimerState(EXPIRED);
+                     cancelTimer();
+                  }
+                  else
+                  {
+                     setTimerState(ACTIVE);
+                  }
+                  break;
+            }
+         }
+         else if (status == Status.STATUS_ROLLEDBACK)
+         {
+            log.debug("rollback: " + this);
+
+            switch (timerState)
+            {
+               case STARTED_IN_TX:
+                  cancelTimer();
+                  break;
+                  
+               case CANCELED_IN_TX:
+                  setTimerState(ACTIVE);
+                  break;
+                  
+               case IN_TIMEOUT:
+                  setTimerState(RETRY_TIMEOUT);
+                  log.debug("retry: " + TimerImpl.this);
+                  timerService.retryTimeout(TimerImpl.this);
+                  break;
+                  
+               case RETRY_TIMEOUT:
+                  if (intervalDuration == 0)
+                  {
+                     setTimerState(EXPIRED);
+                     cancelTimer();
+                  }
+                  else
+                  {
+                     setTimerState(ACTIVE);
+                  }
+                  break;
+            }
+         }
+      }
+
+      public void beforeCompletion()
+      {
+         switch(timerState)
+         {
+            case CANCELED_IN_TX:
+               timerService.removeTimer(TimerImpl.this);
+               break;
+
+            case IN_TIMEOUT:
+            case RETRY_TIMEOUT:
+               if(intervalDuration == 0)
+               {
+                  timerService.removeTimer(TimerImpl.this);
+               }
+               break;
+         }
+      }
+      
+   };
+   
+   class TimerTaskImpl implements Runnable
+   {
+      public void run()
+      {
+         log.debug("run: " + TimerImpl.this);
+
+         // Set next scheduled execution attempt. This is used only
+         // for reporting (getTimeRemaining()/getNextTimeout())
+         // and not from the underlying jdk timer implementation.
+         if (isActive() && intervalDuration > 0)
+         {
+            nextExpiration += intervalDuration;
+         }
+         
+         // If a retry thread is in progress, we don't want to allow another
+         // interval to execute until the retry is complete. See JIRA-1926.
+         if (isInRetry())
+         {
+            log.debug("Timer in retry mode, skipping this scheduled execution");
+            return;
+         }
+         
+         if (isActive())
+         {
+            try
+            {
+               setTimerState(IN_TIMEOUT);
+               timedObjectInvoker.callTimeout(TimerImpl.this);
+            }
+            catch (Exception e)
+            {
+               log.error("Error invoking ejbTimeout", e);
+            }
+            finally
+            {
+               if (timerState == IN_TIMEOUT)
+               {
+                  log.debug("Timer was not registered with Tx, resetting state: " + TimerImpl.this);
+                  if (intervalDuration == 0)
+                  {
+                     setTimerState(EXPIRED);
+                     killTimer();
+                  }
+                  else
+                  {
+                     setTimerState(ACTIVE);
+                  }
+               }
+            }
+         }
+      }
+   }
+   
+   TimerImpl(TimerServiceImpl service, UUID id, Serializable info)
+   {
+      assert service != null : "service is null";
+      assert id != null : "id is null";
+      
+      this.timerService = service;
+      this.timedObjectInvoker = service.getInvoker();
+      this.id = id;
+      this.info = info;
+      
+      this.handle = new TimerHandleImpl(id, service);
+      
+      setTimerState(CREATED);
+   }
+   
+   /**
+    * @throws NoSuchObjectLocalException if the txtimer was canceled or has expired
+    */
+   private void assertTimedOut()
+   {
+      if (timerState == EXPIRED)
+         throw new NoSuchObjectLocalException("Timer has expired");
+      if (timerState == CANCELED_IN_TX || timerState == CANCELED)
+         throw new NoSuchObjectLocalException("Timer was canceled");
+   }
+   
+   /* (non-Javadoc)
+    * @see javax.ejb.Timer#cancel()
+    */
+   public void cancel() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      // TODO Auto-generated method stub
+      //
+      throw new RuntimeException("NYI");
+   }
+
+   /**
+    * killTimer w/o persistence work
+    */
+   protected void cancelTimer()
+   {
+      if (timerState != EXPIRED)
+         setTimerState(CANCELED);
+      future.cancel(false);
+   }
+   
+   public TimerHandle getHandle() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      return handle;
+   }
+
+   protected UUID getId()
+   {
+      return id;
+   }
+   
+   /* (non-Javadoc)
+    * @see javax.ejb.Timer#getInfo()
+    */
+   public Serializable getInfo() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      // TODO Auto-generated method stub
+      //return null;
+      throw new RuntimeException("NYI");
+   }
+
+   /* (non-Javadoc)
+    * @see javax.ejb.Timer#getNextTimeout()
+    */
+   public Date getNextTimeout() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      // TODO Auto-generated method stub
+      //return null;
+      throw new RuntimeException("NYI");
+   }
+
+   /* (non-Javadoc)
+    * @see javax.ejb.Timer#getSchedule()
+    */
+   public ScheduleExpression getSchedule() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      // TODO Auto-generated method stub
+      //return null;
+      throw new RuntimeException("NYI");
+   }
+   
+   /* (non-Javadoc)
+    * @see javax.ejb.Timer#getTimeRemaining()
+    */
+   public long getTimeRemaining() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      // TODO Auto-generated method stub
+      //return 0;
+      throw new RuntimeException("NYI");
+   }
+   
+   protected boolean isActive()
+   {
+      return !isCanceled() && !isExpired();
+   }
+
+   protected boolean isCanceled()
+   {
+      return timerState == CANCELED_IN_TX || timerState == CANCELED;
+   }
+
+   protected boolean isExpired()
+   {
+      return timerState == EXPIRED;
+   }
+   
+   protected boolean isInRetry() {
+      return timerState == RETRY_TIMEOUT;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.ejb.Timer#isPersistent()
+    */
+   public boolean isPersistent() throws IllegalStateException, NoSuchObjectLocalException, EJBException
+   {
+      // TODO Auto-generated method stub
+      //return false;
+      throw new RuntimeException("NYI");
+   }
+   
+   /**
+    * Kill the timer, and remove it from the timer service
+    */
+   protected void killTimer()
+   {
+      log.debug("killTimer: " + this);
+      if (timerState != EXPIRED)
+         setTimerState(CANCELED);
+      timerService.removeTimer(this);
+      future.cancel(false);
+   }
+   
+   protected void registerTimerWithTx()
+   {
+      Transaction tx = timerService.getTransaction();
+      if(tx != null)
+      {
+         try
+         {
+            tx.registerSynchronization(new TimerSynchronization());
+         }
+         catch (RollbackException e)
+         {
+            // TODO: throw the right exception
+            throw new EJBException(e);
+         }
+         catch (SystemException e)
+         {
+            throw new EJBException(e);
+         }
+      }
+   }
+   
+   protected void scheduleTimeout()
+   {
+      Runnable command = new TimerTaskImpl();
+      long delay = nextExpiration - System.currentTimeMillis();
+      if(delay < 0) delay = 0;
+      if (intervalDuration > 0)
+         future = timerService.getExecutor().scheduleAtFixedRate(command, delay, intervalDuration, TimeUnit.MILLISECONDS);
+      else
+         future = timerService.getExecutor().schedule(command, delay, TimeUnit.MILLISECONDS);
+   }
+   
+   private void setTimerState(State state)
+   {
+      log.debug(this + " set state " + state);
+      this.timerState = state;
+   }
+   
+   protected void startInTx()
+   {
+      if (timerService.getTransaction() != null)
+      {
+         // don't schedule the timeout yet
+         setTimerState(STARTED_IN_TX);
+      }
+      else
+      {
+         scheduleTimeout();
+         setTimerState(ACTIVE);
+      }
+   }
+   
+   protected void startTimer(Date initialExpiration, long intervalDuration)
+   {
+      this.initialExpiration = initialExpiration;
+      this.nextExpiration = initialExpiration.getTime();
+      this.intervalDuration = intervalDuration;
+      
+      timerService.addTimer(this);
+      registerTimerWithTx();
+      
+      // the timer will actually go ACTIVE on tx commit
+      startInTx();
+   }
+   
+   @Override
+   public String toString()
+   {
+      long remaining = nextExpiration - System.currentTimeMillis();
+      String retStr = "[id=" + id + ",service=" + timerService + ",remaining=" + remaining + ",intervalDuration=" + intervalDuration + "," + timerState + "]";
+      return retStr;
+   }
+}

Added: projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceFactoryImpl.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceFactoryImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceFactoryImpl.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+
+import javax.ejb.TimerService;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.PersistenceUnit;
+import javax.transaction.TransactionManager;
+
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.ejb3.timerservice.spi.TimedObjectInvoker;
+import org.jboss.ejb3.timerservice.spi.TimerServiceFactory;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class TimerServiceFactoryImpl implements TimerServiceFactory
+{
+   private EntityManagerFactory emf;
+   private TransactionManager transactionManager;
+   private ScheduledExecutorService executor;
+   
+   public TimerService createTimerService(TimedObjectInvoker invoker)
+   {
+      // TODO: inject
+      executor = Executors.newScheduledThreadPool(10);
+      
+      return new TimerServiceImpl(invoker, emf.createEntityManager(), transactionManager, executor);
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.ejb3.timerservice.spi.TimerServiceFactory#restoreTimerService(javax.ejb.TimerService)
+    */
+   public void restoreTimerService(TimerService timerService)
+   {
+      // TODO Auto-generated method stub
+      //
+      throw new RuntimeException("NYI");
+   }
+
+   @PersistenceUnit(unitName="timerdb")
+   public void setEntityManagerFactory(EntityManagerFactory emf)
+   {
+      this.emf = emf;
+   }
+   
+   @Inject
+   public void setTransactionManager(TransactionManager tm)
+   {
+      this.transactionManager = tm;
+   }
+   
+   /* (non-Javadoc)
+    * @see org.jboss.ejb3.timerservice.spi.TimerServiceFactory#suspendTimerService(javax.ejb.TimerService)
+    */
+   public void suspendTimerService(TimerService timerService)
+   {
+      // TODO Auto-generated method stub
+      //
+      throw new RuntimeException("NYI");
+   }
+
+}

Added: projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceImpl.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/TimerServiceImpl.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,277 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ScheduledExecutorService;
+
+import javax.ejb.EJBException;
+import javax.ejb.ScheduleExpression;
+import javax.ejb.Timer;
+import javax.ejb.TimerConfig;
+import javax.ejb.TimerHandle;
+import javax.ejb.TimerService;
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import javax.transaction.HeuristicMixedException;
+import javax.transaction.HeuristicRollbackException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+
+import org.jboss.ejb3.timerservice.mk2.persistence.TimerEntity;
+import org.jboss.ejb3.timerservice.spi.TimedObjectInvoker;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class TimerServiceImpl implements TimerService
+{
+   private static Logger log = Logger.getLogger(TimerServiceImpl.class);
+   
+   private TimedObjectInvoker invoker;
+   private EntityManager em;
+   private TransactionManager transactionManager;
+   private ScheduledExecutorService executor;
+
+   private Map<TimerHandle, TimerImpl> timers = new HashMap<TimerHandle, TimerImpl>();
+
+   protected TimerServiceImpl(TimedObjectInvoker invoker, EntityManager em, TransactionManager transactionManager, ScheduledExecutorService executor)
+   {
+      this.invoker = invoker;
+      this.em = em;
+      this.transactionManager = transactionManager;
+      this.executor = executor;
+   }
+   
+   public Timer createCalendarTimer(ScheduleExpression schedule, Serializable info) 
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createIntervalTimer(Date initialExpiration, long intervalDuration, TimerConfig timerConfig)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createIntervalTimer(long initialDuration, long intervalDuration, TimerConfig timerConfig)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createSingleActionTimer(Date expiration, TimerConfig timerConfig)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createSingleActionTimer(long duration, TimerConfig timerConfig)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      if(duration < 0)
+         throw new IllegalArgumentException("duration is negative");
+      
+      return createTimer(new Date(System.currentTimeMillis() + duration), 0, timerConfig.getInfo(), timerConfig.isPersistent());
+   }
+
+   /**
+    * @param initialExpiration
+    * @param intervalDuration
+    * @param info
+    * @param persistent
+    * @return
+    */
+   private Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info, boolean persistent)
+   {
+      if (initialExpiration == null)
+         throw new IllegalArgumentException("initial expiration is null");
+      if (intervalDuration < 0)
+         throw new IllegalArgumentException("interval duration is negative");
+      
+      UUID uuid = UUID.randomUUID();
+      TimerImpl timer = new TimerImpl(this, uuid, info);
+      if(persistent)
+      {
+         TimerEntity entity = new TimerEntity();
+         entity.setId(uuid);
+         entity.setInfo(info);
+         entity.setInitialDate(initialExpiration);
+         entity.setInterval(intervalDuration);
+         entity.setTargetId(invoker.getTimedObjectId());
+         em.persist(entity);
+      }
+      timer.startTimer(initialExpiration, intervalDuration);
+      return timer;
+   }
+
+   protected void addTimer(TimerImpl timer)
+   {
+      synchronized (timers)
+      {
+         timers.put(timer.getHandle(), timer);
+      }
+   }
+   
+   public Timer createTimer(long duration, Serializable info)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      if(duration < 0)
+         throw new IllegalArgumentException("duration is negative");
+      
+      return createTimer(new Date(System.currentTimeMillis() + duration), 0, info, true);
+   }
+
+   public Timer createTimer(Date expiration, Serializable info)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createTimer(long initialDuration, long intervalDuration, Serializable info)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info)
+      throws IllegalArgumentException, IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   protected ScheduledExecutorService getExecutor()
+   {
+      return executor;
+   }
+   
+   protected TimedObjectInvoker getInvoker()
+   {
+      return invoker;
+   }
+   
+   public Timer getTimer(TimerHandle handle)
+   {
+      TimerImpl timer = timers.get(handle);
+      if (timer != null && timer.isActive())
+         return timer;
+      else
+         return null;
+   }
+   
+   public Collection<Timer> getTimers() throws IllegalStateException, EJBException
+   {
+      throw new RuntimeException("NYI");
+   }
+   
+   protected Transaction getTransaction()
+   {
+      try
+      {
+         return transactionManager.getTransaction();
+      }
+      catch (SystemException e)
+      {
+         throw new EJBException(e);
+      }
+   }
+   
+   /**
+    * Remove a txtimer from the list of active timers
+    */
+   void removeTimer(TimerImpl txtimer)
+   {
+      synchronized (timers)
+      {
+         try
+         {
+            Transaction currentTx = transactionManager.getTransaction();
+            if(currentTx == null)
+               transactionManager.begin();
+            try
+            {
+               Query query = em.createQuery("DELETE FROM TimerEntity WHERE id = ?");
+               query.setParameter(1, txtimer.getId());
+               query.executeUpdate();
+               timers.remove(txtimer.getHandle());
+            }
+            finally
+            {
+               if(currentTx == null)
+                  transactionManager.commit();
+            }
+         }
+         catch(HeuristicMixedException e)
+         {
+            throw new EJBException(e);
+         }
+         catch(HeuristicRollbackException e)
+         {
+            throw new EJBException(e);
+         }
+         catch(NotSupportedException e)
+         {
+            throw new EJBException(e);
+         }
+         catch(RollbackException e)
+         {
+            // TODO: what now?
+            throw new EJBException(e);
+         }
+         catch(SystemException e)
+         {
+            throw new EJBException(e);
+         }
+      }
+   }
+   
+   void retryTimeout(TimerImpl txtimer)
+   {
+      try
+      {
+         //retryPolicy.retryTimeout(timedObjectInvoker, txtimer);
+         log.warn("retryTimeout is NYI");
+         throw new RuntimeException("NYI");
+      }
+      catch (Exception e)
+      {
+         log.error("Retry timeout failed for timer: " + txtimer, e);
+      }
+   }
+}

Added: projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/persistence/TimerEntity.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/persistence/TimerEntity.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/main/java/org/jboss/ejb3/timerservice/mk2/persistence/TimerEntity.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2.persistence;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+import javax.persistence.Table;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Entity
+ at Table(name="timer")
+public class TimerEntity
+{
+   @Id
+   private UUID id;
+   
+   @Column(nullable=false)
+   private String targetId;
+   
+   @Column(nullable=false)
+   private Date initialDate;
+   
+   private long interval;
+   
+   @Lob
+   private Object instanceKey;
+   
+   @Lob
+   private Serializable info;
+
+   public UUID getId()
+   {
+      return id;
+   }
+
+   public void setId(UUID id)
+   {
+      this.id = id;
+   }
+
+   public String getTargetId()
+   {
+      return targetId;
+   }
+
+   public void setTargetId(String targetId)
+   {
+      this.targetId = targetId;
+   }
+
+   public Date getInitialDate()
+   {
+      return initialDate;
+   }
+
+   public void setInitialDate(Date initialDate)
+   {
+      this.initialDate = initialDate;
+   }
+
+   public long getInterval()
+   {
+      return interval;
+   }
+
+   public void setInterval(long interval)
+   {
+      this.interval = interval;
+   }
+
+   public Object getInstanceKey()
+   {
+      return instanceKey;
+   }
+
+   public void setInstanceKey(Object instanceKey)
+   {
+      this.instanceKey = instanceKey;
+   }
+
+   public Serializable getInfo()
+   {
+      return info;
+   }
+
+   public void setInfo(Serializable info)
+   {
+      this.info = info;
+   }
+}

Added: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/AbstractTimerTestCase.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/AbstractTimerTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/AbstractTimerTestCase.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2.test.common;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.JarURLConnection;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+
+import org.jboss.bootstrap.microcontainer.ServerImpl;
+import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.microcontainer.MCServer;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public abstract class AbstractTimerTestCase
+{
+   private static Logger log = Logger.getLogger(AbstractTimerTestCase.class);
+   
+   private static MCServer server;
+   private static MainDeployer mainDeployer;
+   
+   @AfterClass
+   public static void afterClass() throws Exception
+   {
+      if(server != null)
+         server.shutdown();
+   }
+   
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      server = new ServerImpl();
+      
+      Properties props = new Properties();
+      String dir = mkdir("target/bootstrap");
+      mkdir("target/bootstrap/server/default");
+      //mkdir("target/bootstrap/server/default/deploy");
+      mkdir("target/bootstrap/server/default/data");
+      mkdir("target/bootstrap/server/default/log");
+      mkdir("target/bootstrap/server/default/tmp");
+      mkdir("target/bootstrap/server/default/tmp/deploy");
+      mkdir("target/bootstrap/server/default/tmp/native");
+      log.info("dir = " + dir);
+      props.put(ServerConfig.HOME_DIR, dir);
+      props.put(ServerConfig.SERVER_CONFIG_URL, findDir("src/test/resources/conf"));
+      server.init(props);
+      
+      server.start();
+      
+      mainDeployer = (MainDeployer) server.getKernel().getController().getContext("MainDeployer", ControllerState.INSTALLED).getTarget();
+      
+      URL url = new File("src/main/resources").toURI().toURL();
+      log.debug("url = " + url);
+      deploy(url);
+      
+      // TODO: hack, use something similar to deploy directory
+      Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources("META-INF/jboss-beans.xml");
+      while(urls.hasMoreElements())
+      {
+         URL u = urls.nextElement();
+         URLConnection c = u.openConnection();
+         // skip src/test/resources (urgh)
+         if(!(c instanceof JarURLConnection))
+            continue;
+         JarURLConnection connection = (JarURLConnection) c;
+         URL jarFileURL = connection.getJarFileURL();
+         deploy(jarFileURL);
+      }
+      
+      // TODO: another hack that simulates profile service going through deploy dir
+      VirtualFile deployDir = VFS.getRoot(findDirURI("src/test/resources/deploy"));
+      List<VirtualFile> candidates = deployDir.getChildren();
+      for(VirtualFile candidate : candidates)
+      {
+         deploy(candidate.toURL());
+      }
+      
+      // Ehr, to deploy the persistence unit defined in src/test/resources (it's not a hack! it's a feature!)
+      deploy(AbstractTimerTestCase.class.getProtectionDomain().getCodeSource().getLocation());
+   }
+   
+   protected static void deploy(URL url) throws DeploymentException, IOException
+   {
+      VirtualFile root = VFS.getRoot(url);
+      VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(root);
+      mainDeployer.deploy(deployment);
+      mainDeployer.checkComplete(deployment);
+   }
+   
+   private static String findDir(String path) throws IOException
+   {
+      return findDirURI(path).toString();
+   }
+   
+   private static URI findDirURI(String path) throws IOException
+   {
+      File file = new File(path);
+      boolean success = file.isDirectory();
+      if(!success)
+         throw new IOException("failed to find " + path);
+      return file.toURI();
+   }
+   
+   public <T> T getBean(String name, Class<T> expectedType)
+   {
+      // FIXME: check state
+      return expectedType.cast(server.getKernel().getController().getContext(name, null).getTarget());
+   }
+   private static String mkdir(String path) throws IOException
+   {
+      File file = new File(path);
+      boolean success = file.mkdirs() || file.isDirectory();
+      if(!success)
+         throw new IOException("failed to create " + path);
+      return file.toURI().toURL().toString();
+   }
+}

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/HSQLDBService.java (from rev 84119, projects/ejb3/trunk/timerservice-quartz/src/test/java/org/jboss/ejb3/timerservice/quartz/test/common/HSQLDBService.java)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/HSQLDBService.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/HSQLDBService.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2.test.common;
+
+import java.sql.Connection;
+
+import javax.naming.InitialContext;
+
+import org.hsqldb.jdbc.jdbcDataSource;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class HSQLDBService
+{
+   private static final Logger log = Logger.getLogger(HSQLDBService.class);
+   
+   private String jndiName = "java:/DefaultDS";
+   
+   private jdbcDataSource ds;
+   private InitialContext ctx;
+   private Connection conn;
+   
+   public void create() throws Exception
+   {
+      log.info("Creating HSQLDB service");
+      
+      ds = new jdbcDataSource();
+      ds.setDatabase("jdbc:hsqldb:file:target/hsqldb/db");
+      ds.setUser("sa");
+      ds.setPassword("");
+      
+      ctx = new InitialContext();
+   }
+   
+   public void destroy() throws Exception
+   {
+      log.info("Destroying HSQLDB service");
+      
+      if(ctx != null)
+      {
+         ctx.close();
+         ctx = null;
+      }
+      ds = null;
+   }
+   
+   public void start() throws Exception
+   {
+      log.info("Starting HSQLDB service");
+      
+      conn = ds.getConnection();
+      
+      ctx.bind(jndiName, ds);
+   }
+   
+   public void stop() throws Exception
+   {
+      log.info("Stopping HSQLDB service");
+      
+      ctx.unbind(jndiName);
+      
+      if(conn != null)
+      {
+         conn.close();
+         conn = null;
+      }
+   }
+}


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/HSQLDBService.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleClassLoaderDeployer.java (from rev 84119, projects/ejb3/trunk/timerservice-quartz/src/test/java/org/jboss/ejb3/timerservice/quartz/test/common/SimpleClassLoaderDeployer.java)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleClassLoaderDeployer.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleClassLoaderDeployer.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.timerservice.mk2.test.common;
+
+import org.jboss.deployers.spi.deployer.helpers.AbstractTopLevelClassLoaderDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SimpleClassLoaderDeployer extends AbstractTopLevelClassLoaderDeployer
+{
+   @Override
+   protected ClassLoader createTopLevelClassLoader(DeploymentUnit unit) throws Exception
+   {
+      return Thread.currentThread().getContextClassLoader();
+   }
+}


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleClassLoaderDeployer.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleDataSourceDependencyResolver.java (from rev 83895, projects/jpa/trunk/deployers/src/test/java/org/jboss/jpa/deployers/test/common/SimpleDataSourceDependencyResolver.java)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleDataSourceDependencyResolver.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleDataSourceDependencyResolver.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.timerservice.mk2.test.common;
+
+import org.jboss.jpa.resolvers.DataSourceDependencyResolver;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SimpleDataSourceDependencyResolver implements DataSourceDependencyResolver
+{
+   public String resolveDataSourceSupplier(String jndiName)
+   {
+      return "HSQLDBService";
+   }
+}


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleDataSourceDependencyResolver.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleJavaEEModuleInformer.java (from rev 83895, projects/jpa/trunk/deployers/src/test/java/org/jboss/jpa/deployers/test/common/SimpleJavaEEModuleInformer.java)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleJavaEEModuleInformer.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleJavaEEModuleInformer.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.timerservice.mk2.test.common;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.jpa.javaee.JavaEEModuleInformer;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ear.jboss.JBossAppMetaData;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SimpleJavaEEModuleInformer implements JavaEEModuleInformer
+{
+   private static final Logger log = Logger.getLogger(SimpleJavaEEModuleInformer.class);
+   
+   public String getApplicationName(DeploymentUnit deploymentUnit)
+   {
+      DeploymentUnit application = deploymentUnit.getTopLevel();
+//      if(application == null)
+//         return null;
+      if(!application.isAttachmentPresent(JBossAppMetaData.class))
+         return null;
+      return application.getSimpleName();
+   }
+
+   public String getModulePath(DeploymentUnit deploymentUnit)
+   {
+      return deploymentUnit.getRelativePath();
+   }
+
+   public ModuleType getModuleType(DeploymentUnit deploymentUnit)
+   {
+      return ModuleType.JAVA;
+   }
+}


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/common/SimpleJavaEEModuleInformer.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Added: projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/simple/unit/SimpleTimerTestCase.java
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/simple/unit/SimpleTimerTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/java/org/jboss/ejb3/timerservice/mk2/test/simple/unit/SimpleTimerTestCase.java	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.timerservice.mk2.test.simple.unit;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.Semaphore;
+
+import javax.ejb.Timer;
+import javax.ejb.TimerService;
+
+import org.jboss.ejb3.timerservice.mk2.test.common.AbstractTimerTestCase;
+import org.jboss.ejb3.timerservice.spi.TimedObjectInvoker;
+import org.jboss.ejb3.timerservice.spi.TimerServiceFactory;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SimpleTimerTestCase extends AbstractTimerTestCase
+{
+   @Test
+   public void test1() throws Exception
+   {
+      final Semaphore semaphore = new Semaphore(0);
+      TimedObjectInvoker invoker = new TimedObjectInvoker() {
+         public void callTimeout(Timer timer) throws Exception
+         {
+            semaphore.release();
+         }
+
+         public String getTimedObjectId()
+         {
+            return "test";
+         }
+      };
+      
+      TimerServiceFactory factory = getBean("TimerServiceFactory", TimerServiceFactory.class);
+      TimerService service = factory.createTimerService(invoker);
+      service.createTimer(500, null);
+      
+      boolean success = semaphore.tryAcquire(5, SECONDS);
+      
+      assertTrue("timeout failed", success);
+   }
+}

Added: projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/jboss-beans.xml	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/jboss-beans.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="TimerServiceFactory" class="org.jboss.ejb3.timerservice.mk2.TimerServiceFactoryImpl">
+   </bean>
+</deployment>
\ No newline at end of file

Added: projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/persistence.xml
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/persistence.xml	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/META-INF/persistence.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,13 @@
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+   http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+   version="1.0">
+   <persistence-unit name="timerdb">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <class>org.jboss.ejb3.timerservice.mk2.persistence.TimerEntity</class>
+      <properties>
+          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+</persistence>
\ No newline at end of file

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf (from rev 84119, projects/ejb3/trunk/timerservice-quartz/src/test/resources/conf)


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf
___________________________________________________________________
Name: svn:mergeinfo
   + 

Added: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/annotationhandler.xml
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/annotationhandler.xml	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/annotationhandler.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="AnnotationHandlerFactory">
+      <constructor factoryClass="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory" factoryMethod="getInstance" />
+   </bean>
+   <bean name="AnnotationHandler">
+      <constructor factoryMethod="getBeanAnnotationAdapter">
+         <factory bean="AnnotationHandlerFactory"/>
+      </constructor>
+      <incallback method="addAnnotationPlugin" />
+      <uncallback method="removeAnnotationPlugin" />
+   </bean>
+</deployment>
\ No newline at end of file

Modified: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/hsqldb.xml
===================================================================
--- projects/ejb3/trunk/timerservice-quartz/src/test/resources/conf/bootstrap/hsqldb.xml	2009-02-12 10:22:55 UTC (rev 84119)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/hsqldb.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
    <!-- As a 'mock' DataSource we use HSQLDB -->
-   <bean name="HSQLDBService" class="org.jboss.ejb3.timerservice.quartz.test.common.HSQLDBService">
+   <bean name="HSQLDBService" class="org.jboss.ejb3.timerservice.mk2.test.common.HSQLDBService">
       <depends>NamingServer</depends>
    </bean>
 </deployment>

Modified: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/maindeployer.xml
===================================================================
--- projects/ejb3/trunk/timerservice-quartz/src/test/resources/conf/bootstrap/maindeployer.xml	2009-02-12 10:22:55 UTC (rev 84119)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/maindeployer.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
-   <bean name="SimpleClassLoaderDeployer" class="org.jboss.ejb3.timerservice.quartz.test.common.SimpleClassLoaderDeployer"/>
+   <bean name="SimpleClassLoaderDeployer" class="org.jboss.ejb3.timerservice.mk2.test.common.SimpleClassLoaderDeployer"/>
    
    <!-- The MainDeployer -->
    <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
@@ -29,7 +29,15 @@
    </bean>
    
    <!-- File Structure -->
-   <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure"/>
+   <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+      <constructor>
+         <parameter>
+            <set elementClass="java.lang.String">
+               <value>-beans.xml</value>
+            </set>
+         </parameter>
+      </constructor>
+   </bean>
    
    <!-- File Structure -->
    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure"/>

Deleted: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/transactionmanager.xml
===================================================================
--- projects/ejb3/trunk/timerservice-quartz/src/test/resources/conf/bootstrap/transactionmanager.xml	2009-02-12 10:22:55 UTC (rev 84119)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap/transactionmanager.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-   <!-- JTA -->
-   <!-- 
-   <bean name="TransactionManager" class="org.jboss.ejb3.embedded.service.SimpleTransactionService">
-      <depends>NamingServer</depends>
-   </bean>
-   -->
-   
-   <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
-      <!-- 
-      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class,registerDirectly=true)</annotation>
-      -->
-
-      <property name="transactionTimeout">300</property>
-      <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
-      <property name="mbeanServer"><inject bean="MBeanServer"/></property>
-
-      <property name="transactionStatusManagerInetAddress">localhost</property>
-      <property name="transactionStatusManagerPort">5712</property>
-
-      <property name="recoveryInetAddress">localhost</property>
-      <property name="recoveryPort">5713</property>
-
-      <property name="socketProcessIdPort">0</property>
-
-   </bean>
-
-   <bean name="RealTransactionManager">
-      <constructor factoryMethod="getTransactionManager">
-         <factory bean="TransactionManager"/>
-      </constructor>
-   </bean>
-</deployment>

Modified: projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap.xml
===================================================================
--- projects/ejb3/trunk/timerservice-quartz/src/test/resources/conf/bootstrap.xml	2009-02-12 10:22:55 UTC (rev 84119)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/conf/bootstrap.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -11,7 +11,7 @@
 -->
    <url>bootstrap/naming.xml</url>
    <url>bootstrap/jmx-jdk.xml</url>
-   <url>bootstrap/transactionmanager.xml</url>
    <url>bootstrap/maindeployer.xml</url>
+   <url>bootstrap/annotationhandler.xml</url>
    <url>bootstrap/hsqldb.xml</url>
 </bootstrap>

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/resources/deploy/jpa-deployers-beans.xml (from rev 83895, projects/jpa/trunk/deployers/src/test/resources/org/jboss/jpa/deployers/test/common/jpa-deployers-beans.xml)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/resources/deploy/jpa-deployers-beans.xml	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/deploy/jpa-deployers-beans.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="DataSourceDependencyResolver" class="org.jboss.ejb3.timerservice.mk2.test.common.SimpleDataSourceDependencyResolver"/>
+   
+   <bean name="JavaEEModuleInformer" class="org.jboss.ejb3.timerservice.mk2.test.common.SimpleJavaEEModuleInformer"/>
+   
+   <bean name="SpecCompliantSearchStrategy" class="org.jboss.jpa.resolvers.strategy.SpecCompliantSearchStrategy"/>
+   
+   <bean name="PersistenceUnitDependencyResolver" class="org.jboss.jpa.resolvers.DefaultPersistenceUnitDependencyResolver"/>
+   
+   <!-- Do not use this one in a JavaEE environment -->
+   <bean name="XPCResolver" class="org.jboss.jpa.resolvers.DefaultXPCResolver"/>
+   
+   <bean name="PersistenceParsingDeployer" class="org.jboss.jpa.deployers.PersistenceParsingDeployer"/>
+
+   <bean name="PersistenceDeployer" class="org.jboss.jpa.deployers.PersistenceDeployer"/>
+   <bean name="PersistenceUnitDeployer" class="org.jboss.jpa.deployers.PersistenceUnitDeployer">
+      <property name="defaultPersistenceProperties">
+         <map keyClass="java.lang.String" valueClass="java.lang.String">
+            <entry>
+               <key>hibernate.transaction.manager_lookup_class</key>
+               <value>org.hibernate.transaction.JBossTransactionManagerLookup</value>
+            </entry>
+         </map>
+      </property>
+   </bean>
+   
+   <!-- TODO: doesn't belong here -->
+   <bean name="org.jboss.jpa.mcint.annotations.PersistenceUnit" class="org.jboss.jpa.mcint.kernel.plugins.annotations.PersistenceUnitAnnotationPlugin"/>
+</deployment>


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/resources/deploy/jpa-deployers-beans.xml
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/resources/jndi.properties (from rev 84119, projects/ejb3/trunk/timerservice-quartz/src/test/resources/jndi.properties)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/resources/jndi.properties	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/jndi.properties	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,2 @@
+java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/resources/jndi.properties
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/ejb3/trunk/timerservice-mk2/src/test/resources/log4j.xml (from rev 84119, projects/ejb3/trunk/timerservice-quartz/src/test/resources/log4j.xml)
===================================================================
--- projects/ejb3/trunk/timerservice-mk2/src/test/resources/log4j.xml	                        (rev 0)
+++ projects/ejb3/trunk/timerservice-mk2/src/test/resources/log4j.xml	2009-02-20 15:09:12 UTC (rev 84539)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 68671 2008-01-08 10:04:25Z wolfc $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+  <!-- ================================= -->
+  <!-- Preserve messages in a local file -->
+  <!-- ================================= -->
+
+  <!-- A time/date based rolling appender -->
+  <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+    <param name="File" value="target/test.log"/>
+    <param name="Append" value="false"/>
+
+    <!-- Rollover at midnight each day -->
+    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+    <!-- Rollover at the top of each hour
+    <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+    -->
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+      <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+      <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+       -->
+    </layout>	    
+  </appender>
+
+  <!-- A size based file rolling appender
+  <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
+    <param name="Append" value="false"/>
+    <param name="MaxFileSize" value="500KB"/>
+    <param name="MaxBackupIndex" value="1"/>
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+    </layout>	    
+  </appender>
+  -->
+
+  <!-- ============================== -->
+  <!-- Append messages to the console -->
+  <!-- ============================== -->
+
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out"/>
+    <param name="Threshold" value="ALL"/>
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+    </layout>
+  </appender>
+
+
+  <!-- ================ -->
+  <!-- Limit categories -->
+  <!-- ================ -->
+
+  <!-- Limit JBoss categories to INFO
+  <category name="org.jboss">
+    <priority value="INFO" class="org.jboss.logging.XLevel"/>
+  </category>
+  -->
+
+  <!-- Increase the priority threshold for the DefaultDS category
+  <category name="DefaultDS">
+    <priority value="FATAL"/>
+  </category>
+  -->
+
+  <!-- Decrease the priority threshold for the org.jboss.varia category
+  <category name="org.jboss.varia">
+    <priority value="DEBUG"/>
+  </category>
+  -->
+
+  <!--
+     | An example of enabling the custom TRACE level priority that is used
+     | by the JBoss internals to diagnose low level details. This example
+     | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+     | subpackages. This will produce A LOT of logging output.
+  <category name="org.jboss.system">
+    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+  </category>
+  -->
+
+  <category name="org.hibernate">
+    <priority value="ALL"/>
+  </category>
+  
+  <category name="org.jboss">
+    <priority value="INFO"/>
+  </category>
+  
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <priority value="WARN" />
+    <appender-ref ref="CONSOLE"/>
+    <appender-ref ref="FILE"/>
+  </root>
+  
+</log4j:configuration>


Property changes on: projects/ejb3/trunk/timerservice-mk2/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:mergeinfo
   + 




More information about the jboss-cvs-commits mailing list