1 22 package org.jboss.test.jca.xads; 23 24 import java.io.PrintWriter ; 25 import java.sql.SQLException ; 26 27 import javax.sql.XAConnection ; 28 import javax.sql.XADataSource ; 29 30 36 public class TestXADataSource implements XADataSource 37 { 38 public void setSomeProperty(String someProperty) 39 { 40 if (someProperty == null) 41 throw new NullPointerException ("someProperty is null"); 42 if (someProperty.equals("${org.jboss.test.jca.xads.SomeProperty2}") == false) 43 throw new IllegalArgumentException ("Wrong value: " + someProperty); 44 } 45 public void setBackSlash(String backslash) 46 { 47 if (backslash == null) 48 throw new NullPointerException ("backslash is null"); 49 if (backslash.equals("\\") == false) 50 throw new IllegalArgumentException ("Wrong value: " + backslash); 51 } 52 53 public int getLoginTimeout() throws SQLException 54 { 55 return 0; 56 } 57 public PrintWriter getLogWriter() throws SQLException 58 { 59 return null; 60 } 61 public XAConnection getXAConnection() throws SQLException 62 { 63 throw new SQLException ("expected"); 64 } 65 public XAConnection getXAConnection(String user, String password) throws SQLException 66 { 67 return null; 68 } 69 public void setLoginTimeout(int seconds) throws SQLException 70 { 71 } 72 public void setLogWriter(PrintWriter out) throws SQLException 73 { 74 } 75 } 76 | Popular Tags |