Java Code Examples for javax.sql.DataSource#getLogWriter()
The following examples show how to use
javax.sql.DataSource#getLogWriter() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JndiDataSourceProxy.java From XPagesExtensionLibrary with Apache License 2.0 | 5 votes |
public PrintWriter getLogWriter() throws SQLException { try { DataSource r = getWrappedDatasource(); return r.getLogWriter(); } catch(ResourceFactoriesException ex) { throw (SQLException)new SQLException().initCause(ex); } }
Example 2
Source File: LazyJndiResolverTest.java From flexy-pool with Apache License 2.0 | 5 votes |
@Test public void testLazyLookupFailure() { DataSource dataSource = LazyJndiResolver.newInstance("jdbc/DS", DataSource.class); try { dataSource.getLogWriter(); } catch (Exception e) { assertEquals(NameNotFoundException.class, e.getCause().getClass()); } }