openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yingw...@apache.org
Subject svn commit: r936444 - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/ webbeans-jms/src/main/java/org/apache/webbeans/jms/util/ webbeans-openejb/src/main/java/org/apache/webbeans/ejb/resource/ webbeans-reso...
Date Wed, 21 Apr 2010 19:04:34 GMT
Author: yingwang
Date: Wed Apr 21 19:04:33 2010
New Revision: 936444

URL: http://svn.apache.org/viewvc?rev=936444&view=rev
Log:
[OWB-312] part 4 components.

Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
    openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.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

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java?rev=936444&r1=936443&r2=936444&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
Wed Apr 21 19:04:33 2010
@@ -61,6 +61,7 @@ import org.apache.webbeans.proxy.Javassi
 import org.apache.webbeans.spi.ContextsService;
 import org.apache.webbeans.spi.ServiceLoader;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.SecurityUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -450,7 +451,7 @@ public class OpenWebBeansEjbInterceptor
                         WebBeansDecoratorInterceptor lastInterceptor = new WebBeansDecoratorInterceptor(delegateHandler,
instance);
                         InterceptorDataImpl data = new InterceptorDataImpl(true,lastInterceptor);
                         data.setDefinedInInterceptorClass(true);
-                        data.setAroundInvoke(lastInterceptor.getClass().getDeclaredMethods()[0]);
+                        data.setAroundInvoke(SecurityUtil.doPrivilegedGetDeclaredMethods(lastInterceptor.getClass())[0]);
                         //Add to last
                         filteredInterceptorStack.add(data);
                     }

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java?rev=936444&r1=936443&r2=936444&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/util/JmsProxyHandler.java
Wed Apr 21 19:04:33 2010
@@ -35,6 +35,7 @@ import org.apache.webbeans.jms.JMSModel;
 import org.apache.webbeans.jms.JMSModel.JMSType;
 import org.apache.webbeans.jms.component.JmsBean;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.SecurityUtil;
 
 import javassist.util.proxy.MethodHandler;
 
@@ -251,7 +252,7 @@ public class JmsProxyHandler implements 
                 
                 if(!method.isAccessible())
                 {
-                    method.setAccessible(true);   
+                    SecurityUtil.doPrivilegedSetAccessible(method, true);
                 }
                 
                 method.invoke(this.jmsObject, new Object[]{});                

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=936444&r1=936443&r2=936444&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 Apr 21 19:04:33 2010
@@ -30,6 +30,7 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.spi.ResourceInjectionService;
 import org.apache.webbeans.util.AnnotationUtil;
+import org.apache.webbeans.util.SecurityUtil;
 
 public class OpenEjbResourceInjectionService implements ResourceInjectionService
 {
@@ -58,7 +59,7 @@ public class OpenEjbResourceInjectionSer
     @Override
     public void injectJavaEEResources(Object managedBeanInstance) throws Exception
     {
-        Field[] fields = managedBeanInstance.getClass().getDeclaredFields();
+        Field[] fields = SecurityUtil.doPrivilegedGetDeclaredFields(managedBeanInstance.getClass());
         for(Field field : fields)
         {
             if(!field.isAnnotationPresent(Produces.class))
@@ -73,7 +74,7 @@ public class OpenEjbResourceInjectionSer
                         boolean acess = field.isAccessible();
                         try
                         {
-                            field.setAccessible(true);
+                        	SecurityUtil.doPrivilegedSetAccessible(field, true);
                             field.set(managedBeanInstance, getResourceReference(resourceRef));
                             
                         }catch(Exception e)
@@ -83,7 +84,7 @@ public class OpenEjbResourceInjectionSer
                             
                         }finally
                         {
-                            field.setAccessible(acess);
+                            SecurityUtil.doPrivilegedSetAccessible(field, acess);
                         }                                            
                     }
                 }                

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=936444&r1=936443&r2=936444&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 Apr 21 19:04:33 2010
@@ -33,6 +33,7 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.spi.ResourceInjectionService;
 import org.apache.webbeans.util.AnnotationUtil;
+import org.apache.webbeans.util.SecurityUtil;
 
 public class StandaloneResourceInjectionService implements ResourceInjectionService
 {
@@ -74,7 +75,7 @@ public class StandaloneResourceInjection
     @Override
     public void injectJavaEEResources(Object managedBeanInstance) throws Exception
     {
-        Field[] fields = managedBeanInstance.getClass().getDeclaredFields();
+        Field[] fields = SecurityUtil.doPrivilegedGetDeclaredFields(managedBeanInstance.getClass());
         for(Field field : fields)
         {
             if(!field.isAnnotationPresent(Produces.class))
@@ -89,7 +90,7 @@ public class StandaloneResourceInjection
                         boolean acess = field.isAccessible();
                         try
                         {
-                            field.setAccessible(true);
+                            SecurityUtil.doPrivilegedSetAccessible(field, true);
                             field.set(managedBeanInstance, getResourceReference(resourceRef));
                             
                         }catch(Exception e)
@@ -99,7 +100,7 @@ public class StandaloneResourceInjection
                             
                         }finally
                         {
-                            field.setAccessible(acess);
+                            SecurityUtil.doPrivilegedSetAccessible(field, acess);
                         }                        
                     }                    
                 }                



Mime
View raw message