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 2009/01/27 23:03:12 UTC

svn commit: r738264 - in /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: annotation/ component/ config/ event/ inject/xml/ intercept/ proxy/ util/

Author: gerdogdu
Date: Tue Jan 27 22:03:11 2009
New Revision: 738264

URL: http://svn.apache.org/viewvc?rev=738264&view=rev
Log:
OWB-38 Check throwable.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ObservableComponentImpl.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansScanner.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/TransactionalNotifier.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java Tue Jan 27 22:03:11 2009
@@ -70,9 +70,9 @@
      * @param m method invoked method
      * @param proceed actual method on this proxy object self
      * @param args method arguments
-     * @throws Throwable if any exception occurs
+     * @throws Exception if any exception occurs
      */
-    public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Throwable
+    public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Exception
     {
         WebBeansAnnotation anno = (WebBeansAnnotation) self;
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ObservableComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ObservableComponentImpl.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ObservableComponentImpl.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ObservableComponentImpl.java Tue Jan 27 22:03:11 2009
@@ -58,7 +58,7 @@
             instance = getConstructor().newInstance(new Object[] { bindingTypes, eventType });
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             throw new WebBeansException("Exception in creating Observable implicit component for event type : " + eventType.getName());
         }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansScanner.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansScanner.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansScanner.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansScanner.java Tue Jan 27 22:03:11 2009
@@ -103,7 +103,7 @@
             }
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             logger.error("Initializing of the WebBeans container is failed.", e);
             throw new WebBeansConfigurationException(e);
@@ -112,7 +112,7 @@
     }
 
     /* Collects all URLs */
-    private Set<URL> getArchieves() throws Throwable
+    private Set<URL> getArchieves() throws Exception
     {
         Set<URL> lists = createURLFromMarkerFile();
         URL warUrl = createURLFromWARFile();
@@ -126,7 +126,7 @@
     }
 
     /* Creates URLs from the marker file */
-    private Set<URL> createURLFromMarkerFile() throws Throwable
+    private Set<URL> createURLFromMarkerFile() throws Exception
     {
         Set<URL> listURL = new HashSet<URL>();
         URL[] urls = null;
@@ -189,7 +189,7 @@
         return listURL;
     }
 
-    private URL createURLFromWARFile() throws Throwable
+    private URL createURLFromWARFile() throws Exception
     {
         URL url = this.servletContext.getResource("/WEB-INF/web-beans.xml");
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java Tue Jan 27 22:03:11 2009
@@ -242,9 +242,9 @@
                 }
 
             }
-            catch (Throwable e)
+            catch (Exception e)
             {
-                if (Exception.class.isAssignableFrom(e.getClass()))
+                if (!RuntimeException.class.isAssignableFrom(e.getClass()))
                 {
                     throw new ObserverException("Exception is thrown while handling event object with type : " + event.getClass().getName(), e);
                 }
@@ -306,7 +306,7 @@
             }
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             logger.error("Exception is occured in the transational observer ", e);
         }
@@ -329,7 +329,7 @@
             }
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             logger.error("Exception is occured in the transational observer ", e);
         }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/TransactionalNotifier.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/TransactionalNotifier.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/TransactionalNotifier.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/TransactionalNotifier.java Tue Jan 27 22:03:11 2009
@@ -67,27 +67,27 @@
         this.beforeCompletion.add(observer);
     }
 
-    public void notifyAfterCompletion() throws Throwable
+    public void notifyAfterCompletion() throws Exception
     {
         Iterator<Observer<Object>> it = this.afterCompletion.iterator();
         handleEvent(it);
     }
 
-    public void notifyAfterCompletionSuccess() throws Throwable
+    public void notifyAfterCompletionSuccess() throws Exception
     {
         Iterator<Observer<Object>> it = this.afterCompletionSuccess.iterator();
         handleEvent(it);
 
     }
 
-    public void notifyAfterCompletionFailure() throws Throwable
+    public void notifyAfterCompletionFailure() throws Exception
     {
         Iterator<Observer<Object>> it = this.afterCompletionFailure.iterator();
         handleEvent(it);
 
     }
 
-    public void notifyBeforeCompletion() throws Throwable
+    public void notifyBeforeCompletion() throws Exception
     {
         Iterator<Observer<Object>> it = this.beforeCompletion.iterator();
         handleEvent(it);

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java Tue Jan 27 22:03:11 2009
@@ -74,7 +74,7 @@
             }
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             e.printStackTrace();
             throw new WebBeansException(e);

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java Tue Jan 27 22:03:11 2009
@@ -63,7 +63,7 @@
             return (T) m.invoke(instance, list.toArray());
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             // no-op
             e.printStackTrace();

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java Tue Jan 27 22:03:11 2009
@@ -49,7 +49,7 @@
         this.component = component;
     }
 
-    public Object invoke(Object instance, Method method, Method proceed, Object[] arguments) throws Throwable
+    public Object invoke(Object instance, Method method, Method proceed, Object[] arguments) throws Exception
     {
         Context webbeansContext = ManagerImpl.getManager().getContext(component.getScopeType());
         Object webbeansInstance = webbeansContext.get(this.component, new CreationalContextImpl());

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java Tue Jan 27 22:03:11 2009
@@ -75,7 +75,7 @@
             result = fact.createClass().newInstance();
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             throw new WebBeansException(e);
         }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java Tue Jan 27 22:03:11 2009
@@ -494,7 +494,7 @@
             return method.invoke(instance, args);
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             throw new WebBeansException("Exception occurs in the method call with method : " + method.getName() + " in class : " + instance.getClass().getName());
         }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java?rev=738264&r1=738263&r2=738264&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java Tue Jan 27 22:03:11 2009
@@ -32,7 +32,7 @@
             initialContext = new InitialContext();
 
         }
-        catch (Throwable e)
+        catch (Exception e)
         {
             LOGGER.error("Unable to initialize InitialContext object", e);
             throw new ExceptionInInitializerError(e);