geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1095281 - /geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/GeronimoWebBeansPlugin.java
Date Wed, 20 Apr 2011 06:03:47 GMT
Author: xuhaihong
Date: Wed Apr 20 06:03:47 2011
New Revision: 1095281

URL: http://svn.apache.org/viewvc?rev=1095281&view=rev
Log:
Remove the SecurityService, since Geronimo does not have specific implementation for it, and
now, OpenWebBeans will initialize the SecurityService once the WebBeansContext is created,
to provide the SecurityService by plugin would not work now. 

Modified:
    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/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=1095281&r1=1095280&r2=1095281&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
Wed Apr 20 06:03:47 2011
@@ -18,14 +18,6 @@
  */
 package org.apache.geronimo.openwebbeans;
 
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.security.Principal;
-import java.security.PrivilegedActionException;
-import java.util.Properties;
-
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.event.TransactionPhase;
 import javax.enterprise.inject.spi.Bean;
@@ -48,14 +40,11 @@ import javax.transaction.TransactionMana
 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.OpenWebBeansJavaEEPlugin;
 
-public class GeronimoWebBeansPlugin
-    extends AbstractOwbPlugin
-    implements OpenWebBeansJavaEEPlugin, TransactionService, SecurityService {
+public class GeronimoWebBeansPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPlugin,
TransactionService {
  //OpenWebBeansEjbPlugin,
     public <T> Bean<T> defineSessionBean(Class<T> clazz,
                                          ProcessAnnotatedType<T> processAnnotateTypeEvent)
{
@@ -150,89 +139,9 @@ public class GeronimoWebBeansPlugin
         // TODO Auto-generated method stub
     }
 
-    public Principal getCurrentPrincipal() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-    
-    
-
-    @Override
-    public <T> Constructor<T> doPrivilegedGetDeclaredConstructor(Class<T>
clazz, Class<?>... parameterTypes) {
-        try {
-            return clazz.getDeclaredConstructor(parameterTypes);
-        } catch (NoSuchMethodException e) {
-            return null;
-        }
-    }
-
-    @Override
-    public <T> Constructor<?>[] doPrivilegedGetDeclaredConstructors(Class<T>
clazz) {
-        return clazz.getDeclaredConstructors();
-    }
-
-    @Override
-    public <T> Method doPrivilegedGetDeclaredMethod(Class<T> clazz, String name,
Class<?>... parameterTypes) {
-        try {
-            return clazz.getDeclaredMethod(name, parameterTypes);
-        } catch (NoSuchMethodException e) {
-            return null;
-        }
-    }
-
-    @Override
-    public <T> Method[] doPrivilegedGetDeclaredMethods(Class<T> clazz) {
-        return clazz.getDeclaredMethods();
-    }
-
-    @Override
-    public <T> Field doPrivilegedGetDeclaredField(Class<T> clazz, String name)
{
-        try {
-            return clazz.getDeclaredField(name);
-        } catch (NoSuchFieldException e) {
-            return null;
-        }
-    }
-
-    @Override
-    public <T> Field[] doPrivilegedGetDeclaredFields(Class<T> clazz) {
-        return clazz.getDeclaredFields();
-    }
-
-    @Override
-    public void doPrivilegedSetAccessible(AccessibleObject obj, boolean flag) {
-        obj.setAccessible(flag);
-    }
-
-    @Override
-    public boolean doPrivilegedIsAccessible(AccessibleObject obj) {
-        return obj.isAccessible();
-    }
-
-    @Override
-    public <T> T doPrivilegedObjectCreate(Class<T> clazz) throws PrivilegedActionException,
IllegalAccessException,
-            InstantiationException {
-        return clazz.newInstance();
-    }
-
-    @Override
-    public void doPrivilegedSetSystemProperty(String propertyName, String value) {
-        System.setProperty(propertyName, value);
-    }
-
-    @Override
-    public String doPrivilegedGetSystemProperty(String propertyName, String defaultValue)
{
-        return System.getProperty(propertyName, defaultValue);
-    }
-
-    @Override
-    public Properties doPrivilegedGetSystemProperties() {
-        return System.getProperties();
-    }
-
     @Override
     public <T> T getSupportedService(Class<T> serviceClass) {
-        if (serviceClass == SecurityService.class || serviceClass == TransactionService.class)
{
+        if (serviceClass == TransactionService.class) {
             return serviceClass.cast(this);
         }
         return super.getSupportedService(serviceClass);



Mime
View raw message