private void init() { if (!isAlwaysLookup()) { Context ctx = null; try { ctx = (props != null) ? new InitialContext(props) : new InitialContext(); datasource = (DataSource) ctx.lookup(url); } catch (Exception e) { getLog().error( "Error looking up datasource: " + e.getMessage(), e); } finally { if (ctx != null) { try { ctx.close(); } catch(Exception ignore) {} } } } }
private void init() { if (!isAlwaysLookup()) { Context ctx = null; try { ctx = (props != null) ? new InitialContext(props) : new InitialContext(); datasource = (DataSource) ctx.lookup(url); } catch (Exception e) { getLog().error( "Error looking up datasource: " + e.getMessage(), e); } finally { if (ctx != null) { try { ctx.close(); } catch(Exception ignore) {} } } } }
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
private void init() { if (!isAlwaysLookup()) { Context ctx = null; try { ctx = (props != null) ? new InitialContext(props) : new InitialContext(); datasource = (DataSource) ctx.lookup(url); } catch (Exception e) { getLog().error( "Error looking up datasource: " + e.getMessage(), e); } finally { if (ctx != null) { try { ctx.close(); } catch(Exception ignore) {} } } } }
private void init() { if (!isAlwaysLookup()) { Context ctx = null; try { ctx = (props != null) ? new InitialContext(props) : new InitialContext(); datasource = (DataSource) ctx.lookup(url); } catch (Exception e) { getLog().error( "Error looking up datasource: " + e.getMessage(), e); } finally { if (ctx != null) { try { ctx.close(); } catch(Exception ignore) {} } } } }
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;