From bdddc3b4eeeea1e75347bf2012aefc4a9f781d4f Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 29 Jun 2007 19:51:23 +0000 Subject: [PATCH] SVN layout migration for core/branches/Branch_3_2 git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@11761 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- etc/CacheSequences.xml | 116 +++++++ etc/cvs-dup-eol-fixer | 119 +++++++ etc/ehcache.xml | 88 +++++ etc/hibernate-service.xml | 94 ++++++ etc/hibernate.cfg.xml | 14 + etc/hibernate.properties | 528 ++++++++++++++++++++++++++++++ etc/hibernate.properties.template | 488 +++++++++++++++++++++++++++ etc/log4j.properties | 47 +++ etc/oscache.properties | 110 +++++++ etc/treecache.xml | 119 +++++++ 10 files changed, 1723 insertions(+) create mode 100644 etc/CacheSequences.xml create mode 100644 etc/cvs-dup-eol-fixer create mode 100644 etc/ehcache.xml create mode 100644 etc/hibernate-service.xml create mode 100644 etc/hibernate.cfg.xml create mode 100644 etc/hibernate.properties create mode 100644 etc/hibernate.properties.template create mode 100644 etc/log4j.properties create mode 100644 etc/oscache.properties create mode 100644 etc/treecache.xml diff --git a/etc/CacheSequences.xml b/etc/CacheSequences.xml new file mode 100644 index 0000000000..44a698ba43 --- /dev/null +++ b/etc/CacheSequences.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + +
Counters can be incremented by calling the stored procedure BEFORE the insert +using syntax like: call InterSystems.Sequences_GetNext("Name"), or using standard SQL, +or part of an SQL select like: +

select InterSystems.Sequences_GetNext(sequencename) from InterSystems.Sequences where Name='sequencename' +
+
Can also be queried as table InterSystems.Sequences, but that data is actually stored +in ^InterSystems.Sequences. Note use of %CacheSqlStorage to speed incrementing. +
+
Note: to make the Sequences system-wide, simply map ^InterSystems.Sequences* to a +common location +
+
Note: counter names are case-insensitive and force to uppercase on disk. +

