geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r155756 - in geronimo/trunk/modules: assembly/ assembly/src/plan/ derby-connector/src/rar/META-INF/ timer/src/java/org/apache/geronimo/timer/jdbc/
Date Tue, 01 Mar 2005 06:10:10 GMT
Author: djencks
Date: Mon Feb 28 22:10:07 2005
New Revision: 155756

URL: http://svn.apache.org/viewcvs?view=rev&rev=155756
Log:
GERONIMO-568.  Use derby xa connector for system datasource, and use it for the timers.  Thanks
to John Sisson

Modified:
    geronimo/trunk/modules/assembly/maven.xml
    geronimo/trunk/modules/assembly/project.xml
    geronimo/trunk/modules/assembly/src/plan/default-database-plan.xml
    geronimo/trunk/modules/assembly/src/plan/system-database-plan.xml
    geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml
    geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java
    geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java

Modified: geronimo/trunk/modules/assembly/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/maven.xml?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/assembly/maven.xml (original)
+++ geronimo/trunk/modules/assembly/maven.xml Mon Feb 28 22:10:07 2005
@@ -326,7 +326,7 @@
                 <ant:arg value="manager"/>
                 <ant:arg value="distribute"/>
                 <ant:arg value="target/plan/system-database-plan.xml"/>
-                <ant:arg value="${maven.repo.local}/tranql/rars/tranql-connector-${tranql_connector_version}.rar"/>
+                <ant:arg value="${maven.repo.local}/geronimo/rars/geronimo-derby-connector-${pom.currentVersion}.rar"/>
             </ant:java>
 
             <!-- building system activemq configuration-->

Modified: geronimo/trunk/modules/assembly/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/project.xml?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/assembly/project.xml (original)
+++ geronimo/trunk/modules/assembly/project.xml Mon Feb 28 22:10:07 2005
@@ -313,6 +313,16 @@
 
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-derby-connector</artifactId>
+            <version>${pom.currentVersion}</version>
+            <type>rar</type>
+            <properties>
+                <repository>true</repository>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-service-builder</artifactId>
             <version>${pom.currentVersion}</version>
             <properties>

Modified: geronimo/trunk/modules/assembly/src/plan/default-database-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/default-database-plan.xml?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/default-database-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/default-database-plan.xml Mon Feb 28 22:10:07
2005
@@ -71,17 +71,4 @@
         <attribute name="ConfiguredPassword">testPassword</attribute>
     </gbean-->
 
-    <gbean namePart="JDBCTransactionalThreadPooledTimer" class="org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledTransactionalTimer">
-        <attribute name="repeatCount">5</attribute>
-        <reference name="TransactionContextManager">geronimo.server:type=TransactionContextManager</reference>
-        <reference name="ManagedConnectionFactoryWrapper">geronimo.server:J2EEServer=geronimo,j2eeType=JCAManagedConnectionFactory,name=DefaultDatasource</reference>
-        <reference name="ThreadPool">geronimo.server:type=ThreadPool,name=DefaultThreadPool</reference>
-    </gbean>
-
-    <gbean namePart="JDBCNonTransactionalThreadPooledTimer" class="org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledNonTransactionalTimer">
-        <reference name="ManagedConnectionFactoryWrapper">geronimo.server:J2EEServer=geronimo,j2eeType=JCAManagedConnectionFactory,name=DefaultDatasource</reference>
-        <reference name="TransactionContextManager">geronimo.server:J2EEServer=geronimo,j2eeType=GBean,name=TransactionContextManager,*</reference>
-        <reference name="ThreadPool">geronimo.server:J2EEServer=geronimo,j2eeType=GBean,name=DefaultThreadPool,*</reference>
-    </gbean>
-
 </connector>

Modified: geronimo/trunk/modules/assembly/src/plan/system-database-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/system-database-plan.xml?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/system-database-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/system-database-plan.xml Mon Feb 28 22:10:07
2005
@@ -41,9 +41,8 @@
                     <name>SystemDatasource</name>
                     <config-property-setting name="UserName"></config-property-setting>
                     <config-property-setting name="Password"></config-property-setting>
