Description: Compatibility with Hibernate 3.5
Author: Miguel Landaeta <miguel@miguel.cc>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Forwarded: no
Last-Update: 2010-07-18

--- jbossas4-4.2.3.GA.orig/ejb3/src/main/org/jboss/ejb3/entity/InjectedSessionFactory.java
+++ jbossas4-4.2.3.GA/ejb3/src/main/org/jboss/ejb3/entity/InjectedSessionFactory.java
@@ -42,6 +42,7 @@ import org.hibernate.engine.FilterDefini
 import org.hibernate.metadata.ClassMetadata;
 import org.hibernate.metadata.CollectionMetadata;
 import org.hibernate.stat.Statistics;
+import org.hibernate.Cache;
 import org.jboss.ejb3.PersistenceUnitRegistry;
 
 /**
@@ -237,4 +238,15 @@ public class InjectedSessionFactory impl
       return getSessionFactory().getReference();
    }
 
+   // dummy compatibility with Hibernate 3.5.x
+   public boolean containsFetchProfileDefinition(String name)
+   {
+      throw new UnsupportedOperationException("containsFetchProfileDefinition");
+   }
+
+   public Cache getCache()
+   {
+      throw new UnsupportedOperationException("getCache");
+   }
+
 }
--- jbossas4-4.2.3.GA.orig/ejb3/src/main/org/jboss/ejb3/entity/JTATableIdGenerator.java
+++ jbossas4-4.2.3.GA/ejb3/src/main/org/jboss/ejb3/entity/JTATableIdGenerator.java
@@ -40,7 +40,7 @@ import org.hibernate.engine.SessionImple
 import org.hibernate.exception.JDBCExceptionHelper;
 import org.hibernate.id.Configurable;
 import org.hibernate.id.IdentifierGenerationException;
-import org.hibernate.id.IdentifierGeneratorFactory;
+import org.hibernate.id.IdentifierGeneratorHelper;
 import org.hibernate.id.PersistentIdentifierGenerator;
 import org.hibernate.transaction.JBossTransactionManagerLookup;
 import org.hibernate.transaction.TransactionManagerLookup;
@@ -263,7 +263,7 @@ public class JTATableIdGenerator impleme
          tm.commit();
 
          // transform sequence to the desired type and return the value
-         Number typedSequence = IdentifierGeneratorFactory.createNumber(sequence, returnClass);
+         Number typedSequence = IdentifierGeneratorHelper.createNumber(sequence, returnClass);
          if (log.isDebugEnabled())
          {
             log.debug("generate() returned: " + typedSequence);
