db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: db-ojb/profile hsqldb-commons-sql.profile
Date Thu, 29 Jul 2004 20:33:43 GMT
tomdz       2004/07/29 13:33:43

  Modified:    src/java/org/apache/ojb/broker/util/dbhandling
                        DatabaseHandlingTask.java
               .        build.properties
  Added:       profile  hsqldb-commons-sql.profile
  Log:
  Finally got the common-sql dbhandling to work with hsqldb
  
  Revision  Changes    Path
  1.5       +3 -2      db-ojb/src/java/org/apache/ojb/broker/util/dbhandling/DatabaseHandlingTask.java
  
  Index: DatabaseHandlingTask.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/dbhandling/DatabaseHandlingTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DatabaseHandlingTask.java	27 Jul 2004 23:14:19 -0000	1.4
  +++ DatabaseHandlingTask.java	29 Jul 2004 20:33:43 -0000	1.5
  @@ -772,8 +772,9 @@
           // However we're being nice and deregister the classloader afterwards
           ClassLoader sysClassLoader = Thread.currentThread().getContextClassLoader();
   
  -        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
  -        ClassHelper.setClassLoader(getClass().getClassLoader());
  +        AntClassLoader newClassLoader = new AntClassLoader(getClass().getClassLoader(),
true);
  +        Thread.currentThread().setContextClassLoader(newClassLoader);
  +        ClassHelper.setClassLoader(newClassLoader);
   
           DatabaseHandling handling = createDatabaseHandler();
   
  
  
  
  1.67      +4 -1      db-ojb/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/db-ojb/build.properties,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- build.properties	8 Jul 2004 02:35:40 -0000	1.66
  +++ build.properties	29 Jul 2004 20:33:43 -0000	1.67
  @@ -22,6 +22,9 @@
   # implemented profiles:
   #
   profile=hsqldb
  +# Use this when running the unit tests with the commons-sql dbhandling:
  +#profile=hsqldb-commons-sql
  +
   # use the mssqldb-JSQLConnect profile for Microsoft SQL Server and
   # you will automatically JSQLConnect driver, from http://www.j-netdirect.com/
   # MBAIRD: This is my driver of preference for MS SQL Server, I find the OEM'd
  
  
  
  1.1                  db-ojb/profile/hsqldb-commons-sql.profile
  
  Index: hsqldb-commons-sql.profile
  ===================================================================
  #<!--
  #/* Copyright 2002-2004 The Apache Software Foundation
  # *
  # * Licensed 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.
  # */
  #-->
  # location of jar that you will be using for testing
  # so that it can be copied into the dist/lib directory.
  
  torque.testDatabaseJar = ${lib.repo}/hsqldb.jar
  torque.idMethod = idbroker
  torque.defaultDatabase = bookstore
  
  # -------------------------------------------------------------------
  #
  # T O R Q U E  C O N F I G U R A T I O N  F I L E
  #
  # -------------------------------------------------------------------
  
  project = ojbtest
  
  # -------------------------------------------------------------------
  #
  #  T A R G E T  D A T A B A S E
  #
  # -------------------------------------------------------------------
  
  database = hypersonic
  
  # -------------------------------------------------------------------
  #
  #  O B J E C T  M O D E L  I N F O R M A T I O N
  #
  # -------------------------------------------------------------------
  # These settings will allow you to customize the way your
  # Peer-based object model is created.
  # -------------------------------------------------------------------
  # addSaveMethod=true adds tracking code to determine how to save objects
  #
  # addGetByNameMethod=true adds methods to get fields by name/position
  #
  # complexObjectModel=true generates an om with collection support
  #
  # addTimeStamp=true puts time stamps in generated files
  #
  # addIntakeRetrievable=implement Intake's Retrievable interface
  # -------------------------------------------------------------------
  
  targetPackage=org.apache.torque.test
  basePrefix=Base
  addSaveMethod=true
  addGetByNameMethod=true
  complexObjectModel=true
  addTimeStamp=true
  addIntakeRetrievable=false
  useManagers=true
  
  # -------------------------------------------------------------------
  #
  #  D A T A B A S E  S E T T I N G S
  #
  # -------------------------------------------------------------------
  # JDBC connection settings. This is used by the JDBCToXML task that
  # will create an XML database schema from JDBC metadata. These
  # settings are also used by the SQL Ant task to initialize your
  # Turbine system with the generated SQL.
  # -------------------------------------------------------------------
  
  dbmsName = Hsqldb
  jdbcLevel = 2.0
  urlProtocol = jdbc
  urlSubprotocol = hsqldb
  urlDbalias = E:/projects/ojb/db-ojb-dev/target/test/ojb
  
  
  createDatabaseUrl = ${urlProtocol}:${urlSubprotocol}:target/test/OJB
  buildDatabaseUrl = ${urlProtocol}:${urlSubprotocol}:target/test/OJB
  databaseUrl = ${urlProtocol}:${urlSubprotocol}:target/test/OJB
  databaseDriver = org.hsqldb.jdbcDriver
  databaseUser = sa
  databasePassword =
  databaseHost = 127.0.0.1
  
  
  # Tells JDBC task that javaName attribute for the tables and columns
  # should be made same as SQL name.
  sameJavaName=false
  
  # -------------------------------------------------------------------
  #
  #  D O C U M E N T A T I O N   S E T T I N G S
  #
  # -------------------------------------------------------------------
  # These settings will allow you to customize the way your schema
  # documentation is created.
  # Valid formats are: html, anakia (for use with jakarta-site2)
  # -------------------------------------------------------------------
  documentationFormat=html
  
  # -------------------------------------------------------------------
  # You should NOT have to edit anything below here.
  # -------------------------------------------------------------------
  
  # -------------------------------------------------------------------
  #
  #  T E M P L A T E  P A T H
  #
  # -------------------------------------------------------------------
  
  templatePath = ../templates
  
  # -------------------------------------------------------------------
  #
  #  C O N T R O L  T E M P L A T E S
  #
  # -------------------------------------------------------------------
  
  SQLControlTemplate = sql/base/Control.vm
  OMControlTemplate = om/Control.vm
  idTableControlTemplate = sql/id-table/Control.vm
  DataDTDControlTemplate = data/Control.vm
  DataDumpControlTemplate = data/dump/Control.vm
  DataSQLControlTemplate = sql/load/Control.vm
  DocControlTemplate = doc/Control.vm
  
  # -------------------------------------------------------------------
  #
  #  O U T P U T  D I R E C T O R Y
  #
  # -------------------------------------------------------------------
  
  outputDirectory=src
  
  # -------------------------------------------------------------------
  #
  #  S C H E M A  D I R E C T O R Y
  #
  # -------------------------------------------------------------------
  
  schemaDirectory=schema
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message