I'm trying to configuring Hibernate Shards with Spring and it all seems to work fine with org.springframework.transaction.jta.JtaTransactionManager.
But when I configure org.springframework.orm.hibernate3.HibernateTransactionManager, I get an error because it opens a connection in doBegin method:
Connection con = session.connection();
but this method is undefined in ShardedSessionImpl (throws an UnsupportedOperationException).
Any suggestions for solve this problem?
Another question: I can't fully understand this statement:
"The sorting needs to take place inside Hibernate Shards, and in order for this to happen we require that all objects returned by a Criteria query with an order-by clause implement the Comparable interface. If the type of the objects you return do not implement this interface you'll receive an exception"
For example, if I have a User class with two fields: name and age.
User must implement Comparable interface? Why?
Thanks in advance