openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1079878 - in /openwebbeans/trunk: webbeans-openejb/src/main/java/org/apache/webbeans/ejb/ webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/ webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/ webbeans-spi/sr...
Date Wed, 09 Mar 2011 16:49:00 GMT
Author: struberg
Date: Wed Mar  9 16:48:59 2011
New Revision: 1079878

URL: http://svn.apache.org/viewvc?rev=1079878&view=rev
Log:
OWB-543 get rid of checked Exceptions in our SPI

Modified:
    openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
    openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/OpenEjbResourceInjectionService.java
    openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
    openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/ResourceInjectionService.java
    openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/AbstractOwbPlugin.java
    openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansPlugin.java
    openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
    openwebbeans/trunk/webbeans-tomcat7/pom.xml
    openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java

Modified: openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
Wed Mar  9 16:48:59 2011
@@ -35,7 +35,6 @@ import javax.enterprise.inject.spi.Sessi
 
 import org.apache.openejb.Container;
 import org.apache.openejb.DeploymentInfo;
-import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.assembler.classic.DeploymentListener;
@@ -122,7 +121,7 @@ public class EjbPlugin extends AbstractO
      * @see org.apache.webbeans.plugins.AbstractOwbPlugin#shutDown()
      */
     @Override
-    public void shutDown() throws WebBeansConfigurationException
+    public void shutDown()
     {
         try
         {
@@ -159,7 +158,7 @@ public class EjbPlugin extends AbstractO
      * @see org.apache.webbeans.plugins.AbstractOwbPlugin#startUp()
      */
     @Override
-    public void startUp() throws WebBeansConfigurationException
+    public void startUp()
     {
         try
         {
@@ -417,7 +416,7 @@ public class EjbPlugin extends AbstractO
     /**
      * {@inheritDoc}
      */
-    public void isManagedBean(Class<?> clazz) throws WebBeansConfigurationException
+    public void isManagedBean(Class<?> clazz)
     {
         if (isSessionBean(clazz))
         {
@@ -495,9 +494,8 @@ public class EjbPlugin extends AbstractO
      * @param deployments deployments
      * @param deployment deployment
      * @return strategy
-     * @throws OpenEJBException if any exception
      */
-    public JndiNameStrategy createStrategy(AppInfo appInfo, List<DeploymentInfo> deployments,
DeploymentInfo deployment) throws OpenEJBException
+    public JndiNameStrategy createStrategy(AppInfo appInfo, List<DeploymentInfo> deployments,
DeploymentInfo deployment)
     {
         JndiNameStrategy strategy = nameStrategies.get(deployment.getModuleID());
         if (strategy != null)

Modified: openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/OpenEjbResourceInjectionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/OpenEjbResourceInjectionService.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/OpenEjbResourceInjectionService.java
(original)
+++ openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/OpenEjbResourceInjectionService.java
Wed Mar  9 16:48:59 2011
@@ -82,7 +82,7 @@ public class OpenEjbResourceInjectionSer
     }
 
     @Override
-    public void injectJavaEEResources(Object managedBeanInstance) throws Exception
+    public void injectJavaEEResources(Object managedBeanInstance)
     {
         Field[] fields = SecurityUtil.doPrivilegedGetDeclaredFields(managedBeanInstance.getClass());
         for(Field field : fields)

Modified: openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
(original)
+++ openwebbeans/trunk/webbeans-resource/src/main/java/org/apache/webbeans/resource/spi/se/StandaloneResourceInjectionService.java
Wed Mar  9 16:48:59 2011
@@ -108,7 +108,7 @@ public class StandaloneResourceInjection
     }
 
     @Override
-    public void injectJavaEEResources(Object managedBeanInstance) throws Exception
+    public void injectJavaEEResources(Object managedBeanInstance)
     {
         Class currentClass = managedBeanInstance.getClass();
         Boolean containsEeResource = classContainsEEResources.get(currentClass);

Modified: openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/ResourceInjectionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/ResourceInjectionService.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/ResourceInjectionService.java
(original)
+++ openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/ResourceInjectionService.java
Wed Mar  9 16:48:59 2011
@@ -49,7 +49,7 @@ public interface ResourceInjectionServic
      * </p>
      * @param managedBeanInstance managed bean instance
      */
-    public void injectJavaEEResources(Object managedBeanInstance) throws Exception;
+    public void injectJavaEEResources(Object managedBeanInstance);
     
     /**
      * Gets resource for the given resource reference.

Modified: openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/AbstractOwbPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/AbstractOwbPlugin.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/AbstractOwbPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/AbstractOwbPlugin.java
Wed Mar  9 16:48:59 2011
@@ -37,7 +37,7 @@ public abstract class AbstractOwbPlugin 
     }
 
     /** @{inheritDoc} */
-    public void isManagedBean(Class<?> clazz) throws Exception
+    public void isManagedBean(Class<?> clazz)
     {
     }
     
@@ -48,12 +48,12 @@ public abstract class AbstractOwbPlugin 
     }
 
     /** @{inheritDoc} */
-    public void shutDown() throws Exception
+    public void shutDown()
     {
     }
 
     /** @{inheritDoc} */
-    public void startUp() throws Exception
+    public void startUp()
     {
     }
     

Modified: openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansPlugin.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansPlugin.java
Wed Mar  9 16:48:59 2011
@@ -40,9 +40,8 @@ public interface OpenWebBeansPlugin
     /**
      * initialise the plugin.
      * This is called once after the very plugin has been loaded.
-     * @throws WebBeansConfigurationException
      */
-    public void startUp() throws Exception;
+    public void startUp();
 
     /**
      * At shutdown, the plugin must release all locked resources.
@@ -50,7 +49,7 @@ public interface OpenWebBeansPlugin
      * This is usually the case when the WebApplication gets stopped.
      * @throws WebBeansConfigurationException
      */
-    public void shutDown() throws Exception;
+    public void shutDown();
     
 
     /**
@@ -59,7 +58,7 @@ public interface OpenWebBeansPlugin
      * @param clazz the class to check
      * @throws WebBeansConfigurationException if the given clazz cannot be used as simple
web bean.
      */
-    public void isManagedBean(Class<?> clazz) throws Exception;
+    public void isManagedBean(Class<?> clazz);
     
     /**
      * Returns true if plugin provides given service implementation

Modified: openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
Wed Mar  9 16:48:59 2011
@@ -30,6 +30,7 @@ import javax.servlet.http.HttpSessionAtt
 import javax.servlet.http.HttpSessionBindingListener;
 import javax.servlet.http.HttpSessionListener;
 
+import org.apache.webbeans.exception.inject.DefinitionException;
 import org.apache.webbeans.spi.SecurityService;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansWebPlugin;
@@ -72,7 +73,7 @@ public class TomcatWebPlugin extends Abs
      * {@inheritDoc}
      */
     @Override
-    public void isManagedBean(Class<?> clazz) throws Exception
+    public void isManagedBean(Class<?> clazz)
     {
         if(Servlet.class.isAssignableFrom(clazz) ||
                 Filter.class.isAssignableFrom(clazz) ||
@@ -85,7 +86,7 @@ public class TomcatWebPlugin extends Abs
                 ServletRequestListener.class.isAssignableFrom(clazz) ||
                 ServletRequestAttributeListener.class.isAssignableFrom(clazz) )
         {
-            throw new Exception("Given class  : " + clazz.getName() + " is not managed bean");
+            throw new DefinitionException("Given class  : " + clazz.getName() + " is not
managed bean");
         }
     }
     

Modified: openwebbeans/trunk/webbeans-tomcat7/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/pom.xml?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/pom.xml (original)
+++ openwebbeans/trunk/webbeans-tomcat7/pom.xml Wed Mar  9 16:48:59 2011
@@ -43,6 +43,13 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jcdi_1.0_spec</artifactId>
             <scope>provided</scope>

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java?rev=1079878&r1=1079877&r2=1079878&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
Wed Mar  9 16:48:59 2011
@@ -30,6 +30,7 @@ import javax.servlet.http.HttpSessionAtt
 import javax.servlet.http.HttpSessionBindingListener;
 import javax.servlet.http.HttpSessionListener;
 
+import org.apache.webbeans.exception.inject.DefinitionException;
 import org.apache.webbeans.spi.SecurityService;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansWebPlugin;
@@ -72,7 +73,7 @@ public class TomcatWebPlugin extends Abs
      * {@inheritDoc}
      */
     @Override
-    public void isManagedBean(Class<?> clazz) throws Exception
+    public void isManagedBean(Class<?> clazz)
     {
         if(Servlet.class.isAssignableFrom(clazz) ||
                 Filter.class.isAssignableFrom(clazz) ||
@@ -85,7 +86,7 @@ public class TomcatWebPlugin extends Abs
                 ServletRequestListener.class.isAssignableFrom(clazz) ||
                 ServletRequestAttributeListener.class.isAssignableFrom(clazz) )
         {
-            throw new Exception("Given class  : " + clazz.getName() + " is not managed bean");
+            throw new DefinitionException("Given class  : " + clazz.getName() + " is not
managed bean");
         }
     }
     



Mime
View raw message