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.hibernate;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import org.hotswap.agent.annotation.FileEvent;
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.OnClassFileEvent;
import org.hotswap.agent.annotation.OnClassLoadEvent;
import org.hotswap.agent.annotation.Plugin;
import org.hotswap.agent.annotation.Versions;
import org.hotswap.agent.command.Command;
import org.hotswap.agent.command.ReflectionCommand;
import org.hotswap.agent.command.Scheduler;
import org.hotswap.agent.javassist.CtClass;
import org.hotswap.agent.logging.AgentLogger;
import org.hotswap.agent.util.AnnotationHelper;
/**
* Reload Hibernate configuration after entity create/change.
*
* @author Jiri Bubnik
*/
@Plugin(name = "Hibernate",
group = "groupHibernate",
fallback = true,
description = "Reload Hibernate configuration after entity create/change.",
testedVersions = {"All between 4.0.1 - 4.3.11, 5.0.0 - 5.2.10"},
expectedVersions = {"4.0.x", "4.1.x", "4.2.x", "5.0.[0-4,7-x]", "5.1.x", "5.2.x", "5.3.x", "5.4.x" },
supportClass = {HibernateTransformers.class})
@Versions(
maven = {
@Maven(value = "[4.0,6.0)", artifactId = "hibernate-core", groupId = "org.hibernate"),
@Maven(value = "[4.0,6.0)", artifactId = "hibernate-entitymanager", groupId = "org.hibernate"),
},
manifest= {
@Manifest(value="[4.0,6.0)", names= {
@Name(key=Name.BundleSymbolicName, value="org.hibernate.validator")
}),
@Manifest(value="[4.0,6.0)", names= {
@Name(key=Name.BundleSymbolicName, value="org.hibernate.entitymanager")
}),
@Manifest(value="[4.0,6.0)", names= {
@Name(key=Name.BundleSymbolicName, value="org.hibernate.core")
}),
@Manifest(value="[4.0,6.0)", names= {
@Name(key=Name.ImplementationUrl, value="http://hibernate.org"),
@Name(key=Name.ImplementationVendorId, value="org.hibernate")
}),
}
)
public class HibernatePlugin {
private static final String ENTITY_ANNOTATION = "javax.persistence.Entity";
private static AgentLogger LOGGER = AgentLogger.getLogger(HibernatePlugin.class);
@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;
Set