Merge of ideas by JSL and APC 09/2005 +]]>
+persistent +1 +custom +%Persistent +60172,44404.735854 +60137,56752.747989 +0 + + +1 +1 +Name +1 + + + + +The name of the sequence or identity, forced to uppercase. Typically a tablename +(MSSQL identities) or an Oracle-like Sequence name +%String + + + + + +Last assigned value for this Name. Initial +%Integer +0 + + + + +Returns an integer value with next assigned counter. +1 +name:%String +%Integer +1 + + + + + +Hibernate procedure to intialise a sequence, but can be used at any time +1 +SequenceName:%String +%Integer +1 + + + + + +Hibernate procedure to kill a sequence, but can be used at any time +1 +SequenceName:%String +%Integer +1 + + + + +%CacheSQLStorage +^InterSystems.SequencesS + + +1 + + +data +^InterSystems.Sequences +delimited + +{Name} + + + + +
+ +
diff --git a/etc/cvs-dup-eol-fixer b/etc/cvs-dup-eol-fixer new file mode 100644 index 0000000000..6da141eb9c --- /dev/null +++ b/etc/cvs-dup-eol-fixer @@ -0,0 +1,119 @@ +#!perl -w +############################################################################### +# +# Name: cvs-dup-eol-fixer +# Author: Steve Ebersole +# +# Description: +# Script to fix the bad end-of-line issues that sometimes occur after checking +# out Hibernate source from the sourceforge CVS where everything is essentially +# double-spaced. What I found however, at least on my environment, was that +# this was actually caused by two carriage-return characters (i.e., \r\r) being +# substituted for all line endings. This script works under that assumption +# and fixes only that issue. +# +############################################################################### + + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# This subroutine is essentially a recursive directory searcher. It does also +# filter out anything from the CVS local admin dirs. +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +sub parsedir($) { + my @results = (); + my $dir = shift@_; + opendir(DIRHANDLE, $dir) or die("Unable to open dir [$dir] for parsing"); + my @dir_contents = readdir(DIRHANDLE); + closedir(DIRHANDLE) or warn("Unable to close dir [$dir]"); + + foreach $element (@dir_contents) { + if ( $element eq "." || $element eq ".." ) { + # Nothing to do here... + } + elsif ($element =~ /CVS/) { + # nothing to do here... + } + # assume no extension means a directory + elsif ($element =~ /\./) { + if ($element =~ /\.java/) { + push( @results, "$dir/$element" ); + } + } + else { + push( @results, parsedir("$dir/$element") ); + } + } + + return @results; +} + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# This subroutine basically checks to see if the file needs to be fixed, based +# mainly on the number of adjacent (i.e., repeating) cariage-return characters. +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +sub checkfile($) { + my $file_name = shift @_; + my $loop_count = 0; + my $adj_cr_count = 0; + my $line_count = 0; + + open( INFILEHANDLE, "<$file_name" ) or die( "Unable to open file [$file_name] for check" ); + while () { + $loop_count++; + + @matches = m/\r\r/g; + $adj_cr_count = $adj_cr_count + $#matches + 1; + + $line_count = $line_count + tr/\r\n/\r\n/; + } + close( INFILEHANDLE ); + + my $half_line_count = $line_count / 2; + return $loop_count == 1 && int($half_line_count) <= $adj_cr_count && $adj_cr_count <= int($half_line_count + 1); +} + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# This is the subroutine where the file actually gets fixed. It is also +# responsible for making sure files get backed up before doing the fix. +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +sub fixfile($) { + my $file_name = shift @_; + my $file_text = ""; + + open( INFILEHANDLE, "<$file_name" ) or die( "Unable to open file [$file_name] for fix input" ); + while () { + s/\r\r/\n/g; + $file_text .= $_; + } + close( INFILEHANDLE ); + + my $new_file_name = $file_name . ".old"; + rename( $file_name, $new_file_name ); + + open( OUTFILEHANDLE, ">$file_name" ) or die( "Unable to open file [$file_name] for fix output" ); + print( OUTFILEHANDLE $file_text ); + close( OUTFILEHANDLE ); +} + + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Start main process +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +open( REPORTFILEHANDLE, ">cvs-dup-eol-fixer.report" ) or die( "Unable to open report file" ); + +my $basedir = shift @ARGV; +print( REPORTFILEHANDLE "Using basedir : $basedir\n"); + +my @file_list = parsedir($basedir); + +foreach $file_name (@file_list) { + print( REPORTFILEHANDLE "Checking file [$file_name]\n" ); + if ( checkfile($file_name) ) { + print( REPORTFILEHANDLE " Need to fix file : $file_name\n" ); + fixfile($file_name); + } +} + +close(REPORTFILEHANDLE) or warn("Unable to close report file"); + +__END__ diff --git a/etc/ehcache.xml b/etc/ehcache.xml new file mode 100644 index 0000000000..b951963768 --- /dev/null +++ b/etc/ehcache.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + --> + + + + diff --git a/etc/hibernate-service.xml b/etc/hibernate-service.xml new file mode 100644 index 0000000000..98f3ff800d --- /dev/null +++ b/etc/hibernate-service.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + jca/test + + + + + + + + ConnectionURL + java.lang.String + jdbc:mysql:///test + + + DriverClass + java.lang.String + com.mysql.jdbc.Driver + + + Password + java.lang.String + + + + UserName + java.lang.String + dbradby + + + Dialect + java.lang.String + org.hibernate.dialect.MySQLDialect + + + MapResources + java.lang.String + Simple.hbm.xml + + + + + + + jboss.jca:service=RARDeployment,name=Hibernate Resource Adapter + + + + + + + + 0 + 50 + 5000 + 15 + + ByContainer + + + + jboss.jca:service=CachedConnectionManager + + jboss.security:service=JaasSecurityManager + + + jboss.jca:service=RARDeployer + java:/TransactionManager + + + + diff --git a/etc/hibernate.cfg.xml b/etc/hibernate.cfg.xml new file mode 100644 index 0000000000..ddb4781625 --- /dev/null +++ b/etc/hibernate.cfg.xml @@ -0,0 +1,14 @@ + + + + + true + + + + \ No newline at end of file diff --git a/etc/hibernate.properties b/etc/hibernate.properties new file mode 100644 index 0000000000..1c3b3d6855 --- /dev/null +++ b/etc/hibernate.properties @@ -0,0 +1,528 @@ +###################### +### Query Language ### +###################### + +## define query language constants / function names + +hibernate.query.substitutions yes 'Y', no 'N' + + +## select the classic query parser + +#hibernate.query.factory_class org.hibernate.hql.classic.ClassicQueryTranslatorFactory + + + +################# +### Platforms ### +################# + +## JNDI Datasource + +#hibernate.connection.datasource jdbc/test +#hibernate.connection.username db2 +#hibernate.connection.password db2 + + +## HypersonicSQL + +hibernate.dialect org.hibernate.dialect.HSQLDialect +hibernate.connection.driver_class org.hsqldb.jdbcDriver +hibernate.connection.username sa +hibernate.connection.password +hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate +#hibernate.connection.url jdbc:hsqldb:hsql://localhost +#hibernate.connection.url jdbc:hsqldb:test + +## H2 (www.h2database.com) +#hibernate.dialect org.hibernate.dialect.H2Dialect +#hibernate.connection.driver_class org.h2.Driver +#hibernate.connection.username sa +#hibernate.connection.password +#hibernate.connection.url jdbc:h2:mem:./build/db/h2/hibernate +#hibernate.connection.url jdbc:h2:testdb/h2test +#hibernate.connection.url jdbc:h2:mem:imdb1 +#hibernate.connection.url jdbc:h2:tcp://dbserv:8084/sample; +#hibernate.connection.url jdbc:h2:ssl://secureserv:8085/sample; +#hibernate.connection.url jdbc:h2:ssl://secureserv/testdb;cipher=AES + +## MySQL + +#hibernate.dialect org.hibernate.dialect.MySQLDialect +#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect +#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect +#hibernate.connection.driver_class com.mysql.jdbc.Driver +#hibernate.connection.url jdbc:mysql:///test +#hibernate.connection.username gavin +#hibernate.connection.password + + +## Oracle + +#hibernate.dialect org.hibernate.dialect.OracleDialect +#hibernate.dialect org.hibernate.dialect.Oracle9Dialect +#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver +#hibernate.connection.username ora +#hibernate.connection.password ora +#hibernate.connection.url jdbc:oracle:thin:@localhost:1521:orcl +#hibernate.connection.url jdbc:oracle:thin:@localhost:1522:XE + + +## PostgreSQL + +#hibernate.dialect org.hibernate.dialect.PostgreSQLDialect +#hibernate.connection.driver_class org.postgresql.Driver +#hibernate.connection.url jdbc:postgresql:template1 +#hibernate.connection.username pg +#hibernate.connection.password + + +## DB2 + +#hibernate.dialect org.hibernate.dialect.DB2Dialect +#hibernate.connection.driver_class com.ibm.db2.jcc.DB2Driver +#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver +#hibernate.connection.url jdbc:db2://localhost:50000/somename +#hibernate.connection.url jdbc:db2:somename +#hibernate.connection.username db2 +#hibernate.connection.password db2 + +## TimesTen + +#hibernate.dialect org.hibernate.dialect.TimesTenDialect +#hibernate.connection.driver_class com.timesten.jdbc.TimesTenDriver +#hibernate.connection.url jdbc:timesten:direct:test +#hibernate.connection.username +#hibernate.connection.password + +## DB2/400 + +#hibernate.dialect org.hibernate.dialect.DB2400Dialect +#hibernate.connection.username user +#hibernate.connection.password password + +## Native driver +#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver +#hibernate.connection.url jdbc:db2://systemname + +## Toolbox driver +#hibernate.connection.driver_class com.ibm.as400.access.AS400JDBCDriver +#hibernate.connection.url jdbc:as400://systemname + + +## Derby (not supported!) + +#hibernate.dialect org.hibernate.dialect.DerbyDialect +#hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver +#hibernate.connection.username +#hibernate.connection.password +#hibernate.connection.url jdbc:derby:build/db/derby/hibernate;create=true + + +## Sybase + +#hibernate.dialect org.hibernate.dialect.SybaseDialect +#hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver +#hibernate.connection.username sa +#hibernate.connection.password sasasa +#hibernate.connection.url jdbc:sybase:Tds:co3061835-a:5000/tempdb + + +## Mckoi SQL + +#hibernate.dialect org.hibernate.dialect.MckoiDialect +#hibernate.connection.driver_class com.mckoi.JDBCDriver +#hibernate.connection.url jdbc:mckoi:/// +#hibernate.connection.url jdbc:mckoi:local://C:/mckoi1.0.3/db.conf +#hibernate.connection.username admin +#hibernate.connection.password nimda + + +## SAP DB + +#hibernate.dialect org.hibernate.dialect.SAPDBDialect +#hibernate.connection.driver_class com.sap.dbtech.jdbc.DriverSapDB +#hibernate.connection.url jdbc:sapdb://localhost/TST +#hibernate.connection.username TEST +#hibernate.connection.password TEST +#hibernate.query.substitutions yes 'Y', no 'N' + + +## MS SQL Server + +#hibernate.dialect org.hibernate.dialect.SQLServerDialect +#hibernate.connection.username sa +#hibernate.connection.password sa + +## JSQL Driver +#hibernate.connection.driver_class com.jnetdirect.jsql.JSQLDriver +#hibernate.connection.url jdbc:JSQLConnect://1E1/test + +## JTURBO Driver +#hibernate.connection.driver_class com.newatlanta.jturbo.driver.Driver +#hibernate.connection.url jdbc:JTurbo://1E1:1433/test + +## WebLogic Driver +#hibernate.connection.driver_class weblogic.jdbc.mssqlserver4.Driver +#hibernate.connection.url jdbc:weblogic:mssqlserver4:1E1:1433 + +## Microsoft Driver (not recommended!) +#hibernate.connection.driver_class com.microsoft.jdbc.sqlserver.SQLServerDriver +#hibernate.connection.url jdbc:microsoft:sqlserver://1E1;DatabaseName=test;SelectMethod=cursor + +## The New Microsoft Driver +#hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver +#hibernate.connection.url jdbc:sqlserver://localhost + +## jTDS (since version 0.9) +#hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver +#hibernate.connection.url jdbc:jtds:sqlserver://1E1/test + +## Interbase + +#hibernate.dialect org.hibernate.dialect.InterbaseDialect +#hibernate.connection.username sysdba +#hibernate.connection.password masterkey + +## DO NOT specify hibernate.connection.sqlDialect + +## InterClient + +#hibernate.connection.driver_class interbase.interclient.Driver +#hibernate.connection.url jdbc:interbase://localhost:3060/C:/firebird/test.gdb + +## Pure Java + +#hibernate.connection.driver_class org.firebirdsql.jdbc.FBDriver +#hibernate.connection.url jdbc:firebirdsql:localhost/3050:/firebird/test.gdb + + +## Pointbase + +#hibernate.dialect org.hibernate.dialect.PointbaseDialect +#hibernate.connection.driver_class com.pointbase.jdbc.jdbcUniversalDriver +#hibernate.connection.url jdbc:pointbase:embedded:sample +#hibernate.connection.username PBPUBLIC +#hibernate.connection.password PBPUBLIC + + +## Ingres + +## older versions (before Ingress 2006) + +#hibernate.dialect org.hibernate.dialect.IngresDialect +#hibernate.connection.driver_class ca.edbc.jdbc.EdbcDriver +#hibernate.connection.url jdbc:edbc://localhost:II7/database +#hibernate.connection.username user +#hibernate.connection.password password + +## Ingres 2006 or later + +#hibernate.dialect org.hibernate.dialect.IngresDialect +#hibernate.connection.driver_class com.ingres.jdbc.IngresDriver +#hibernate.connection.url jdbc:ingres://localhost:II7/database;CURSOR=READONLY;auto=multi +#hibernate.connection.username user +#hibernate.connection.password password + +## Mimer SQL + +#hibernate.dialect org.hibernate.dialect.MimerSQLDialect +#hibernate.connection.driver_class com.mimer.jdbc.Driver +#hibernate.connection.url jdbc:mimer:multi1 +#hibernate.connection.username hibernate +#hibernate.connection.password hibernate + + +## InterSystems Cache + +#hibernate.dialect org.hibernate.dialect.Cache71Dialect +#hibernate.connection.driver_class com.intersys.jdbc.CacheDriver +#hibernate.connection.username _SYSTEM +#hibernate.connection.password SYS +#hibernate.connection.url jdbc:Cache://127.0.0.1:1972/HIBERNATE + + +################################# +### Hibernate Connection Pool ### +################################# + +hibernate.connection.pool_size 1 + + + +########################### +### C3P0 Connection Pool### +########################### + +#hibernate.c3p0.max_size 2 +#hibernate.c3p0.min_size 2 +#hibernate.c3p0.timeout 5000 +#hibernate.c3p0.max_statements 100 +#hibernate.c3p0.idle_test_period 3000 +#hibernate.c3p0.acquire_increment 2 +#hibernate.c3p0.validate false + + + +############################## +### Proxool Connection Pool### +############################## + +## Properties for external configuration of Proxool + +hibernate.proxool.pool_alias pool1 + +## Only need one of the following + +#hibernate.proxool.existing_pool true +#hibernate.proxool.xml proxool.xml +#hibernate.proxool.properties proxool.properties + + + +################################# +### Plugin ConnectionProvider ### +################################# + +## use a custom ConnectionProvider (if not set, Hibernate will choose a built-in ConnectionProvider using hueristics) + +#hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider + + + +####################### +### Transaction API ### +####################### + +## Enable automatic flush during the JTA beforeCompletion() callback +## (This setting is relevant with or without the Transaction API) + +#hibernate.transaction.flush_before_completion + + +## Enable automatic session close at the end of transaction +## (This setting is relevant with or without the Transaction API) + +#hibernate.transaction.auto_close_session + + +## the Transaction API abstracts application code from the underlying JTA or JDBC transactions + +#hibernate.transaction.factory_class org.hibernate.transaction.JTATransactionFactory +#hibernate.transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory + + +## to use JTATransactionFactory, Hibernate must be able to locate the UserTransaction in JNDI +## default is java:comp/UserTransaction +## you do NOT need this setting if you specify hibernate.transaction.manager_lookup_class + +#jta.UserTransaction jta/usertransaction +#jta.UserTransaction javax.transaction.UserTransaction +#jta.UserTransaction UserTransaction + + +## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager + +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.JBossTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WeblogicTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WebSphereTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.OrionTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.ResinTransactionManagerLookup + + + +############################## +### Miscellaneous Settings ### +############################## + +## print all generated SQL to the console + +#hibernate.show_sql true + + +## format SQL in log and console + +hibernate.format_sql true + + +## add comments to the generated SQL + +#hibernate.use_sql_comments true + + +## generate statistics + +#hibernate.generate_statistics true + + +## auto schema export + +#hibernate.hbm2ddl.auto create-drop +#hibernate.hbm2ddl.auto create +#hibernate.hbm2ddl.auto update +#hibernate.hbm2ddl.auto validate + + +## specify a default schema and catalog for unqualified tablenames + +#hibernate.default_schema test +#hibernate.default_catalog test + + +## enable ordering of SQL UPDATEs by primary key + +#hibernate.order_updates true + + +## set the maximum depth of the outer join fetch tree + +hibernate.max_fetch_depth 1 + + +## set the default batch size for batch fetching + +#hibernate.default_batch_fetch_size 8 + + +## rollback generated identifier values of deleted entities to default values + +#hibernate.use_identifer_rollback true + + +## enable bytecode reflection optimizer (disabled by default) + +#hibernate.bytecode.use_reflection_optimizer true + + + +##################### +### JDBC Settings ### +##################### + +## specify a JDBC isolation level + +#hibernate.connection.isolation 4 + + +## enable JDBC autocommit (not recommended!) + +#hibernate.connection.autocommit true + + +## set the JDBC fetch size + +#hibernate.jdbc.fetch_size 25 + + +## set the maximum JDBC 2 batch size (a nonzero value enables batching) + +#hibernate.jdbc.batch_size 5 +#hibernate.jdbc.batch_size 0 + + +## enable batch updates even for versioned data + +hibernate.jdbc.batch_versioned_data true + + +## enable use of JDBC 2 scrollable ResultSets (specifying a Dialect will cause Hibernate to use a sensible default) + +#hibernate.jdbc.use_scrollable_resultset true + + +## use streams when writing binary types to / from JDBC + +hibernate.jdbc.use_streams_for_binary true + + +## use JDBC 3 PreparedStatement.getGeneratedKeys() to get the identifier of an inserted row + +#hibernate.jdbc.use_get_generated_keys false + + +## choose a custom JDBC batcher + +# hibernate.jdbc.factory_class + + +## enable JDBC result set column alias caching +## (minor performance enhancement for broken JDBC drivers) + +# hibernate.jdbc.wrap_result_sets + + +## choose a custom SQL exception converter + +#hibernate.jdbc.sql_exception_converter + + + +########################## +### Second-level Cache ### +########################## + +## optimize chache for minimal "puts" instead of minimal "gets" (good for clustered cache) + +#hibernate.cache.use_minimal_puts true + + +## set a prefix for cache region names + +hibernate.cache.region_prefix hibernate.test + + +## disable the second-level cache + +#hibernate.cache.use_second_level_cache false + + +## enable the query cache + +#hibernate.cache.use_query_cache true + + +## store the second-level cache entries in a more human-friendly format + +#hibernate.cache.use_structured_entries true + + +## choose a cache implementation + +#hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.EmptyCacheProvider +hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.TreeCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.OSCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.SwarmCacheProvider + + +## choose a custom query cache implementation + +#hibernate.cache.query_cache_factory + + + +############ +### JNDI ### +############ + +## specify a JNDI name for the SessionFactory + +#hibernate.session_factory_name hibernate/session_factory + + +## Hibernate uses JNDI to bind a name to a SessionFactory and to look up the JTA UserTransaction; +## if hibernate.jndi.* are not specified, Hibernate will use the default InitialContext() which +## is the best approach in an application server + +#file system +#hibernate.jndi.class com.sun.jndi.fscontext.RefFSContextFactory +#hibernate.jndi.url file:/ + +#WebSphere +#hibernate.jndi.class com.ibm.websphere.naming.WsnInitialContextFactory +#hibernate.jndi.url iiop://localhost:900/ + diff --git a/etc/hibernate.properties.template b/etc/hibernate.properties.template new file mode 100644 index 0000000000..9445826986 --- /dev/null +++ b/etc/hibernate.properties.template @@ -0,0 +1,488 @@ +###################### +### Query Language ### +###################### + +## define query language constants / function names + +hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N' + + +## Query translator factory class + +hibernate.query.factory_class @QUERY_TRANSLATOR_FACTORY@ + +################# +### Platforms ### +################# + +hibernate.dialect @HIBERNATE_DIALECT@ +hibernate.connection.driver_class @DRIVER_CLASS@ +hibernate.connection.username @DB_USERNAME@ +hibernate.connection.password @DB_PASSWORD@ +hibernate.connection.url @DB_URL@ + +## JNDI Datasource + +#hibernate.connection.datasource jdbc/test +#hibernate.connection.username db2 +#hibernate.connection.password db2 + + +## HypersonicSQL + +#hibernate.dialect org.hibernate.dialect.HSQLDialect +#hibernate.connection.driver_class org.hsqldb.jdbcDriver +#hibernate.connection.username sa +#hibernate.connection.password +#hibernate.connection.url jdbc:hsqldb:hsql://localhost +#hibernate.connection.url jdbc:hsqldb:test +#hibernate.connection.url jdbc:hsqldb:. + + +## MySQL + + +#hibernate.dialect org.hibernate.dialect.MySQLDialect +#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect +#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect +#hibernate.connection.driver_class org.gjt.mm.mysql.Driver +#hibernate.connection.driver_class com.mysql.jdbc.Driver +#hibernate.connection.url jdbc:mysql:///test +#hibernate.connection.username gavin +#hibernate.connection.password + + +## Oracle + +#hibernate.dialect org.hibernate.dialect.OracleDialect +#hibernate.dialect org.hibernate.dialect.Oracle9Dialect +#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver +#hibernate.connection.username ora +#hibernate.connection.password ora +#hibernate.connection.url jdbc:oracle:thin:@localhost:1521:test + + +## PostgreSQL + +#hibernate.dialect org.hibernate.dialect.PostgreSQLDialect +#hibernate.connection.driver_class org.postgresql.Driver +#hibernate.connection.url jdbc:postgresql:template1 +#hibernate.connection.username pg +#hibernate.connection.password +#hibernate.query.substitutions yes 'Y', no 'N' + + +## DB2 + +#hibernate.dialect org.hibernate.dialect.DB2Dialect +#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver +#hibernate.connection.url jdbc:db2:test +#hibernate.connection.username db2 +#hibernate.connection.password db2 + +## TimesTen (not supported yet) + +#hibernate.dialect org.hibernate.dialect.TimesTenDialect +#hibernate.connection.driver_class com.timesten.jdbc.TimesTenDriver +#hibernate.connection.url jdbc:timesten:direct:test +#hibernate.connection.username +#hibernate.connection.password + +## DB2/400 + +#hibernate.dialect org.hibernate.dialect.DB2400Dialect +#hibernate.connection.username user +#hibernate.connection.password password + +## Native driver +#hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver +#hibernate.connection.url jdbc:db2://systemname + +## Toolbox driver +#hibernate.connection.driver_class com.ibm.as400.access.AS400JDBCDriver +#hibernate.connection.url jdbc:as400://systemname + + +## Derby (Not supported!) + +#hibernate.dialect org.hibernate.dialect.DerbyDialect +#hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver +#hibernate.connection.username +#hibernate.connection.password +#hibernate.connection.url jdbc:derby:/test;create=true + + +## Sybase + +#hibernate.dialect org.hibernate.dialect.SybaseDialect +#hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver +#hibernate.connection.username sa +#hibernate.connection.password sasasa +#hibernate.connection.url jdbc:sybase:Tds:co3061835-a:5000/tempdb + + +## Mckoi SQL + +#hibernate.dialect org.hibernate.dialect.MckoiDialect +#hibernate.connection.driver_class com.mckoi.JDBCDriver +#hibernate.connection.url jdbc:mckoi:/// +#hibernate.connection.url jdbc:mckoi:local://C:/mckoi1.00/db.conf +#hibernate.connection.username admin +#hibernate.connection.password nimda + + +## SAP DB + +#hibernate.dialect org.hibernate.dialect.SAPDBDialect +#hibernate.connection.driver_class com.sap.dbtech.jdbc.DriverSapDB +#hibernate.connection.url jdbc:sapdb://localhost/TST +#hibernate.connection.username TEST +#hibernate.connection.password TEST +#hibernate.query.substitutions yes 'Y', no 'N' + + +## MS SQL Server + +#hibernate.dialect org.hibernate.dialect.SQLServerDialect +#hibernate.connection.username sa +#hibernate.connection.password sa + +## JSQL Driver +#hibernate.connection.driver_class com.jnetdirect.jsql.JSQLDriver +#hibernate.connection.url jdbc:JSQLConnect://1E1/test + +## JTURBO Driver +#hibernate.connection.driver_class com.newatlanta.jturbo.driver.Driver +#hibernate.connection.url jdbc:JTurbo://1E1:1433/test + +## WebLogic Driver +#hibernate.connection.driver_class weblogic.jdbc.mssqlserver4.Driver +#hibernate.connection.url jdbc:weblogic:mssqlserver4:1E1:1433 + +## Microsoft Driver (not recommended!) +#hibernate.connection.driver_class com.microsoft.jdbc.sqlserver.SQLServerDriver +#hibernate.connection.url jdbc:microsoft:sqlserver://1E1;DatabaseName=test;SelectMethod=cursor + +## jTDS (since version 0.9) +#hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver +#hibernate.connection.url jdbc:jtds:sqlserver://1E1/test + +## Interbase + +#hibernate.dialect org.hibernate.dialect.InterbaseDialect +#hibernate.connection.username sysdba +#hibernate.connection.password masterkey + +## DO NOT specify hibernate.connection.sqlDialect + +## InterClient + +#hibernate.connection.driver_class interbase.interclient.Driver +#hibernate.connection.url jdbc:interbase://localhost:3060/C:/firebird/test.gdb + +## Pure Java + +#hibernate.connection.driver_class org.firebirdsql.jdbc.FBDriver +#hibernate.connection.url jdbc:firebirdsql:localhost/3050:/firebird/test.gdb + + +## Pointbase + +#hibernate.dialect org.hibernate.dialect.PointbaseDialect +#hibernate.connection.driver_class com.pointbase.jdbc.jdbcUniversalDriver +#hibernate.connection.url jdbc:pointbase:embedded:sample +#hibernate.connection.username PBPUBLIC +#hibernate.connection.password PBPUBLIC + + +## Ingres + +#hibernate.dialect org.hibernate.dialect.IngresDialect +#hibernate.connection.driver_class ca.edbc.jdbc.EdbcDriver +#hibernate.connection.url jdbc:edbc://localhost:II7/database +#hibernate.connection.username user +#hibernate.connection.password password + + +## Mimer SQL + +#hibernate.dialect org.hibernate.dialect.MimerSQLDialect +#hibernate.connection.driver_class com.mimer.jdbc.Driver +#hibernate.connection.url jdbc:mimer:multi1 +#hibernate.connection.username hibernate +#hibernate.connection.password hibernate + + + +################################# +### Hibernate Connection Pool ### +################################# + +hibernate.connection.pool_size 1 + + + +########################### +### C3P0 Connection Pool### +########################### + +#hibernate.c3p0.max_size 2 +#hibernate.c3p0.min_size 2 +#hibernate.c3p0.timeout 5000 +#hibernate.c3p0.max_statements 100 +#hibernate.c3p0.idle_test_period 3000 +#hibernate.c3p0.acquire_increment 2 +#hibernate.c3p0.validate false + + + +############################## +### Proxool Connection Pool### +############################## + +## Properties for external configuration of Proxool + +hibernate.proxool.pool_alias pool1 + +## Only need one of the following + +#hibernate.proxool.existing_pool true +#hibernate.proxool.xml proxool.xml +#hibernate.proxool.properties proxool.properties + + + +################################# +### Plugin ConnectionProvider ### +################################# + +## use a custom ConnectionProvider (if not set, Hibernate will choose a built-in ConnectionProvider using hueristics) + +#hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.DBCPConnectionProvider +#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider + + + +####################### +### Transaction API ### +####################### + +## Enable automatic flush during the JTA beforeCompletion() callback +## (This setting is relevant with or without the Transaction API) + +#hibernate.transaction.flush_before_completion + + +## Enable automatic session close at the end of transaction +## (This setting is relevant with or without the Transaction API) + +#hibernate.transaction.auto_close_session + + +## the Transaction API abstracts application code from the underlying JTA or JDBC transactions + +#hibernate.transaction.factory_class org.hibernate.transaction.JTATransactionFactory +#hibernate.transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory + + +## to use JTATransactionFactory, Hibernate must be able to locate the UserTransaction in JNDI +## default is java:comp/UserTransaction +## you do NOT need this setting if you specify hibernate.transaction.manager_lookup_class + +#jta.UserTransaction jta/usertransaction +#jta.UserTransaction javax.transaction.UserTransaction +#jta.UserTransaction UserTransaction + + +## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager + +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.JBossTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WeblogicTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WebSphereTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.OrionTransactionManagerLookup +#hibernate.transaction.manager_lookup_class org.hibernate.transaction.ResinTransactionManagerLookup + + + +############################## +### Miscellaneous Settings ### +############################## + +## print all generated SQL to the console + +#hibernate.show_sql true + + +## add comments to the generated SQL + +#hibernate.use_sql_comments true + + +## generate statistics + +#hibernate.generate_statistics true + + +## auto schema export + +#hibernate.hbm2ddl.auto create-drop +#hibernate.hbm2ddl.auto create +#hibernate.hbm2ddl.auto update + + +## specify a default schema and catalog for unqualified tablenames + +#hibernate.default_schema test +#hibernate.default_catalog test + + +## enable ordering of SQL UPDATEs by primary key + +hibernate.order_updates true + + +## set the maximum depth of the outer join fetch tree + +hibernate.max_fetch_depth 1 + + +## set the default batch size for batch fetching + +hibernate.default_batch_fetch_size 8 + + +## rollback generated identifier values of deleted entities to default values + +#hibernate.use_identifer_rollback true + + +## enable bytecode reflection optimizer (disabled by default) + +#hibernate.bytecode.use_reflection_optimizer true + + + +##################### +### JDBC Settings ### +##################### + +## specify a JDBC isolation level + +#hibernate.connection.isolation 4 + + +## enable JDBC autocommit (not recommended!) + +#hibernate.connection.autocommit true + + +## set the JDBC fetch size + +#hibernate.jdbc.fetch_size 25 + + +## set the maximum JDBC 2 batch size (a nonzero value enables batching) + +#hibernate.jdbc.batch_size 5 + + +## enable batch updates even for versioned data + +hibernate.jdbc.batch_versioned_data true + + +## enable use of JDBC 2 scrollable ResultSets (specifying a Dialect will cause Hibernate to use a sensible default) + +#hibernate.jdbc.use_scrollable_resultset true + + +## use streams when writing binary types to / from JDBC + +hibernate.jdbc.use_streams_for_binary true + + +## use JDBC 3 PreparedStatement.getGeneratedKeys() to get the identifier of an inserted row + +#hibernate.jdbc.use_get_generated_keys false + + +## choose a custom JDBC batcher + +# hibernate.jdbc.factory_class + + +## choose a custom SQL exception converter + +#hibernate.jdbc.sql_exception_converter + + + +########################## +### Second-level Cache ### +########################## + +## optimize chache for minimal "puts" instead of minimal "gets" (good for clustered cache) + +#hibernate.cache.use_minimal_puts true + + +## set a prefix for cache region names + +hibernate.cache.region_prefix hibernate.test + + +## disable the second-level cache + +#hibernate.cache.use_second_level_cache false + + +## enable the query cache + +#hibernate.cache.use_query_cache true + + +## store the second-level cache entries in a more human-friendly format + +#hibernate.cache.use_structured_entries true + + +## choose a cache implementation + +#hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.EmptyCacheProvider +hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.TreeCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.OSCacheProvider +#hibernate.cache.provider_class org.hibernate.cache.SwarmCacheProvider + + +## choose a custom query cache implementation + +#hibernate.cache.query_cache_factory + + + +############ +### JNDI ### +############ + +## specify a JNDI name for the SessionFactory + +#hibernate.session_factory_name hibernate/session_factory + + +## Hibernate uses JNDI to bind a name to a SessionFactory and to look up the JTA UserTransaction; +## if hibernate.jndi.* are not specified, Hibernate will use the default InitialContext() which +## is the best approach in an application server + +#file system +#hibernate.jndi.class com.sun.jndi.fscontext.RefFSContextFactory +#hibernate.jndi.url file:/ + +#WebSphere +#hibernate.jndi.class com.ibm.websphere.naming.WsnInitialContextFactory +#hibernate.jndi.url iiop://localhost:900/ + diff --git a/etc/log4j.properties b/etc/log4j.properties new file mode 100644 index 0000000000..1922c1667a --- /dev/null +++ b/etc/log4j.properties @@ -0,0 +1,47 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### direct messages to file hibernate.log ### +#log4j.appender.file=org.apache.log4j.FileAppender +#log4j.appender.file.File=hibernate.log +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### set log levels - for more verbose logging change 'info' to 'debug' ### + +log4j.rootLogger=warn, stdout + +#log4j.logger.org.hibernate=info +log4j.logger.org.hibernate=debug + +### log HQL query parser activity +#log4j.logger.org.hibernate.hql.ast.AST=debug + +### log just the SQL +#log4j.logger.org.hibernate.SQL=debug + +### log JDBC bind parameters ### +log4j.logger.org.hibernate.type=info +#log4j.logger.org.hibernate.type=debug + +### log schema export/update ### +log4j.logger.org.hibernate.tool.hbm2ddl=debug + +### log HQL parse trees +#log4j.logger.org.hibernate.hql=debug + +### log cache activity ### +#log4j.logger.org.hibernate.cache=debug + +### log transaction activity +#log4j.logger.org.hibernate.transaction=debug + +### log JDBC resource acquisition +#log4j.logger.org.hibernate.jdbc=debug + +### enable the following line if you want to track down connection ### +### leakages when using DriverManagerConnectionProvider ### +#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace diff --git a/etc/oscache.properties b/etc/oscache.properties new file mode 100644 index 0000000000..9e616419b9 --- /dev/null +++ b/etc/oscache.properties @@ -0,0 +1,110 @@ +# CACHE IN MEMORY +# +# If you want to disable memory caching, just uncomment this line. +# +# cache.memory=false + + +# CACHE KEY +# +# This is the key that will be used to store the cache in the application +# and session scope. +# +# If you want to set the cache key to anything other than the default +# uncomment this line and change the cache.key +# +# cache.key=__oscache_cache + + +# USE HOST DOMAIN NAME IN KEY +# +# Servers for multiple host domains may wish to add host name info to +# the generation of the key. If this is true, then uncomment the +# following line. +# +# cache.use.host.domain.in.key=true + + +# CACHE LISTENERS +# +# These hook OSCache events and perform various actions such as logging +# cache hits and misses, or broadcasting to other cache instances across a cluster. +# See the documentation for further information. +# +# cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener, \ +# com.opensymphony.oscache.extra.CacheEntryEventListenerImpl, \ +# com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl, \ +# com.opensymphony.oscache.extra.ScopeEventListenerImpl + + +# CACHE PERSISTENCE CLASS +# +# Specify the class to use for persistence. If you use the supplied DiskPersistenceListener, +# don't forget to supply the cache.path property to specify the location of the cache +# directory. +# +# If a persistence class is not specified, OSCache will use memory caching only. +# +# cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener + + +# CACHE DIRECTORY +# +# This is the directory on disk where caches will be stored by the DiskPersistenceListener. +# it will be created if it doesn't already exist. Remember that OSCache must have +# write permission to this directory. +# +# Note: for Windows machines, this needs \ to be escaped +# ie Windows: +# cache.path=c:\\myapp\\cache +# or *ix: +# cache.path=/opt/myapp/cache +# +# cache.path=c:\\app\\cache + + +# CACHE ALGORITHM +# +# Default cache algorithm to use. Note that in order to use an algorithm +# the cache size must also be specified. If the cache size is not specified, +# the cache algorithm will be Unlimited cache. +# +# cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache +# cache.algorithm=com.opensymphony.oscache.base.algorithm.FIFOCache +# cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache + + +# CACHE SIZE +# +# Default cache size in number of items. If a size is specified but not +# an algorithm, the cache algorithm used will be LRUCache. +# +cache.capacity=1000 + + +# CACHE UNLIMITED DISK +# Use unlimited disk cache or not. The default value is false, which means +# the disk cache will be limited in size to the value specified by cache.capacity. +# +# cache.unlimited.disk=false + + +# JMS CLUSTER PROPERTIES +# +# Configuration properties for JMS clustering. See the clustering documentation +# for more information on these settings. +# +#cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory +#cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic +#cache.cluster.jms.node.name=node1 + + +# JAVAGROUPS CLUSTER PROPERTIES +# +# Configuration properites for the JavaGroups clustering. Only one of these +# should be specified. Default values (as shown below) will be used if niether +# property is set. See the clustering documentation and the JavaGroups project +# (www.javagroups.com) for more information on these settings. +# +#cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):PING(timeout=2000;num_initial_members=3):MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):pbcast.STABLE(desired_avg_gossip=20000):UNICAST(timeout=5000):FRAG(frag_size=8096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true) +#cache.cluster.multicast.ip=231.12.21.132 diff --git a/etc/treecache.xml b/etc/treecache.xml new file mode 100644 index 0000000000..e469c12204 --- /dev/null +++ b/etc/treecache.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + jboss:service=Naming + jboss:service=TransactionManager + + + + + + REPEATABLE_READ + + + LOCAL + + + TreeCache-Cluster + + + + + + + + + + + + + + + + + + + + + + + 20000 + + + 20000 + + + 10000 + + + 15000 + + + 60000 + + + + + + +