-                    <config-property-setting name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
-                    <config-property-setting name="ConnectionURL">jdbc:derby:SystemDatabase;create=true</config-property-setting>
-                    <config-property-setting name="ExceptionSorterClass">org.tranql.connector.NoExceptionsAreFatalSorter</config-property-setting>
+                    <config-property-setting name="DatabaseName">SystemDatabase</config-property-setting>
+                    <config-property-setting name="CreateDatabase">create</config-property-setting>
                     <connectionmanager>
                         <local-transaction/>
                         <single-pool>
@@ -68,19 +67,19 @@
         <attribute name="port">1527</attribute>
     </gbean>
 
-    <!--
-    <gbean name="geronimo.server:type=ThreadPooledTimer,name=JDBCTransactionalThreadPooledTimer"
class="org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledTransactionalTimer">
+    <gbean namePart="JDBCTransactionalThreadPooledTimer" class="org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledTransactionalTimer">
         <attribute name="repeatCount">5</attribute>
-        <reference name="TransactionContextManager">geronimo.server:type=TransactionContextManager</reference>
-        <reference name="ManagedConnectionFactoryWrapper">geronimo.server:J2EEServer=geronimo,j2eeType=JCAManagedConnectionFactory,name=DefaultDatasource</reference>
-        <reference name="ThreadPool">geronimo.server:type=ThreadPool,name=DefaultThreadPool</reference>
+        <reference name="TransactionContextManager">geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=JTAResource,name=TransactionContextManager,*</reference>
+        <reference name="ManagedConnectionFactoryWrapper">geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=org/apache/geronimo/SystemDatabase,j2eeType=JCAManagedConnectionFactory,name=SystemDatasource,*</reference>
+        <reference name="ThreadPool">geronimo.server:J2EEServer=geronimo,j2eeType=GBean,name=DefaultThreadPool,*</reference>
+        <reference name="DerbySystem">geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/SystemDatabase,J2EEServer=geronimo,j2eeType=GBean,name=DerbySystem</reference>
     </gbean>
 
-    <gbean name="geronimo.server:type=ThreadPooledTimer,name=JDBCNonTransactionalThreadPooledTimer"
class="org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledNonTransactionalTimer">
-        <reference name="ManagedConnectionFactoryWrapper">geronimo.server:J2EEServer=geronimo,j2eeType=JCAManagedConnectionFactory,name=DefaultDatasource</reference>
-        <reference name="TransactionContextManager">geronimo.server:type=TransactionContextManager</reference>
-        <reference name="ThreadPool">geronimo.server:type=ThreadPool,name=DefaultThreadPool</reference>
+    <gbean namePart="JDBCNonTransactionalThreadPooledTimer" class="org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledNonTransactionalTimer">
+        <reference name="ManagedConnectionFactoryWrapper">geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=org/apache/geronimo/SystemDatabase,j2eeType=JCAManagedConnectionFactory,name=SystemDatasource,*</reference>
+        <reference name="TransactionContextManager">geronimo.server:J2EEServer=geronimo,j2eeType=JTAResource,name=TransactionContextManager,*</reference>
+        <reference name="ThreadPool">geronimo.server:J2EEServer=geronimo,j2eeType=GBean,name=DefaultThreadPool,*</reference>
+        <reference name="DerbySystem">geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/SystemDatabase,J2EEServer=geronimo,j2eeType=GBean,name=DerbySystem</reference>
     </gbean>
--->
 
 </connector>

Modified: geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml (original)
+++ geronimo/trunk/modules/derby-connector/src/rar/META-INF/ra.xml Mon Feb 28 22:10:07 2005
@@ -17,26 +17,49 @@
             <connection-definition>
                 <managedconnectionfactory-class>org.apache.geronimo.derby.connector.DerbyXAManagedConnectionFactory</managedconnectionfactory-class>
                 <config-property>
+                    <description>
+                      The name of the database to access.  A mandatory config-property.
+                    </description>
                     <config-property-name>DatabaseName</config-property-name>
                     <config-property-type>java.lang.String</config-property-type>
                 </config-property>
                 <config-property>
+                    <description>
+                        The database password.
+                    </description>
                     <config-property-name>Password</config-property-name>
                     <config-property-type>java.lang.String</config-property-type>
                 </config-property>
                 <config-property>
