[jboss-user] [JCA/JBoss] - Re: Datasource problem.
muddu_shafi
do-not-reply at jboss.com
Wed Oct 15 13:21:53 EDT 2008
| public void healthCheck() throws ErpProxyDaoException {
| Connection con = null;
| Statement stmt = null;
| ResultSet rs = null;
| Connection con2 = null;
| Statement stmt2 = null;
| ResultSet rs2 = null;
| try {
| /* * Test the QAD/web database */
| String sql = "SELECT COUNT(1) FROM pub.zzad_ctrl";
| ErpProxyProgressDAO.logger.fine(sql);
| con = getQadWebDbConnection();
| ErpProxyProgressDAO.logger.info("Halle maamu connection milgaya...");
| stmt = con.createStatement();
| //stmt = this.getQadWebDbConnection().createStatement();
| rs = stmt.executeQuery(sql);
| ErpProxyProgressDAO.logger.info("Halle maamu Database se baath hogayi..."+rs);
| /* * Test the QAD proxy database */
| sql = "SELECT COUNT(1) FROM pub.ctry_mstr";
| ErpProxyProgressDAO.logger.fine(sql);
| con2 = getProxyDbConnection();
| stmt2 = con2.createStatement();
| //stmt = this.getProxyDbConnection().createStatement();
| ErpProxyProgressDAO.logger.info(sql);
| rs2 = stmt2.executeQuery(sql);
| ErpProxyProgressDAO.logger.info("Phatte proxy se bhi Resultset aagaya...");
| }catch (Throwable e) {
| throw new ErpProxyDaoException (e);
| }finally{
| try {
| if(rs!=null) {
| rs.close();
| }
| if (stmt != null) {
| stmt.close();
| }
| if (con != null){
| con.close();
| }
| if(rs2!=null){
| rs2.close();
| }
| if (stmt2 != null) {
| stmt2.close();
| }
| if (con2 != null){
| con2.close();
| }
| } catch (SQLException e) {
| e.printStackTrace();
| }
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182467#4182467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182467
More information about the jboss-user
mailing list