Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DSRA9110E: Connection is closed. Connection is getting closed for bulk requests at a time

 
krishna movva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a project performing some insert operations to data base.It works fine while processing single request.
But it throws " DSRA9110E: Connection is closed " error when it receives a bulk of requests.

I have two classes
1)DBConnection:To get the connection
2)DAOImpl: code to perform insert operations on DB

Below is my code for getting connection object.

DBConnection class:

public static Connection conn = null;
public static String jndi="jdbc/servicedb"
public static Connection getConnection() {
try {


Context intialCtnx = new InitialContext();
DataSource ds = (DataSource) intialCtnx.lookup(jndi);
conn =ds.getConnection();



} catch (Exception e) {
--------
}
return conn;
}

DAOImpl class:

I get the connection from DBConnection class and perform insert operations on DB.

public static Connection connection = null;
connection = DBConnection.getConnection();

I am really confused to handle the scenario
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic