Kumara Swamy wrote:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
Kumara Swamy wrote:
so now my question is : Is there any way to find whether the connection object is already expired or not before getting a statement object on that.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Kumara Swamy wrote:Hi Mr.Sagar Rohankar,
Thanks a lot you resolved the issue.
The urls provided by you has the exact content what i am expecting and its resolved the issue.
Kumara Swamy wrote:
thank you very much to the community.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Kumara Swamy wrote:
in mysql wait_timeout=120
PavanPL KalyanK wrote:
Do we get an exception ?? Can we handle this exception in our Application.
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
PavanPL KalyanK wrote:
You will definately get a Privilege permisions .
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar wrote:
PavanPL KalyanK wrote:
Do we get an exception ?? Can we handle this exception in our Application.
Of course we get an exception when server gone away when wait_timeout has been expired and like any other Java exception we can handle this too, using try.. catch..
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sagar Rohankar wrote:Really, didn't get what you want ? Do you want to say,
How can I change the URL string at every connection code (Which is not best JDBC practice, more than one connection code)
Sagar Rohankar wrote:Really, didn't get what you want ? Do you want to say,
How can I enclose a connection code in try .. catch block?
For this above two problem, your IDEs, 'Find and Replace' method will works
Kumara Swamy wrote: My question is instead of enclosing the execution code in try/catch do we have any alternative?
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |