geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: rev 55099 - in geronimo/trunk/modules/derby-connector/src: java java/org java/org/apache java/org/apache/geronimo java/org/apache/geronimo/derby java/org/apache/geronimo/derby/connector rar rar/META-INF
Date Tue, 19 Oct 2004 20:52:40 GMT
Author: djencks
Date: Tue Oct 19 13:52:40 2004
New Revision: 55099

Added:
   geronimo/trunk/modules/derby-connector/src/java/
   geronimo/trunk/modules/derby-connector/src/java/org/
   geronimo/trunk/modules/derby-connector/src/java/org/apache/
   geronimo/trunk/modules/derby-connector/src/java/org/apache/geronimo/
   geronimo/trunk/modules/derby-connector/src/java/org/apache/geronimo/derby/
   geronimo/trunk/modules/derby-connector/src/java/org/apache/geronimo/derby/connector/
   geronimo/trunk/modules/derby-connector/src/java/org/apache/geronimo/derby/connector/DerbyXAManagedConnectionFactory.java
   geronimo/trunk/modules/derby-connector/src/rar/
   geronimo/trunk/modules/derby-connector/src/rar/META-INF/
   geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml
Log:
here is the content... svn still takes a little getting used to

Added: geronimo/trunk/modules/derby-connector/src/java/org/apache/geronimo/derby/connector/DerbyXAManagedConnectionFactory.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/derby-connector/src/java/org/apache/geronimo/derby/connector/DerbyXAManagedConnectionFactory.java
Tue Oct 19 13:52:40 2004
@@ -0,0 +1,70 @@
+package org.apache.geronimo.derby.connector;
+
+import java.sql.SQLException;
+
+import org.apache.derby.jdbc.EmbeddedXADataSource;
+import org.tranql.connector.jdbc.AbstractXADataSourceMCF;
+import org.tranql.connector.NoExceptionsAreFatalSorter;
+
+/**
+ */
+public class DerbyXAManagedConnectionFactory extends AbstractXADataSourceMCF{
+
+    public DerbyXAManagedConnectionFactory() throws IllegalAccessException, InstantiationException,
ClassNotFoundException {
+        super(new EmbeddedXADataSource());
+        setExceptionSorterClass(NoExceptionsAreFatalSorter.class.getName());
+    }
+
+    EmbeddedXADataSource getDerbyXADS() {
+        return (EmbeddedXADataSource) xaDataSource;
+    }
+
+    public String getUserName() {
+        return getDerbyXADS().getUser();
+    }
+
+    public void setUserName(String userName) {
+        getDerbyXADS().setUser(userName);
+    }
+
+    public String getPassword() {
+        return getDerbyXADS().getPassword();
+    }
+
+    public void setPassword(String password) {
+        getDerbyXADS().setPassword(password);
+    }
+
+    public String getDatabaseName() {
+        return getDerbyXADS().getDatabaseName();
+    }
+
+    public void setDatabaseName(String databaseName) {
+        getDerbyXADS().setDatabaseName(databaseName);
+    }
+
+    public Integer getLoginTimeout() throws SQLException {
+        return new Integer(getDerbyXADS().getLoginTimeout());
+    }
+
+    public void setLoginTimeout(Integer loginTimeout) throws SQLException {
+        getDerbyXADS().setLoginTimeout(loginTimeout == null? 0: loginTimeout.intValue());
+    }
+
+    public String getCreateDatabase() {
+        return getDerbyXADS().getCreateDatabase();
+    }
+
+    public void setCreateDatabase(String createDatabase) {
+        getDerbyXADS().setCreateDatabase(createDatabase);
+    }
+
+    public String getShutdownDatabase() {
+        return getDerbyXADS().getShutdownDatabase();
+    }
+
+    public void setShutdownDatabase(String shutdownDatabase) {
+        getDerbyXADS().setShutdownDatabase(shutdownDatabase);
+    }
+
+}

Added: geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml	Tue Oct 19 13:52:40 2004
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+       http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+    version="1.5">
+
+    <description>Geronimo Derby XA Resource Adapter</description>
+    <display-name>Geronimo Derby XA Resource Adapter</display-name>
+
+    <vendor-name>Tranql</vendor-name>
+    <eis-type>RDBMS</eis-type>
+    <resourceadapter-version>0.1</resourceadapter-version>
+    <resourceadapter>
+        <outbound-resourceadapter>
+            <connection-definition>
+                <managedconnectionfactory-class>org.apache.geronimo.derby.connector.DerbyXAManagedConnectionFactory</managedconnectionfactory-class>
+                <config-property>
+                    <config-property-name>DatabaseName</config-property-name>
+                    <config-property-type>java.lang.String</config-property-type>
+                </config-property>
+                <config-property>
+                    <config-property-name>Password</config-property-name>
+                    <config-property-type>java.lang.String</config-property-type>
+                </config-property>
+                <config-property>
+                    <config-property-name>UserName</config-property-name>
+                    <config-property-type>java.lang.String</config-property-type>
+                </config-property>
+                <config-property>
+                    <config-property-name>LoginTimeout</config-property-name>
+                    <config-property-type>java.lang.Integer</config-property-type>
+                </config-property>
+                <config-property>
+                    <config-property-name>CreateDatabase</config-property-name>
+                    <config-property-type>java.lang.String</config-property-type>
+                </config-property>
+                <config-property>
+                    <config-property-name>ShutdownDatabase</config-property-name>
+                    <config-property-type>java.lang.String</config-property-type>
+                </config-property>
+
+                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+                <connectionfactory-impl-class>org.tranql.connector.jdbc.DataSource</connectionfactory-impl-class>
+                <connection-interface>java.sql.Connection</connection-interface>
+                <connection-impl-class>org.tranql.connector.jdbc.ConnectionHandle</connection-impl-class>
+
+            </connection-definition>
+            <transaction-support>XATransaction</transaction-support>
+            <authentication-mechanism>
+                <description>uses jdbc user password authentication</description>
+                <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+                <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+            </authentication-mechanism>
+            <reauthentication-support>false</reauthentication-support>
+        </outbound-resourceadapter>
+    </resourceadapter>
+</connector>

Mime
View raw message