Well, the entities are the same and the generated SQL looks the same so I doubt the optimizer would take another path. Are there any switches in Seam/JBoss that might do some extra checking somewhere?
The database is the same
The host is the same
The data is the same
The database driver and JPA provider are the same
The entities and resulting SQL is the same
In a standalone tomcat with simlar JVM opts a certain "from Foo" query takes 1,3s but on JBoss it takes closer to 3s. Must check with the performance forum if there are no theories here...