[jboss-cvs] JBossAS SVN: r101731 - in projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb: embeddable and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 2 12:52:12 EST 2010
Author: jaikiran
Date: 2010-03-02 12:52:11 -0500 (Tue, 02 Mar 2010)
New Revision: 101731
Modified:
projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/AsyncResult.java
projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ConcurrentAccessTimeoutException.java
projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ScheduleExpression.java
projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/TimerConfig.java
projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/embeddable/EJBContainer.java
Log:
JBCTS-955 Fixed some of the API inconsistencies
Modified: projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/AsyncResult.java
===================================================================
--- projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/AsyncResult.java 2010-03-02 17:39:56 UTC (rev 101730)
+++ projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/AsyncResult.java 2010-03-02 17:52:11 UTC (rev 101731)
@@ -21,7 +21,6 @@
*/
package javax.ejb;
-import java.io.Serializable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -29,15 +28,17 @@
/**
* 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.
+ * preserving compatibility with the business interface signature. The value specified
+ * in the constructor will be retrieved by the container and made available to the client.
+ * Note that this object is not passed to the client. It is merely a convenience for
+ * providing the result value to the container. Therefore, none of its
+ * instance methods should be called by the application.
*
* @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
+public final class AsyncResult<V> implements Future<V>
{
private static final long serialVersionUID = 1L;
Modified: projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ConcurrentAccessTimeoutException.java
===================================================================
--- projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ConcurrentAccessTimeoutException.java 2010-03-02 17:39:56 UTC (rev 101730)
+++ projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ConcurrentAccessTimeoutException.java 2010-03-02 17:52:11 UTC (rev 101731)
@@ -23,14 +23,14 @@
/**
* This exception indicates that an attempt to concurrently
- * access a method of a Singleton resulted in a timeout.
+ * access a bean method 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
+public class ConcurrentAccessTimeoutException extends ConcurrentAccessException
{
private static final long serialVersionUID = 1L;
Modified: projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ScheduleExpression.java
===================================================================
--- projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ScheduleExpression.java 2010-03-02 17:39:56 UTC (rev 101730)
+++ projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/ScheduleExpression.java 2010-03-02 17:52:11 UTC (rev 101731)
@@ -25,14 +25,40 @@
import java.util.Date;
/**
- * A calendar-based timeout expression for an enterprise bean timer.
- * See the Schedule annotation for the defaults.
+ * A calendar-based timeout expression for an enterprise bean timer. See EJB specification for the full timer expression syntax.
+ * <p>
+ * Each expression attribute has two overloaded setter methods, one that takes a String and one that takes an int. The int version is merely a convenience method for setting the attribute in the common case that the value is a simple integer.
+ * </p>
+ * E.g. <br/>
+ * <code>
+ * scheduleExpression.second(10)
+ * </code>
+ * is semantically equivalent to
+ * <code>
+ * scheduleExpression.second("10")
+ * </code>
+ * None of the ScheduleExpression methods are required to be called. The defaults are :
+ * <p>
+ * { second , minute , hour } : "0"
+ * </p>
+ * <p>
+ * { dayOfMonth, month, dayOfWeek, year } : "*"
+ * </p>
+ * <p>
+ * timezone : default JVM time zone
+ * </p>
+ * <p>
+ * startDate : no start date
+ * </p>
+ * <p>
+ * endDate : no end date
+ * </p>
*
* @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
* @version $Revision$
* @since 3.1
*/
-public final class ScheduleExpression implements Serializable
+public class ScheduleExpression implements Serializable
{
private static final long serialVersionUID = 1L;
Modified: projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/TimerConfig.java
===================================================================
--- projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/TimerConfig.java 2010-03-02 17:39:56 UTC (rev 101730)
+++ projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/TimerConfig.java 2010-03-02 17:52:11 UTC (rev 101731)
@@ -24,7 +24,15 @@
import java.io.Serializable;
/**
- * Additional timer configuration options.
+ * TimerConfig is used to specify additional timer configuration settings during timer creation.
+ * <p>
+ * The info object represents a serializable object made available to corresponding timer callbacks.
+ * It is optional and defaults to null.
+ * </p>
+ * <p>
+ * The persistent property determines whether the corresponding timer has a lifetime that spans the JVM in which it was created.
+ * It is optional and defaults to true.
+ * </p>
*
* @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
* @version $Revision$
@@ -35,6 +43,17 @@
private Serializable info;
private boolean persistent;
+ public TimerConfig()
+ {
+
+ }
+
+ public TimerConfig(Serializable info, boolean persistent)
+ {
+ this.info = info;
+ this.persistent = persistent;
+ }
+
public Serializable getInfo()
{
return info;
Modified: projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/embeddable/EJBContainer.java
===================================================================
--- projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/embeddable/EJBContainer.java 2010-03-02 17:39:56 UTC (rev 101730)
+++ projects/javaee/jboss-ejb-api_3.1_spec/trunk/src/main/javax/ejb/embeddable/EJBContainer.java 2010-03-02 17:52:11 UTC (rev 101731)
@@ -167,8 +167,5 @@
*
* @return The naming context.
*/
- public Context getContext()
- {
- throw new UnsupportedOperationException(this + " does not support a naming context");
- }
+ public abstract Context getContext();
}
More information about the jboss-cvs-commits
mailing list