geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1080442 - in /geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans: GeronimoResourceInjectionService.java GeronimoWebBeansPlugin.java
Date Fri, 11 Mar 2011 04:28:25 GMT
Author: xuhaihong
Date: Fri Mar 11 04:28:25 2011
New Revision: 1080442

URL: http://svn.apache.org/viewvc?rev=1080442&view=rev
Log:
Update integration codes due to recent changes on openwebbeans

Modified:
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoResourceInjectionService.java
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoWebBeansPlugin.java

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoResourceInjectionService.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoResourceInjectionService.java?rev=1080442&r1=1080441&r2=1080442&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoResourceInjectionService.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoResourceInjectionService.java
Fri Mar 11 04:28:25 2011
@@ -29,7 +29,6 @@ import java.lang.reflect.Modifier;
 
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.Bean;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
@@ -57,7 +56,7 @@ public class GeronimoResourceInjectionSe
 
     //from StandaloneResourceInjectionService
     @Override
-    public void injectJavaEEResources(Object managedBeanInstance) throws Exception {
+    public void injectJavaEEResources(Object managedBeanInstance) {
         Class<?> currentClass = managedBeanInstance.getClass();
 
         while (currentClass != null && Object.class != currentClass)
@@ -130,6 +129,6 @@ public class GeronimoResourceInjectionSe
             ClassNotFoundException {
         return (T) ((ResourceBean)bean).getActualInstance();
     }
-        
+
 
 }

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoWebBeansPlugin.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoWebBeansPlugin.java?rev=1080442&r1=1080441&r2=1080442&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoWebBeansPlugin.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoWebBeansPlugin.java
Fri Mar 11 04:28:25 2011
@@ -41,14 +41,14 @@ import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 import javax.transaction.UserTransaction;
 
+import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.spi.SecurityService;
 import org.apache.webbeans.spi.TransactionService;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
-import org.apache.webbeans.spi.plugins.OpenWebBeansEjbPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansJavaEEPlugin;
 
-public class GeronimoWebBeansPlugin 
-    extends AbstractOwbPlugin 
+public class GeronimoWebBeansPlugin
+    extends AbstractOwbPlugin
     implements OpenWebBeansJavaEEPlugin, TransactionService, SecurityService {
  //OpenWebBeansEjbPlugin,
     public <T> Bean<T> defineSessionBean(Class<T> clazz,
@@ -85,7 +85,7 @@ public class GeronimoWebBeansPlugin 
     }
 
     @Override
-    public void isManagedBean(Class<?> clazz) throws Exception {
+    public void isManagedBean(Class<?> clazz) {
         if(Servlet.class.isAssignableFrom(clazz) ||
                 Filter.class.isAssignableFrom(clazz) ||
                 ServletContextListener.class.isAssignableFrom(clazz) ||
@@ -98,7 +98,7 @@ public class GeronimoWebBeansPlugin 
                 ServletRequestAttributeListener.class.isAssignableFrom(clazz) ||
                 AsyncListener.class.isAssignableFrom(clazz) )
         {
-            throw new Exception("Given class  : " + clazz.getName() + " is not managed bean");
+            throw new WebBeansConfigurationException("Given class  : " + clazz.getName()
+ " is not managed bean");
         }
     }
 
@@ -141,7 +141,7 @@ public class GeronimoWebBeansPlugin 
     public void registerTransactionSynchronization(TransactionPhase phase,
                                                    ObserverMethod<? super Object> observer,
                                                    Object event) throws Exception {
-        // TODO Auto-generated method stub        
+        // TODO Auto-generated method stub
     }
 
     public Principal getCurrentPrincipal() {



Mime
View raw message