[jboss-cvs] JBossAS SVN: r99863 - projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Jan 24 18:37:26 EST 2010
Author: ALRubinger
Date: 2010-01-24 18:37:26 -0500 (Sun, 24 Jan 2010)
New Revision: 99863
Modified:
projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/InterceptionIntegrationTest.java
projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/SecurityActions.java
Log:
[EJBBOOK-16] Remove unused code
Modified: projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/InterceptionIntegrationTest.java
===================================================================
--- projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/InterceptionIntegrationTest.java 2010-01-24 23:33:36 UTC (rev 99862)
+++ projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/InterceptionIntegrationTest.java 2010-01-24 23:37:26 UTC (rev 99863)
@@ -138,7 +138,7 @@
log.info("Starting Server: " + server);
// Set TCCL
- Thread.currentThread().setContextClassLoader(jbossHomeClassLoader);
+ SecurityActions.setThreadContextClassLoader(jbossHomeClassLoader);
// Start the Server
server.start();
Modified: projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/SecurityActions.java
===================================================================
--- projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/SecurityActions.java 2010-01-24 23:33:36 UTC (rev 99862)
+++ projects/ejb-book/trunk/chxx-interceptors/src/test/java/org/jboss/ejb3/examples/chxx/echo/SecurityActions.java 2010-01-24 23:37:26 UTC (rev 99863)
@@ -81,25 +81,6 @@
}
/**
- * Obtains the environment variable with the specified name, or null
- * if not present
- * @param envVarName
- * @return
- * @throws IllegalArgumentException If the environment variable name was not specified
- */
- static String getEnvironmentVariable(final String envVarName) throws IllegalArgumentException
- {
- // Precondition checks
- if (envVarName == null || envVarName.length() == 0)
- {
- throw new IllegalArgumentException("Environment variable name was not specified");
- }
-
- // Return
- return AccessController.doPrivileged(new GetEnvironmentVariableAction(envVarName));
- }
-
- /**
* Obtains the system property with the specified key
*
* @param key
@@ -136,41 +117,6 @@
}
/**
- * {@link PrivilegedAction} to access an environment variable
- *
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- private static class GetEnvironmentVariableAction implements PrivilegedAction<String>
- {
-
- /**
- * Name of the environment variable to get
- */
- private String envVarName;
-
- /**
- * Creates a new instance capable of obtaining the specified environment variable name
- * @param envVarName
- */
- public GetEnvironmentVariableAction(final String envVarName)
- {
- this.envVarName = envVarName;
- }
-
- /**
- * {@inheritDoc}
- * @see java.security.PrivilegedAction#run()
- */
- @Override
- public String run()
- {
- return System.getenv(envVarName);
- }
- }
-
- /**
* {@link PrivilegedAction} to access a system property
*
*
More information about the jboss-cvs-commits
mailing list