KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > derby > connector > DerbyXAManagedConnectionFactory


1 package org.apache.geronimo.derby.connector;
2
3 import java.sql.SQLException JavaDoc;
4
5 import org.apache.derby.jdbc.EmbeddedXADataSource;
6 import org.tranql.connector.jdbc.AbstractXADataSourceMCF;
7 import org.tranql.connector.NoExceptionsAreFatalSorter;
8
9 /**
10  */

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 JavaDoc getUserName() {
22         return getDerbyXADS().getUser();
23     }
24
25     public void setUserName(String JavaDoc userName) {
26         getDerbyXADS().setUser(userName);
27     }
28
29     public String JavaDoc getPassword() {
30         return getDerbyXADS().getPassword();
31     }
32
33     public void setPassword(String JavaDoc password) {
34         getDerbyXADS().setPassword(password);
35     }
36
37     public String JavaDoc getDatabaseName() {
38         return getDerbyXADS().getDatabaseName();
39     }
40
41     public void setDatabaseName(String JavaDoc databaseName) {
42         getDerbyXADS().setDatabaseName(databaseName);
43     }
44
45     public Integer JavaDoc getLoginTimeout() throws SQLException JavaDoc {
46         return new Integer JavaDoc(getDerbyXADS().getLoginTimeout());
47     }
48
49     public void setLoginTimeout(Integer JavaDoc loginTimeout) throws SQLException JavaDoc {
50         getDerbyXADS().setLoginTimeout(loginTimeout == null? 0: loginTimeout.intValue());
51     }
52
53     public String JavaDoc getCreateDatabase() {
54         return getDerbyXADS().getCreateDatabase();
55     }
56
57     public void setCreateDatabase(String JavaDoc createDatabase) {
58         getDerbyXADS().setCreateDatabase(createDatabase);
59     }
60
61     public String JavaDoc getShutdownDatabase() {
62         return getDerbyXADS().getShutdownDatabase();
63     }
64
65     public void setShutdownDatabase(String JavaDoc shutdownDatabase) {
66         getDerbyXADS().setShutdownDatabase(shutdownDatabase);
67     }
68
69 }
70
Popular Tags