This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connection Statsus - Help Please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Statsus - Help Please" Watch "Connection Statsus - Help Please" New topic

Connection Statsus - Help Please

Sudhakar Rao
Ranch Hand

Joined: May 21, 2005
Posts: 36
I have one scenirao.In my application one my server will send messages and the applicaiton has to store them in the dataabse. I would like to know how to know the status of the connection. If the connection is not alive,I have to store the messages in a buffer and immdeaitly after the connection is live I want to store the buffer values into database. Can any body help me how to achive this.
Thanks in Advance
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29287

I don't know of an API to check a connection status without actually using it. You could catch a SQLException and put the message on the buffer upon error.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Connection Statsus - Help Please
Similar Threads
Access to another process' memory
how to find correct email and undeliverable email in javamail
Network assignment HELP NEEDED
Tranfer files between java and unix
Constructor Problem