You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by mp...@apache.org on 2003/06/06 14:08:44 UTC
cvs commit: db-torque/src/java/org/apache/torque TorqueComponent.java
mpoeschl 2003/06/06 05:08:44
Modified: src/generator project.xml
. project.xml
Added: src/conf roleConfiguration.xml componentConfiguration.xml
src/java/org/apache/torque TorqueComponent.java
Log:
update dependencies
add Avalon component + sample config
Revision Changes Path
1.1 db-torque/src/conf/roleConfiguration.xml
Index: roleConfiguration.xml
===================================================================
<!-- This configuration file for Avalon components is used for testing the TestComponent -->
<role-list>
<role
name="org.apache.torque.TorqueComponent"
shorthand="TorqueComponent"
default-class="org.apache.torque.TorqueComponent"/>
</role-list>
1.1 db-torque/src/conf/componentConfiguration.xml
Index: componentConfiguration.xml
===================================================================
<componentConfig>
<TorqueComponent>
<configFile>/WEB-INF/conf/Torque.properties</configFile>
</TorqueComponent>
</componentConfig>
1.12 +2 -2 db-torque/src/generator/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/db-torque/src/generator/project.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- project.xml 30 Apr 2003 22:27:25 -0000 1.11
+++ project.xml 6 Jun 2003 12:08:44 -0000 1.12
@@ -32,12 +32,12 @@
</dependency>
<dependency>
<id>commons-logging</id>
- <version>1.0.2</version>
+ <version>1.0.3</version>
<url>http://jakarta.apache.org/commons/</url>
</dependency>
<dependency>
<id>velocity</id>
- <version>1.3</version>
+ <version>1.3.1</version>
<url>http://jakarta.apache.org/velocity/</url>
</dependency>
<dependency>
1.88 +3 -5 db-torque/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/db-torque/project.xml,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- project.xml 14 May 2003 20:13:22 -0000 1.87
+++ project.xml 6 Jun 2003 12:08:44 -0000 1.88
@@ -188,13 +188,11 @@
</contributors>
<dependencies>
-<!--
<dependency>
<id>avalon-framework</id>
<version>4.1.4</version>
<url>http://jakarta.apache.org/avalon/</url>
</dependency>
--->
<dependency>
<id>commons-beanutils</id>
<version>1.6.1</version>
@@ -207,7 +205,7 @@
</dependency>
<dependency>
<id>commons-configuration</id>
- <version>SNAPSHOT</version>
+ <version>1.0-dev-3.20030603.101200</version>
<url>http://jakarta.apache.org/commons/</url>
</dependency>
<dependency>
@@ -222,7 +220,7 @@
</dependency>
<dependency>
<id>commons-logging</id>
- <version>1.0.2</version>
+ <version>1.0.3</version>
<url>http://jakarta.apache.org/commons/</url>
</dependency>
<dependency>
@@ -247,7 +245,7 @@
</dependency>
<dependency>
<id>log4j</id>
- <version>1.2.7</version>
+ <version>1.2.8</version>
<url>http://jakarta.apache.org/log4j/</url>
</dependency>
<dependency>
1.1 db-torque/src/java/org/apache/torque/TorqueComponent.java
Index: TorqueComponent.java
===================================================================
package org.apache.torque;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, 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" and "Apache Software Foundation" and
* "Apache Turbine" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Turbine", 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 (INCLUDING, 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. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
/**
* Avalon component for Torque.
*
* @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
* @version $Id: TorqueComponent.java,v 1.1 2003/06/06 12:08:44 mpoeschl Exp $
*/
public class TorqueComponent implements Configurable, Initializable, Disposable
{
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration) throws ConfigurationException
{
String configFile = configuration.getChild("configfile").getValue();
try
{
Torque.init(configFile);
}
catch (TorqueException tex)
{
throw new ConfigurationException("Torque could not be configured", tex);
}
}
/**
* @see org.apache.avalon.framework.activity.Initializable#initialize()
*/
public void initialize() throws Exception
{
Torque torque = new Torque();
torque.initialize();
}
/**
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
public void dispose()
{
Torque torque = new Torque();
torque.dispose();
}
}