users@glassfish.java.net

Re: NullPointerException during the commit phase

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 Jul 2008 05:20:48 PDT

Thanks for the quick help!

I created the JDBC configuration this way:

asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property DatabaseName=tsb3_db:Password=mypassword:ServerName=localhost:User=root TSB_DB
asadmin create-jdbc-resource --connectionpoolid TSB_DB jdbc/mmbox/connector

In the domain.xml we have:

...
    <jdbc-resource enabled="true" jndi-name="jdbc/mmbox/connector" object-type="user" pool-name="TSB_DB"/>
...
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="TSB_DB" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="5" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
      <property name="DatabaseName" value="tsb3_db"/>
      <property name="Password" value="mypassword"/>
      <property name="User" value="root"/>
      <property name="ServerName" value="localhost"/>
    </jdbc-connection-pool>
...

I would like the connections to take part in appserver's transaction manager.
[Message sent by forum member 'micmazza' (micmazza)]

http://forums.java.net/jive/thread.jspa?messageID=285030