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) {} } } } }
/** * Constructor * * @param jndiUrl * The url for the datasource */ public JNDIConnectionProvider(String jndiUrl, boolean alwaysLookup) { this.url = jndiUrl; this.alwaysLookup = alwaysLookup; init(); }
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
JNDIConnectionProvider cp = new JNDIConnectionProvider(dsJndi, props, dsAlwaysLookup); dbMgr = DBConnectionManager.getInstance();
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
JNDIConnectionProvider cp = new JNDIConnectionProvider(dsJndi, props, dsAlwaysLookup); dbMgr = DBConnectionManager.getInstance();
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) {} } } } }
/** * Constructor * * @param jndiUrl * The url for the datasource */ public JNDIConnectionProvider(String jndiUrl, boolean alwaysLookup) { this.url = jndiUrl; this.alwaysLookup = alwaysLookup; init(); }
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
JNDIConnectionProvider cp = new JNDIConnectionProvider(dsJndi, props, dsAlwaysLookup); dbMgr = DBConnectionManager.getInstance();
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) {} } } } }
/** * Constructor * * @param jndiUrl * The URL for the DataSource * @param jndiProps * The JNDI properties to use when establishing the InitialContext * for the lookup of the given URL. */ public JNDIConnectionProvider(String jndiUrl, Properties jndiProps, boolean alwaysLookup) { this.url = jndiUrl; this.props = jndiProps; this.alwaysLookup = alwaysLookup; init(); }
Object ds = this.datasource; if (ds == null || isAlwaysLookup()) { ctx = (props != null) ? new InitialContext(props): new InitialContext(); if (!isAlwaysLookup()) { this.datasource = ds;
JNDIConnectionProvider cp = new JNDIConnectionProvider(dsJndi, props, dsAlwaysLookup); dbMgr = DBConnectionManager.getInstance();
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) {} } } } }
/** * Constructor * * @param jndiUrl * The URL for the DataSource * @param jndiProps * The JNDI properties to use when establishing the InitialContext * for the lookup of the given URL. */ public JNDIConnectionProvider(String jndiUrl, Properties jndiProps, boolean alwaysLookup) { this.url = jndiUrl; this.props = jndiProps; this.alwaysLookup = alwaysLookup; init(); }
/** * Constructor * * @param jndiUrl * The url for the datasource */ public JNDIConnectionProvider(String jndiUrl, boolean alwaysLookup) { this.url = jndiUrl; this.alwaysLookup = alwaysLookup; init(); }
/** * Constructor * * @param jndiUrl * The url for the datasource */ public JNDIConnectionProvider(String jndiUrl, boolean alwaysLookup) { this.url = jndiUrl; this.alwaysLookup = alwaysLookup; init(); }
/** * Constructor * * @param jndiUrl * The URL for the DataSource * @param jndiProps * The JNDI properties to use when establishing the InitialContext * for the lookup of the given URL. */ public JNDIConnectionProvider(String jndiUrl, Properties jndiProps, boolean alwaysLookup) { this.url = jndiUrl; this.props = jndiProps; this.alwaysLookup = alwaysLookup; init(); }
/** * Constructor * * @param jndiUrl * The URL for the DataSource * @param jndiProps * The JNDI properties to use when establishing the InitialContext * for the lookup of the given URL. */ public JNDIConnectionProvider(String jndiUrl, Properties jndiProps, boolean alwaysLookup) { this.url = jndiUrl; this.props = jndiProps; this.alwaysLookup = alwaysLookup; init(); }