private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up ["+jndiLocation+"] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }
private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up [" + jndiLocation + "] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }
private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up ["+jndiLocation+"] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }
private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up ["+jndiLocation+"] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }
private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up [" + jndiLocation + "] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }
private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up [" + jndiLocation + "] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }
private DataSource lookupDataSource() throws NamingException, SQLException { addInfo("Looking up ["+jndiLocation+"] in JNDI"); DataSource ds; Context initialContext = new InitialContext(); Object obj = initialContext.lookup(jndiLocation); // PortableRemoteObject was introduced in JDK 1.3. We won't use it. // ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class); ds = (DataSource) obj; if (ds == null) { throw new SQLException("Failed to obtain data source from JNDI location " + jndiLocation); } else { return ds; } } }