[jboss-cvs] JBossAS SVN: r62732 - projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 2 10:40:10 EDT 2007
Author: kabir.khan at jboss.com
Date: 2007-05-02 10:40:10 -0400 (Wed, 02 May 2007)
New Revision: 62732
Removed:
projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectDeployer32.java
projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32.java
projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32JDK5.java
projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassLoaderValidator32.java
projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPool32.java
projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPoolFactory32.java
Log:
[JBAOP-397] I don't think we need to support AS 3.2.x for AOP 2
Deleted: projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectDeployer32.java
===================================================================
--- projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectDeployer32.java 2007-05-02 14:38:38 UTC (rev 62731)
+++ projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectDeployer32.java 2007-05-02 14:40:10 UTC (rev 62732)
@@ -1,36 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.deployment;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class AspectDeployer32 extends AspectDeployer
-{
- protected void initializeMainDeployer()
- {
- // complete
- }
-}
Deleted: projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32.java
===================================================================
--- projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32.java 2007-05-02 14:38:38 UTC (rev 62731)
+++ projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32.java 2007-05-02 14:40:10 UTC (rev 62732)
@@ -1,51 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.deployment;
-
-import javassist.scopedpool.ScopedClassPoolFactory;
-
-import org.jboss.aop.ClassLoaderValidation;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class AspectManagerService32 extends AspectManagerService
-{
- protected ScopedClassPoolFactory createFactory() throws Exception
- {
- return new JBossClassPoolFactory32(tmpClassesDir);
- }
-
- protected ClassLoaderValidation createClassLoaderValidation()
- {
- return new JBossClassLoaderValidator32();
- }
-
- protected void baseAop()
- {
- // complete
- }
-
-}
Deleted: projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32JDK5.java
===================================================================
--- projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32JDK5.java 2007-05-02 14:38:38 UTC (rev 62731)
+++ projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/AspectManagerService32JDK5.java 2007-05-02 14:40:10 UTC (rev 62732)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.aop.deployment;
-
-import javassist.scopedpool.ScopedClassPoolFactory;
-
-import org.jboss.aop.ClassLoaderValidation;
-
-/**
- * comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- */
-public class AspectManagerService32JDK5 extends AspectManagerServiceJDK5
-{
- protected ScopedClassPoolFactory createFactory() throws Exception
- {
- return new JBossClassPoolFactory32(tmpClassesDir);
- }
-
- protected ClassLoaderValidation createClassLoaderValidation()
- {
- return new JBossClassLoaderValidator32();
- }
-
- protected void baseAop()
- {
- // complete
- }
-}
Deleted: projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassLoaderValidator32.java
===================================================================
--- projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassLoaderValidator32.java 2007-05-02 14:38:38 UTC (rev 62731)
+++ projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassLoaderValidator32.java 2007-05-02 14:40:10 UTC (rev 62732)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.deployment;
-
-import org.jboss.aop.ClassLoaderValidation;
-import org.jboss.mx.loading.UnifiedClassLoader;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class JBossClassLoaderValidator32 implements ClassLoaderValidation
-{
- public boolean isValidClassLoader(ClassLoader loader)
- {
- if (!(loader instanceof UnifiedClassLoader)) return false;
- return ((UnifiedClassLoader) loader).getLoaderRepository() != null;
- }
-}
Deleted: projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPool32.java
===================================================================
--- projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPool32.java 2007-05-02 14:38:38 UTC (rev 62731)
+++ projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPool32.java 2007-05-02 14:40:10 UTC (rev 62732)
@@ -1,116 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.deployment;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.security.ProtectionDomain;
-
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.mx.loading.UnifiedClassLoader;
-import javassist.CannotCompileException;
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class JBossClassPool32 extends AOPClassPool
-{
- /**
- * Used for dynamically created classes (see loadClass(String, byte[]), ClassLoader)
- */
- protected File tempdir = null;
- // For loadClass tmpdir creation for UCL
- protected final Object tmplock = new Object();
-
- protected JBossClassPool32(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, File tmp)
- {
- super(cl, src, repository);
- tempdir = tmp;
- }
-
- protected JBossClassPool32(ClassPool src, ScopedClassPoolRepository repository)
- {
- super(src, repository);
- }
-
- public boolean isUnloadedClassLoader()
- {
- if (getClassLoader() instanceof UnifiedClassLoader)
- {
- UnifiedClassLoader rcl = (UnifiedClassLoader) getClassLoader();
- return rcl.getLoaderRepository() == null;
- }
- return false;
- }
-
- public Class toClass(CtClass cc, ClassLoader loader, ProtectionDomain domain)
- throws CannotCompileException
- {
- lockInCache(cc);
- if (getClassLoader() == null || tempdir == null)
- {
- return super.toClass(cc, loader, domain);
- }
- Class dynClass = null;
- try
- {
- File classFile = null;
- String classFileName = cc.getName().replace('.', '/') + ".class";
- // Write the clas file to the tmpdir
- synchronized (tmplock)
- {
- classFile = new File(tempdir, classFileName);
- File pkgDirs = classFile.getParentFile();
- pkgDirs.mkdirs();
- FileOutputStream stream = new FileOutputStream(classFile);
- stream.write(cc.toBytecode());
- stream.flush();
- stream.close();
- classFile.deleteOnExit();
- }
- // We have to clear Blacklist caches or the class will never
- // be found
- //((UnifiedClassLoader)dcl).clearBlacklists();
- // To be backward compatible
- UnifiedClassLoader rcl = (UnifiedClassLoader) getClassLoader();
- rcl.clearBlacklists();
-
- // Now load the class through the cl
- dynClass = getClassLoader().loadClass(cc.getName());
- }
- catch (Exception ex)
- {
- ClassFormatError cfe = new ClassFormatError("Failed to load dyn class: " + cc.getName());
- cfe.initCause(ex);
- throw cfe;
- }
-
- return dynClass;
- }
-
-}
Deleted: projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPoolFactory32.java
===================================================================
--- projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPoolFactory32.java 2007-05-02 14:38:38 UTC (rev 62731)
+++ projects/aop/trunk/asintegration/src/main/org/jboss/aop/deployment/JBossClassPoolFactory32.java 2007-05-02 14:40:10 UTC (rev 62732)
@@ -1,81 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.deployment;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import org.jboss.mx.loading.UnifiedClassLoader;
-import javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- *
- **/
-public class JBossClassPoolFactory32 implements ScopedClassPoolFactory
-{
- protected File tmpClassesDir;
-
- public JBossClassPoolFactory32(File tmpClassesDir) throws IOException
- {
- this.tmpClassesDir = tmpClassesDir;
-
- }
- public ScopedClassPool create(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository)
- {
- try
- {
- File tempdir = createTempDir(cl);
- return new JBossClassPool32(cl, src, repository, tempdir);
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public ScopedClassPool create(ClassPool src, ScopedClassPoolRepository repository)
- {
- return new JBossClassPool32(src, repository);
- }
-
- public File createTempDir(ClassLoader cl) throws IOException
- {
- if (!(cl instanceof UnifiedClassLoader)) return null;
- File tempdir = File.createTempFile("ucl", "", tmpClassesDir);
- tempdir.delete();
- tempdir.mkdir();
- tempdir.deleteOnExit();
- UnifiedClassLoader ucl = (UnifiedClassLoader) cl;
- URL tmpURL = tempdir.toURL();
- URL tmpCP = new URL(tmpURL, "?dynamic=true");
- // we may be shutting down.
- if (ucl.getLoaderRepository() != null) ucl.addURL(tmpCP);
- return tempdir;
- }
-}
More information about the jboss-cvs-commits
mailing list