Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2013-2024 the HotswapAgent authors.
*
* This file is part of HotswapAgent.
*
* HotswapAgent is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 2 of the License, or (at your
* option) any later version.
*
* HotswapAgent 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 General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with HotswapAgent. If not, see http://www.gnu.org/licenses/.
*/
package org.hotswap.agent.plugin.elresolver;
import java.lang.reflect.Modifier;
import java.util.Collections;
import java.util.Set;
import java.util.WeakHashMap;
import org.hotswap.agent.annotation.Init;
import org.hotswap.agent.annotation.LoadEvent;
import org.hotswap.agent.annotation.Manifest;
import org.hotswap.agent.annotation.Maven;
import org.hotswap.agent.annotation.Name;
import org.hotswap.agent.annotation.OnClassLoadEvent;
import org.hotswap.agent.annotation.Plugin;
import org.hotswap.agent.annotation.Versions;
import org.hotswap.agent.command.Scheduler;
import org.hotswap.agent.config.PluginConfiguration;
import org.hotswap.agent.javassist.CannotCompileException;
import org.hotswap.agent.javassist.CtClass;
import org.hotswap.agent.javassist.CtConstructor;
import org.hotswap.agent.javassist.CtField;
import org.hotswap.agent.javassist.CtMethod;
import org.hotswap.agent.javassist.CtNewMethod;
import org.hotswap.agent.javassist.NotFoundException;
import org.hotswap.agent.logging.AgentLogger;
import org.hotswap.agent.util.PluginManagerInvoker;
/**
* Clear javax.el.BeanELResolver cache after any class redefinition.
*
* @author Vladimir Dvorak
*/
@Plugin(name = "ELResolver",
group = "groupELResolver",
fallback = true,
description = "Purge BeanELResolver class cache on any class redefinition.",
testedVersions = {"2.2"},
expectedVersions = {"2.2"})
@Versions(
maven = {
//Jboss el 2
@Maven(value = "[1.0,)", artifactId = "jboss-el-api_2.2_spec", groupId = "org.jboss.spec.javax.el"),
//Juel
@Maven(value = "[2.0,)", artifactId = "juel", groupId = "de.odysseus.juel"),
//Jboss el 3.0
@Maven(value="[3.0,)", artifactId = "javax.el-api", groupId = "javax.el")
},
manifest = {
// Seam jboss
@Manifest(value="[1.0,)", versionName="JBoss-EL-Version", names ={@Name(key="JBoss-EL-Version", value=".*")}),
// Tomcat bundled EL (6-9)
@Manifest(value="[2.0,5.0)",versionName = Name.SpecificationVersion, names={
@Name(key=Name.ImplementationTitle,value="javax.el"),
@Name(key=Name.ImplementationVendor, value="Apache.*Software.*Foundation")
}),
// Tomcat bundled EL (10)
@Manifest(value="[5.0,)",versionName = Name.SpecificationVersion, names={
@Name(key=Name.ImplementationTitle,value="jakarta.el"),
@Name(key=Name.ImplementationVendor, value="Apache.*Software.*Foundation")
}),
//Jetty 7,8
@Manifest(value="[2.0,)", versionName={Name.BundleVersion}, names={@Name(key=Name.BundleSymbolicName,value="javax.el")}),
//Jetty 9
@Manifest(value="[8.0,)", versionName={Name.BundleVersion}, names={
@Name(key=Name.BundleSymbolicName,value="org.mortbay.jasper.apache-el"),
@Name(key="Bundle-Vendor",value="Webtide")}),
// GlassFish
@Manifest(value="[3.0,)", versionName={Name.BundleVersion}, names={
@Name(key=Name.BundleSymbolicName,value="com.sun.el.javax.el"),
@Name(key="Bundle-Vendor",value="GlassFish Community")})
}
)
public class ELResolverPlugin {
private static AgentLogger LOGGER = AgentLogger.getLogger(ELResolverPlugin.class);
public static final String PURGE_CLASS_CACHE_METHOD_NAME = "$$ha$resetCache";
@Init
Scheduler scheduler;
Set