Hi All,
I've got a PostgreSQL 8.1 database that I'm performing a series of large queries on under JBoss 4.0.5, and the EntityManager is closing after each query such that the next fails. The queries are native SQL, and return in excess of 250,000 rows.
The datasource is defined as non-transactional to avoid transaction timeouts:
<no-tx-datasource> <jndi-name>MyDB</jndi-name> <connection-url>jdbc:postgresql://localhost:5432/MyDB</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>...</user-name> <password>...</password> </no-tx-datasource>
<persistence-unit name="MyDB"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/MyDB</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <property name="hibernate.show_sql" value="false" /> </properties> </persistence-unit>