Technical Stuff

Start from basics

DB Auto-Reconnect

DB Auto-Reconnect
DB Auto-Reconnect
5 (100%) 1 vote

Hello EveryOne ! This blog is on db auto reconnect. So, it’s a hack that when your system goes down then there would be a issue with your DB connection. You have to  manually reconnect with the database. So, my adding listed code you can direct reconnect with the database.

 

If you had a database outage or failure while JBoss was up, you’re likely in a situation where you would have to restart JBoss because the database connections didn’t get reconnected for you. You’re likely also faced with a massive set of log files due to the data source complaining about it not being able to connect to the database. db auto reconnect is the essential part of any application server.

If this setting is not there in your application server, then it can take the hell out of you. So, it is strongly recommended.

If you want JBoss to automatically reconnect the data source pool(s) for you, here’s some settings to use (only valid if using a “local-tx-datasource”):

For Jboss 5, $Jboss_Home/profile/server/deploy

Filename : Oracle-ds.xml

For Jboss 6, $Jboss_Home/profile/server/

Filename : standalone.xml

Code :

1) <autoReconnect>true</autoReconnect>

2) <check-valid-connection-sql>an efficient select statement</check-valid-connection-sql>

3) <failOverReadOnly>false</failOverReadOnly>

4) <maxReconnects>50</maxReconnects>

5) <initialTimeout>15</initialTimeout>

Thank You !
Happy Learning !!!
If you have doubt or queries, you can definetely comment us or can mail us on [email protected]

If you have any Recommendation for future blog, You can email us on [email protected]

Top Searches :

  1. SSL Implementation in Jboss
  2. Best SSL Guide.
  3. Types of SSL.
  4. Best Jboss Server Security Guide.
  5. Introduction to hardening in Middleware.
  6. Hardening In Jboss EAP 5.1
  7. Enable TLS1.2 in Jboss EAP 7
  8. VAPT – Enabling TLS1.1/1.2 in Jboss
  9. VAPT – DISABLING HTTP METHODS
  10. VAPT – HOW TO REMOVE APACHE COYOTE VERSION FROM JBOSS
  11. INSTALLATION OF JBOSS ON LINUX
  12. INTRODUCTION TO JBOSS
  13. INTRODUCTION TO MIDDLEWARE
  14. Thread Dump
  15. Heap Dump

2 thoughts on “DB Auto-Reconnect

  1. Pingback: My Middleware

Leave a Reply

%d bloggers like this: