hibernate-tools

Adam Young ayoung at redhat.com
Thu Apr 15 23:21:44 UTC 2010


OK, I couldn't quite give up on hibernate tools, so I just spent one 
more day on it and...well, I got it to compile.  I haven't tested it, 
nor any of the other RPMS for that matter.

Hibernate tools was the only one I had to patch.  Once I accepted that 
this was a viable route, I was happy.

In the version of Hibernate that tools was origianlly built against, 
therei s a class called CacheFactory that basically pulls in a mother 
load of other dependencies.  Really poor design.  It also has four 
symbolic constants for strings.  It was only these strings that the rest 
of the build needed, which means that this class wasn't even loaded at 
run time:  javac replaces the strings with the literals anyway.  So, I 
hacked everything but the symbolic constants out of the class and added 
in via a patch.

diff -Nurd 
hibernate-tools-needed-classes/org/hibernate/cache/CacheFactory.java 
hibernate-tools-3.2.4.GA.new/org/hibernate/cache/CacheFactory.java
--- 
hibernate-tools-needed-classes/org/hibernate/cache/CacheFactory.java    
1969-12-31 19:00:00.000000000 -0500
+++ 
hibernate-tools-3.2.4.GA.new/org/hibernate/cache/CacheFactory.java    
2010-04-15 19:04:03.091745593 -0400
@@ -0,0 +1,13 @@
+//$Id: CacheFactory.java 5685 2005-02-12 07:19:50Z steveebersole $
+package org.hibernate.cache;
+
+/**
+ * @author Gavin King
+ */
+public final class CacheFactory {
+
+    public static final String READ_ONLY = "read-only";
+    public static final String READ_WRITE = "read-write";
+    public static final String NONSTRICT_READ_WRITE = 
"nonstrict-read-write";
+    public static final String TRANSACTIONAL = "transactional";
+}


With that, I should be done, but Dmitri snuck in yet another dependency 
on me today.  I'll get that tomorrow.






More information about the candlepin mailing list