openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1056785 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventImpl.java
Date Sat, 08 Jan 2011 20:11:15 GMT
Author: djencks
Date: Sat Jan  8 20:11:15 2011
New Revision: 1056785

URL: http://svn.apache.org/viewvc?rev=1056785&view=rev
Log:
OWB-503 fix serialization problem

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventImpl.java?rev=1056785&r1=1056784&r2=1056785&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventImpl.java
Sat Jan  8 20:11:15 2011
@@ -31,7 +31,6 @@ import javax.enterprise.event.Event;
 import javax.enterprise.util.TypeLiteral;
 
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.OwbCustomObjectInputStream;
 import org.apache.webbeans.util.WebBeansUtil;
@@ -52,9 +51,7 @@ public class EventImpl<T> implements Eve
     /**Event types*/
     private Type eventType;
 
-    /**Bean manager*/
-    private transient BeanManagerImpl manager = null;
-    private final WebBeansContext webBeansContext;
+    private transient WebBeansContext webBeansContext = WebBeansContext.getInstance();
 
     /**
      * Creates a new event.
@@ -66,8 +63,6 @@ public class EventImpl<T> implements Eve
     {
         this.injectedBindings = injectedBindings;
         this.eventType = eventType;
-        webBeansContext = WebBeansContext.getInstance();
-        this.manager = webBeansContext.getBeanManagerImpl();
     }
 
     /**
@@ -75,7 +70,7 @@ public class EventImpl<T> implements Eve
      */
     public void fire(T event)
     {
-        this.manager.fireEvent(event, this.injectedBindings);
+        this.webBeansContext.getBeanManagerImpl().fireEvent(event, this.injectedBindings);
     }
 
     /**
@@ -167,6 +162,6 @@ public class EventImpl<T> implements Eve
         this.eventType = (Type)inputStream.readObject();
         this.injectedBindings = (Annotation[])inputStream.readObject();
 
-        this.manager = webBeansContext.getBeanManagerImpl();
+        this.webBeansContext = WebBeansContext.getInstance();
     }
 }
\ No newline at end of file



Mime
View raw message