From fgray@example.com Sun Feb 01 12:03:34 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 70396 invoked from network); 1 Feb 2004 12:03:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 12:03:33 -0000 Received: (qmail 31073 invoked by uid 500); 1 Feb 2004 12:03:31 -0000 Delivered-To: fgray@example.com Received: (qmail 31016 invoked by uid 500); 1 Feb 2004 12:03:31 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 30993 invoked by uid 500); 1 Feb 2004 12:03:31 -0000 Delivered-To: fgray@example.com Received: (qmail 30974 invoked from network); 1 Feb 2004 12:03:31 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 12:03:31 -0000 Received: (qmail 70355 invoked by uid 1746); 1 Feb 2004 12:03:31 -0000 Date: 1 Feb 2004 12:03:31 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/documentation/xdocs/userdocs/flow sitemap.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N antonio 2004/02/01 04:03:31 Modified: src/documentation/xdocs/userdocs/flow sitemap.xml Log: Fixing typo Revision Changes Path 1.19 +1 -1 cocoon-2.1/src/documentation/xdocs/userdocs/flow/sitemap.xml Index: sitemap.xml =================================================================== RCS file: /home/cvs//cocoon-2.1/src/documentation/xdocs/userdocs/flow/sitemap.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- sitemap.xml 12 Oct 2003 13:04:48 -0000 1.18 +++ sitemap.xml 1 Feb 2004 12:03:678.242.6083.19 @@ -17,7 +17,7 @@ <p>The <code>flow</code> element defines a Flowscript interpreter for a sitemap. The <code>language</code> attribute specifies the target programming language. Currently the only supported language is <code>"javascript"</code>. Its embedded <code>script</code> elements allow you to specify the files that make up the flow for this sitemap. Each <code>script</code> element specifies the URI of a script that will be compiled and executed when this Sitemap is created. The <code>src</code> attribute specifies the URI of the script.</p> <source><![CDATA[ <map:flow language="Language"> - <map:script src="URI"/>+ + <map:script src="URI"/> </map:flow> ]]></source> <p>Example:</p> From fgray@example.com Sun Feb 01 19:32:36 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 7444 invoked from network); 1 Feb 2004 19:32:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 19:32:36 -0000 Received: (qmail 49647 invoked by uid 500); 1 Feb 2004 19:32:26 -0000 Delivered-To: fgray@example.com Received: (qmail 49463 invoked by uid 500); 1 Feb 2004 19:32:25 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 49443 invoked by uid 500); 1 Feb 2004 19:32:24 -0000 Delivered-To: fgray@example.com Received: (qmail 49439 invoked from network); 1 Feb 2004 19:32:24 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 19:32:24 -0000 Received: (qmail 7390 invoked by uid 1544); 1 Feb 2004 19:32:33 -0000 Date: 1 Feb 2004 19:32:33 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/generation JXTemplateGenerator.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N coliver 2004/02/01 11:32:33 Modified: src/java/org/apache/cocoon/generation JXTemplateGenerator.java Log: Fixed typo in error message and added fix for bugzilla 26086 Revision Changes Path 1.35 +11 -13 cocoon-2.1/src/java/org/apache/cocoon/generation/JXTemplateGenerator.java Index: JXTemplateGenerator.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/generation/JXTemplateGenerator.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- JXTemplateGenerator.java 31 Jan 2004 15:57:32 -0000 1.34 +++ JXTemplateGenerator.java 1 Feb 2004 19:32:33 -0000 1.35 @@ -382,14 +382,14 @@ }; private static final Iterator NULL_ITER = new Iterator() { - public boolean hasNext() { - return true; - } - public Object next() { - return null; - } - public void remove() { - } + public boolean hasNext() { + return true; + } + public Object next() { + return null; + } + public void remove() { + } }; private static final Locator NULL_LOCATOR = new LocatorImpl(); @@ -1195,8 +1195,6 @@ int ch; boolean inExpr = false; boolean xpath = false; - // int line = this.location.getLineNumber(); - // int column = this.location.getColumnNumber(); try { top: while ((ch = in.read()) != -1) { // column++; @@ -1223,7 +1221,7 @@ } } catch (Exception exc) { throw new SAXParseException(exc.getMessage(), - location, + this.location, exc); } substitutions.add(new Expression(str, @@ -3823,7 +3821,7 @@ doc.next, doc.endDocument); } catch (Exception exc) { throw new SAXParseException( - "Exception occured in imported template " + "Exception occurred in imported template " + uri + ": "+ exc.getMessage(), ev.location, exc); } From fgray@example.com Sun Feb 01 21:34:39 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 51399 invoked from network); 1 Feb 2004 21:34:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 21:34:38 -0000 Received: (qmail 79295 invoked by uid 500); 1 Feb 2004 21:34:24 -0000 Delivered-To: fgray@example.com Received: (qmail 79205 invoked by uid 500); 1 Feb 2004 21:34:24 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 79180 invoked by uid 500); 1 Feb 2004 21:34:24 -0000 Delivered-To: fgray@example.com Received: (qmail 79172 invoked from network); 1 Feb 2004 21:34:23 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 21:34:23 -0000 Received: (qmail 51375 invoked by uid 1041); 1 Feb 2004 21:34:35 -0000 Date: 1 Feb 2004 21:34:35 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/components - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N giacomo 2004/02/01 13:34:35 cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/components - New directory From fgray@example.com Sun Feb 01 21:34:39 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 51409 invoked from network); 1 Feb 2004 21:34:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 21:34:38 -0000 Received: (qmail 79328 invoked by uid 500); 1 Feb 2004 21:34:24 -0000 Delivered-To: fgray@example.com Received: (qmail 79225 invoked by uid 500); 1 Feb 2004 21:34:24 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 79186 invoked by uid 500); 1 Feb 2004 21:34:24 -0000 Delivered-To: fgray@example.com Received: (qmail 79173 invoked from network); 1 Feb 2004 21:34:24 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 21:34:24 -0000 Received: (qmail 51380 invoked by uid 1041); 1 Feb 2004 21:34:35 -0000 Date: 1 Feb 2004 21:34:35 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/ojb/samples/odmg - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N giacomo 2004/02/01 13:34:35 cocoon-2.1/src/blocks/ojb/samples/odmg - New directory From fgray@example.com Sun Feb 01 21:34:57 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 51758 invoked from network); 1 Feb 2004 21:34:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 21:34:56 -0000 Received: (qmail 80689 invoked by uid 500); 1 Feb 2004 21:34:45 -0000 Delivered-To: fgray@example.com Received: (qmail 80505 invoked by uid 500); 1 Feb 2004 21:34:44 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 80472 invoked by uid 500); 1 Feb 2004 21:34:44 -0000 Delivered-To: fgray@example.com Received: (qmail 80457 invoked from network); 1 Feb 2004 21:34:43 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 21:34:43 -0000 Received: (qmail 51735 invoked by uid 1041); 1 Feb 2004 21:34:50 -0000 Date: 1 Feb 2004 21:34:50 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/ojb/samples/odmg/xsp - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N giacomo 2004/02/01 13:34:50 cocoon-2.1/src/blocks/ojb/samples/odmg/xsp - New directory From fgray@example.com Sun Feb 01 21:37:33 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 52631 invoked from network); 1 Feb 2004 21:37:32 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 21:37:32 -0000 Received: (qmail 87779 invoked by uid 500); 1 Feb 2004 21:37:19 -0000 Delivered-To: fgray@example.com Received: (qmail 87724 invoked by uid 500); 1 Feb 2004 21:37:19 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 87707 invoked by uid 500); 1 Feb 2004 21:37:19 -0000 Delivered-To: fgray@example.com Received: (qmail 87704 invoked from network); 1 Feb 2004 21:37:19 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 21:37:19 -0000 Received: (qmail 52603 invoked by uid 1041); 1 Feb 2004 21:37:30 -0000 Date: 1 Feb 2004 21:37:30 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/ojb/samples sitemap.xmap welcome.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N giacomo 2004/02/01 13:37:30 Modified: . blocks.properties gump.xml status.xml src/blocks/ojb/WEB-INF/classes OJB.properties repository.xml src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components JdoPMFImpl.java src/blocks/ojb/java/org/apache/cocoon/ojb/odmg/components OdmgImplementationImpl.java src/blocks/ojb/samples sitemap.xmap welcome.xml Added: src/blocks/ojb/java/org/apache/cocoon/ojb/components AbstractOjbImpl.java ConnectionFactoryAvalonDataSource.java src/blocks/ojb/samples/odmg/xsp demo1.xsp Log: OJB-Block: Added our own OJB ConnectionFactory which uses the DataSources configured in cocoon.xconf Revision Changes Path 1.1 cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/components/AbstractOjbImpl.java Index: AbstractOjbImpl.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact fgray@example.com. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <fgray@example.com>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.ojb.components; import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.activity.Initializable; import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.Serviceable; /** * Base class for different DB-OBJ wrapper implementations. This base class is responsible to initialize and dispose of * the helper class <code>ConnectionFactoryAvalonDataSource</code> which can be used as a ConnectionFactory class in * the OJB Configuration * * @author giacomo * @version $Id: AbstractOjbImpl.java,v 1.1 2004/02/01 21:37:29 giacomo Exp $ */ public class AbstractOjbImpl extends AbstractLogEnabled implements Initializable, Disposable, Serviceable { /** The <code>ServiceManager</code> instance */ protected ServiceManager manager; /* (non-Javadoc) * @see org.apache.avalon.framework.activity.Initializable#initialize() */ public void initialize() throws Exception { ConnectionFactoryAvalonDataSource.initialize(this.manager); } /* (non-Javadoc) * @see org.apache.avalon.framework.activity.Disposable#dispose() */ public void dispose() { ConnectionFactoryAvalonDataSource.dispose(); } /* (non-Javadoc) * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) */ public void service(final ServiceManager manager) throws ServiceException { this.manager = manager; } } 1.1 cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/components/ConnectionFactoryAvalonDataSource.java Index: ConnectionFactoryAvalonDataSource.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact fgray@example.com. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <fgray@example.com>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.ojb.components; import java.sql.Connection; import java.sql.SQLException; import org.apache.avalon.framework.CascadingRuntimeException; import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.ServiceSelector; import org.apache.avalon.excalibur.datasource.DataSourceComponent; import org.apache.ojb.broker.accesslayer.ConnectionFactory; import org.apache.ojb.broker.accesslayer.LookupException; import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor; /** * OJBConnectionFactory implemenation to bridge into the Avalon DataSource Connection Pooling * Component defined in the Cocoon configuration. * * @author fgray@example.com * @version $Id: ConnectionFactoryAvalonDataSource.java,v 1.1 2004/02/01 21:37:29 giacomo Exp $ */ public class ConnectionFactoryAvalonDataSource implements ConnectionFactory { /** The <code>ServiceManager</code> to be used */ private static ServiceManager manager; /** The <code>ServiceSelector</code> to be used */ private static ServiceSelector dbselector; /** * Initializes this helper class with the <code>ServiceManager</code> to be used. This method * should be called from a Avalon Component configured into Cocoon at startup to supply the * needed <code>ServiceManager</code>. * * @param serviceManager The ServiceManager * * @throws ServiceException In case we cannot obtain a DataSource */ public static void initialize(final ServiceManager serviceManager) throws ServiceException { ConnectionFactoryAvalonDataSource.manager = serviceManager; ConnectionFactoryAvalonDataSource.dbselector = (ServiceSelector)ConnectionFactoryAvalonDataSource.manager.lookup(DataSourceComponent.ROLE + "Selector"); } /** * Signal disposal to this helper class. */ public static void dispose() { ConnectionFactoryAvalonDataSource.manager.release(ConnectionFactoryAvalonDataSource.dbselector); } /* (non-Javadoc) * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor) */ public Connection lookupConnection(final JdbcConnectionDescriptor conDesc) throws LookupException { if (null == ConnectionFactoryAvalonDataSource.manager) { throw new LookupException("ServiceManager was not set!"); } try { return ((DataSourceComponent)ConnectionFactoryAvalonDataSource.dbselector.select(conDesc.getJcdAlias())).getConnection(); } catch (final ServiceException se) { throw new LookupException("Cannot lookup DataSources named " + conDesc.getJcdAlias(), se); } catch (final SQLException sqle) { throw new LookupException("Cannot get Connection from DataSource named " + conDesc.getDbAlias(), sqle); } } /* (non-Javadoc) * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#releaseConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor, java.sql.Connection) */ public void releaseConnection(JdbcConnectionDescriptor conDesc, Connection con) { try { con.close(); // The DataSource itself from where this connection comes from will take care of pooling } catch (final SQLException sqle) { // This should not happend, but in case throw new CascadingRuntimeException("Cannot eelase SQL Connection to DataSource", sqle); } } /* (non-Javadoc) * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#releaseAllResources() */ public void releaseAllResources() { //Nothing to do here } } 1.1 cocoon-2.1/src/blocks/ojb/samples/odmg/xsp/demo1.xsp Index: demo1.xsp =================================================================== <?xml version="1.0"?> <!-- $Id: demo1.xsp,v 1.1 2004/02/01 21:37:29 giacomo Exp $--> <!-- ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact fgray@example.com. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <fgray@example.com>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. --> <!-- * Simple demo that insert a row into hsqldb using OJB with JDO * * @author <a href="mailto:fgray@example.com>Antonio Gallardo</a> * @version CVS $Revision: 1.1 $ $Date: 2004/02/01 21:37:29 $ --> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"> <xsp:structure> <xsp:include>org.apache.cocoon.ojb.odmg.components.OdmgImplementation</xsp:include> <xsp:include>org.apache.cocoon.ojb.samples.Department</xsp:include> <xsp:include>org.odmg.Implementation</xsp:include> <xsp:include>org.odmg.Transaction</xsp:include> <xsp:include>org.odmg.ODMGException</xsp:include> </xsp:structure> <xsp:init-page> OdmgImplementation odmgImpl = null; Implementation impl = null; Department bean = new Department(); String s; </xsp:init-page> <page> <content> <title>Hello</title> <para>This is my first Cocoon page with OJB!</para> <xsp:logic> try { /* Get the PersistenceManager */ try { odmgImpl = (OdmgImplementation)manager.lookup( OdmgImplementation.ROLE ); impl = odmgImpl.getInstance( "personnel" ); } catch (ComponentException cme) { getLogger().error("Could not look up the ODMG Implementation", cme); } catch (ODMGException oe) { getLogger().error("Failed to instantiate ODMG Implementation", oe); } <!-- Setting up the Bean --> bean.setId(6); bean.setName("ODMG Development"); <!-- 2. Get current transaction --> Transaction tx = impl.newTransaction(); <!-- 3. Start a Transaction --> tx.begin(); <!-- 4. now perform persistence operations. Store the new Department --> tx.lock(bean, Transaction.WRITE);; <!-- 5. Commit the transaction --> tx.commit(); s = bean.getId() + " : " + bean.getName(); </xsp:logic> <p> Inserted data: <xsp:expr>s</xsp:expr> </p> <xsp:logic> } finally { manager.release(odmgImpl); } </xsp:logic> </content> </page> </xsp:page> 1.55 +1 -0 cocoon-2.1/blocks.properties Index: blocks.properties =================================================================== RCS file: /home/cvs/cocoon-2.1/blocks.properties,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -b -u -r1.54 -r1.55 --- blocks.properties 13 Jan 2004 11:29:49 -0000 1.54 +++ blocks.properties 1 Feb 2004 21:37:29 -0000 1.55 @@ -87,6 +87,7 @@ #-----[dependency]: "mail" depends on "asciiart". #exclude.block.mail=true #exclude.block.midi=true +#-----[dependency]: "ojb" depends on "databases". #exclude.block.ojb=true #exclude.block.paranoid=true #-----[dependency]: "petstore" depends on "databases", "hsqldb", "velocity", "woody". 1.107 +2 -1 cocoon-2.1/gump.xml Index: gump.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/gump.xml,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -b -u -r1.106 -r1.107 --- gump.xml 30 Jan 2004 17:00:09 -0000 1.106 +++ gump.xml 1 Feb 2004 21:37:30 -0000 1.107 @@ -1034,6 +1034,7 @@ </ant> <depend project="cocoon" inherit="all"/> + <depend project="cocoon-block-databases"/> <work nested="tools/anttasks"/> <home nested="build/cocoon-@@DATE@@"/> 1.234 +6 -2 cocoon-2.1/status.xml Index: status.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/status.xml,v retrieving revision 1.233 retrieving revision 1.234 diff -u -d -b -u -r1.233 -r1.234 --- status.xml 31 Jan 2004 00:07:01 -0000 1.233 +++ status.xml 1 Feb 2004 21:37:30 -0000 1.234 @@ -196,6 +196,10 @@ <changes> <release version="@version@" date="@date@"> + <action dev="GP" type="add" > + OJB-Block: Added our own OJB ConnectionFactory which uses the + DataSources configured in cocoon.xconf + </action> <action dev="AG" type="update"> Updated POI to 2.0-final </action> 1.3 +10 -6 cocoon-2.1/src/blocks/ojb/WEB-INF/classes/OJB.properties Index: OJB.properties =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/WEB-INF/classes/OJB.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -b -u -r1.2 -r1.3 --- OJB.properties 10 Oct 2003 06:10:00 -0000 1.2 +++ OJB.properties 1 Feb 2004 21:37:30 -0000 1.3 @@ -88,16 +88,19 @@ # A ConnectionFactory is responsible for creating # JDBC Connections. Current version ships four implementations: # -# 1. ConnectionFactoryNotPooledImpl +# 1. ConnectionFactoryAvalonDatasource +# Uses a Cocoon configured DataSource specified with the jcd-alias attribute value in +# a jdbc-connection-descriptor element in the repository.xml file. +# 2. ConnectionFactoryNotPooledImpl # No pooling, no playing around. # Every connection request returns a new connection, # every connection release close the connection. -# 2. ConnectionFactoryPooledImpl +# 3. ConnectionFactoryPooledImpl # This implementation supports connection pooling. -# 3. ConnectionFactoryDBCPImpl +# 4. ConnectionFactoryDBCPImpl # Using the jakarta-DBCP api for connection management, support # connection- and prepared statement-pooling, abandoned connection handling. -# 4. ConnectionFactoryManagedImpl +# 5. ConnectionFactoryManagedImpl # Connection factory for use within managed environments - e.g. JBoss. # Every obtained DataSource was wrapped within OJB (and ignore # e.g. con.commit() calls within OJB). @@ -110,7 +113,8 @@ # take a look at the repository.dtd, there was a possibility to override # this default connection factory entry in each JDBCConnectionDescriptor. # -ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl +ConnectionFactoryClass=org.apache.cocoon.ojb.components.ConnectionFactoryAvalonDataSource +#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl 1.5 +8 -2 cocoon-2.1/src/blocks/ojb/WEB-INF/classes/repository.xml Index: repository.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/WEB-INF/classes/repository.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -b -u -r1.4 -r1.5 --- repository.xml 10 Oct 2003 06:10:00 -0000 1.4 +++ repository.xml 1 Feb 2004 21:37:30 -0000 1.5 @@ -16,7 +16,7 @@ Ditto it is possible to add jdbc-connection-descriptor at runtime using the MetadataManager. --> -<jdbc-connection-descriptor + <jdbc-connection-descriptor jcd-alias="default" default-connection="true" platform="Hsqldb" @@ -41,6 +41,12 @@ <attribute attribute-name="grabSize" attribute-value="5"/> </sequence-manager> </jdbc-connection-descriptor> + + <jdbc-connection-descriptor jcd-alias="personnel"> + <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl"> + <attribute attribute-name="grabSize" attribute-value="5"/> + </sequence-manager> + </jdbc-connection-descriptor> <class-descriptor class="org.apache.cocoon.ojb.samples.Department" table="DEPARTMENT"> <field-descriptor name="id" column="ID" jdbc-type="INTEGER" primarykey="true"/> 1.2 +5 -2 cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components/JdoPMFImpl.java Index: JdoPMFImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components/JdoPMFImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -b -u -r1.1 -r1.2 --- JdoPMFImpl.java 28 Sep 2003 04:31:11 -0000 1.1 +++ JdoPMFImpl.java 1 Feb 2004 21:37:30 -0000 1.2 @@ -60,6 +60,7 @@ import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.thread.ThreadSafe; +import org.apache.cocoon.ojb.components.AbstractOjbImpl; import org.apache.ojb.jdori.sql.OjbStorePMF; /** @@ -68,7 +69,7 @@ * @author <a href="mailto:fgray@example.com">Antonio Gallardo</a> * @version CVS $Id$ */ -public class JdoPMFImpl extends AbstractLogEnabled implements JdoPMF, Configurable, Initializable, +public class JdoPMFImpl extends AbstractOjbImpl implements JdoPMF, Configurable, Initializable, Disposable, ThreadSafe { protected PersistenceManagerFactory factory = null; @@ -87,6 +88,7 @@ */ public void dispose() { + super.dispose(); if (this.getLogger().isDebugEnabled()) this.getLogger().debug("OJB-JDO: Disposed OK!"); } @@ -103,6 +105,7 @@ */ public void initialize() throws Exception { + super.initialize(); try { // Create the factory 1.2 +5 -3 cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/odmg/components/OdmgImplementationImpl.java Index: OdmgImplementationImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/odmg/components/OdmgImplementationImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -b -u -r1.1 -r1.2 --- OdmgImplementationImpl.java 27 Jan 2004 06:15:14 -0000 1.1 +++ OdmgImplementationImpl.java 1 Feb 2004 21:37:30 -0000 1.2 @@ -58,8 +58,8 @@ import org.apache.avalon.framework.configuration.Configurable; import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.thread.ThreadSafe; +import org.apache.cocoon.ojb.components.AbstractOjbImpl; import org.apache.ojb.odmg.OJB; import org.odmg.Database; import org.odmg.Implementation; @@ -73,7 +73,7 @@ * @version CVS $Id$ */ public class OdmgImplementationImpl - extends AbstractLogEnabled + extends AbstractOjbImpl implements OdmgImplementation, Configurable, Initializable, Disposable, ThreadSafe { private final static String DEFAULT_CONNECTION ="default"; @@ -96,6 +96,7 @@ * @see org.apache.avalon.framework.activity.Disposable#dispose() */ public void dispose() { + super.dispose(); synchronized(this.databases) { final Set keys = this.databases.keySet(); for( Iterator i = keys.iterator(); i.hasNext(); ) @@ -121,6 +122,7 @@ */ public void initialize() throws Exception { + super.initialize(); try { // Get the Implementation this.odmg = OJB.getInstance(); 1.4 +16 -3 cocoon-2.1/src/blocks/ojb/samples/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/samples/sitemap.xmap,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -b -u -r1.3 -r1.4 --- sitemap.xmap 29 Oct 2003 21:27:12 -0000 1.3 +++ sitemap.xmap 1 Feb 2004 21:37:30 -0000 1.4 @@ -107,6 +107,19 @@ <!-- Manages continuations --> <map:match pattern="jdo/woody/*.continue"> <map:call continuation="{1}"/> + </map:match> + + <!-- odmg samples --> + <map:match pattern="odmg/xspdemo"> + <map:generate src="odmg/xsp/demo1.xsp" type="serverpages"/> + <map:transform src="context://samples/stylesheets/dynamic-page2html.xsl"> + <map:parameter name="servletPath" value="{request:servletPath}"/> + <map:parameter name="sitemapURI" value="{request:sitemapURI}"/> + <map:parameter name="contextPath" value="{request:contextPath}"/> + <map:parameter name="file" value="odmg/xsp/xspdemo.xsp"/> + <map:parameter name="remove" value="{0}"/> + </map:transform> + <map:serialize/> </map:match> </map:pipeline> 1.2 +1 -1 cocoon-2.1/src/blocks/ojb/samples/welcome.xml Index: welcome.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/samples/welcome.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -b -u -r1.1 -r1.2 --- welcome.xml 28 Sep 2003 04:31:10 -0000 1.1 +++ welcome.xml 1 Feb 2004 21:37:30 -0000 1.2 @@ -19,7 +19,7 @@ Object Data Management Group (ODMG) 3 standard for binding databases. Uses Object Query Language (OQL). ODMG has been superceded by JDO. </note> - <sample name="XSP" href="">Sample using in a XSP page. To be done.</sample> + <sample name="XSP" href="odmg/xspdemo">Sample using in a XSP page.</sample> <sample name="Woody" href="">Sample using Woody binding. To be done.</sample> <sample name="JXForm" href="">Sample using JXForms. To be done.</sample> </group> From fgray@example.com Sun Feb 01 23:26:17 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 85069 invoked from network); 1 Feb 2004 23:26:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 23:26:17 -0000 Received: (qmail 70864 invoked by uid 500); 1 Feb 2004 23:26:02 -0000 Delivered-To: fgray@example.com Received: (qmail 70783 invoked by uid 500); 1 Feb 2004 23:26:02 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 70771 invoked by uid 500); 1 Feb 2004 23:26:02 -0000 Delivered-To: fgray@example.com Received: (qmail 70763 invoked from network); 1 Feb 2004 23:26:01 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 23:26:01 -0000 Received: (qmail 85044 invoked by uid 1656); 1 Feb 2004 23:26:15 -0000 Date: 1 Feb 2004 23:26:15 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-site/site/lenya index.html X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N gregor 2004/02/01 15:26:15 Modified: site/lenya index.html Log: new lenya release Revision Changes Path 1.10 +1 -2 cocoon-site/site/lenya/index.html Index: index.html =================================================================== RCS file: /home/cvs/cocoon-site/site/lenya/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- index.html 30 Jan 2004 17:39:27 -0000 1.9 +++ index.html 1 Feb 2004 23:26:15 -0000 1.10 @@ -201,8 +201,7 @@ Thank you very much for your suggestions and contributions. </p> -<a name="N101ED"></a><a name="+%2827+May+2003%29"></a> -<h3>Lenya 1.2 RC 1 Released (11 December 2003)</h3> +<h3>Lenya 1.2 RC 2 Released (1 Februar 2004)</h3> <div style="margin-left: 0 ; border: 2px"> <ul> From fgray@example.com Sun Feb 01 23:28:13 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 85725 invoked from network); 1 Feb 2004 23:28:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Feb 2004 23:28:12 -0000 Received: (qmail 75029 invoked by uid 500); 1 Feb 2004 23:27:58 -0000 Delivered-To: fgray@example.com Received: (qmail 74836 invoked by uid 500); 1 Feb 2004 23:27:57 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 74822 invoked by uid 500); 1 Feb 2004 23:27:57 -0000 Delivered-To: fgray@example.com Received: (qmail 74813 invoked from network); 1 Feb 2004 23:27:56 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Feb 2004 23:27:56 -0000 Received: (qmail 85628 invoked by uid 1656); 1 Feb 2004 23:28:10 -0000 Date: 1 Feb 2004 23:28:10 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-site/site/lenya index.html X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N gregor 2004/02/01 15:28:10 Modified: site/lenya index.html Log: speling Revision Changes Path 1.11 +1 -1 cocoon-site/site/lenya/index.html Index: index.html =================================================================== RCS file: /home/cvs/cocoon-site/site/lenya/index.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- index.html 1 Feb 2004 23:26:15 -0000 1.10 +++ index.html 1 Feb 2004 23:28:10 -0000 1.11 @@ -201,7 +201,7 @@ Thank you very much for your suggestions and contributions. </p> -<h3>Lenya 1.2 RC 2 Released (1 Februar 2004)</h3> +<h3>Lenya 1.2 RC 2 Released (February 1, 2004)</h3> <div style="margin-left: 0 ; border: 2px"> <ul> From fgray@example.com Mon Feb 02 08:35:02 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 21203 invoked from network); 2 Feb 2004 08:35:01 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 08:35:01 -0000 Received: (qmail 10737 invoked by uid 500); 2 Feb 2004 08:34:36 -0000 Delivered-To: fgray@example.com Received: (qmail 10676 invoked by uid 500); 2 Feb 2004 08:34:35 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 10652 invoked by uid 500); 2 Feb 2004 08:34:35 -0000 Delivered-To: fgray@example.com Received: (qmail 10645 invoked from network); 2 Feb 2004 08:34:35 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 08:34:35 -0000 Received: (qmail 21157 invoked by uid 1260); 2 Feb 2004 08:34:59 -0000 Date: 2 Feb 2004 08:34:59 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/documentation/xdocs/plan release.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cziegeler 2004/02/02 00:34:59 Modified: src/documentation/xdocs/plan release.xml Log: Update release plan Revision Changes Path 1.9 +4 -4 cocoon-2.1/src/documentation/xdocs/plan/release.xml Index: release.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/plan/release.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- release.xml 14 Nov 2003 09:42:23 -0000 1.8 +++ release.xml 2 Feb 2004 08:34:59 -0000 1.9 @@ -19,9 +19,9 @@ <s1 title="Timeframe"> <p>This is the current time frame for the next releases:</p> <ul> - <li>December 03/January 04 : 2.1.4 (maintainance release)</li> - <li>Not schedulded yet : 2.2 Milestone 1</li> - <li>On request : 2.0.5 (maintainance release)</li> + <li>2004/02/12 : 2.1.4 (maintainance release)</li> + <li>Not schedulded yet : 2.2 Milestone 1</li> + <li>On request : 2.0.5 (maintainance release)</li> </ul> </s1> From fgray@example.com Mon Feb 02 08:39:15 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 24712 invoked from network); 2 Feb 2004 08:39:15 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 08:39:15 -0000 Received: (qmail 23503 invoked by uid 500); 2 Feb 2004 08:38:47 -0000 Delivered-To: fgray@example.com Received: (qmail 23431 invoked by uid 500); 2 Feb 2004 08:38:46 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 23396 invoked by uid 500); 2 Feb 2004 08:38:46 -0000 Delivered-To: fgray@example.com Received: (qmail 23378 invoked from network); 2 Feb 2004 08:38:46 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 08:38:46 -0000 Received: (qmail 24599 invoked by uid 1260); 2 Feb 2004 08:39:09 -0000 Date: 2 Feb 2004 08:39:09 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/source CopletSource.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cziegeler 2004/02/02 00:39:09 Modified: src/blocks/portal/java/org/apache/cocoon/portal/source CopletSource.java Log: Implement streaming of coplets Revision Changes Path 1.5 +29 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/source/CopletSource.java Index: CopletSource.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/source/CopletSource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CopletSource.java 20 Oct 2003 13:37:10 -0000 1.4 +++ CopletSource.java 2 Feb 2004 08:39:09 -0000 1.5 @@ -50,15 +50,23 @@ */ package org.apache.cocoon.portal.source; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import org.apache.avalon.framework.component.ComponentException; +import org.apache.avalon.framework.component.ComponentManager; +import org.apache.avalon.framework.component.ComponentSelector; import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.ServiceSelector; import org.apache.avalon.framework.service.Serviceable; +import org.apache.cocoon.CascadingIOException; +import org.apache.cocoon.components.CocoonComponentManager; import org.apache.cocoon.portal.coplet.CopletInstanceData; import org.apache.cocoon.portal.coplet.adapter.CopletAdapter; +import org.apache.cocoon.serialization.Serializer; import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceNotFoundException; import org.apache.excalibur.source.SourceValidity; @@ -105,7 +113,26 @@ * @see org.apache.excalibur.source.Source#getInputStream() */ public InputStream getInputStream() throws IOException, SourceNotFoundException { - return null; + ComponentManager sitemapManager = CocoonComponentManager.getSitemapComponentManager(); + ComponentSelector serializerSelector = null; + Serializer serializer = null; + try { + serializerSelector = (ComponentSelector) sitemapManager.lookup(Serializer.ROLE+"Selector"); + serializer = (Serializer) serializerSelector.select("html"); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + serializer.setOutputStream(os); + this.toSAX(serializer); + return new ByteArrayInputStream(os.toByteArray()); + } catch (SAXException se) { + throw new CascadingIOException("Unable to stream content.", se); + } catch (ComponentException ce) { + throw new CascadingIOException("Unable to get components for serializing.", ce); + } finally { + if ( serializer != null ) { + serializerSelector.release(serializer); + } + sitemapManager.release(serializerSelector); + } } /** From fgray@example.com Mon Feb 02 08:39:59 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 25355 invoked from network); 2 Feb 2004 08:39:58 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 08:39:58 -0000 Received: (qmail 25833 invoked by uid 500); 2 Feb 2004 08:39:16 -0000 Delivered-To: fgray@example.com Received: (qmail 25776 invoked by uid 500); 2 Feb 2004 08:39:15 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 25744 invoked by uid 500); 2 Feb 2004 08:39:15 -0000 Delivered-To: fgray@example.com Received: (qmail 25609 invoked from network); 2 Feb 2004 08:39:14 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 08:39:14 -0000 Received: (qmail 25154 invoked by uid 1260); 2 Feb 2004 08:39:37 -0000 Date: 2 Feb 2004 08:39:37 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory PortletInvokerFactoryImpl.java LocalPortletInvokerImpl.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cziegeler 2004/02/02 00:39:37 Modified: src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory PortletInvokerFactoryImpl.java LocalPortletInvokerImpl.java Log: Implement destroy() of local portlets Revision Changes Path 1.3 +27 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/PortletInvokerFactoryImpl.java Index: PortletInvokerFactoryImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/PortletInvokerFactoryImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PortletInvokerFactoryImpl.java 27 Jan 2004 09:56:37 -0000 1.2 +++ PortletInvokerFactoryImpl.java 2 Feb 2004 08:39:37 -0000 1.3 @@ -45,6 +45,12 @@ */ package org.apache.cocoon.portal.pluto.factory; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.container.ContainerUtil; import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.ContextException; @@ -52,6 +58,7 @@ import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.Serviceable; +import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.portal.pluto.om.PortletDefinitionImpl; import org.apache.pluto.factory.PortletInvokerFactory; import org.apache.pluto.invoker.PortletInvoker; @@ -67,7 +74,7 @@ */ public class PortletInvokerFactoryImpl extends AbstractFactory -implements PortletInvokerFactory, Serviceable, Contextualizable { +implements PortletInvokerFactory, Serviceable, Contextualizable, ThreadSafe, Disposable { /** The avalon context */ protected Context context; @@ -75,6 +82,9 @@ /** The service manager */ protected ServiceManager manager; + /** All local portlets */ + protected List localPortlets = Collections.synchronizedList(new ArrayList()); + /* (non-Javadoc) * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context) */ @@ -90,6 +100,20 @@ } /* (non-Javadoc) + * @see org.apache.avalon.framework.activity.Disposable#dispose() + */ + public void dispose() { + final Iterator i = this.localPortlets.iterator(); + while (i.hasNext()) { + LocalPortletInvokerImpl current = (LocalPortletInvokerImpl)i.next(); + current.destroy(); + } + this.localPortlets.clear(); + this.manager = null; + this.context = null; + } + + /* (non-Javadoc) * @see org.apache.pluto.factory.PortletInvokerFactory#getPortletInvoker(org.apache.pluto.om.portlet.PortletDefinition) */ public PortletInvoker getPortletInvoker(PortletDefinition portletDefinition) { @@ -103,6 +127,7 @@ invoker = ((PortletDefinitionImpl)portletDefinition).getLocalPortletInvoker(); if ( invoker == null ) { invoker = new LocalPortletInvokerImpl(portletDefinition, this.servletConfig); + this.localPortlets.add(invoker); ((PortletDefinitionImpl)portletDefinition).setLocalPortletInvoker(invoker); try { ContainerUtil.enableLogging(invoker, this.getLogger()); 1.3 +10 -1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java Index: LocalPortletInvokerImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- LocalPortletInvokerImpl.java 27 Jan 2004 09:56:38 -0000 1.2 +++ LocalPortletInvokerImpl.java 2 Feb 2004 08:39:37 -0000 1.3 @@ -188,4 +188,13 @@ this.portlet.init(portletConfig); } + /** + * Destroy the associated portlet + */ + public void destroy() { + if (this.portlet != null ) { + this.portlet.destroy(); + this.portlet = null; + } + } } From fgray@example.com Mon Feb 02 08:54:10 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 35602 invoked from network); 2 Feb 2004 08:54:10 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 08:54:10 -0000 Received: (qmail 69820 invoked by uid 500); 2 Feb 2004 08:53:43 -0000 Delivered-To: fgray@example.com Received: (qmail 69743 invoked by uid 500); 2 Feb 2004 08:53:43 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 69723 invoked by uid 500); 2 Feb 2004 08:53:43 -0000 Delivered-To: fgray@example.com Received: (qmail 69715 invoked from network); 2 Feb 2004 08:53:43 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 08:53:43 -0000 Received: (qmail 35534 invoked by uid 1638); 2 Feb 2004 08:54:07 -0000 Date: 2 Feb 2004 08:54:07 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/v2 ScriptableWidget.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bruno 2004/02/02 00:54:07 Modified: src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/v2 ScriptableWidget.java Log: Allow setting the JXPath based selection list too. Revision Changes Path 1.6 +14 -0 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/v2/ScriptableWidget.java Index: ScriptableWidget.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/v2/ScriptableWidget.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ScriptableWidget.java 30 Jan 2004 23:53:25 -0000 1.5 +++ ScriptableWidget.java 2 Feb 2004 08:54:07 -0000 1.6 @@ -639,6 +639,20 @@ } } + public void jsFunction_setSelectionList(Object objectArg, Object valuePathArg, Object labelPathArg) throws Exception { + if (delegate instanceof Field || + delegate instanceof MultiValueField) { + Object object = unwrap(objectArg); + String valuePath = Context.toString(valuePathArg); + String labelPath = Context.toString(labelPathArg); + if (delegate instanceof Field) { + ((Field)delegate).setSelectionList(object, valuePath, labelPath); + } else { + ((MultiValueField)delegate).setSelectionList(object, valuePath, labelPath); + } + } + } + static final Object[] WIDGET_CLASS_MAP = { Form.class, "Form", Field.class, "Field", From fgray@example.com Mon Feb 02 10:03:22 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 86026 invoked from network); 2 Feb 2004 10:03:21 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 10:03:21 -0000 Received: (qmail 5665 invoked by uid 500); 2 Feb 2004 10:02:54 -0000 Delivered-To: fgray@example.com Received: (qmail 5573 invoked by uid 500); 2 Feb 2004 10:02:54 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 5555 invoked by uid 500); 2 Feb 2004 10:02:53 -0000 Delivered-To: fgray@example.com Received: (qmail 5551 invoked from network); 2 Feb 2004 10:02:53 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 10:02:53 -0000 Received: (qmail 85970 invoked by uid 1692); 2 Feb 2004 10:03:19 -0000 Date: 2 Feb 2004 10:03:19 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto PortletContainerEnvironmentImpl.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N reinhard 2004/02/02 02:03:19 Modified: src/blocks/portal/java/org/apache/cocoon/portal/pluto PortletContainerEnvironmentImpl.java Log: - Java 1.3 doesn't support the constructur RuntimeException(String message, Exception ex) Revision Changes Path 1.2 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java Index: PortletContainerEnvironmentImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PortletContainerEnvironmentImpl.java 22 Jan 2004 14:01:21 -0000 1.1 +++ PortletContainerEnvironmentImpl.java 2 Feb 2004 10:03:18 -0000 1.2 @@ -164,7 +164,7 @@ service = (ContainerService)this.manager.lookup(key); this.services.put(key, service); } catch (ServiceException se) { - throw new RuntimeException("Unable to lookup service " + key, se); + throw new RuntimeException("Unable to lookup service " + key + ": " + se); } } } From fgray@example.com Mon Feb 02 10:26:47 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 1196 invoked from network); 2 Feb 2004 10:26:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 10:26:46 -0000 Received: (qmail 88785 invoked by uid 500); 2 Feb 2004 10:26:19 -0000 Delivered-To: fgray@example.com Received: (qmail 88725 invoked by uid 500); 2 Feb 2004 10:26:18 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 88701 invoked by uid 500); 2 Feb 2004 10:26:18 -0000 Delivered-To: fgray@example.com Received: (qmail 88693 invoked from network); 2 Feb 2004 10:26:18 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 10:26:18 -0000 Received: (qmail 1148 invoked by uid 1260); 2 Feb 2004 10:26:43 -0000 Date: 2 Feb 2004 10:26:43 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto PortletContainerEnvironmentImpl.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cziegeler 2004/02/02 02:26:43 Modified: src/blocks/portal/java/org/apache/cocoon/portal/pluto PortletContainerEnvironmentImpl.java Log: Thanks for spotting this! Let's use the CascadingRuntimeException Revision Changes Path 1.3 +3 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java Index: PortletContainerEnvironmentImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PortletContainerEnvironmentImpl.java 2 Feb 2004 10:03:18 -0000 1.2 +++ PortletContainerEnvironmentImpl.java 2 Feb 2004 10:26:43 -0000 1.3 @@ -49,6 +49,7 @@ import java.util.Iterator; import java.util.Map; +import org.apache.avalon.framework.CascadingRuntimeException; import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.activity.Initializable; import org.apache.avalon.framework.container.ContainerUtil; @@ -164,7 +165,7 @@ service = (ContainerService)this.manager.lookup(key); this.services.put(key, service); } catch (ServiceException se) { - throw new RuntimeException("Unable to lookup service " + key + ": " + se); + throw new CascadingRuntimeException("Unable to lookup service " + key, se); } } } From fgray@example.com Mon Feb 02 11:49:02 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 61772 invoked from network); 2 Feb 2004 11:49:01 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 11:49:01 -0000 Received: (qmail 50055 invoked by uid 500); 2 Feb 2004 11:48:59 -0000 Delivered-To: fgray@example.com Received: (qmail 49995 invoked by uid 500); 2 Feb 2004 11:48:59 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 49957 invoked by uid 500); 2 Feb 2004 11:48:59 -0000 Delivered-To: fgray@example.com Received: (qmail 49942 invoked from network); 2 Feb 2004 11:48:58 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 11:48:58 -0000 Received: (qmail 14358 invoked by uid 1672); 2 Feb 2004 10:48:59 -0000 Date: 2 Feb 2004 10:48:59 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components JdoPMFImpl.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N joerg 2004/02/02 02:48:59 Modified: src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components JdoPMFImpl.java Log: imports Revision Changes Path 1.3 +1 -2 cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components/JdoPMFImpl.java Index: JdoPMFImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/jdo/components/JdoPMFImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JdoPMFImpl.java 1 Feb 2004 21:37:30 -0000 1.2 +++ JdoPMFImpl.java 2 Feb 2004 10:48:59 -0000 1.3 @@ -58,7 +58,6 @@ import org.apache.avalon.framework.configuration.Configurable; import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.ojb.components.AbstractOjbImpl; import org.apache.ojb.jdori.sql.OjbStorePMF; From fgray@example.com Mon Feb 02 11:50:25 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 62445 invoked from network); 2 Feb 2004 11:50:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 11:50:24 -0000 Received: (qmail 54001 invoked by uid 500); 2 Feb 2004 11:50:23 -0000 Delivered-To: fgray@example.com Received: (qmail 53840 invoked by uid 500); 2 Feb 2004 11:50:22 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 53826 invoked by uid 500); 2 Feb 2004 11:50:22 -0000 Delivered-To: fgray@example.com Received: (qmail 53815 invoked from network); 2 Feb 2004 11:50:22 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 11:50:22 -0000 Received: (qmail 36325 invoked by uid 1509); 2 Feb 2004 11:23:41 -0000 Date: 2 Feb 2004 11:23:41 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/test/org/apache/cocoon/matching - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N stephan 2004/02/02 03:23:41 cocoon-2.1/src/test/org/apache/cocoon/matching - New directory From fgray@example.com Mon Feb 02 11:52:25 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 63848 invoked from network); 2 Feb 2004 11:52:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 11:52:25 -0000 Received: (qmail 61478 invoked by uid 500); 2 Feb 2004 11:52:24 -0000 Delivered-To: fgray@example.com Received: (qmail 61425 invoked by uid 500); 2 Feb 2004 11:52:23 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 61409 invoked by uid 500); 2 Feb 2004 11:52:23 -0000 Delivered-To: fgray@example.com Received: (qmail 61400 invoked from network); 2 Feb 2004 11:52:23 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 11:52:23 -0000 Received: (qmail 15349 invoked by uid 1041); 2 Feb 2004 10:50:23 -0000 Date: 2 Feb 2004 10:50:23 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/tools/bin create-repository-jars.sh X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N giacomo 2004/02/02 02:50:23 Modified: tools/bin create-repository-jars.sh Log: fixed for more shells than I have :-) Revision Changes Path 1.3 +17 -17 cocoon-2.1/tools/bin/create-repository-jars.sh Index: create-repository-jars.sh =================================================================== RCS file: /home/cvs/cocoon-2.1/tools/bin/create-repository-jars.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -b -u -r1.2 -r1.3 --- create-repository-jars.sh 2 Feb 2004 10:38:34 -0000 1.2 +++ create-repository-jars.sh 2 Feb 2004 10:50:23 -0000 1.3 @@ -9,19 +9,19 @@ # - copy all jars and the war to the appropriate locations (repository structure) # The cvs repository name -if [ "$REPOSITORY_NAME" == "" ]; then +if [ "$REPOSITORY_NAME" = "" ]; then REPOSITORY_NAME=cocoon-2.1 fi # What is the default revision/branch/tag to use # In case of a HEAD revision a SNAPSHOT version will be created and # any old snapshots will be removed to save some space -if [ "$REVISION" == "" ]; then +if [ "$REVISION" = "" ]; then REVISION=HEAD fi # What is the default CVSROOT to be used for checkout -if [ "$CVSROOT" == "" ]; then +if [ "$CVSROOT" = "" ]; then CVSROOT=":pserver:fgray@example.com:/home/cvspublic" fi @@ -33,7 +33,7 @@ # If it exists it will do a # 'cvs upd -dPACr $REVISION' # in there to update to the requested revision (see REVISION below) -if [ "$LOCAL_REPOSITORY" == "" ]; then +if [ "$LOCAL_REPOSITORY" = "" ]; then LOCAL_REPOSITORY=$HOME/cvs/cocoon-2.1 fi @@ -43,18 +43,18 @@ fi # On which host should the artifacts be published -if [ "$REMOTEHOST" == "" ]; then +if [ "$REMOTEHOST" = "" ]; then REMOTEHOST=www.apache.org fi # Where is the path on the remote host the repository is located at -if [ "$REMOTEPATH" == "" ]; then +if [ "$REMOTEPATH" = "" ]; then REMOTEPATH=/www/www.apache.org/dist/java-repository/cocoon fi # ------- NO NEED TO CHANGE ANYTHING BELOW HERE ---------- -if [ "$JAVA_HOME" == "" ]; then +if [ "$JAVA_HOME" = "" ]; then echo "You need to set the JAVA_HOME environment variable to the installed JDK 1.3" exit 1 fi @@ -95,7 +95,7 @@ # check if the local repository exists and do a checkout/update accordingly if [ -d "$LOCAL_REPOSITORY" ]; then cd $LOCAL_REPOSITORY - if [ $NOCVS -eq 0 ]; then + if [ $NOCVS = 0 ]; then echo echo "updating the local repository at $LOCAL_REPOSITORY with" echo " cvs up -dPACr $REVISION" @@ -119,7 +119,7 @@ # cleanup the repository, prepare and do a build if not suppressed by command line option RC=0 # set in advace in case we don't do a build -if [ $NOBUILD -eq 0 ]; then +if [ $NOBUILD = 0 ]; then # build the local.blocks.properties file echo echo "generating local.blocks.properties file" @@ -143,7 +143,7 @@ # build everything echo - if [ $NOCLEAN -eq 0 ]; then + if [ $NOCLEAN = 0 ]; then echo "clean the local repository, build the webapp, and the war files" CLEAN=clean-dist else @@ -154,7 +154,7 @@ ./build.sh $CLEAN webapp war | tee $LOCAL_REPOSITORY/build.log # The build script dosn't report on failures so we have to do that by hand tail -10 $LOCAL_REPOSITORY/build.log|grep "BUILD SUCCESSFUL" - if [ $? -eq 0 ]; then + if [ $? = 0 ]; then RC=0 else RC=1 @@ -168,7 +168,7 @@ # copy all the jars produced over to the iremote repository space VERSION=`ls build | grep cocoon | sed s/cocoon-//` -if [ "$REVISION" == "HEAD" ]; then +if [ "$REVISION" = "HEAD" ]; then TVERSION=`date "+%Y%m%d.%H%M%S"` else TVERSION=$VERSION @@ -182,13 +182,13 @@ else BLOCKPART=`echo $FILE | sed 's/cocoon//'` fi - if [ "$REVISION" == "HEAD" ]; then + if [ "$REVISION" = "HEAD" ]; then # remove all snapshots in the remote repository SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/jars/cocoon$BLOCKPART-????????.??????.jar 2>/dev/null"` fi scp $i $REMOTEHOST:$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar ssh $REMOTEHOST "chmod g+w $REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar" - if [ "$REVISION" == "HEAD" ]; then + if [ "$REVISION" = "HEAD" ]; then if [ ! -z "$SNAPSHOT" ]; then RM="rm $SNAPSHOT;" else @@ -203,11 +203,11 @@ # copy the war file to the web space WAR=build/cocoon-$VERSION/cocoon.war -if [ "$REVISION" == "HEAD" ]; then +if [ "$REVISION" = "HEAD" ]; then SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/wars/cocoon-war-????????.??????.war 2>/dev/null"` fi scp $WAR $REMOTEHOST:$REMOTEPATH/wars/cocoon-war-$TVERSION.war -if [ "$REVISION" == "HEAD" ]; then +if [ "$REVISION" = "HEAD" ]; then if [ ! -z "$SNAPSHOT" ]; then RM="rm $SNAPSHOT;" else From fgray@example.com Mon Feb 02 11:52:41 2004 Return-Path: <fgray@example.com> Delivered-To: fgray@example.com Received: (qmail 64072 invoked from network); 2 Feb 2004 11:52:41 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Feb 2004 11:52:41 -0000 Received: (qmail 62383 invoked by uid 500); 2 Feb 2004 11:52:39 -0000 Delivered-To: fgray@example.com Received: (qmail 62302 invoked by uid 500); 2 Feb 2004 11:52:38 -0000 Mailing-List: contact fgray@example.com; run by ezmlm Precedence: bulk Reply-To: fgray@example.com list-help: <mailto:fgray@example.com> list-unsubscribe: <mailto:fgray@example.com> list-post: <mailto:fgray@example.com> Delivered-To: mailing list fgray@example.com Received: (qmail 62287 invoked by uid 500); 2 Feb 2004 11:52:38 -0000 Delivered-To: fgray@example.com Received: (qmail 62277 invoked from network); 2 Feb 2004 11:52:38 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Feb 2004 11:52:38 -0000 Received: (qmail 37780 invoked by uid 1509); 2 Feb 2004 11:25:57 -0000 Date: 2 Feb 2004 11:25:57 -0000 Message-ID: <fgray@example.com> From: fgray@example.com To: fgray@example.com Subject: cvs commit: cocoon-2.1/src/test/org/apache/cocoon/matching WildcardURIMatcherTestCase.java WildcardURIMatcherTestCase.xtest X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N stephan 2004/02/02 03:25:57 Modified: src/test/org/apache/cocoon SitemapComponentTestCase.java Added: src/test/org/apache/cocoon/matching WildcardURIMatcherTestCase.java WildcardURIMatcherTestCase.xtest Log: Add test method for Matchers, and example for the WildcardURIMatcher. Thanks to Wojciech Gdela, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26441 Revision Changes Path 1.3 +46 -1 cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java Index: SitemapComponentTestCase.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SitemapComponentTestCase.java 23 Dec 2003 15:28:33 -0000 1.2 +++ SitemapComponentTestCase.java 2 Feb 2004 11:25:57 -0000 1.3 @@ -75,6 +75,7 @@ import org.apache.cocoon.environment.mock.MockRequest; import org.apache.cocoon.environment.mock.MockResponse; import org.apache.cocoon.generation.Generator; +import org.apache.cocoon.matching.Matcher; import org.apache.cocoon.transformation.Transformer; import org.apache.cocoon.serialization.Serializer; import org.apache.cocoon.xml.WhitespaceFilter; @@ -149,6 +150,50 @@ redirector.reset(); } + /** + * Match with a pattern. + * + * @param type Hint of the matcher. + * @param pattern Pattern for the matcher. + * @param parameters Matcher parameters. + */ + public final Map match(String type, String pattern, Parameters parameters) { + + ComponentSelector selector = null; + Matcher matcher = null; + SourceResolver resolver = null; + + Map result = null; + try { + selector = (ComponentSelector) this.manager.lookup(Matcher.ROLE + + "Selector"); + assertNotNull("Test lookup of matcher selector", selector); + + resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE); + assertNotNull("Test lookup of source resolver", resolver); + + assertNotNull("Test if matcher name is not null", type); + matcher = (Matcher) selector.select(type); + assertNotNull("Test lookup of matcher", matcher); + + result = matcher.match(pattern, objectmodel, parameters); + + } catch (ComponentException ce) { + getLogger().error("Could not retrieve generator", ce); + fail("Could not retrieve generator: " + ce.toString()); + } catch (Exception e) { + getLogger().error("Could not execute test", e); + fail("Could not execute test: " + e); + } finally { + if (matcher != null) { + selector.release(matcher); + } + this.manager.release(selector); + this.manager.release(resolver); + } + return result; + } + /** * Perform the action component. * 1.1 cocoon-2.1/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java Index: WildcardURIMatcherTestCase.java =================================================================== package org.apache.cocoon.matching; import java.util.Map; import org.apache.avalon.framework.parameters.Parameters; import org.apache.cocoon.SitemapComponentTestCase; public
{'source': 'Apache Software Foundation Public Mail Archives'}