Switch to Hibernate 3.0.5. It's really cool. And it is really fast when you enable Jboss Tree cache.
After switching to Jboss 4 we've got over 100% performance boost, but this is mainly due to faster Hibernate and better caching (jboss cache instead of ehcache).
What JVM are you running on? Did you change the JRE for the upgrade or stay at the same version?
I am using Sun's 1.5_02, that is unchanged.
I am working on migrating to hibernate 3.0.5 but that is not a trivial task. And, then it would mean that Hibernate 2 is a lot slower on 4 then on 3. I can imagine that possiblility, but my feeling is that JTA Transactions in 4 are more integrated in Jboss and they are the cause of the decrease in performance.
Problem is solved
The cause was that JBoss 3 probably ignored the transaction-type in the ejb-jar.xml. And XDoclet sets it default to 'Container'. JBoss 4, in accordance to J2EE takes that hint serious and start performing (in my case needless) transactions and dragging performance by almost 50%.
So, make sure you add transaction-type="Bean" in XDoclet, if you want acceptable performance.