Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Communication Link Failure

 
Ramesh Balakrishnan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello people,
We are developing a job search engine.We use JDBC concepts for getting stored data for the purpose of searching particular job title.We use multithread programming. In this we get "communication Link failure" when we declare prepared statement globally.But while declaring that statement in local method there will not be any error.
we want to know the reason for communication link failure.This may come under threading problems.we welcome your suggestions and solutions.
you can make visit to www.jobpier.com to know the searching details.This may be useful for job seekers also
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming this error is related to the database you are using. Can you give us more details please?
 
Ramesh Balakrishnan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai David,
I am using mySQL 1.4.0 version for database accesssing.In our program we continously executing the query for all the page contents in our database.During the process the "Communication Link Failure" occurs.This when we use single thread also...
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only use a PreparedStatement object from one thread at a time. Declare methods synchronized as needed - the resultset returned also needs to be part of the SAME synchronization. An application server with a good connection pooling and prepared statement caching would help you here. What are you using?
 
Ramesh Balakrishnan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yah...That's fine.We made thread synchronization that a single should accesss the prepared statement and resultset.There is no exception...Thanks...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic