1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.jencks.tranql;
18
19 import java.sql.SQLException;
20
21 import org.enhydra.jdbc.standard.StandardXADataSource;
22 import org.tranql.connector.AllExceptionsAreFatalSorter;
23 import org.tranql.connector.jdbc.AbstractXADataSourceMCF;
24
25 /***
26 * @author Thierry Templier
27 */
28 public class XAPoolDataSourceMCF extends AbstractXADataSourceMCF {
29
30 public XAPoolDataSourceMCF() {
31 super(new StandardXADataSource(),new AllExceptionsAreFatalSorter());
32 }
33
34 /***
35 * @see org.tranql.connector.UserPasswordManagedConnectionFactory#getUserName()
36 */
37 public String getUserName() {
38 return ((StandardXADataSource)xaDataSource).getUser();
39 }
40
41 /***
42 * @see org.tranql.connector.UserPasswordManagedConnectionFactory#getPassword()
43 */
44 public String getPassword() {
45 return ((StandardXADataSource)xaDataSource).getPassword();
46 }
47
48
49
50
51 public void setDriverName(String driverName) {
52 try {
53 ((StandardXADataSource)xaDataSource).setDriverName(driverName);
54 } catch (SQLException ex) {
55 ex.printStackTrace();
56 }
57 }
58
59 public void setUrl(String url) {
60 ((StandardXADataSource)xaDataSource).setUrl(url);
61 }
62
63 public void setUser(String user) {
64 ((StandardXADataSource)xaDataSource).setUser(user);
65 }
66
67 public void setPassword(String password) {
68 ((StandardXADataSource)xaDataSource).setPassword(password);
69 }
70
71 }