1 17 package org.apache.geronimo.gjndi.binding; 18 19 import org.apache.geronimo.gbean.GBeanInfo; 20 import org.apache.geronimo.gbean.GBeanInfoBuilder; 21 22 import javax.sql.DataSource ; 23 import java.io.PrintWriter ; 24 import java.sql.Connection ; 25 import java.sql.SQLException ; 26 27 30 public class MockDataSource implements DataSource { 31 public Connection getConnection() throws SQLException { 32 return null; 33 } 34 35 public Connection getConnection(String username, String password) throws SQLException { 36 return null; 37 } 38 39 public PrintWriter getLogWriter() throws SQLException { 40 return null; 41 } 42 43 public void setLogWriter(PrintWriter out) throws SQLException { 44 } 45 46 public void setLoginTimeout(int seconds) throws SQLException { 47 } 48 49 public int getLoginTimeout() throws SQLException { 50 return 0; 51 } 52 53 public static final GBeanInfo GBEAN_INFO; 54 55 public static GBeanInfo getGBeanInfo() { 56 return MockDataSource.GBEAN_INFO; 57 } 58 59 static { 60 GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(MockDataSource.class, "MockDataSource"); 61 GBEAN_INFO = builder.getBeanInfo(); 62 } 63 } 64 | Popular Tags |