[EMAIL PROTECTED] wrote on 10/02/2005 01:34:22 PM: > I am working on a patch for switching system-datasource plan to the derby > xa connector as well as moving the timer gbeans to the system datasource
> plan. http://issues.apache.org/jira/browse/GERONIMO-568 > > I am having a problem where the JDBCStoreThreadPooledNonTransactionalTimer > GBean is being invoked before the DerbySystemGBean. > > The JDBCStoreThreadPooledNonTransactionalTimer constructor creates a new > instance of JDBCWorkerPersistence, which then calls the execSQL method in > its superclass that opens a database connection, therefore initialising > the embedded derby database. > > One of the problems with this is that the SystemDatabase and derby.log are > not created under geronimo\var\derby (since the derby.system.home property > is set by the DerbySystemGBean, which hasn't been started yet. > > Both the timer GBeans have a reference to > geronimo.server:J2EEApplication=null,J2EEServer=geronimo, > JCAResource=org/apache/geronimo/SystemDatabase, > j2eeType=JCAManagedConnectionFactory,name=SystemDatasource,* > > The SystemDatasource GBean reference is shown as started in the log before > Derby has been initialised. > > Some options to discuss: > > * Have the Timer GBeans have a reference to the DerbySystem GBean, so they > aren't started until the DerbySystem GBean has started. Do you really > want a DerbySystem parameter on the constructor of the Timer GBeans? Even > if we do this, it won't stop future GBeans referencing the > SystemDatasource when Derby hasn't been initialised. FYI.. After an IRC discussion with David Jencks and Dain I ended up taking this option. John > > * Have the SystemDatasource Gbean have a reference to the DerbySystem > GBean, so the SystemDatasource is not started until the DerbySystem GBean > has started. Not sure how this can be done and how practical it is. > > * Have a new system-derby-plan.xml file with > configId="org/apache/geronimo/DerbySystem" and > parentId="org/apache/geronimo/Server" that contains the DerbySystem and > DerbyNetwork gbeans . Change the system-database-plan.xml file to have > parentId="org/apache/geronimo/DerbySystem". > > Thanks, > > John >
