This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Context> | |
<Loader loaderClass="fr.openwide.tomcat.catalina.loader.WebappOrderedClassLoader" /> | |
</Context> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InterceptorAwareHibernatePersistenceProvider extends HibernatePersistenceProvider { | |
private static final Logger LOGGER = Logger.getLogger(InterceptorAwareHibernatePersistenceProvider.class); | |
@Autowired | |
private Interceptor interceptor; | |
@Override | |
@SuppressWarnings("rawtypes") | |
public EntityManagerFactoryBuilder getEntityManagerFactoryBuilder( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java | |
index 8ff72cd..8896aef 100644 | |
--- a/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java | |
+++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java | |
@@ -644,9 +644,18 @@ | |
"proxy not of type HibernateProxy; it is " + proxyOrig.getClass() | |
); | |
} | |
+ | |
+ HibernateProxy hibernateProxyOrig = (HibernateProxy) proxyOrig ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.openwide.core.jpa.hibernate.ejb; | |
import java.util.Map; | |
import javax.persistence.EntityManagerFactory; | |
import javax.persistence.spi.PersistenceUnitInfo; | |
import org.hibernate.Interceptor; | |
import org.hibernate.cfg.Configuration; | |
import org.hibernate.jpa.HibernatePersistenceProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String buildUrl(String applicationName, IRequestHandler requestHandler) { | |
Args.notNull(applicationName, "applicationName"); | |
Args.notNull(requestHandler, "requestHandler"); | |
RequestCycle requestCycle = getRequestCycle(applicationName); | |
String url = requestCycle.getUrlRenderer().renderFullUrl(Url.parse(requestCycle.urlFor(requestHandler))); | |
if (ThreadContext.getSession() == null) { | |
ThreadContext.detach(); | |
} | |
return url; |
NewerOlder