01: package org.emforge.jbpm;
02:
03: import org.jbpm.context.exe.matcher.HibernateLongIdMatcher;
04:
05: /** Fix class is used for fixing problem with Hibernate and CGLib
06: * Problem described here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2437
07: * Also here: http://jira.jboss.com/jira/browse/JBPM-846
08: *
09: * As result, basic HibernateLongIdMatcher was not able to process correctly stored
10: * references to Project and Milestone and as result stored them as BLOBS
11: *
12: * Bug in EmForge is ^20799
13: *
14: * @author akakunin
15: *
16: */
17: public class FixedHibernateMatcher extends HibernateLongIdMatcher {
18: private static final long serialVersionUID = -8460641595565133061L;
19:
20: public boolean matches(Class<?> valueClass) {
21: Class<?> fixedValueClass = valueClass;
22:
23: /*
24: if (net.sf.cglib.proxy.Enhancer.isEnhanced(valueClass)) {
25: // try to get class itself
26: fixedValueClass = valueClass.getSuperclass();
27: }
28: */
29:
30: return super.matches(fixedValueClass);
31: }
32: }
|