1 package org.apache.geronimo.derby.connector; 2 3 import java.sql.SQLException ; 4 5 import org.apache.derby.jdbc.EmbeddedXADataSource; 6 import org.tranql.connector.jdbc.AbstractXADataSourceMCF; 7 import org.tranql.connector.NoExceptionsAreFatalSorter; 8 9 11 public class DerbyXAManagedConnectionFactory extends AbstractXADataSourceMCF{ 12 13 public DerbyXAManagedConnectionFactory() { 14 super(new EmbeddedXADataSource(), new NoExceptionsAreFatalSorter()); 15 } 16 17 EmbeddedXADataSource getDerbyXADS() { 18 return (EmbeddedXADataSource) xaDataSource; 19 } 20 21 public String getUserName() { 22 return getDerbyXADS().getUser(); 23 } 24 25 public void setUserName(String userName) { 26 getDerbyXADS().setUser(userName); 27 } 28 29 public String getPassword() { 30 return getDerbyXADS().getPassword(); 31 } 32 33 public void setPassword(String password) { 34 getDerbyXADS().setPassword(password); 35 } 36 37 public String getDatabaseName() { 38 return getDerbyXADS().getDatabaseName(); 39 } 40 41 public void setDatabaseName(String databaseName) { 42 getDerbyXADS().setDatabaseName(databaseName); 43 } 44 45 public Integer getLoginTimeout() throws SQLException { 46 return new Integer (getDerbyXADS().getLoginTimeout()); 47 } 48 49 public void setLoginTimeout(Integer loginTimeout) throws SQLException { 50 getDerbyXADS().setLoginTimeout(loginTimeout == null? 0: loginTimeout.intValue()); 51 } 52 53 public String getCreateDatabase() { 54 return getDerbyXADS().getCreateDatabase(); 55 } 56 57 public void setCreateDatabase(String createDatabase) { 58 getDerbyXADS().setCreateDatabase(createDatabase); 59 } 60 61 public String getShutdownDatabase() { 62 return getDerbyXADS().getShutdownDatabase(); 63 } 64 65 public void setShutdownDatabase(String shutdownDatabase) { 66 getDerbyXADS().setShutdownDatabase(shutdownDatabase); 67 } 68 69 } 70 | Popular Tags |