I am sorry I was not very clear here is an example of what I meant:
try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("blabla");
}
catch(Exeption e){}
this is the courent state of aCis
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement("blabla")) { // code
}
catch(Exeption e){}
this is what I believe should be more effective on handling the database connections
pros less code, better handle
- time to code it
if you want I can discuss with you in private about a reworked database connection, from small tests I did is faster, but faster does not meant always reliable, I am talking about the c3p0 library.
anything else send me a message cause I am out of topic. BB:)