Author: nettings
Date: Fri Oct 12 14:07:12 2007
New Revision: 584272
URL: http://svn.apache.org/viewvc?rev=584272&view=rev
Log:
fixes http://issues.apache.org/bugzilla/show_bug.cgi?id=43581
(custom datasources in cocoon.xconf were being nuked by an unspecific
lenya patchfile)
the approach is now to add to the <datasources/> element instead of
overwriting it, which mandates another patchfile that will make sure an
empty <datasources/> element is created first.
thanks to markus angst for this patch.
please test, i don't use custom datasources...
Added:
lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/add_datasources_element.xconf
Modified:
lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/datasources.xconf
Added: lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/add_datasources_element.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/add_datasources_element.xconf?rev=584272&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/add_datasources_element.xconf (added)
+++ lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/add_datasources_element.xconf Fri Oct 12 14:07:12 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- This file creates an empty <datasources/> element in cocoon.xconf.
+ This is necessary to enable subsequent xpatch files (like datasources.xconf)
+ to patch datasource entries into this element. See bug 43581 for a
+ discussion/explanation.
+ The name of this file has to alphabetically sort in before "datasources.xconf".
+-->
+
+<xconf xpath="/cocoon"
+ unless="datasources"
+ insert-before="/cocoon/hsqldb-server"
+ if-prop="patch.webapp">
+ <datasources>
+ </datasources>
+</xconf>
Modified: lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/datasources.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/datasources.xconf?rev=584272&r1=584271&r2=584272&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/datasources.xconf (original)
+++ lenya/trunk/src/webapp/lenya/config/cocoon-xconf/scheduler/datasources.xconf Fri Oct 12 14:07:12 2007
@@ -16,25 +16,17 @@
limitations under the License.
-->
-<!-- $Id: usecases-workflow-deactivate.xconf 348547 2005-11-23 20:13:01Z chestnut $ -->
-
- <xconf xpath="/cocoon"
- unless="datasources/jdbc[@name = 'LenyaScheduler']"
- remove="/cocoon/datasources"
- insert-before="/cocoon/hsqldb-server"
+<xconf xpath="/cocoon/datasources"
+ unless="/cocoon/datasources/jdbc[@name = 'LenyaScheduler']"
if-prop="patch.webapp">
-
- <datasources>
- <jdbc logger="core.datasources.lenya.scheduler" name="LenyaScheduler">
- <pool-controller max="10" min="5">
- <!-- use custom keep-alive query because HSQL does not accept 'SELECT 1' -->
- <keep-alive>SELECT 1 FROM QRTZ_LOCKS</keep-alive>
- </pool-controller>
- <dburl>jdbc:hsqldb:hsql://localhost:9002/cocoondb</dburl>
- <user>sa</user>
- <password/>
- </jdbc>
- </datasources>
-
- </xconf>
-
+ <jdbc logger="core.datasources.lenya.scheduler" name="LenyaScheduler">
+ <pool-controller max="10" min="5">
+ <!-- use custom keep-alive query because HSQL does not accept 'SELECT 1' -->
+ <keep-alive>SELECT 1 FROM QRTZ_LOCKS</keep-alive>
+ </pool-controller>
+ <dburl>jdbc:hsqldb:hsql://localhost:9002/cocoondb</dburl>
+ <user>sa</user>
+ <password/>
+ </jdbc>
+</xconf>
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.