You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by st...@apache.org on 2015/03/16 21:08:26 UTC
svn commit: r1667118 - in /geronimo/specs/trunk/geronimo-jcdi_1.1_spec: ./
src/main/java/javax/decorator/ src/main/java/javax/enterprise/context/
Author: struberg
Date: Mon Mar 16 20:08:25 2015
New Revision: 1667118
URL: http://svn.apache.org/r1667118
Log:
GERONIMO-6458 improve JavaDoc
Modified:
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/pom.xml
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Decorator.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Delegate.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/BusyConversationException.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextException.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextNotActiveException.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/Dependent.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/NormalScope.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/RequestScoped.java
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/pom.xml?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/pom.xml (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/pom.xml Mon Mar 16 20:08:25 2015
@@ -30,7 +30,9 @@
<name>Apache Geronimo JCDI Spec 1.1</name>
<version>1.0-SNAPSHOT</version>
- <description>Apache Geronimo implementation of the JSR-299 Context and Dependency Injection for the Java EE Platform</description>
+ <description>
+ Apache Geronimo implementation of the JSR-346 Context and Dependency Injection 1.1 & 1.2 Specification
+ </description>
<url>http://geronimo.apache.org/maven/${siteId}/${version}</url>
<distributionManagement>
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Decorator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Decorator.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Decorator.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Decorator.java Mon Mar 16 20:08:25 2015
@@ -28,7 +28,12 @@ import javax.enterprise.inject.Stereotyp
/**
* Defines decorator classes.
- *
+ * Classes annotated with @Decorator will get picked up by the CDI container and
+ * 'decorate' the implemented CDI ManagedBeans.
+ *
+ * A Decorator must implement at least one of the Interfaces of it's decorated type.
+ *
+ *
* @version $Rev$ $Date$
*
*/
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Delegate.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Delegate.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Delegate.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/decorator/Delegate.java Mon Mar 16 20:08:25 2015
@@ -27,10 +27,12 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
- * Annotates delegate bean.
- *
- * @version $Rev$ $Date$
+ * Defines a delegation point in a {@see Decorator}.
+ * There must only be one delegation point in a Decorator.
+ *
+ * @see javax.decorator.Decorator
*
+ * @version $Rev$ $Date$
*/
@Target({FIELD,PARAMETER})
@Retention(RUNTIME)
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/BusyConversationException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/BusyConversationException.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/BusyConversationException.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/BusyConversationException.java Mon Mar 16 20:08:25 2015
@@ -25,7 +25,7 @@ import javax.enterprise.context.spi.Crea
/**
* A long running conversation must only be used by one request at the same time!
*
- * If a parallel long running conversation gets detected, this very Exception will
+ * If a parallel access to a long running conversation gets detected, this very Exception will
* be thrown for the new request and the 2nd request will get a
* fresh Conversation assigned.
*
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextException.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextException.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextException.java Mon Mar 16 20:08:25 2015
@@ -18,6 +18,9 @@
*/
package javax.enterprise.context;
+/**
+ * Base class for all CDI problems related to {@link javax.enterprise.context.spi.Context}s.
+ */
public class ContextException extends RuntimeException
{
private static final long serialVersionUID = -3599813072560026919L;
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextNotActiveException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextNotActiveException.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextNotActiveException.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/ContextNotActiveException.java Mon Mar 16 20:08:25 2015
@@ -23,9 +23,16 @@ import javax.enterprise.context.spi.Cont
import javax.enterprise.context.spi.CreationalContext;
/**
- * It is used by the <code>Context</code> interface.
- *
- *
+ * This Exception is thrown if
+ * {@link Context#get(javax.enterprise.context.spi.Contextual)} or
+ * {@link Context#get(javax.enterprise.context.spi.Contextual, javax.enterprise.context.spi.CreationalContext)}
+ * is called on a Context which is not 'active' in respect to the current thread.
+ * This ultimately also happens if a CDI scoped Contextual Reference (the CDI proxy for a Contextual Instance)
+ * of a CDI bean gets accessed in situations where it's Context is not available.
+ *
+ * An example of such a case would be calling a method on a @SessionScoped CDI bean in a situation where
+ * we do not have an active session like e.g. during an @Asynchronous EJB method.
+ *
* @see Context#get(Contextual, CreationalContext)
* @see Context#get(Contextual)
*/
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/Dependent.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/Dependent.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/Dependent.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/Dependent.java Mon Mar 16 20:08:25 2015
@@ -28,20 +28,24 @@ import java.lang.annotation.Target;
import javax.inject.Scope;
/**
- * Dependent scope type.
+ * <p>An @#064;Dependent scoped Contextual instance shares it's lifecycle with
+ * the Contextual Instance it got injected to.
+ * @Dependent scoped Contextual Instances also do <strong>not</strong> get
+ * a normalscoping-proxy (Contextual Reference). They only get a proxy
+ * if they are either intercepted or decorated.</p>
+ *
+ * <p>As of CDI-1.0 this is the default scope for any class if no other
+ * scope is explicitly annotated. Since CDI-1.1 this is only the case if the
+ * beans.xml has a {@code bean-discovery-mode="alïïl"}ïï</p>
+ *
* <p>
- * If webbeans or its stereotypes do not define its scope type,
- * default scope type is <code>Dependent</code> scope.
- * </p>
- *
- * <p>
- * Every webbeans instance has an associated dependent context. Each dependent context
+ * Every CDI instance has an associated dependent context. Each dependent context
* is destroyed with its parent webbeans component instance.
* </p>
*
* <p>
* Please see <b>8.3 Dependent pseudo-scope</b> of the specification
- * for getting furhter information.
+ * for further information.
* </p>
*
*/
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/NormalScope.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/NormalScope.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/NormalScope.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/NormalScope.java Mon Mar 16 20:08:25 2015
@@ -26,8 +26,14 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
- * Defines normal scoped meta-data.
- *
+ * <p>Defines CDI scopes which have a well-defined lifecycle. Examples for such scopes
+ * are {@link javax.enterprise.context.RequestScoped}, {@link javax.enterprise.context.SessionScoped}
+ * and {@link javax.enterprise.context.ApplicationScoped}.</p>
+ * <p>Beans of such a scope will get a normalscoping proxy (Contextual Reference)
+ * for every injection.</p>
+ *
+ * <p>If a NormalScope is {@code passivating} then all it's Contextual Instances need
+ * to implement {@code java.io.Serializable}.</p>
* @version $Rev$ $Date$
*
*/
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/RequestScoped.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/RequestScoped.java?rev=1667118&r1=1667117&r2=1667118&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/RequestScoped.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/RequestScoped.java Mon Mar 16 20:08:25 2015
@@ -33,7 +33,7 @@ import java.lang.annotation.Target;
*
* <p>
* Please see <b>Request context lifecycle</b> of the specification
- * for getting furher information.
+ * for further information.
* </p>
*
* @version $Rev$Â $Date$