/** * Lookup the XADataSource in JNDI. We got the relevant information from the * property file provided at input to this instance. */ private final void createDataSource() throws SQLException { try { if (_dataSource == null) { Hashtable env = jdbcPropertyManager.getJDBCEnvironmentBean().getJndiProperties(); Context context = new InitialContext(env); _dataSource = (XADataSource) context.lookup(_dbName); if (_dataSource == null) throw new SQLException(jdbcLogger.i18NLogger.get_cant_resolve_ds_jndi_lookup(_dbName, env)); } } catch (SQLException ex) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, ex); throw ex; } catch (Exception e) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, e); SQLException sqlException = new SQLException(e.toString()); sqlException.initCause(e); throw sqlException; } }
/** * Lookup the XADataSource in JNDI. We got the relevant information from the * property file provided at input to this instance. */ private final void createDataSource() throws SQLException { try { if (_dataSource == null) { Hashtable env = jdbcPropertyManager.getJDBCEnvironmentBean().getJndiProperties(); Context context = new InitialContext(env); _dataSource = (XADataSource) context.lookup(_dbName); if (_dataSource == null) throw new SQLException(jdbcLogger.i18NLogger.get_cant_resolve_ds_jndi_lookup(_dbName, env)); } } catch (SQLException ex) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, ex); throw ex; } catch (Exception e) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, e); SQLException sqlException = new SQLException(e.toString()); sqlException.initCause(e); throw sqlException; } }
/** * Lookup the XADataSource in JNDI. We got the relevant information from the * property file provided at input to this instance. */ private final void createDataSource() throws SQLException { try { if (_dataSource == null) { Hashtable env = jdbcPropertyManager.getJDBCEnvironmentBean().getJndiProperties(); Context context = new InitialContext(env); _dataSource = (XADataSource) context.lookup(_dbName); if (_dataSource == null) throw new SQLException(jdbcLogger.i18NLogger.get_cant_resolve_ds_jndi_lookup(_dbName, env)); } } catch (SQLException ex) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, ex); throw ex; } catch (Exception e) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, e); SQLException sqlException = new SQLException(e.toString()); sqlException.initCause(e); throw sqlException; } }
/** * Lookup the XADataSource in JNDI. We got the relevant information from the * property file provided at input to this instance. */ private final void createDataSource() throws SQLException { try { if (_dataSource == null) { Hashtable env = jdbcPropertyManager.getJDBCEnvironmentBean().getJndiProperties(); Context context = new InitialContext(env); _dataSource = (XADataSource) context.lookup(_dbName); if (_dataSource == null) throw new SQLException(jdbcLogger.i18NLogger.get_cant_resolve_ds_jndi_lookup(_dbName, env)); } } catch (SQLException ex) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, ex); throw ex; } catch (Exception e) { jdbcLogger.i18NLogger.error_cannot_create_datasource(_dbName, e); SQLException sqlException = new SQLException(e.toString()); sqlException.initCause(e); throw sqlException; } }