+                    <description>
+                        The database UserName.
+                        Note:  The current schema for any connection defaults to a schema
corresponding to the user name. 
+                        If no user name is supplied then the user name (and hence current
schema) defaults to APP.
+                    </description>
                     <config-property-name>UserName</config-property-name>
                     <config-property-type>java.lang.String</config-property-type>
                 </config-property>
                 <config-property>
+                    <description>
+                        This config-property is currently ignored by Derby.
+                    </description>                
                     <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>
+                    <description>
+                        If set to the string "create", this will cause a new database to
be created if the database
+                        specified in the databaseName config-property does not already exist.
 
+                        The database is created when a connection object is obtained from
the data source.                
+                    </description>
+	                <config-property-name>CreateDatabase</config-property-name>
                     <config-property-type>java.lang.String</config-property-type>
                 </config-property>
                 <config-property>
+                    <description>
+                        If set to the string "shutdown", this will cause the database to
shutdown when a java.sql.Connection object
+                        is obtained from the data source.
+                    </description>
                     <config-property-name>ShutdownDatabase</config-property-name>
                     <config-property-type>java.lang.String</config-property-type>
                 </config-property>

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java
(original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java
Mon Feb 28 22:10:07 2005
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.timer.jdbc;
 
+import java.io.Serializable;
 import java.sql.SQLException;
 
 import javax.sql.DataSource;
@@ -39,6 +40,7 @@
     public JDBCStoreThreadPooledNonTransactionalTimer(ManagedConnectionFactoryWrapper managedConnectionFactoryWrapper,
                                                       TransactionContextManager transactionContextManager,
                                                       Executor threadPool,
+                                                      Serializable derbySystem,
                                                       Kernel kernel) throws SQLException
{
         super(new NontransactionalExecutorTaskFactory(),
                 new JDBCWorkerPersistence(kernel.getKernelName(), (DataSource)managedConnectionFactoryWrapper.$getResource(),
false), threadPool, transactionContextManager);
@@ -54,10 +56,11 @@
         infoFactory.addReference("ManagedConnectionFactoryWrapper", ManagedConnectionFactoryWrapper.class);
         infoFactory.addReference("ThreadPool", Executor.class);
         infoFactory.addReference("TransactionContextManager", TransactionContextManager.class);
-
+        infoFactory.addReference("DerbySystem", Serializable.class);
+        
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.setConstructor(new String[]{"ManagedConnectionFactoryWrapper", "TransactionContextManager",
"ThreadPool", "kernel"});
+        infoFactory.setConstructor(new String[]{"ManagedConnectionFactoryWrapper", "TransactionContextManager",
"ThreadPool", "DerbySystem", "kernel"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java?view=diff&r1=155755&r2=155756
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java
(original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java
Mon Feb 28 22:10:07 2005
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.timer.jdbc;
 
+import java.io.Serializable;
 import java.sql.SQLException;
 
 import javax.sql.DataSource;
@@ -43,6 +44,7 @@
             TransactionContextManager transactionContextManager,
             ManagedConnectionFactoryWrapper managedConnectionFactoryWrapper,
             Executor threadPool,
+            Serializable derbySystem,
             Kernel kernel) throws SQLException {
         super(new TransactionalExecutorTaskFactory(transactionContextManager, repeatCount),
                 new JDBCWorkerPersistence(kernel.getKernelName(), (DataSource)managedConnectionFactoryWrapper.$getResource(),
false), threadPool, transactionContextManager);
@@ -59,9 +61,10 @@
         infoFactory.addReference("TransactionContextManager", TransactionContextManager.class);
         infoFactory.addReference("ManagedConnectionFactoryWrapper", ManagedConnectionFactoryWrapper.class);
         infoFactory.addReference("ThreadPool", Executor.class);
+        infoFactory.addReference("DerbySystem", Serializable.class);
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.setConstructor(new String[] {"repeatCount", "TransactionContextManager",
"ManagedConnectionFactoryWrapper", "ThreadPool", "kernel"});
+        infoFactory.setConstructor(new String[] {"repeatCount", "TransactionContextManager",
"ManagedConnectionFactoryWrapper", "ThreadPool", "DerbySystem", "kernel"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 



Mime
View raw message