geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1056676 - in /geronimo/server/trunk/plugins: openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/
Date Sat, 08 Jan 2011 09:25:16 GMT
Author: djencks
Date: Sat Jan  8 09:25:16 2011
New Revision: 1056676

URL: http://svn.apache.org/viewvc?rev=1056676&view=rev
Log:
OWB-503 related changes

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoSingletonService.java
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java?rev=1056676&r1=1056675&r2=1056676&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
Sat Jan  8 09:25:16 2011
@@ -176,7 +176,7 @@ public class EjbModuleImpl implements EJ
         if (appContext == null) {
             throw new IllegalStateException("Not started");
         }
-        return appContext.get(OWBContext.class).getSingletons();
+        return appContext.get(OWBContext.class).getWebBeansContext();
     }
 
     public void doStart() throws Exception {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java?rev=1056676&r1=1056675&r2=1056676&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
Sat Jan  8 09:25:16 2011
@@ -52,7 +52,7 @@ public class ThreadSingletonServiceAdapt
                 //not embedded. Are we the first ejb module to try this?
                 if (startupObject.getAppContext().get(OWBContext.class) == null) {
                     startupObject.getAppContext().set(OWBContext.class, owbContext);
-                    WebBeansContext webBeansContext = owbContext.getSingletons();
+                    WebBeansContext webBeansContext = owbContext.getWebBeansContext();
                     setConfiguration(webBeansContext.getOpenWebBeansConfiguration());
                     try {
                         webBeansContext.getService(ContainerLifecycle.class).startApplication(startupObject);
@@ -84,7 +84,7 @@ public class ThreadSingletonServiceAdapt
 
     @Override
     public Object contextEntered(org.apache.openejb.cdi.OWBContext owbContext) {
-        return GeronimoSingletonService.contextEntered(owbContext.getSingletons());
+        return GeronimoSingletonService.contextEntered(owbContext.getWebBeansContext());
     }
 
     @Override

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoSingletonService.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoSingletonService.java?rev=1056676&r1=1056675&r2=1056676&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoSingletonService.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoSingletonService.java
Sat Jan  8 09:25:16 2011
@@ -20,18 +20,15 @@
 
 package org.apache.geronimo.openwebbeans;
 
-import java.util.Map;
-
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.config.WebBeansFinder;
-import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.spi.SingletonService;
 import org.osgi.framework.Bundle;
 
 /**
  * @version $Rev$ $Date$
  */
-public class GeronimoSingletonService implements SingletonService {
+public class GeronimoSingletonService implements SingletonService<WebBeansContext>
{
 
     private static final ThreadLocal<WebBeansContext> contexts = new ThreadLocal<WebBeansContext>();
     private static Bundle bundle;
@@ -55,9 +52,8 @@ public class GeronimoSingletonService im
     }
 
     @Override
-    public Object get(Object key, String singletonClassName) {
-        WebBeansContext context = getContext();
-        return context.get(singletonClassName);
+    public WebBeansContext get(Object key) {
+        return getContext();
     }
 
     private WebBeansContext getContext() {
@@ -73,18 +69,4 @@ public class GeronimoSingletonService im
         getContext().clear();
     }
 
-    @Override
-    public boolean isExist(Object key, String singletonClassName) {
-        throw new UnsupportedOperationException("isExist is never called");
-    }
-
-    @Override
-    public Object getExist(Object key, String singletonClassName) {
-        return getContext().get(singletonClassName);
-    }
-
-    @Override
-    public Object getKey(Object singleton) {
-        return null;
-    }
 }

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java?rev=1056676&r1=1056675&r2=1056676&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
Sat Jan  8 09:25:16 2011
@@ -208,6 +208,7 @@ public class WebBeansConfigurationListen
         ConversationManager conversationManager = webBeansContext.getConversationManager();
         conversationManager.destroyConversationContextWithSessionId(event.getSession().getId());
     }
+    
 
     @Override
     public void sessionWillPassivate(HttpSessionEvent event)



Mime
View raw message