Hi,
I'm noticing significant performance degradation when using hibernate code in a managed environment.
Here are the details of my managed environment:
1) I'm using jboss and I deployed my maapings and configuration in a service archive such that the configurations are within an mbean.
2)my datasource:
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://127.0.0.1:3306/abc</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<min-pool-size>20</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>1</idle-timeout-minutes>
</local-tx-datasource>
</datasources>
3)Transaction strategy is JDBC.
4)Hibernate code runs in an ejb container (MDB)
5)The MDB more or less queries for an object adds a few association objects and closes the session.
Essentially I have the same logic in a non-managed Hibernate program and I'm getting INSERT performance that is exponentially greater. Further as the MDB continues to labour the INSERT rate goes down.
I'd appreciate some advice, thanks,
|