/*
 * JBoss, Home of Professional Open Source
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb.plugins.cmp.jdbc.keygen;

import java.security.AccessController;
import java.security.PrivilegedAction;

/**
 * Security PrivilegedAction actions for this package
 * @author Scott.Stark@jboss.org
 * @version $Revison:$
 */
public class GetTCLAction implements PrivilegedAction
{
   static PrivilegedAction ACTION = new GetTCLAction();
   public Object run()
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      return loader;
   }

   static ClassLoader getContextClassLoader()
   {
      ClassLoader loader = (ClassLoader) AccessController.doPrivileged(GetTCLAction.ACTION);
      return loader;
   }

}
