You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2010/02/05 23:09:36 UTC

svn commit: r907113 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java

Author: gerdogdu
Date: Fri Feb  5 22:09:35 2010
New Revision: 907113

URL: http://svn.apache.org/viewvc?rev=907113&view=rev
Log:
[OWB-6] Update creational context on passiavation capable

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=907113&r1=907112&r2=907113&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java Fri Feb  5 22:09:35 2010
@@ -21,10 +21,10 @@
 
 import javax.enterprise.context.spi.Contextual;
 import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.PassivationCapable;
 
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.WebBeansUtil;
 
 /** {@inheritDoc} */
 public class CreationalContextImpl<T> implements CreationalContext<T>, Serializable
@@ -219,9 +219,10 @@
                 = new HashMap<Object, DependentCreationalContext<?>>(dependentObjects);
         s.writeObject(depo);
 
-        if (contextual != null && contextual instanceof PassivationCapable)
+        String id = null;
+        if (contextual != null && (id = WebBeansUtil.isPassivationCapable(contextual)) != null)
         {
-            s.writeObject(((PassivationCapable)contextual).getId());
+            s.writeObject(id);
         }
         else
         {