tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1139265 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
Date Fri, 24 Jun 2011 12:12:57 GMT
Author: rmannibucau
Date: Fri Jun 24 12:12:57 2011
New Revision: 1139265

URL: http://svn.apache.org/viewvc?rev=1139265&view=rev
Log:
adding some delimiters to user interceptors property

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java?rev=1139265&r1=1139264&r2=1139265&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
Fri Jun 24 12:12:57 2011
@@ -73,7 +73,7 @@ public class BeanContext extends Deploym
     private Logger logger = Logger.getInstance(LogCategory.OPENEJB, BeanContext.class);
 
     public static final String USER_INTERCEPTOR_KEY = "org.apache.openejb.default.system.interceptors";
-    public static final String USER_INTERCEPTOR_SEPARATOR = ", ";
+    public static final String USER_INTERCEPTOR_SEPARATOR = ",| |;";
 
     public interface BusinessLocalHome extends javax.ejb.EJBLocalHome {
         Object create();
@@ -218,15 +218,17 @@ public class BeanContext extends Deploym
             String[] interceptorArray = interceptors.split(USER_INTERCEPTOR_SEPARATOR);
             ClassLoader classLoader = moduleContext.getClassLoader();
             for (String interceptor : interceptorArray) {
-                Object interceptorObject;
-                try {
-                    Class<?> clazz = classLoader.loadClass(interceptor);
-                    interceptorObject = clazz.newInstance();
-                } catch (Exception e) {
-                    logger.warning("interceptor " + interceptor + " not found, are you sure
the container can load it?");
-                    continue;
+                if (interceptor != null && !interceptor.isEmpty()) {
+                    Object interceptorObject;
+                    try {
+                        Class<?> clazz = classLoader.loadClass(interceptor);
+                        interceptorObject = clazz.newInstance();
+                    } catch (Exception e) {
+                        logger.warning("interceptor " + interceptor + " not found, are you
sure the container can load it?");
+                        continue;
+                    }
+                    addUserInterceptor(interceptorObject);
                 }
-                addUserInterceptor(interceptorObject);
             }
         }
     }



Mime
View raw message