• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Postgresql JBoss issue when Database is made down and started again.

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

i am using PostgreSql as database and JBoss as the Server.
Both works fine and i get data into the JSPs without any issues.

When the database is stopped(made down), there will be no data availabele
in the JSPs.
but when the database is started again without restarting JBOSS,
i dont receive the data from the database to The JSPs.
(connection doesnt get restored)

If i clear the temp and work folder from the JBoss/server/default location,
it works fine and i receive data from the database.(connection gets restored)
Also if i restart JBoss, i receive data.

can anyone please help me out in resolving the issue in retrieving the data from
the database(restoring the databse connection) without restarting JBoss at that moment
when the database is stopped and started again ??

Thanks in advance..
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add a <check-valid-connection-sql> entry to your *-ds.xml file. This entry causes JBoss AS to issue the identified SQL statement each time a connection is requested. If the statement gets a connection error, JBoss AS will re-establish the connection.
 
Abhishek Mhptr
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you so much for the reply.

i have already added the entry <check-valid-connection-sql>. but i had commented it.
i am going to try now by removing the comment.

Thanks Peter.

 
Abhishek Mhptr
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much peter.
you are just a genius..

It worked. Connection can be restored with your fix.

it was so nice and kind of you to reply.

Thanks again peter..
 
Forget Steve. Look at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic