Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Web Logic Server Interview Question:
Can you explain what are the ways to avoid ResourceExceptions when sending requests for databaseconnections?
Submitted by: AdministratorThe problem with the servers is to have few resources or the database connection in the connection pool to decrease the work load. The servers need to increase the maximum number of connections in the connection pool and utilize it to balance the overall load on the server. The server needs to be optimally designed to allow the connection pool to execute few threads and get the work done. The application should be designed to find out whether there are connections available or not. If there are connections available then it shows the message of NoResourceException. This is shown by the example:
try{
// your statement
} catch(Exception handleEx) {
// your statement
} finally {
try{ conn.close();
}catch (Exception ignore){} // this returns the connection pool
}
Submitted by: Administrator
try{
// your statement
} catch(Exception handleEx) {
// your statement
} finally {
try{ conn.close();
}catch (Exception ignore){} // this returns the connection pool
}
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.