Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample upgrade for issue #1263 #1266

Merged
merged 1 commit into from
Oct 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions framework/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,18 @@ require: &allDependencies
- org.codehaus.groovy -> groovy 2.5.1
- org.codehaus.groovy -> groovy-xml 2.5.1
- org.eclipse.jdt -> org.eclipse.jdt.core 3.14.0
- org.hibernate -> hibernate-core 5.2.10.patched
- org.hibernate -> hibernate-core 5.3.6.Final.patched
- net.bytebuddy -> byte-buddy 1.8.17
- javax.persistence -> javax.persistence-api 2.2
- org.hibernate.common -> hibernate-commons-annotations 5.0.1.Final
- org.hibernate -> hibernate-validator 5.4.1.Final
- org.jboss.logging -> jboss-logging 3.3.0.Final
- org.jboss.spec.javax.transaction -> jboss-transaction-api_1.2_spec 1.0.1.Final
- org.hibernate.javax.persistence -> hibernate-jpa-2.1-api 1.0.0.Final
- com.fasterxml -> classmate 1.3.3
- org.hibernate -> hibernate-c3p0 5.2.10.Final
- org.hibernate -> hibernate-ehcache 5.2.10.Final
- org.hibernate -> hibernate-c3p0 5.3.6.Final
- org.hibernate -> hibernate-entitymanager 5.3.6.Final
- org.hibernate -> hibernate-ehcache 5.3.6.Final
- com.mchange -> mchange-commons-java 0.2.12
- org.javassist -> javassist 3.23.1-GA
- io.netty -> netty 3.10.6.Final
Expand Down
Binary file added framework/lib/byte-buddy-1.8.17.jar
Binary file not shown.
Binary file removed framework/lib/hibernate-c3p0-5.2.10.Final.jar
Binary file not shown.
Binary file added framework/lib/hibernate-c3p0-5.3.6.Final.jar
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/hibernate-ehcache-5.2.10.Final.jar
Binary file not shown.
Binary file added framework/lib/hibernate-ehcache-5.3.6.Final.jar
Binary file not shown.
Binary file removed framework/lib/hibernate-entitymanager-5.2.10.Final.jar
Binary file not shown.
Binary file not shown.
Binary file added framework/lib/javax.persistence-api-2.2.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions framework/patches/hibernate-5.2.10-patch-play.README

This file was deleted.

6 changes: 6 additions & 0 deletions framework/patches/hibernate-5.3.6-patch-play.README
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
----
Download Hibernate 5.3.6.Final source code, apply the patch, and build with gradle (tip use export GRADLE_OPTS=-Xmx1G -XX:MaxPermSize=512m)
----

DRY RUN -> patch --dry-run -p1 -i hibernate-5.3.6-patch-play.patch
APPLY -> patch -p1 -i hibernate-5.3.6-patch-play.patch
Original file line number Diff line number Diff line change
@@ -1,71 +1,11 @@
From 3063617b2d9b1d8210566f974e98694598872f3f Mon Sep 17 00:00:00 2001
From: Alexandre Chatiron <alexandre@payxpert.com>
Date: Thu, 31 Jul 2014 08:47:11 +0800
Subject: [PATCH] patch play 1.3.0 on hibernate 4.2.15

---
.../main/java/org/hibernate/EmptyInterceptor.java | 6 ++--
.../src/main/java/org/hibernate/Interceptor.java | 6 ++--
.../internal/AbstractFlushingEventListener.java | 36 ++++++++++++++++++----
.../test/interfaceproxy/DocumentInterceptor.java | 6 ++--
.../hibernate/test/mixed/DocumentInterceptor.java | 9 ++++--
5 files changed, 45 insertions(+), 18 deletions(-)

diff --git a/hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java b/hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java
index b3e0dc5..1cd6852 100755
--- a/hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java
+++ b/hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java
@@ -111,10 +111,10 @@ public class EmptyInterceptor implements Interceptor, Serializable {
return sql;
}

- public void onCollectionRemove(Object collection, Serializable key) throws CallbackException {}
+ public boolean onCollectionRemove(Object collection, Serializable key) throws CallbackException { return true; }

- public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException {}
+ public boolean onCollectionRecreate(Object collection, Serializable key) throws CallbackException { return true; }

- public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException {}
+ public boolean onCollectionUpdate(Object collection, Serializable key) throws CallbackException { return true; }

}
\ No newline at end of file
diff --git a/hibernate-core/src/main/java/org/hibernate/Interceptor.java b/hibernate-core/src/main/java/org/hibernate/Interceptor.java
index 7664c36..f935942 100644
--- a/hibernate-core/src/main/java/org/hibernate/Interceptor.java
+++ b/hibernate-core/src/main/java/org/hibernate/Interceptor.java
@@ -132,7 +132,7 @@ public interface Interceptor {
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/
- public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException;
+ public boolean onCollectionRecreate(Object collection, Serializable key) throws CallbackException;

/**
* Called before a collection is deleted.
@@ -142,7 +142,7 @@ public interface Interceptor {
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/
- public void onCollectionRemove(Object collection, Serializable key) throws CallbackException;
+ public boolean onCollectionRemove(Object collection, Serializable key) throws CallbackException;

/**
* Called before a collection is updated.
@@ -152,7 +152,7 @@ public interface Interceptor {
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/
- public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException;
+ public boolean onCollectionUpdate(Object collection, Serializable key) throws CallbackException;

/**
* Called before a flush
diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java
index 604803a..2bd10a1 100644
--- a/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java
+++ b/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java
@@ -152,6 +152,27 @@ public abstract class AbstractFlushingEventListener implements Serializable {
Index: hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java (date 1535476081000)
+++ hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java (date 1536758339169)
@@ -146,6 +146,27 @@
// for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {
EntityEntry entry = (EntityEntry) me.getValue();
Status status = entry.getStatus();
Expand Down Expand Up @@ -93,9 +33,9 @@ index 604803a..2bd10a1 100644
if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) {
cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything );
}
@@ -269,8 +290,8 @@ public abstract class AbstractFlushingEventListener implements Serializable {
@@ -274,8 +295,8 @@
CollectionEntry ce = me.getValue();

if ( ce.isDorecreate() ) {
- session.getInterceptor().onCollectionRecreate( coll, ce.getCurrentKey() );
- actionQueue.addAction(
Expand All @@ -104,7 +44,7 @@ index 604803a..2bd10a1 100644
new CollectionRecreateAction(
coll,
ce.getCurrentPersister(),
@@ -278,10 +299,11 @@ public abstract class AbstractFlushingEventListener implements Serializable {
@@ -283,10 +304,11 @@
session
)
);
Expand All @@ -118,7 +58,7 @@ index 604803a..2bd10a1 100644
new CollectionRemoveAction(
coll,
ce.getLoadedPersister(),
@@ -290,10 +312,11 @@ public abstract class AbstractFlushingEventListener implements Serializable {
@@ -295,10 +317,11 @@
session
)
);
Expand All @@ -132,53 +72,118 @@ index 604803a..2bd10a1 100644
new CollectionUpdateAction(
coll,
ce.getLoadedPersister(),
@@ -302,6 +325,7 @@ public abstract class AbstractFlushingEventListener implements Serializable {
@@ -307,6 +330,7 @@
session
)
);
+ }
}
if ( !coll.wasInitialized() && coll.hasQueuedOperations() ) {
actionQueue.addAction(
diff --git a/hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java b/hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java
index 3455384..11ec47a 100755
--- a/hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java
@@ -88,7 +88,7 @@ public class DocumentInterceptor implements Interceptor {

// todo : I'm not sure the !wasInitialized part should really be part of this check
Index: hibernate-core/src/main/java/org/hibernate/Interceptor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- hibernate-core/src/main/java/org/hibernate/Interceptor.java (date 1535476081000)
+++ hibernate-core/src/main/java/org/hibernate/Interceptor.java (date 1536758425833)
@@ -121,7 +121,7 @@
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/
- void onCollectionRecreate(Object collection, Serializable key) throws CallbackException;
+ boolean onCollectionRecreate(Object collection, Serializable key) throws CallbackException;

/**
* Called before a collection is deleted.
@@ -131,7 +131,7 @@
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/
- void onCollectionRemove(Object collection, Serializable key) throws CallbackException;
+ boolean onCollectionRemove(Object collection, Serializable key) throws CallbackException;

/**
* Called before a collection is updated.
@@ -141,7 +141,7 @@
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/
- void onCollectionUpdate(Object collection, Serializable key) throws CallbackException;
+ boolean onCollectionUpdate(Object collection, Serializable key) throws CallbackException;

/**
* Called before a flush.
Index: hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java (date 1535476081000)
+++ hibernate-core/src/main/java/org/hibernate/EmptyInterceptor.java (date 1536758395766)
@@ -121,14 +121,17 @@
}

@Override
- public void onCollectionRemove(Object collection, Serializable key) throws CallbackException {
+ public boolean onCollectionRemove(Object collection, Serializable key) throws CallbackException {
+ return true;
}

@Override
- public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException {
+ public boolean onCollectionRecreate(Object collection, Serializable key) throws CallbackException {
+ return true;
}

@Override
- public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException {
+ public boolean onCollectionUpdate(Object collection, Serializable key) throws CallbackException {
+ return true;
}
}
Index: hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java (date 1535476081000)
+++ hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/DocumentInterceptor.java (date 1536758425850)
@@ -94,8 +94,8 @@
return sql;
}

- public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException {}
- public void onCollectionRemove(Object collection, Serializable key) throws CallbackException {}
- public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException {}
+ public boolean onCollectionRecreate(Object collection, Serializable key) throws CallbackException { return true;}
+ public boolean onCollectionRemove(Object collection, Serializable key) throws CallbackException { return true;}
+ public boolean onCollectionUpdate(Object collection, Serializable key) throws CallbackException { return true;}

}
diff --git a/hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java b/hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java
index d781826..f3fad5c 100755
--- a/hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java
@@ -104,13 +104,16 @@ public class DocumentInterceptor implements Interceptor {
Index: hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java (date 1535476081000)
+++ hibernate-core/src/test/java/org/hibernate/test/mixed/DocumentInterceptor.java (date 1536758425863)
@@ -111,12 +111,15 @@
return sql;
}

- public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException {
+ public boolean onCollectionRecreate(Object collection, Serializable key) throws CallbackException {
+ return true;
}

- public void onCollectionRemove(Object collection, Serializable key) throws CallbackException {
+ public boolean onCollectionRemove(Object collection, Serializable key) throws CallbackException {
+ return true;
}

- public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException {
+ public boolean onCollectionUpdate(Object collection, Serializable key) throws CallbackException {
+ return true;
}

}
--
1.9.2.msysgit.0