public PartyLovDAO() { try { dataSource = LookUpBean.getDataSource(); } catch (Exception nmEx) { nmEx.printStackTrace(); } }
public void setSessionContext(SessionContext sessionCtx) { this.sessionContext = sessionCtx; try { dataSource = LookUpBean.getDataSource(); } catch (Exception e) { throw new RuntimeException("Unable To LookUp the DataSource"); } }
/** @return */ private Connection getConnection() { DataSource ds = null; // InitialContext ic = null;//commented by nagaja for performance tuning on 23-09-2008 Connection con = null; try { // modified by nagaja for performance tuning on 23-09-2008 /* ic = new InitialContext(); ds = (DataSource)ic.lookup("java:comp/env/jdbc/DB");*/ ds = LookUpBean.getDataSource(); con = ds.getConnection(); } catch (Exception ex) { Logger.error(FILE_NAME, "Exception in getConnection() : " + ex); } return con; }