[jboss-cvs] JBossAS SVN: r97848 - in projects/javaee/trunk/jboss-ejb-api: src/main/javax and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Dec 15 11:35:16 EST 2009


Author: wolfc
Date: 2009-12-15 11:35:15 -0500 (Tue, 15 Dec 2009)
New Revision: 97848

Added:
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AccessTimeout.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterBegin.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterCompletion.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AsyncResult.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Asynchronous.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/BeforeCompletion.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagement.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagementType.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrentAccessTimeoutException.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/DependsOn.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/IllegalLoopbackException.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LocalBean.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Lock.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LockType.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/NoMoreTimeoutsException.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedule.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ScheduleExpression.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedules.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Singleton.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Startup.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/StatefulTimeout.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerConfig.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/embeddable/
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/embeddable/EJBContainer.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/spi/EJBContainerProvider.java
Removed:
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/interceptor/
Modified:
   projects/javaee/trunk/jboss-ejb-api/pom.xml
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ApplicationException.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJB.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJBContext.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/SessionContext.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Timer.java
   projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerService.java
Log:
JBEE-19: merged jboss-ejb3-api


Modified: projects/javaee/trunk/jboss-ejb-api/pom.xml
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/pom.xml	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/pom.xml	2009-12-15 16:35:15 UTC (rev 97848)
@@ -1,3 +1,6 @@
+<!--
+  vim: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.javaee</groupId>
@@ -13,6 +16,19 @@
   <name>EJB 3.1 API</name>
   <url>http://www.jboss.org</url>
   <description>The Java EJB 3.1 API classes</description>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.jboss.javaee</groupId>

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AccessTimeout.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AccessTimeout.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AccessTimeout.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,49 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Specifies the amount of time in a given time unit that a concurrent access 
+ * attempt on a Singleton session bean should block before timing out. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target({METHOD,TYPE})
+ at Retention(RUNTIME)
+public @interface AccessTimeout {
+   /**
+    * The maximum time to wait for access.
+    */
+   long value();
+   
+   TimeUnit unit() default TimeUnit.MILLISECONDS;
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AccessTimeout.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterBegin.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterBegin.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterBegin.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,42 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Designate a stateful session bean method to receive the AfterBegin 
+ * Session Synchronization callback. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(METHOD)
+ at Retention(RUNTIME)
+public @interface AfterBegin {
+
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterBegin.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterCompletion.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterCompletion.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterCompletion.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,41 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Designate a stateful session bean method to receive the AfterCompletion 
+ * Session Synchronization callback.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ */
+ at Target(METHOD)
+ at Retention(RUNTIME)
+public @interface AfterCompletion {
+
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AfterCompletion.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ApplicationException.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ApplicationException.java	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ApplicationException.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -37,5 +37,16 @@
 @Retention(RetentionPolicy.RUNTIME)
 public @interface ApplicationException
 {
+   /**
+    * Indicates whether the application exception designation should apply to subclasses of 
+    * the annotated exception class.
+    * @since 3.1
+    */
+   boolean inherited() default true;
+   
+   /**
+    * Indicates whether the container should cause the transaction to rollback when the 
+    * exception is thrown. 
+    */
    boolean rollback() default false;
 }

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AsyncResult.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AsyncResult.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AsyncResult.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,75 @@
+/*
+ * 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 javax.ejb;
+
+import java.io.Serializable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * Wraps the result of an asynchronous method call as a Future object 
+ * preserving compatability with the business interface signature. The 
+ * value specified in the constructor will be retrieved by the container 
+ * and made available to the client. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public final class AsyncResult<V> implements Future<V>, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   private V result;
+   
+   public AsyncResult(V result)
+   {
+      this.result = result;
+   }
+   
+   public boolean cancel(boolean mayInterruptIfRunning)
+   {
+      return false;
+   }
+
+   public V get() throws InterruptedException, ExecutionException
+   {
+      return result;
+   }
+
+   public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
+   {
+      return result;
+   }
+
+   public boolean isCancelled()
+   {
+      return false;
+   }
+
+   public boolean isDone()
+   {
+      return true;
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/AsyncResult.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Asynchronous.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Asynchronous.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Asynchronous.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,43 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Used to mark a method as an asynchronous method or to designate all 
+ * business methods of a class or interface as asynchronous. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target({METHOD,TYPE})
+ at Retention(RUNTIME)
+public @interface Asynchronous {
+
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Asynchronous.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/BeforeCompletion.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/BeforeCompletion.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/BeforeCompletion.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,42 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Designate a stateful session bean method to receive the 
+ * BeforeCompletion Session Synchronization callback. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(METHOD)
+ at Retention(RUNTIME)
+public @interface BeforeCompletion {
+
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/BeforeCompletion.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagement.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagement.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagement.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,42 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static javax.ejb.ConcurrencyManagementType.CONTAINER;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Declares a Singleton bean's concurrency management type.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+public @interface ConcurrencyManagement {
+   ConcurrencyManagementType value() default CONTAINER;
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagement.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagementType.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagementType.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagementType.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,40 @@
+/*
+ * 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 javax.ejb;
+
+/**
+ * A Singleton bean's concurrency management type.
+ * <ul>
+ * <li>BEAN : Bean managed concurrency</li>
+ * <li>CONCURRENCY_NOT_ALLOWED : Concurrency not allowed</li>
+ * <li>CONTAINER : Container managed concurrency</li> 
+ * </ul>
+ *  
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public enum ConcurrencyManagementType {
+   BEAN,
+   CONCURRENCY_NOT_ALLOWED,
+   CONTAINER
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrencyManagementType.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrentAccessTimeoutException.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrentAccessTimeoutException.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrentAccessTimeoutException.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,46 @@
+/*
+ * 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 javax.ejb;
+
+/**
+ * This exception indicates that an attempt to concurrently 
+ * access a method of a Singleton resulted in a timeout.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @see AccessTimeout
+ * @since 3.1
+ */
+public class ConcurrentAccessTimeoutException extends EJBException
+{
+   private static final long serialVersionUID = 1L;
+
+   public ConcurrentAccessTimeoutException()
+   {
+      super();
+   }
+
+   public ConcurrentAccessTimeoutException(String message)
+   {
+      super(message);
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ConcurrentAccessTimeoutException.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/DependsOn.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/DependsOn.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/DependsOn.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,45 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Used to express an initialization dependency between Singleton components.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+public @interface DependsOn {
+   /**
+    * Holds one or more ejb-names of Singleton components whose 
+    * initialization must occur before this Singleton.
+    */
+   String[] value();
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/DependsOn.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJB.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJB.java	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJB.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -21,9 +21,12 @@
 */
 package javax.ejb;
 
-import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
 import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.*;
 import java.lang.annotation.Target;
 
 /**
@@ -42,6 +45,11 @@
    
    String beanName() default "";
    
+   /** 
+    * A portable lookup string containing the JNDI name for the target EJB component.
+    */
+   String lookup() default "";
+   
    String mappedName() default "";
 
    String description() default "";

Modified: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJBContext.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJBContext.java	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/EJBContext.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -21,11 +21,13 @@
 */
 package javax.ejb;
 
-import javax.transaction.UserTransaction;
 import java.security.Identity;
 import java.security.Principal;
+import java.util.Map;
 import java.util.Properties;
 
+import javax.transaction.UserTransaction;
+
 /**
  * <P>The EJBContext interface provides an instance with access to the
  * container-provided runtime context of an enterprise Bean instance.</P>
@@ -83,8 +85,15 @@
     */
    public Principal getCallerPrincipal();
 
-
    /**
+    * Returns the context data associated with this invocation or lifecycle callback. If there
+    * is no context data, an empty Map object will be returned. 
+    * @return Context data or empty map.
+    * @since 3.1
+    */
+   Map<String, Object> getContextData();
+   
+   /**
     * <B>Deprecated.</B> <I>Use boolean isCallerInRole(String roleName) instead.</I>
     *
     * <P>Test if the caller has a given role.</P>

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/IllegalLoopbackException.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/IllegalLoopbackException.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/IllegalLoopbackException.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,47 @@
+/*
+ * 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 javax.ejb;
+
+/**
+ * This exception indicates that an attempt was made to perform an illegal loopback 
+ * invocation on a Singleton with container-managed concurrency. One possible cause 
+ * is a loopback call to a WRITE method where the current thread does not already 
+ * hold a WRITE lock. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public class IllegalLoopbackException extends ConcurrentAccessException
+{
+   private static final long serialVersionUID = 1L;
+
+   public IllegalLoopbackException()
+   {
+      super();
+   }
+
+   public IllegalLoopbackException(String message)
+   {
+      super(message);
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/IllegalLoopbackException.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LocalBean.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LocalBean.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LocalBean.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,40 @@
+/*
+ * 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 javax.ejb;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Designates that a session bean exposes a no-interface view. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface LocalBean {
+
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LocalBean.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Lock.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Lock.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Lock.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,43 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static javax.ejb.LockType.WRITE;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Declares a concurrency lock for a singleton method.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target({METHOD,TYPE})
+ at Retention(RUNTIME)
+public @interface Lock {
+   LockType value() default WRITE;
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Lock.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LockType.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LockType.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LockType.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,39 @@
+/*
+ * 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 javax.ejb;
+
+/**
+ * Concurrency lock type.
+ * <ul>
+ * <li>READ : For read-only operations. Allows simultaneous access to 
+ *  methods designated as READ, as long as no WRITE lock is held.</li> 
+ * <li>WRITE : For write operations. The WRITE lock is exclusive.</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public enum LockType {
+   READ,
+   WRITE
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/LockType.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/NoMoreTimeoutsException.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/NoMoreTimeoutsException.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/NoMoreTimeoutsException.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,44 @@
+/*
+ * 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 javax.ejb;
+
+/**
+ * This exception indicates that a calendar-based timer will not result in any more timeouts. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public class NoMoreTimeoutsException extends EJBException
+{
+   private static final long serialVersionUID = 1L;
+
+   public NoMoreTimeoutsException()
+   {
+      super();
+   }
+
+   public NoMoreTimeoutsException(String message)
+   {
+      super(message);
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/NoMoreTimeoutsException.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedule.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedule.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedule.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,61 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Schedule a timer for automatic creation with a timeout schedule 
+ * based on a cron-like time expression. The annotated method is used 
+ * as the timeout callback method. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(value=METHOD)
+ at Retention(value=RUNTIME)
+public @interface Schedule {
+   String dayOfMonth() default "*";
+   
+   String dayOfWeek() default "*";
+   
+   String hour() default "0";
+   
+   String info() default "";
+   
+   String minute() default "0";
+   
+   String month() default "*";
+   
+   boolean persistent() default true;
+   
+   String second() default "0";
+   
+   String timezone() default "";
+   
+   String year() default "*";
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedule.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ScheduleExpression.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ScheduleExpression.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ScheduleExpression.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,210 @@
+/*
+ * 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 javax.ejb;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * A calendar-based timeout expression for an enterprise bean timer. 
+ * See the Schedule annotation for the defaults.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public final class ScheduleExpression implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+   
+   private String dayOfMonth = "*";
+
+   private String dayOfWeek = "*";
+
+   private Date end;
+
+   private String hour = "0";
+
+   private String minute = "0";
+
+   private String month = "*";
+
+   private String second = "0";
+
+   private Date start;
+   
+   private String timezone = "";
+
+   private String year = "*";
+
+   public ScheduleExpression dayOfMonth(int d)
+   {
+      this.dayOfMonth = Integer.toString(d);
+      return this;
+   }
+   
+   public ScheduleExpression dayOfMonth(String d)
+   {
+      this.dayOfMonth = d;
+      return this;
+   }
+   
+   public ScheduleExpression dayOfWeek(int d)
+   {
+      this.dayOfWeek = Integer.toString(d);
+      return this;
+   }
+   
+   public ScheduleExpression dayOfWeek(String d)
+   {
+      this.dayOfWeek = d;
+      return this;
+   }
+   
+   public ScheduleExpression end(Date e)
+   {
+      this.end = e;
+      return this;
+   }
+   
+   public String getDayOfMonth()
+   {
+      return dayOfMonth;
+   }
+   
+   public String getDayOfWeek()
+   {
+      return dayOfWeek;
+   }
+   
+   public Date getEnd()
+   {
+      return end;
+   }
+   
+   public String getHour()
+   {
+      return hour ;
+   }
+   
+   public String getMinute()
+   {
+      return minute ;
+   }
+   
+   public String getMonth()
+   {
+      return month ;
+   }
+   
+   public String getSecond()
+   {
+      return second ;
+   }
+   
+   public Date getStart()
+   {
+      return start;
+   }
+   
+   public String getTimezone()
+   {
+      return timezone;
+   }
+   
+   public String getYear()
+   {
+      return year ;
+   }
+   
+   public ScheduleExpression hour(int h)
+   {
+      this.hour = Integer.toString(h);
+      return this;
+   }
+   
+   public ScheduleExpression hour(String h)
+   {
+      this.hour = h;
+      return this;
+   }
+   
+   public ScheduleExpression minute(int m)
+   {
+      this.minute = Integer.toString(m);
+      return this;
+   }
+   
+   public ScheduleExpression minute(String m)
+   {
+      this.minute = m;
+      return this;
+   }
+   
+   public ScheduleExpression month(int m)
+   {
+      this.month = Integer.toString(m);
+      return this;
+   }
+   
+   public ScheduleExpression month(String m)
+   {
+      this.month = m;
+      return this;
+   }
+   
+   public ScheduleExpression second(int s)
+   {
+      this.second = Integer.toString(s);
+      return this;
+   }
+   
+   public ScheduleExpression second(String s)
+   {
+      this.second = s;
+      return this;
+   }
+   
+   public ScheduleExpression start(Date s)
+   {
+      this.start = s;
+      return this;
+   }
+   
+   public ScheduleExpression timezone(String s)
+   {
+      this.timezone = s;
+      return this;
+   }
+   
+   public ScheduleExpression year(int y)
+   {
+      this.year = Integer.toString(y);
+      return this;
+   }
+   
+   public ScheduleExpression year(String y)
+   {
+      this.year = y;
+      return this;
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/ScheduleExpression.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedules.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedules.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedules.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,41 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Schedules multiple timers that use the same method as the timeout callback method. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(METHOD)
+ at Retention(RUNTIME)
+public @interface Schedules {
+   Schedule[] value();
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Schedules.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/SessionContext.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/SessionContext.java	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/SessionContext.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -29,7 +29,7 @@
  * instance. The container passes the SessionContext interface to an
  * instance after the instance has been created. The session context
  * remains associated with the instance for the lifetime of the instance.
- * @version $Revision$
+ * @version $Revision:78081 $
  */
 public interface SessionContext extends EJBContext
 {
@@ -94,5 +94,14 @@
     */ 
    public Class getInvokedBusinessInterface() throws IllegalStateException;
    
-   
+   /**
+    * Check whether a client has requested that the current asynchronous invocation
+    * be cancelled.
+    * 
+    * @return true if the client has invoked Future.cancel()
+    * @throws IllegalStateException Thrown if not invoked from within an asynchronous 
+    *   business method invocation with return type Future.
+    * @since 3.1
+    */
+   boolean wasCancelCalled() throws IllegalStateException;
 }

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Singleton.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Singleton.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Singleton.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,55 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Component-defining annotation for a singleton session bean. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+public @interface Singleton {
+   String description() default "";
+   
+   /**
+    * A product specific name (in JBoss the global JNDI name) that this 
+    * session bean should be mapped to. Application servers are not 
+    * required to support any particular form or type of mapped name, 
+    * nor the ability to use mapped names. The mapped name is product-dependent 
+    * and often installation-dependent. No use of a mapped name is portable. 
+    */
+   String mappedName() default "";
+   
+   /**
+    * The ejb-name of this bean.
+    */
+   String name() default "";
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Singleton.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Startup.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Startup.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Startup.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,41 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Mark a Singleton for eager loading during application initialization.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+public @interface Startup {
+
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Startup.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/StatefulTimeout.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/StatefulTimeout.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/StatefulTimeout.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,46 @@
+/*
+ * 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 javax.ejb;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Specifies the amount of time a stateful session bean can be idle 
+ * ( not receive any client invocations ) before it is eligible 
+ * for removal by the container.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+public @interface StatefulTimeout {
+   long value();
+   
+   TimeUnit unit() default TimeUnit.MINUTES;
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/StatefulTimeout.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Timer.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Timer.java	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/Timer.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -31,11 +31,11 @@
 public interface Timer {
    
    /**
-    * Cause the timer and all its associated expiration notifications to be cancelled.
+    * Cause the timer and all its associated expiration notifications to be canceled.
     *
     * @throws IllegalStateException If this method is invoked while the instance is in
     *                               a state that does not allow access to this method.
-    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been canceled.
     * @throws EJBException If this method could not complete due to a system-level failure.
     **/
    public void cancel()
@@ -51,12 +51,14 @@
     *
     * @throws IllegalStateException If this method is invoked while the instance is in
     *                               a state that does not allow access to this method.
-    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+    * @throws NoMoreTimeoutsException Indicates that the timer has no future timeouts.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been canceled.
     * @throws EJBException If this method could not complete due to a system-level failure.
     **/
    public long getTimeRemaining()
       throws
          IllegalStateException,
+         NoMoreTimeoutsException,
          NoSuchObjectLocalException,
          EJBException;
    
@@ -67,12 +69,14 @@
     *
     * @throws IllegalStateException If this method is invoked while the instance is in
     *                               a state that does not allow access to this method.
-    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+    * @throws NoMoreTimeoutsException Indicates that the timer has no future timeouts.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been canceled.
     * @throws EJBException If this method could not complete due to a system-level failure.
     **/
    public Date getNextTimeout()
       throws
          IllegalStateException,
+         NoMoreTimeoutsException,
          NoSuchObjectLocalException,
          EJBException;
    
@@ -84,7 +88,7 @@
     *
     * @throws IllegalStateException If this method is invoked while the instance is in
     *                               a state that does not allow access to this method.
-    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been canceled.
     * @throws EJBException If this method could not complete due to a system-level failure.
     **/
    public Serializable getInfo()
@@ -101,7 +105,7 @@
     *
     * @throws IllegalStateException If this method is invoked while the instance is in
     *                               a state that does not allow access to this method.
-    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or has been canceled.
     * @throws EJBException If this method could not complete due to a system-level failure.
     **/
    public TimerHandle getHandle()
@@ -109,4 +113,50 @@
          IllegalStateException,
          NoSuchObjectLocalException,
          EJBException;
+   
+   /**
+    * Get the schedule expression corresponding to this timer.
+    * 
+    * @return
+    * @throws IllegalStateException If this method is invoked while the instance
+    *   is in a state that does not allow access to this method. Also thrown if
+    *   invoked on a timer that was created with one of the non-ScheduleExpression
+    *   TimerService.createTimer APIs.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired or 
+    *   has been cancelled. 
+    * @throws EJBException If this method could not complete due to a system-level
+    *   failure.
+    * @since 3.1
+    */
+   ScheduleExpression getSchedule() throws IllegalStateException, 
+      NoSuchObjectLocalException, EJBException;
+
+   /**
+    * Query whether this timer is a calendar-based timer. 
+    * 
+    * @return true if this timer is a calendar-based timer. 
+    * @throws IllegalStateException If this method is invoked while the instance
+    *   is in a state that does not allow access to this method.
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired
+    *   or has been cancelled. 
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    */
+   boolean isCalendarTimer() throws IllegalStateException, NoSuchObjectLocalException, 
+      EJBException;
+   
+   /**
+    * Query whether this timer has persistent semantics.
+    * 
+    * @return true if this timer has persistent guarantees.
+    * @throws IllegalStateException If this method is invoked while the instance 
+    *   is in a state that does not allow access to this method. 
+    * @throws NoSuchObjectLocalException If invoked on a timer that has expired
+    *   or has been cancelled. 
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    */
+   boolean isPersistent() throws IllegalStateException, NoSuchObjectLocalException,
+      EJBException;
+
 }

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerConfig.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerConfig.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerConfig.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,57 @@
+/*
+ * 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 javax.ejb;
+
+import java.io.Serializable;
+
+/**
+ * Additional timer configuration options.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public class TimerConfig
+{
+   private Serializable info;
+   private boolean persistent;
+
+   public Serializable getInfo()
+   {
+      return info;
+   }
+   
+   public boolean isPersistent()
+   {
+      return persistent;
+   }
+   
+   public void setInfo(Serializable i )
+   {
+      this.info = i;
+   }
+   
+   public void setPersistent(boolean p)
+   {
+      this.persistent = p;
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerConfig.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerService.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerService.java	2009-12-15 15:32:40 UTC (rev 97847)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/TimerService.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -32,11 +32,155 @@
  * a specified time, after a specified elapsed time, or after a specified interval.
  **/
 public interface TimerService {
+   /**
+    * Create a calendar-based timer based on the input schedule expression.
+    * 
+    * @param schedule A schedule expression describing the timeouts for this timer.
+    * @return The newly created Timer.
+    * @throws IllegalArgumentException If Schedule represents an invalid schedule
+    *   expression.
+    * @throws IllegalStateException If this method is invoked while the instance
+    *   is in a state that does not allow access to this method. 
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    */
+   Timer createCalendarTimer(ScheduleExpression schedule)
+      throws IllegalArgumentException, IllegalStateException, EJBException;
    
    /**
+    * Create a calendar-based timer based on the input schedule expression.
+    * 
+    * @param schedule A schedule expression describing the timeouts for this timer.
+    * @param info Application information to be delivered along with the timer 
+    *   expiration. This can be null.
+    * @return The newly created Timer.
+    * @throws IllegalArgumentException If Schedule represents an invalid schedule
+    *   expression.
+    * @throws IllegalStateException If this method is invoked while the instance
+    *   is in a state that does not allow access to this method. 
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    */
+   Timer createCalendarTimer(ScheduleExpression schedule, Serializable info)
+      throws IllegalArgumentException, IllegalStateException, EJBException;
+
+   /**
+    * Create a calendar-based timer based on the input schedule expression.
+    * 
+    * @param schedule A schedule expression describing the timeouts for this timer.
+    * @param timerConfig Timer configuration.
+    * @return The newly created Timer.
+    * @throws IllegalArgumentException If Schedule represents an invalid schedule
+    *   expression.
+    * @throws IllegalStateException If this method is invoked while the instance
+    *   is in a state that does not allow access to this method. 
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    */
+   Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig)
+      throws IllegalArgumentException, IllegalStateException, EJBException;
+
+   /**
+    * Create an interval timer whose first expiration occurs at a given point in time and
+    * whose subsequent expirations occur after a specified interval.
+    *
+    * @param initialExpiration The point in time at which the first timer expiration must occur.
+    * @param intervalDuration The number of milliseconds that must elapse between timer
+    *                         expiration notifications. Expiration notifications are
+    *                         scheduled relative to the time of the first expiration. If
+    *                         expiration is delayed(e.g. due to the interleaving of other
+    *                         method calls on the bean) two or more expiration notifications
+    *                         may occur in close succession to "catch up".
+    * @param timerConfig Timer configuration.
+    *
+    * @return The newly created Timer. 
+    *
+    * @throws IllegalArgumentException If initialExpiration is null, or initialExpiration.getTime()
+    *                                  is negative, or intervalDuration is negative.
+    * @throws IllegalStateException If this method is invoked while the instance is in
+    *                               a state that does not allow access to this method.
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    **/
+   public Timer createIntervalTimer( Date initialExpiration, long intervalDuration, TimerConfig timerConfig )
+      throws
+         IllegalArgumentException,
+         IllegalStateException,
+         EJBException;
+   
+   /**
+    * Create an interval timer whose first expiration occurs after a specified duration,
+    * and whose subsequent expirations occur after a specified interval.
+    *
+    * @param initialDuration The number of milliseconds that must elapse before the first
+    *                        timer expiration notification.
+    * @param intervalDuration The number of milliseconds that must elapse between timer
+    *                         expiration notifications. Expiration notifications are
+    *                         scheduled relative to the time of the first expiration. If
+    *                         expiration is delayed(e.g. due to the interleaving of other
+    *                         method calls on the bean) two or more expiration notifications
+    *                         may occur in close succession to "catch up".
+    * @param timerConfig Timer configuration.
+    *
+    * @return The newly created Timer. 
+    *
+    * @throws IllegalArgumentException If initialDuration is negative, or intervalDuration
+    *                                  is negative.
+    * @throws IllegalStateException If this method is invoked while the instance is in
+    *                               a state that does not allow access to this method.
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    **/
+   public Timer createIntervalTimer( long initialDuration, long intervalDuration, TimerConfig timerConfig )
+      throws
+         IllegalArgumentException,
+         IllegalStateException,
+         EJBException;
+   
+   /**
+    * Create a single-action timer that expires at a given point in time.
+    *
+    * @param expiration The point in time at which the timer must expire.
+    * @param timerConfig Timer configuration.
+    *
+    * @return The newly created Timer. 
+    *
+    * @throws IllegalArgumentException If expiration is null, or expiration.getTime() is negative.
+    * @throws IllegalStateException If this method is invoked while the instance is in
+    *                               a state that does not allow access to this method.
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    **/
+   public Timer createSingleActionTimer( Date expiration, TimerConfig timerConfig )
+      throws
+         IllegalArgumentException,
+         IllegalStateException,
+         EJBException;
+   
+   /**
     * Create a single-action timer that expires after a specified duration.
     *
     * @param duration  The number of milliseconds that must elapse before the timer expires.
+    * @param timerConfig Timer configuration.
+    *
+    * @return The newly created Timer. 
+    *
+    * @throws IllegalArgumentException If duration is negative
+    * @throws IllegalStateException If this method is invoked while the instance is in
+    *                               a state that does not allow access to this method.
+    * @throws EJBException If this method could not complete due to a system-level failure.
+    * @since 3.1
+    **/
+   public Timer createSingleActionTimer( long duration, TimerConfig timerConfig )
+      throws
+         IllegalArgumentException,
+         IllegalStateException,
+         EJBException;
+   
+   /**
+    * Create a single-action timer that expires after a specified duration.
+    *
+    * @param duration  The number of milliseconds that must elapse before the timer expires.
     * @param info Application information to be delivered along with the timer expiration
     *             notification. This can be null.
     *

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/embeddable/EJBContainer.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/embeddable/EJBContainer.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/embeddable/EJBContainer.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,174 @@
+/*
+ * 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 javax.ejb.embeddable;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.ejb.EJBException;
+import javax.ejb.spi.EJBContainerProvider;
+import javax.naming.Context;
+
+/**
+ * Used to execute an EJB application in an embeddable container.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public abstract class EJBContainer
+{
+   public static final String APP_NAME = "javax.ejb.embeddable.appName";
+   public static final String MODULES = "javax.ejb.embeddable.modules";
+   public static final String PROVIDER = "javax.ejb.embeddable.provider";
+   
+   private static final Pattern nonCommentPattern = Pattern.compile("^([^#]+)");
+
+   private static List<EJBContainerProvider> factories = new ArrayList<EJBContainerProvider>();
+   
+   static
+   {
+      findAllFactories();
+   }
+   
+   /**
+    * Shutdown an embeddable EJBContainer instance.
+    */
+   public abstract void close();
+   
+   /**
+    * Create and initialize an embeddable EJB container. 
+    * JVM classpath is searched for all ejb-jars or exploded ejb-jars in directory format.
+    * 
+    * @return EJBContainer instance
+    * @throws EJBException Thrown if the container or application could not 
+    *   be successfully initialized.
+    */
+   public static EJBContainer createEJBContainer() throws EJBException
+   {
+      return createEJBContainer(null);
+   }
+   
+   /**
+    * Create and initialize an embeddable EJB container with an 
+    * set of configuration properties and names of modules to be initialized. 
+    * 
+    * @param properties One or more spec-defined or vendor-specific properties. 
+    *   The spec reserves the prefix "javax.ejb." for spec-defined properties.
+    * @return EJBContainer instance
+    * @throws EJBException Thrown if the container or application could not 
+    *   be successfully initialized.
+    */
+   public static EJBContainer createEJBContainer(Map<?, ?> properties)
+      throws EJBException
+   {
+      for(EJBContainerProvider factory : factories)
+      {
+         EJBContainer container = factory.createEJBContainer(properties);
+         if(container != null)
+            return container;
+      }
+      throw new EJBException("Unable to instantiate container with factories " + factories);
+   }
+   
+   private static List<String> factoryNamesFromReader(BufferedReader reader) throws IOException
+   {
+      List<String> names = new ArrayList<String>();
+      String line;
+      while ((line = reader.readLine()) != null)
+      {
+         line = line.trim();
+         Matcher m = nonCommentPattern.matcher(line);
+         if (m.find())
+         {
+            names.add(m.group().trim());
+         }
+      }
+      return names;
+   }
+   
+   private static void findAllFactories()
+   {
+      try
+      {
+         ClassLoader loader = Thread.currentThread().getContextClassLoader();
+         Enumeration<URL> resources = loader.getResources("META-INF/services/" + EJBContainerProvider.class.getName());
+         Set<String> names = new HashSet<String>();
+         while (resources.hasMoreElements())
+         {
+            URL url = resources.nextElement();
+            InputStream is = url.openStream();
+            try
+            {
+               names.addAll(factoryNamesFromReader(new BufferedReader(new InputStreamReader(is))));
+            }
+            finally
+            {
+               is.close();
+            }
+         }
+         for (String s : names)
+         {
+            Class<?> factoryClass = loader.loadClass(s);
+            factories.add(EJBContainerProvider.class.cast(factoryClass.newInstance()));
+         }
+      }
+      catch (IOException e)
+      {
+         throw new EJBException(e);
+      }
+      catch (InstantiationException e)
+      {
+         throw new EJBException(e);
+      }
+      catch (IllegalAccessException e)
+      {
+         throw new EJBException(e);
+      }
+      catch (ClassNotFoundException e)
+      {
+         throw new EJBException(e);
+      }
+   }
+   
+   /**
+    * Retrieve a naming context for looking up references to session beans executing in
+    * the embeddable container.
+    * 
+    * @return The naming context.
+    */
+   public Context getContext()
+   {
+      throw new UnsupportedOperationException(this + " does not support a naming context");
+   }
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/embeddable/EJBContainer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/spi/EJBContainerProvider.java
===================================================================
--- projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/spi/EJBContainerProvider.java	                        (rev 0)
+++ projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/spi/EJBContainerProvider.java	2009-12-15 16:35:15 UTC (rev 97848)
@@ -0,0 +1,52 @@
+/*
+ * 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 javax.ejb.spi;
+
+import java.util.Map;
+
+import javax.ejb.EJBException;
+import javax.ejb.embeddable.EJBContainer;
+
+/**
+ * The EJBContainerProvider SPI is used by the embeddable container bootstrap class to
+ * initialize a suitable embeddable container. 
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision$
+ * @since 3.1
+ */
+public interface EJBContainerProvider
+{
+   /**
+    * Called by the embeddable container bootstrap process to find a suitable embeddable container
+    * implementation. An embeddable container provider may deem itself as appropriate for the
+    * embeddable application if any of the following are true : The javax.ejb.embeddable.initial
+    * property was included in the Map passed to createEJBContainer and the value of the property is
+    * the provider's implementation class. No javax.ejb.embeddable.initial property was specified.
+    * If a provider does not qualify as the provider for the embeddable application, it must return null.
+    * 
+    * @param properties
+    * @return EJBContainer instance or null
+    * @throws EJBException
+    */
+   EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException;
+}


Property changes on: projects/javaee/trunk/jboss-ejb-api/src/main/javax/ejb/spi/EJBContainerProvider.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list