[jboss-user] [Datasource Configuration] - Problem of jboss server starting on connection failover

Samarjit Chakraborty do-not-reply at jboss.com
Sun Apr 18 03:57:41 EDT 2010

Samarjit Chakraborty [http://community.jboss.org/people/samarjit] replied to the discussion

"Problem of jboss server starting on connection failover"

To view the discussion, visit: http://community.jboss.org/message/538160#538160

Dear Priyanka,

I've got this reference from  http://community.jboss.org/wiki/JBossJCADatabaseFailover http://community.jboss.org/wiki/JBossJCADatabaseFailover

In JBoss v5.0.x or greater <ha-local-tx-datasource> elements are no longer supported. Instead of that you can put the <connection-url> separated by delimiters in your main <local-tx-datasource> element inside *-ds.xml. Even <url-delimiter> can be included inside.

I've tested it using this configuration:

      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
      <!-- Datasources are not available outside the virtual machine -->
      <!-- The driver class -->
      <!-- The login and password -->
      <!-- The maximum connections in a pool/sub-pool -->
      <!-- The time before an unused connection is destroyed -->
      <!-- Whether to check all statements are closed when the connection is returned to the pool,
           this is a debugging feature that should be turned off in production -->
      <!-- Benefits from prepared statement caching -->
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

And it is working. When i stopped the instance of database representing "url1" JBoss automatically bound the JNDI name to "url2". Please check it out.

Let me know whether you succeeded or not.

Best of luck



Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100418/524871ab/attachment.html 

More information about the jboss-user mailing list