openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r787074 - in /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: ./ annotation/ config/ context/creational/
Date Sun, 21 Jun 2009 19:28:21 GMT
Author: gerdogdu
Date: Sun Jun 21 19:28:21 2009
New Revision: 787074

URL: http://svn.apache.org/viewvc?rev=787074&view=rev
Log:
Reflect API changes.

Added:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AfterBeanDiscoveryLiteral.java
      - copied, changed from r782277, incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DeployedManagerLiteral.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeBeanDiscoveryLiteral.java
      - copied, changed from r782277, incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedManagerLiteral.java
Removed:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DeployedManagerLiteral.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedManagerLiteral.java
Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/WebBeansConstants.java
  (contents, props changed)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/WebBeansConstants.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/WebBeansConstants.java?rev=787074&r1=787073&r2=787074&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/WebBeansConstants.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/WebBeansConstants.java
Sun Jun 21 19:28:21 2009
@@ -13,11 +13,12 @@
  */
 package org.apache.webbeans;
 
+import javax.enterprise.inject.spi.BeanManager;
+
 /**
  * Web beans related constants.
  * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
+ * @version $Rev$ $Date$
  */
 public final class WebBeansConstants
 {
@@ -90,6 +91,7 @@
 
     public static final String WEB_BEANS_XML_ARRAY_ELEMENT = "Array";
 
-    public static final String WEB_BEANS_MANAGER_JNDI_NAME = "java:app/Manager";
+    /**JNDI name of the {@link BeanManager} instance*/
+    public static final String WEB_BEANS_MANAGER_JNDI_NAME = "java:comp/Manager";
 
 }

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/WebBeansConstants.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AfterBeanDiscoveryLiteral.java
(from r782277, incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DeployedManagerLiteral.java)
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AfterBeanDiscoveryLiteral.java?p2=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AfterBeanDiscoveryLiteral.java&p1=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DeployedManagerLiteral.java&r1=782277&r2=787074&rev=787074&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DeployedManagerLiteral.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AfterBeanDiscoveryLiteral.java
Sun Jun 21 19:28:21 2009
@@ -17,9 +17,9 @@
 package org.apache.webbeans.annotation;
 
 import javax.enterprise.inject.AnnotationLiteral;
-import javax.inject.manager.Deployed;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
 
-public class DeployedManagerLiteral extends AnnotationLiteral<Deployed> implements
Deployed
+public class AfterBeanDiscoveryLiteral extends AnnotationLiteral<AfterBeanDiscovery>
implements AfterBeanDiscovery
 {
 
 }

Copied: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeBeanDiscoveryLiteral.java
(from r782277, incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedManagerLiteral.java)
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeBeanDiscoveryLiteral.java?p2=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeBeanDiscoveryLiteral.java&p1=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedManagerLiteral.java&r1=782277&r2=787074&rev=787074&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedManagerLiteral.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeBeanDiscoveryLiteral.java
Sun Jun 21 19:28:21 2009
@@ -14,9 +14,9 @@
 package org.apache.webbeans.annotation;
 
 import javax.enterprise.inject.AnnotationLiteral;
-import javax.inject.manager.Initialized;
+import javax.enterprise.inject.spi.BeforeBeanDiscovery;
 
-public class InitializedManagerLiteral extends AnnotationLiteral<Initialized> implements
Initialized
+public class BeforeBeanDiscoveryLiteral extends AnnotationLiteral<BeforeBeanDiscovery>
implements BeforeBeanDiscovery
 {
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java?rev=787074&r1=787073&r2=787074&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
Sun Jun 21 19:28:21 2009
@@ -37,8 +37,8 @@
 import javax.interceptor.Interceptor;
 
 import org.apache.webbeans.WebBeansConstants;
-import org.apache.webbeans.annotation.DeployedManagerLiteral;
-import org.apache.webbeans.annotation.InitializedManagerLiteral;
+import org.apache.webbeans.annotation.AfterBeanDiscoveryLiteral;
+import org.apache.webbeans.annotation.BeforeBeanDiscoveryLiteral;
 import org.apache.webbeans.component.ComponentImpl;
 import org.apache.webbeans.component.WebBeansType;
 import org.apache.webbeans.container.InjectionResolver;
@@ -149,14 +149,14 @@
     private void fireInitializeEvent()
     {
         BeanManager manager = ManagerImpl.getManager();
-        manager.fireEvent(manager, new Annotation[] { new InitializedManagerLiteral() });
+        manager.fireEvent(manager, new Annotation[] { new BeforeBeanDiscoveryLiteral() });
     }
     
     
     private void fireDeployedEvent()
     {
         BeanManager manager = ManagerImpl.getManager();
-        manager.fireEvent(manager, new Annotation[] { new DeployedManagerLiteral() });  
     
+        manager.fireEvent(manager, new Annotation[] { new AfterBeanDiscoveryLiteral() });
       
         
     }
     

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=787074&r1=787073&r2=787074&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Sun Jun 21 19:28:21 2009
@@ -25,15 +25,26 @@
 /** {@inheritDoc} */
 public class CreationalContextImpl<T> implements CreationalContext<T>
 {
+    /**Map of bean with its incomplete instance*/
     private Map<Bean<?>,Object> incompleteInstancesMap = new ConcurrentHashMap<Bean<?>,
Object>();
 
+    /**Bean*/
     private Bean<T> incompleteBean = null;
     
+    /**
+     * Package private
+     */
     CreationalContextImpl()
     {
-        
+        //Empty
     }
     
+    /**
+     * Returns new creational context.
+     * 
+     * @param incompleteBean incomplete instance owner
+     * @return new creational context
+     */
     protected CreationalContextImpl<T> getCreationalContextImpl(Bean<T> incompleteBean)
     {
         CreationalContextImpl<T> impl = new CreationalContextImpl<T>();     
  
@@ -45,17 +56,34 @@
         
     }
     
+    /**
+     * Save this incomplete instance.
+     * 
+     * @param incompleteInstance incomplete bean instance
+     */
     public void push(T incompleteInstance)
     {
         this.incompleteInstancesMap.put(this.incompleteBean, incompleteInstance);
         
     }
     
+    /**
+     * Returns incomplete instance.
+     * 
+     * @param incompleteBean instance owner
+     * @return incomplete instance
+     */
     public Object get(Bean<?> incompleteBean)
     {
         return incompleteInstancesMap.get(incompleteBean);
     }
     
+    
+    /**
+     * Removes from creational context.
+     * 
+     * @param bean owner bean
+     */
     public void remove(Bean<?> bean)
     {
         if(this.incompleteInstancesMap.containsKey(bean))
@@ -64,9 +92,22 @@
         }
     }
     
+    /**
+     * Clear registry.
+     */
     public void clear()
     {
         this.incompleteInstancesMap.clear();
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void release()
+    {
+        remove(this.incompleteBean);
+        
+    }
+
 }
\ No newline at end of file



Mime
View raw message