Hibernate SVN: r12896 - branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x.
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-03 13:39:19 -0400 (Fri, 03 Aug 2007)
New Revision: 12896
Modified:
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DocExporterTest.java
Log:
fix jdk 1.5 dep
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DocExporterTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DocExporterTest.java 2007-08-03 14:31:01 UTC (rev 12895)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DocExporterTest.java 2007-08-03 17:39:19 UTC (rev 12896)
@@ -36,7 +36,7 @@
DocExporter exporter = new DocExporter(getCfg(), getOutputDir() );
Properties properties = new Properties();
properties.put( "jdk5", "true"); // test generics
- if(File.pathSeparator.equals(';')) { // to work around windows/jvm not seeming to respect executing just "dot"
+ if(File.pathSeparator.equals(";")) { // to work around windows/jvm not seeming to respect executing just "dot"
properties.put("dot.executable", System.getProperties().getProperty("dot.executable","dot.exe"));
} else {
properties.put("dot.executable", System.getProperties().getProperty("dot.executable","dot"));
17 years, 5 months
Hibernate SVN: r12895 - trunk/HibernateExt/search/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-08-03 10:31:01 -0400 (Fri, 03 Aug 2007)
New Revision: 12895
Modified:
trunk/HibernateExt/search/doc/reference/en/modules/getting-started.xml
Log:
Work in progress
Modified: trunk/HibernateExt/search/doc/reference/en/modules/getting-started.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/getting-started.xml 2007-08-03 13:48:06 UTC (rev 12894)
+++ trunk/HibernateExt/search/doc/reference/en/modules/getting-started.xml 2007-08-03 14:31:01 UTC (rev 12895)
@@ -8,7 +8,8 @@
<para>
The following chapter will guide you through the minimal steps
required to integrate Hibernate Search into an existing
- application.
+ Hibernate enabled application. In case you are a Hibernate new timer
+ we recommend you start <ulink url="http://hibernate.org/152.html">here</ulink>.
</para>
<section>
@@ -41,15 +42,80 @@
</tbody>
</tgroup>
</table>
-
+ <para>
You can download the dependencies from the Hibernate
<ulink url="http://www.hibernate.org/6.html">download site</ulink>. The required dependency versions
can also be found in the <ulink url="http://www.hibernate.org/6.html#A3">Compatibility Matrix</ulink>.
+ </para>
</section>
<section>
<title>Hibernate Configuration</title>
+ Lets assume that your application contains a class <classname>Book</classname> which
+ is managed by Hibernate. You now want to add free text search abilities to your application
+ in order to search within the books body and summary.
+ <programlisting>
+...
+@Entity
+public class Book {
+
+ private Integer id;
+ private String body;
+ private String summary;
+ private Set<Author> authors = new HashSet<Author>();
+ private Author mainAuthor;
+ private Date publicationDate;
+
+ public Book() {
+ }
+
+ // standard getters/setters follow here
+...
+ </programlisting>
+ <para>
+ Once you have downloaded and added all required dependencies to your application you have
+ to add some basic Hibernate Search properties to your hibernate configuration file.
+ We recommend to start your first experiments with a <classname>FSDirectoryProvider</classname>.
+ This has the advantage that you can physically inspect (eg with
+ <ulink url="http://www.getopt.org/luke/">Luke</ulink>) the Lucene indeces created by
+ Hibnerate Search. Once you have a working configuration you can start experimenting with
+ other <xref linkend="search-configuration-directory"/>s.
+ </para>
+
+ <para>
+ </para>
+
+ <programlisting>
+...
+# the default base directory for the indecies
+hibernate.search.default.indexBase = /var/lucene/indices
+
+# the default directory provider
+hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
+...
+ </programlisting>
+
</section>
+
+ <section>
+ <title>Indexing</title>
+ <para>
+ Once you have added these properties to your configuration you will have to trigger an
+ initial batch index of your books. You can achieve this by adding the following lines
+ to your code:
+ </para>
+ <programlisting>
+FullTextSession fullTextSession = Search.createFullTextSession(session);
+Transaction tx = fullTextSession.beginTransaction();
+for (Book book : books) {
+ fullTextSession.index(book);
+}
+tx.commit(); //index are written at commit time
+ </programlisting>
+ <para>
+ For more information see <xref linkend="search-batchindex"/>.
+ </para>
+ </section>
<section>
<title>First search</title>
17 years, 5 months
Hibernate SVN: r12894 - in branches/Branch_3_2/HibernateExt/tools: lib/testlibs and 8 other directories.
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-03 09:48:06 -0400 (Fri, 03 Aug 2007)
New Revision: 12894
Added:
branches/Branch_3_2/HibernateExt/tools/src/testoutputdependent/properties/
branches/Branch_3_2/HibernateExt/tools/src/testoutputdependent/properties/PropertiesUsage.java
Removed:
branches/Branch_3_2/HibernateExt/tools/lib/testlibs/jboss-seam.jar
branches/Branch_3_2/HibernateExt/tools/lib/testlibs/myfaces-api.jar
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/seam/SeamExporter.java
branches/Branch_3_2/HibernateExt/tools/src/templates/seam/
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/SeamAntTest.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2SeamTest.java
Modified:
branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/ant.xml
branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/plugins.xml
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/AntAllTests.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2XAllTests.java
Log:
Bye bye old dusty seam 0.x templates
Modified: branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/ant.xml
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/ant.xml 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/ant.xml 2007-08-03 13:48:06 UTC (rev 12894)
@@ -739,25 +739,24 @@
handling.</para>
<section>
- <title>Seam Exporter via
+ <title>Exporter via
<literal><hbmtemplate></literal></title>
<para>The following is an example of reverse engineering via
- <literal><jdbcconfiguration></literal> and use the
- SeamExporter via the <literal><hbmtemplate></literal> to
- generate a Seam application skeleton.</para>
+ <literal><jdbcconfiguration></literal> and use a custom
+ Exporter via the <literal><hbmtemplate></literal>.</para>
<para><programlisting><![CDATA[ <hibernatetool destdir="${destdir}">
<jdbcconfiguration
configurationfile="hibernate.cfg.xml"
- packagename="x.y.z.seam.crud"/>
+ packagename="my.model"/>
<!-- setup properties -->
- <property key="seam_appname" value="Registration"/>
- <property key="seam_shortname" value="crud"/>
+ <property key="appname" value="Registration"/>
+ <property key="shortname" value="crud"/>
<hbmtemplate
- exporterclass="org.hibernate.tool.hbm2x.seam.SeamExporter"
+ exporterclass="my.own.Exporter"
filepattern="."/>
</hibernatetool>
Modified: branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/plugins.xml
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/plugins.xml 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/doc/reference/en/modules/plugins.xml 2007-08-03 13:48:06 UTC (rev 12894)
@@ -628,20 +628,6 @@
database schema and some of the mappings.</para></entry>
</row>
- <row>
- <entry><para>JBoss Seam skeleton app [Beta]</para></entry>
-
- <entry><para>Generates a complete JBoss Seam skeleton app. The
- generation will include annotated POJO's, Seam controller beans
- and a JSP for the presentation layer. See the generated
- readme.txt for how to use it. </para><para>Note: this exporter
- generates a full application, including a build.xml thus you
- will get the best results if you use an output directory which
- is the root of your project.</para><para>Currently this
- generation is the old style of CRUD generation for Seam 1.0. If
- you use Seam 1.1 seam-gen is more apropriate and
- uptodate.</para></entry>
- </row>
</tbody>
</tgroup>
</table>
Deleted: branches/Branch_3_2/HibernateExt/tools/lib/testlibs/jboss-seam.jar
===================================================================
(Binary files differ)
Deleted: branches/Branch_3_2/HibernateExt/tools/lib/testlibs/myfaces-api.jar
===================================================================
(Binary files differ)
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -202,6 +202,7 @@
return generateEquals( thisName, otherName, allPropertiesIterator, useGenerics );
}
+ /** returns the properties that would be visible on this entity as a pojo. This does not return *all* properties since hibernate has certain properties that are only relevant in context of persistence. */
public abstract Iterator getAllPropertiesIterator();
protected String generateEquals(String thisName, String otherName, Iterator allPropertiesIterator, boolean useGenerics) {
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -121,6 +121,7 @@
return getAllPropertiesIterator(clazz);
}
+
public Iterator getAllPropertiesIterator(PersistentClass pc) {
List properties = new ArrayList();
List iterators = new ArrayList();
Deleted: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/seam/SeamExporter.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/seam/SeamExporter.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/seam/SeamExporter.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -1,92 +0,0 @@
-package org.hibernate.tool.hbm2x.seam;
-
-import java.io.File;
-import java.util.Properties;
-
-import org.hibernate.cfg.Configuration;
-import org.hibernate.tool.hbm2x.AbstractExporter;
-import org.hibernate.tool.hbm2x.GenericExporter;
-import org.hibernate.tool.hbm2x.POJOExporter;
-
-public class SeamExporter extends AbstractExporter {
-
- public SeamExporter() {
- }
-
- public SeamExporter(Configuration cfg, File outputdir) {
- super(cfg, outputdir);
- init();
- }
-
- private void init() {
-
- }
-
- protected void setupContext() {
- if(!getProperties().contains("seam_appname")) {
- getProperties().put("seam_appname", "SeamApplication");
- }
- if(!getProperties().contains("seam_shortname")) {
- getProperties().put("seam_shortname", "seamapp");
- }
-
- super.setupContext();
- }
-
- public String getName() {
- return "hbm2seam";
- }
-
- public void doStart() {
-
- configureExporter( "seam/build.xml.ftl", "build.xml").start();
- configureExporter( "seam/build.properties.ftl", "build.properties").start();
- configureExporter( "seam/components.xml.ftl", "resources/WEB-INF/components.xml").start();
- configureExporter( "seam/readme.txt.ftl", "readme.txt").start();
- new File( getOutputDirectory(), "lib" ).mkdir();
-
- configureExporter( "seam/seam.properties.ftl", "resources/seam.properties").start();
- configureExporter( "seam/messages.properties.ftl", "resources/WEB-INF/classes/messages.properties").start();
-
- configureExporter( "seam/web.xml.ftl", "resources/WEB-INF/web.xml").start();
- configureExporter( "seam/faces-config.xml.ftl", "resources/WEB-INF/faces-config.xml").start();
- new File( getOutputDirectory(), "resources/WEB-INF/lib" ).mkdir();
-
- configureExporter( "seam/persistence.xml.ftl", "resources/META-INF/persistence.xml").start();
-
- configureExporter( "seam/application.xml.ftl", "resources/META-INF/application.xml").start();
- configureExporter( "seam/jboss-app.xml.ftl", "resources/META-INF/jboss-app.xml").start();
-
- configureExporter( "seam/edit.jsp.ftl", "resources/jsp/edit{class-name}.jsp").start();
- configureExporter( "seam/find.jsp.ftl", "resources/jsp/find{class-name}.jsp").start();
- configureExporter( "seam/index.html.ftl", "resources/jsp/index.html").start();
- configureExporter( "seam/screen.css.ftl", "resources/jsp/style/default/screen.css").start();
-
- POJOExporter exporter = new POJOExporter(getConfiguration(),getOutputDirectory());
- exporter.setProperties((Properties) getProperties().clone());
- exporter.setTemplatePath(getTemplatePaths());
- exporter.setArtifactCollector(getArtifactCollector());
- exporter.getProperties().setProperty("ejb3", "true");
- exporter.getProperties().setProperty("jdk5", "true");
- exporter.setFilePattern("src/{package-name}/{class-name}.java");
- exporter.start();
-
- configureExporter( "seam/finder.java.ftl", "src/{package-name}/{class-name}Finder.java").start();
- configureExporter( "seam/finderbean.java.ftl", "src/{package-name}/{class-name}FinderBean.java").start();
- configureExporter( "seam/selector.java.ftl", "src/{package-name}/{class-name}Selector.java").start();
-
- configureExporter( "seam/editor.java.ftl", "src/{package-name}/{class-name}Editor.java").start();
- configureExporter( "seam/editorbean.java.ftl", "src/{package-name}/{class-name}EditorBean.java").start();
-
- }
-
- private GenericExporter configureExporter(String template, String pattern) {
- GenericExporter exporter = new GenericExporter(getConfiguration(),getOutputDirectory());
- exporter.setProperties((Properties) getProperties().clone());
- exporter.setTemplatePath(getTemplatePaths());
- exporter.setTemplateName(template);
- exporter.setFilePattern(pattern);
- exporter.setArtifactCollector(getArtifactCollector());
- return exporter;
- }
-}
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -10,6 +10,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.io.SAXReader;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Settings;
import org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect;
@@ -146,5 +149,19 @@
}
}
+ /** parse the url, fails if not valid xml. Does not validate against the DTD because they are remote */
+ public Document assertValidXML(File url) {
+ SAXReader reader = new SAXReader();
+ reader.setValidation(false);
+ Document document = null;
+ try {
+ document = reader.read(url);
+ }
+ catch (DocumentException e) {
+ fail("Could not parse " + url + ":" + e);
+ }
+ assertNotNull(document);
+ return document;
+ }
}
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/AntAllTests.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/AntAllTests.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/AntAllTests.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -8,8 +8,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("Test for org.hibernate.tool.ant");
//$JUnit-BEGIN$
- suite.addTestSuite(AntHibernateToolTest.class);
- suite.addTestSuite(SeamAntTest.class);
+ suite.addTestSuite(AntHibernateToolTest.class);
suite.addTestSuite(JavaFormatterTest.class);
//$JUnit-END$
return suite;
Deleted: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/SeamAntTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/SeamAntTest.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/ant/SeamAntTest.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -1,117 +0,0 @@
-/*
- * Created on 13-Feb-2005
- *
- */
-package org.hibernate.tool.ant;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.io.SAXReader;
-import org.hibernate.tool.test.TestHelper;
-
-/**
- * A temporary test class for controlling the seam template generation
- * via an antfile.
- *
- * @author max
- *
- */
-public class SeamAntTest extends BuildFileTestCase {
-
- public SeamAntTest(String name) {
- super(name);
- }
-
-
- protected void tearDown() throws Exception {
- System.out.println(getLog() );
- super.tearDown();
- }
-
-
- protected void setUp() throws Exception {
- //HibernateUberspect.initMethodNotFoundCount(); // enable some tracing of velocity errors
- configureProject("src/testsupport/seamtest-build.xml");
- }
-
- public void testCrudGeneration() {
- executeTarget("generate-crud");
- File baseDir = new File(project.getProperty("destdir"));
-
- assertFileAndExists(new File(baseDir, "build.xml"));
- assertFileAndExists(new File(baseDir, "resources/seam.properties"));
- assertFileAndExists(new File(baseDir, "resources/WEB-INF/components.xml"));
-
- validXMLFile( new File(baseDir, "resources/WEB-INF/web.xml") );
-
- validXMLFile( new File(baseDir, "resources/WEB-INF/faces-config.xml") );
-
- validXMLFile( new File(baseDir, "resources/META-INF/application.xml") );
-
- validXMLFile( new File(baseDir, "resources/META-INF/jboss-app.xml") );
-
- // cannot check for valid xml since the jsp's has <%@ in the top
- validFile( new File(baseDir, "resources/jsp/editIssue.jsp") );
- validFile( new File(baseDir, "resources/jsp/findIssue.jsp") );
-
- validFile(new File(baseDir, "src/org/jboss/seam/example/crud/Issue.java"));
-
- validFile(new File(baseDir, "src/org/jboss/seam/example/crud/IssueFinder.java"));
- validFile(new File(baseDir, "src/org/jboss/seam/example/crud/IssueFinderBean.java"));
-
- validFile(new File(baseDir, "src/org/jboss/seam/example/crud/IssueEditor.java"));
- validFile(new File(baseDir, "src/org/jboss/seam/example/crud/IssueEditorBean.java"));
-
- File srcDir = new File(baseDir, "src");
- List files = TestHelper.visitAllFiles(srcDir, new ArrayList());
- List jars = new ArrayList();
- jars.add("ejb3-persistence.jar");
- jars.add("jboss-ejb3x.jar");
- jars.add("jboss-annotations-ejb3.jar");
- jars.add("hibernate-annotations.jar");
- jars.add("jboss-seam.jar");
- jars.add("myfaces-api.jar");
-
- TestHelper.compile( srcDir, new File(baseDir, "classes"), files, "1.5", TestHelper.buildClasspath(jars));
- }
-
-
- private void validXMLFile(File xmlfile) {
- validFile( xmlfile );
- assertParse(xmlfile);
- }
-
-
- private void validFile(File xmlfile) {
- assertFileAndExists(xmlfile);
- assertEquals( "$ found in " + xmlfile, null, TestHelper.findFirstString( "$", xmlfile ));
- }
-
-
- public static Test suite() {
- return new TestSuite(SeamAntTest.class);
- }
-
- /** parse the url, fails if not valid xml. Does not validate against the DTD because they are remote */
- public Document assertParse(File url) {
- SAXReader reader = new SAXReader();
- reader.setValidation(false);
- Document document = null;
- try {
- document = reader.read(url);
- }
- catch (DocumentException e) {
- fail("Could not parse " + url + ":" + e);
- }
- assertNotNull(document);
- return document;
- }
-
-}
Deleted: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2SeamTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2SeamTest.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2SeamTest.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -1,65 +0,0 @@
-/*
- * Created on 2004-12-01
- *
- */
-package org.hibernate.tool.hbm2x;
-
-import java.io.File;
-
-import org.hibernate.tool.NonReflectiveTestCase;
-import org.hibernate.tool.hbm2x.seam.SeamExporter;
-
-/**
- * @author max
- *
- */
-public class Hbm2SeamTest extends NonReflectiveTestCase {
-
- private ArtifactCollector artifactCollector;
-
- public Hbm2SeamTest(String name) {
- super( name, "hbm2seamoutput" );
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- SeamExporter exporter = new SeamExporter(getCfg(), getOutputDir() );
- exporter.start();
-
- artifactCollector = exporter.getArtifactCollector();
-
- }
-
-
- public void testFileExistence() {
- assertFileAndExists(new File(getOutputDir(), "src/org/hibernate/tool/hbm2x/Article.java") );
- assertFileAndExists(new File(getOutputDir(), "src/org/hibernate/tool/hbm2x/Author.java") );
- assertFileAndExists(new File(getOutputDir(), "resources/jsp/editAuthor.jsp") );
- assertFileAndExists(new File(getOutputDir(), "build.xml") );
- }
-
- public void testArtifactCollection() {
- assertEquals(12,artifactCollector.getFileCount("java"));
- assertEquals(1,artifactCollector.getFileCount("html"));
- assertEquals(4,artifactCollector.getFileCount("jsp"));
- assertEquals(7,artifactCollector.getFileCount("xml"));
- assertEquals(3,artifactCollector.getFileCount("properties"));
- assertEquals(1,artifactCollector.getFileCount("txt"));
- assertEquals(1,artifactCollector.getFileCount("css"));
-
- assertEquals(7,artifactCollector.getFileTypes().size());
- }
-
- protected String getBaseForMappings() {
- return "org/hibernate/tool/hbm2x/";
- }
-
- protected String[] getMappings() {
- return new String[] {
- "Article.hbm.xml",
- "Author.hbm.xml"
- };
- }
-
-}
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2XAllTests.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2XAllTests.java 2007-08-03 13:11:28 UTC (rev 12893)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2XAllTests.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -23,8 +23,7 @@
suite.addTestSuite( Hbm2CfgTest.class );
suite.addTestSuite( GenericExporterTest.class );
suite.addTestSuite( Hbm2HibernateDAOTest.class );
- suite.addTestSuite( DocExporterTest.class );
- suite.addTestSuite( Hbm2SeamTest.class );
+ suite.addTestSuite( DocExporterTest.class );
suite.addTestSuite( PropertiesTest.class );
//$JUnit-END$
return suite;
Added: branches/Branch_3_2/HibernateExt/tools/src/testoutputdependent/properties/PropertiesUsage.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/testoutputdependent/properties/PropertiesUsage.java (rev 0)
+++ branches/Branch_3_2/HibernateExt/tools/src/testoutputdependent/properties/PropertiesUsage.java 2007-08-03 13:48:06 UTC (rev 12894)
@@ -0,0 +1,10 @@
+package properties;
+
+public class PropertiesUsage {
+
+ public void personName(){
+ PPerson person = new PPerson();
+ person.setName( "name" );
+ person.setContact(true);
+ }
+}
17 years, 5 months
Hibernate SVN: r12893 - in core/trunk/testsuite/src/test/perf/org: hibernate and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-03 09:11:28 -0400 (Fri, 03 Aug 2007)
New Revision: 12893
Added:
core/trunk/testsuite/src/test/perf/org/hibernate/
core/trunk/testsuite/src/test/perf/org/hibernate/test/
core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/
core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewPerformanceTest.java
core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewerPerformanceTest.java
core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/PerformanceTest.java
Log:
somehow the perf tests got dropped during my moving stuff around
Added: core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewPerformanceTest.java
===================================================================
--- core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewPerformanceTest.java (rev 0)
+++ core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewPerformanceTest.java 2007-08-03 13:11:28 UTC (rev 12893)
@@ -0,0 +1,93 @@
+package org.hibernate.test.perf;
+
+import java.io.Serializable;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.textui.TestRunner;
+
+import org.hibernate.classic.Session;
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.hibernate.test.legacy.Simple;
+
+public class NewPerformanceTest extends FunctionalTestCase {
+
+ public NewPerformanceTest(String arg0) {
+ super(arg0);
+ }
+
+ public String[] getMappings() {
+ return new String[] { "legacy/Simple.hbm.xml" };
+ }
+
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( NewPerformanceTest.class );
+ }
+
+ public static void main(String[] args) throws Exception {
+ TestRunner.run( suite() );
+ }
+
+ public void testPerformance() throws Exception {
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ }
+
+ Session s = openSession();
+ prepare(s, simples, ids, n);
+ s.close();
+
+ long find = 0;
+ long flush = 0;
+
+ for ( int i=0; i<100; i++ ) {
+
+ s = openSession();
+ long time = System.currentTimeMillis();
+ List list = s.createQuery("from Simple s where not s.name='osama bin laden' and s.other is null").list();
+ find += System.currentTimeMillis() - time;
+ assertTrue( list.size()==n );
+ time = System.currentTimeMillis();
+ s.flush();
+ flush += System.currentTimeMillis() - time;
+ time = System.currentTimeMillis();
+ s.connection().commit();
+ find += System.currentTimeMillis() - time;
+ s.close();
+
+ }
+
+ System.out.println( "Objects: " + n + " - find(): " + find + "ms / flush(): " + flush + "ms / Ratio: " + ( (float) flush )/find );
+ System.out.println( "Objects: " + n + " flush time per object: " + flush / 100.0 / n );
+ System.out.println( "Objects: " + n + " load time per object: " + find / 100.0 / n );
+ s = openSession();
+ delete(s);
+ s.close();
+
+ }
+ }
+
+ private void prepare(Session s, Simple[] simples, Serializable[] ids, int N) throws Exception {
+ for ( int i=0; i<N; i++ ) {
+ s.save( simples[i], ids[i] );
+ }
+ s.flush();
+ s.connection().commit();
+ }
+
+ private void delete(Session s) throws Exception {
+ s.delete("from Simple s");
+ s.flush();
+ s.connection().commit();
+ }
+
+}
Added: core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewerPerformanceTest.java
===================================================================
--- core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewerPerformanceTest.java (rev 0)
+++ core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/NewerPerformanceTest.java 2007-08-03 13:11:28 UTC (rev 12893)
@@ -0,0 +1,396 @@
+package org.hibernate.test.perf;
+
+import java.io.Serializable;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.textui.TestRunner;
+
+import org.hibernate.cfg.Environment;
+import org.hibernate.classic.Session;
+import org.hibernate.connection.ConnectionProvider;
+import org.hibernate.connection.ConnectionProviderFactory;
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.hibernate.test.legacy.Simple;
+
+public class NewerPerformanceTest extends FunctionalTestCase {
+
+ public NewerPerformanceTest(String name) {
+ super( name );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "legacy/Simple.hbm.xml" };
+ }
+
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( NewerPerformanceTest.class );
+ }
+
+ public static void main(String[] args) throws Exception {
+ TestRunner.run( suite() );
+ }
+
+ public void testMany() throws Exception {
+
+ ConnectionProvider cp = ConnectionProviderFactory.newConnectionProvider( Environment.getProperties() );
+
+ long hiber=0;
+ long jdbc=0;
+
+ for ( int n=0; n<20; n++ ) {
+
+ Session s = openSession();
+ s.delete("from Simple");
+ s.flush();
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ s.save(simples[i], ids[i]);
+ }
+ s.flush();
+ s.connection().commit();
+ s.close();
+
+ //allow cache to settle
+
+ s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ Connection c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ //Now do timings
+
+ int N=30;
+
+ long time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ s = openSession();
+ hibernate(s, simples, ids, n, "h1");
+ s.close();
+ }
+ hiber += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j1" );
+ cp.closeConnection(c);
+ }
+ jdbc += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ s = openSession();
+ hibernate(s, simples, ids, n, "h2");
+ s.close();
+ }
+ hiber += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j2" );
+ cp.closeConnection(c);
+ }
+ jdbc += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ s = openSession();
+ hibernate(s, simples, ids, n, "h1");
+ s.close();
+ }
+ hiber += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j1" );
+ cp.closeConnection(c);
+ }
+ jdbc += System.currentTimeMillis() - time;
+
+ }
+
+ System.out.println( "Hibernate: " + hiber + "ms / Direct JDBC: " + jdbc + "ms = Ratio: " + ( (float) hiber )/jdbc );
+
+ cp.close();
+ System.gc();
+ }
+
+ public void testSimultaneous() throws Exception {
+
+ ConnectionProvider cp = ConnectionProviderFactory.newConnectionProvider( Environment.getProperties() );
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Session s = openSession();
+ s.delete("from Simple");
+ s.flush();
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ s.save(simples[i], ids[i]);
+ }
+ s.flush();
+ s.connection().commit();
+ s.close();
+
+ //allow cache to settle
+
+ s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ Connection c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ //Now do timings
+
+ s = openSession();
+ long time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h1");
+ long hiber = System.currentTimeMillis() - time;
+ s.close();
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j1" );
+ long jdbc = System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ System.out.println( "Objects: " + n + " - Hibernate: " + hiber + "ms / Direct JDBC: " + jdbc + "ms = Ratio: " + ( (float) hiber )/jdbc );
+
+ }
+
+ cp.close();
+ System.gc();
+ }
+
+ public void testHibernateOnly() throws Exception {
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Session s = openSession();
+ Simple[] simples = new Simple[n];
+ s.delete("from Simple");
+ s.flush();
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ s.save(simples[i], ids[i]);
+ }
+ s.flush();
+ s.connection().commit();
+ s.close();
+
+ //Now do timings
+
+ s = openSession();
+ long time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h1");
+ long hiber = System.currentTimeMillis() - time;
+ s.close();
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ System.out.println( "Objects: " + n + " - Hibernate: " + hiber );
+
+ }
+
+ System.gc();
+ }
+
+ public void testJdbcOnly() throws Exception {
+
+ ConnectionProvider cp = ConnectionProviderFactory.newConnectionProvider( Environment.getProperties() );
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Session s = openSession();
+ Simple[] simples = new Simple[n];
+ s.delete("from Simple");
+ s.flush();
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ s.save(simples[i], ids[i]);
+ }
+ s.flush();
+ s.connection().commit();
+ s.close();
+
+
+ //Now do timings
+
+ Connection c = cp.getConnection();
+ long time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j1" );
+ long jdbc = System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ System.out.println( "Objects: " + n + " Direct JDBC: " + jdbc );
+
+ }
+
+ cp.close();
+ System.gc();
+ }
+
+ /*private void hibernate(Session s, Simple[] simples, Serializable[] ids, int N, String runname) throws Exception {
+ for ( int i=0; i<N; i++ ) {
+ s.get( Simple.class, ids[i] );
+ //s.find("from Simple s where s.id = ?", ids[i], Hibernate.LONG);
+ }
+ //s.flush();
+ s.connection().commit();
+ }
+
+ private void directJDBC(Connection c, Simple[] simples, Serializable[] ids, int N, String runname) throws SQLException {
+
+ for ( int i=0; i<N; i++ ) {
+ PreparedStatement select = c.prepareStatement("SELECT s.id_, s.name, s.address, s.count_, s.date_, s.pay, s.other FROM Simple s where s.id_=?");
+ select.setLong( 1, ( (Long) ids[i] ).longValue() );
+ ResultSet rs = select.executeQuery();
+ rs.next();
+ /*new Long( rs.getLong(1) );
+ rs.getString(2);
+ rs.getString(3);
+ rs.getInt(4);
+ rs.getDate(5);
+ rs.getFloat(6);
+ rs.getLong(7);*/
+ /*Simple s = new Simple();
+ new Long( rs.getLong("id_") ); rs.wasNull();
+ s.setName( rs.getString("name") ); rs.wasNull();
+ s.setAddress( rs.getString("address") ); rs.wasNull();
+ s.setCount( rs.getInt("count_") ); rs.wasNull();
+ s.setDate( rs.getTimestamp("date_") ); rs.wasNull();
+ s.setPay( new Float( rs.getFloat("pay") ) ); rs.wasNull();
+ rs.getLong("other"); rs.wasNull(); s.setOther(null);
+ rs.close();
+ select.close();
+ }
+ c.commit();
+ }*/
+
+ private void hibernate(Session s, Simple[] simples, Serializable[] ids, int N, String runname) throws Exception {
+ s.createQuery("from Simple s").list();
+ s.connection().commit();
+ }
+
+ private void directJDBC(Connection c, Simple[] simples, Serializable[] ids, int N, String runname) throws SQLException {
+ List result=new ArrayList();
+ PreparedStatement select = c.prepareStatement("SELECT s.id_ as id_, s.name as name, s.address as address, s.count_ as count_, s.date_ as date_, s.pay as pay, s.other as other FROM Simple s");
+ ResultSet rs = select.executeQuery();
+ while ( rs.next() ) {
+ /*new Long( rs.getLong(1) );
+ rs.getString(2);
+ rs.getString(3);
+ rs.getInt(4);
+ rs.getDate(5);
+ rs.getFloat(6);
+ rs.getLong(7);*/
+ Simple s = new Simple();
+ new Long( rs.getLong("id_") ); rs.wasNull();
+ s.setName( rs.getString("name") ); rs.wasNull();
+ s.setAddress( rs.getString("address") ); rs.wasNull();
+ s.setCount( rs.getInt("count_") ); rs.wasNull();
+ s.setDate( rs.getTimestamp("date_") ); rs.wasNull();
+ s.setPay( new Float( rs.getFloat("pay") ) ); rs.wasNull();
+ rs.getLong("other"); rs.wasNull(); s.setOther(null);
+ result.add(s);
+ }
+ rs.close();
+ select.close();
+ c.commit();
+ }
+
+}
Added: core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/PerformanceTest.java
===================================================================
--- core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/PerformanceTest.java (rev 0)
+++ core/trunk/testsuite/src/test/perf/org/hibernate/test/perf/PerformanceTest.java 2007-08-03 13:11:28 UTC (rev 12893)
@@ -0,0 +1,357 @@
+package org.hibernate.test.perf;
+
+import java.io.Serializable;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Types;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.hibernate.cfg.Environment;
+import org.hibernate.classic.Session;
+import org.hibernate.connection.ConnectionProvider;
+import org.hibernate.connection.ConnectionProviderFactory;
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.test.legacy.Simple;
+
+public class PerformanceTest extends FunctionalTestCase {
+
+ public PerformanceTest(String arg0) {
+ super(arg0);
+ }
+
+ public String[] getMappings() {
+ return new String[] { "legacy/Simple.hbm.xml" };
+ }
+
+ public static Test suite() throws Exception {
+ return new TestSuite(PerformanceTest.class);
+ }
+
+ public static void main(String[] args) throws Exception {
+ TestRunner.run( suite() );
+ }
+
+ public void testMany() throws Exception {
+
+ ConnectionProvider cp = ConnectionProviderFactory.newConnectionProvider( Environment.getProperties() );
+
+ long hiber=0;
+ long jdbc=0;
+
+ for ( int n=0; n<20; n++ ) {
+
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ }
+
+ //allow cache to settle
+
+ Session s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ Connection c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ //Now do timings
+
+ int N=30;
+
+ long time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ s = openSession();
+ hibernate(s, simples, ids, n, "h1");
+ s.close();
+ }
+ hiber += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j1" );
+ cp.closeConnection(c);
+ }
+ jdbc += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ s = openSession();
+ hibernate(s, simples, ids, n, "h2");
+ s.close();
+ }
+ hiber += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j2" );
+ cp.closeConnection(c);
+ }
+ jdbc += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ s = openSession();
+ hibernate(s, simples, ids, n, "h1");
+ s.close();
+ }
+ hiber += System.currentTimeMillis() - time;
+
+ time = System.currentTimeMillis();
+ for (int i=0; i<N; i++) {
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j1" );
+ cp.closeConnection(c);
+ }
+ jdbc += System.currentTimeMillis() - time;
+
+ }
+
+ System.out.println( "Hibernate: " + hiber + "ms / Direct JDBC: " + jdbc + "ms = Ratio: " + ( (float) hiber )/jdbc );
+
+ cp.close();
+ System.gc();
+ }
+
+ public void testSimultaneous() throws Exception {
+
+ ConnectionProvider cp = ConnectionProviderFactory.newConnectionProvider( Environment.getProperties() );
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ }
+
+ //allow cache to settle
+
+ Session s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ Connection c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ s = openSession();
+ hibernate(s, simples, ids, n, "h0");
+ s.close();
+
+ c = cp.getConnection();
+ directJDBC( c, simples, ids, n, "j0" );
+ cp.closeConnection(c);
+
+ //Now do timings
+
+ s = openSession();
+ long time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h1");
+ long hiber = System.currentTimeMillis() - time;
+ s.close();
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j1" );
+ long jdbc = System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ System.out.println( "Objects: " + n + " - Hibernate: " + hiber + "ms / Direct JDBC: " + jdbc + "ms = Ratio: " + ( (float) hiber )/jdbc );
+
+ }
+
+ cp.close();
+ System.gc();
+ }
+
+ public void testHibernateOnly() throws Exception {
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ }
+
+ //Now do timings
+
+ Session s = openSession();
+ long time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h1");
+ long hiber = System.currentTimeMillis() - time;
+ s.close();
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ s = openSession();
+ time = System.currentTimeMillis();
+ hibernate(s, simples, ids, n, "h2");
+ hiber += System.currentTimeMillis() - time;
+ s.close();
+
+ System.out.println( "Objects: " + n + " - Hibernate: " + hiber );
+
+ }
+
+ System.gc();
+ }
+
+ public void testJdbcOnly() throws Exception {
+
+ ConnectionProvider cp = ConnectionProviderFactory.newConnectionProvider( Environment.getProperties() );
+
+ for ( int n=2; n<4000; n*=2 ) {
+
+ Simple[] simples = new Simple[n];
+ Serializable[] ids = new Serializable[n];
+ for ( int i=0; i<n; i++ ) {
+ simples[i] = new Simple();
+ simples[i].init();
+ simples[i].setCount(i);
+ ids[i] = new Long(i);
+ }
+
+ //Now do timings
+
+ Connection c = cp.getConnection();
+ long time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j1" );
+ long jdbc = System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ c = cp.getConnection();
+ time = System.currentTimeMillis();
+ directJDBC( c, simples, ids, n, "j2" );
+ jdbc += System.currentTimeMillis() - time;
+ cp.closeConnection(c);
+
+ System.out.println( "Objects: " + n + " Direct JDBC: " + jdbc );
+
+ }
+
+ cp.close();
+ System.gc();
+ }
+
+ private void hibernate(Session s, Simple[] simples, Serializable[] ids, int N, String runname) throws Exception {
+ for ( int i=0; i<N; i++ ) {
+ s.save( simples[i], ids[i] );
+ }
+ for ( int i=0; i<N; i++ ) {
+ simples[0].setName("A Different Name!" + i + N + runname);
+ }
+ //s.flush();
+ // the results of this test are highly dependent upon
+ // how many times we flush!
+ assertTrue( "assertion", s.delete("from Simple s")==N );
+ s.flush();
+ s.connection().commit();
+ }
+
+ private void directJDBC(Connection c, Simple[] simples, Serializable[] ids, int N, String runname) throws SQLException {
+
+ PreparedStatement insert = c.prepareStatement("insert into Simple ( name, address, count_, date_, other, id_ ) values ( ?, ?, ?, ?, ?, ? )");
+ PreparedStatement delete = c.prepareStatement("delete from Simple where id_ = ?");
+ PreparedStatement select = c.prepareStatement("SELECT s.id_, s.name, s.address, s.count_, s.date_, s.other FROM Simple s");
+ PreparedStatement update = c.prepareStatement("update Simple set name = ?, address = ?, count_ = ?, date_ = ?, other = ? where id_ = ?");
+ for ( int i=0; i<N; i++ ) {
+ insert.setString(1, simples[i].getName() );
+ insert.setString(2, simples[i].getAddress() );
+ insert.setInt(3, simples[i].getCount() );
+ insert.setDate( 4, (java.sql.Date) simples[i].getDate() );
+ insert.setNull(5, Types.BIGINT);
+ insert.setLong( 6, ( (Long) ids[i] ).longValue() );
+ insert.executeUpdate();
+ }
+ insert.close();
+ for ( int i=0; i<N; i++ ) {
+ update.setString(1, "A Different Name!" + i + N + runname );
+ update.setString(2, simples[i].getAddress() );
+ update.setInt(3, simples[i].getCount() );
+ update.setDate( 4, (java.sql.Date) simples[i].getDate() );
+ update.setNull(5, Types.BIGINT);
+ update.setLong( 6, ( (Long) ids[i] ).longValue() );
+ update.executeUpdate();
+ }
+ update.close();
+ java.sql.ResultSet rs = select.executeQuery();
+ Long[] keys = new Long[N];
+ int j=0;
+ while ( rs.next() ) {
+ keys[j++] = new Long( rs.getLong(1) );
+ rs.getString(2);
+ rs.getString(3);
+ rs.getInt(4);
+ rs.getDate(5);
+ rs.getLong(6);
+ }
+ rs.close();
+ select.close();
+ for ( int i=0; i<N; i++ ) {
+ delete.setLong(1, keys[i].longValue() );
+ delete.executeUpdate();
+ }
+ delete.close();
+ c.commit();
+ }
+}
17 years, 5 months
Hibernate SVN: r12892 - core/trunk/testsuite/src/test.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-03 08:47:14 -0400 (Fri, 03 Aug 2007)
New Revision: 12892
Removed:
core/trunk/testsuite/src/test/profile/
Log:
testsuite now uses maven profiles with properties file interpolation
17 years, 5 months
Hibernate SVN: r12891 - in core/trunk: cache-ehcache/src/main/java/org/hibernate/cache and 73 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-03 00:09:17 -0400 (Fri, 03 Aug 2007)
New Revision: 12891
Added:
core/trunk/testsuite/src/test/resources/hibernate.properties
Removed:
core/trunk/testsuite/src/test/profile/hsqldb/hsqldb-env.xml
Modified:
core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java
core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCacheProvider.java
core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java
core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCacheProvider.java
core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCache.java
core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCacheProvider.java
core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/InvalidationCacheInstanceManager.java
core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/ReadOnlyAccess.java
core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/TransactionalAccess.java
core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/ReadOnlyAccess.java
core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/TransactionalAccess.java
core/trunk/connection-c3p0/src/main/java/org/hibernate/connection/C3P0ConnectionProvider.java
core/trunk/connection-proxool/src/main/java/org/hibernate/connection/ProxoolConnectionProvider.java
core/trunk/core/pom.xml
core/trunk/core/src/main/antlr/hql-sql.g
core/trunk/core/src/main/antlr/sql-gen.g
core/trunk/core/src/main/java/org/hibernate/AssertionFailure.java
core/trunk/core/src/main/java/org/hibernate/LazyInitializationException.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java
core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/BytecodeProviderImpl.java
core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/JavassistClassTransformer.java
core/trunk/core/src/main/java/org/hibernate/cache/AbstractJndiBoundCacheProvider.java
core/trunk/core/src/main/java/org/hibernate/cache/NonstrictReadWriteCache.java
core/trunk/core/src/main/java/org/hibernate/cache/ReadOnlyCache.java
core/trunk/core/src/main/java/org/hibernate/cache/ReadWriteCache.java
core/trunk/core/src/main/java/org/hibernate/cache/StandardQueryCache.java
core/trunk/core/src/main/java/org/hibernate/cache/TransactionalCache.java
core/trunk/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java
core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/CollectionRegionAdapter.java
core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/EntityRegionAdapter.java
core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/RegionFactoryCacheProviderBridge.java
core/trunk/core/src/main/java/org/hibernate/cfg/CollectionSecondPass.java
core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java
core/trunk/core/src/main/java/org/hibernate/cfg/Environment.java
core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java
core/trunk/core/src/main/java/org/hibernate/cfg/Mappings.java
core/trunk/core/src/main/java/org/hibernate/cfg/NamedSQLQuerySecondPass.java
core/trunk/core/src/main/java/org/hibernate/cfg/SettingsFactory.java
core/trunk/core/src/main/java/org/hibernate/collection/PersistentArrayHolder.java
core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
core/trunk/core/src/main/java/org/hibernate/connection/DatasourceConnectionProvider.java
core/trunk/core/src/main/java/org/hibernate/connection/DriverManagerConnectionProvider.java
core/trunk/core/src/main/java/org/hibernate/connection/UserSuppliedConnectionProvider.java
core/trunk/core/src/main/java/org/hibernate/context/JTASessionContext.java
core/trunk/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java
core/trunk/core/src/main/java/org/hibernate/dialect/Dialect.java
core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java
core/trunk/core/src/main/java/org/hibernate/dialect/Oracle9Dialect.java
core/trunk/core/src/main/java/org/hibernate/dialect/OracleDialect.java
core/trunk/core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java
core/trunk/core/src/main/java/org/hibernate/dialect/lock/UpdateLockingStrategy.java
core/trunk/core/src/main/java/org/hibernate/engine/ActionQueue.java
core/trunk/core/src/main/java/org/hibernate/engine/Cascade.java
core/trunk/core/src/main/java/org/hibernate/engine/CascadingAction.java
core/trunk/core/src/main/java/org/hibernate/engine/CollectionEntry.java
core/trunk/core/src/main/java/org/hibernate/engine/Collections.java
core/trunk/core/src/main/java/org/hibernate/engine/IdentifierValue.java
core/trunk/core/src/main/java/org/hibernate/engine/ParameterBinder.java
core/trunk/core/src/main/java/org/hibernate/engine/QueryParameters.java
core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
core/trunk/core/src/main/java/org/hibernate/engine/TwoPhaseLoad.java
core/trunk/core/src/main/java/org/hibernate/engine/VersionValue.java
core/trunk/core/src/main/java/org/hibernate/engine/Versioning.java
core/trunk/core/src/main/java/org/hibernate/engine/loading/CollectionLoadContext.java
core/trunk/core/src/main/java/org/hibernate/engine/loading/EntityLoadContext.java
core/trunk/core/src/main/java/org/hibernate/engine/loading/LoadContexts.java
core/trunk/core/src/main/java/org/hibernate/engine/query/HQLQueryPlan.java
core/trunk/core/src/main/java/org/hibernate/engine/query/NativeSQLQueryPlan.java
core/trunk/core/src/main/java/org/hibernate/engine/query/QueryPlanCache.java
core/trunk/core/src/main/java/org/hibernate/engine/transaction/Isolater.java
core/trunk/core/src/main/java/org/hibernate/event/def/AbstractFlushingEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/AbstractLockUpgradeEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/AbstractReassociateEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/AbstractSaveEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultAutoFlushEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDeleteEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDirtyCheckEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultEvictEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultFlushEntityEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultInitializeCollectionEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultPersistEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultRefreshEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultReplicateEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/DefaultSaveOrUpdateEventListener.java
core/trunk/core/src/main/java/org/hibernate/event/def/EvictVisitor.java
core/trunk/core/src/main/java/org/hibernate/event/def/ReattachVisitor.java
core/trunk/core/src/main/java/org/hibernate/event/def/WrapVisitor.java
core/trunk/core/src/main/java/org/hibernate/exception/SQLExceptionConverterFactory.java
core/trunk/core/src/main/java/org/hibernate/hql/QuerySplitter.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/ASTQueryTranslatorFactory.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/ErrorCounter.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlParser.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlSqlWalker.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/QueryTranslatorImpl.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/BasicExecutor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableDeleteExecutor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/AbstractRestrictableStatement.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DeleteStatement.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DotNode.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromClause.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElement.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementFactory.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementType.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromReferenceNode.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IndexNode.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/MethodNode.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/QueryNode.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/UpdateStatement.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/util/JoinProcessor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/util/LiteralProcessor.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/util/PathHelper.java
core/trunk/core/src/main/java/org/hibernate/hql/ast/util/SyntheticAndFactory.java
core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java
core/trunk/core/src/main/java/org/hibernate/id/GUIDGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/IdentifierGeneratorFactory.java
core/trunk/core/src/main/java/org/hibernate/id/IncrementGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/PersistentIdentifierGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/SequenceGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/SequenceHiLoGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/TableGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/TableHiLoGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java
core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStructure.java
core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java
core/trunk/core/src/main/java/org/hibernate/impl/AbstractScrollableResults.java
core/trunk/core/src/main/java/org/hibernate/impl/IteratorImpl.java
core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java
core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryObjectFactory.java
core/trunk/core/src/main/java/org/hibernate/impl/SessionImpl.java
core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java
core/trunk/core/src/main/java/org/hibernate/jdbc/ConnectionManager.java
core/trunk/core/src/main/java/org/hibernate/jdbc/Expectations.java
core/trunk/core/src/main/java/org/hibernate/jdbc/JDBCContext.java
core/trunk/core/src/main/java/org/hibernate/loader/Loader.java
core/trunk/core/src/main/java/org/hibernate/loader/collection/BasicCollectionLoader.java
core/trunk/core/src/main/java/org/hibernate/loader/collection/OneToManyLoader.java
core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLCustomQuery.java
core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java
core/trunk/core/src/main/java/org/hibernate/loader/entity/AbstractEntityLoader.java
core/trunk/core/src/main/java/org/hibernate/loader/entity/CollectionElementLoader.java
core/trunk/core/src/main/java/org/hibernate/mapping/RootClass.java
core/trunk/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java
core/trunk/core/src/main/java/org/hibernate/persister/collection/NamedQueryCollectionInitializer.java
core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
core/trunk/core/src/main/java/org/hibernate/persister/entity/NamedQueryLoader.java
core/trunk/core/src/main/java/org/hibernate/pretty/Printer.java
core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java
core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
core/trunk/core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java
core/trunk/core/src/main/java/org/hibernate/secure/JACCConfiguration.java
core/trunk/core/src/main/java/org/hibernate/stat/StatisticsImpl.java
core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseMetadata.java
core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java
core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java
core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java
core/trunk/core/src/main/java/org/hibernate/transaction/CMTTransaction.java
core/trunk/core/src/main/java/org/hibernate/transaction/CacheSynchronization.java
core/trunk/core/src/main/java/org/hibernate/transaction/JDBCTransaction.java
core/trunk/core/src/main/java/org/hibernate/transaction/JTATransaction.java
core/trunk/core/src/main/java/org/hibernate/transaction/JTATransactionFactory.java
core/trunk/core/src/main/java/org/hibernate/transaction/TransactionFactoryFactory.java
core/trunk/core/src/main/java/org/hibernate/transaction/TransactionManagerLookupFactory.java
core/trunk/core/src/main/java/org/hibernate/transaction/WebSphereTransactionManagerLookup.java
core/trunk/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java
core/trunk/core/src/main/java/org/hibernate/tuple/PojoInstantiator.java
core/trunk/core/src/main/java/org/hibernate/tuple/entity/Dom4jEntityTuplizer.java
core/trunk/core/src/main/java/org/hibernate/tuple/entity/DynamicMapEntityTuplizer.java
core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java
core/trunk/core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java
core/trunk/core/src/main/java/org/hibernate/type/DbTimestampType.java
core/trunk/core/src/main/java/org/hibernate/type/NullableType.java
core/trunk/core/src/main/java/org/hibernate/util/ConfigHelper.java
core/trunk/core/src/main/java/org/hibernate/util/DTDEntityResolver.java
core/trunk/core/src/main/java/org/hibernate/util/JDBCExceptionReporter.java
core/trunk/core/src/main/java/org/hibernate/util/NamingHelper.java
core/trunk/core/src/main/java/org/hibernate/util/SerializationHelper.java
core/trunk/core/src/main/java/org/hibernate/util/XMLHelper.java
core/trunk/documentation/manual/es-ES/src/main/docbook/modules/quickstart.xml
core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/quickstart.xml
core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/quickstart.xml
core/trunk/documentation/tutorial/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java
core/trunk/jmx/pom.xml
core/trunk/jmx/src/main/java/org/hibernate/jmx/HibernateService.java
core/trunk/jmx/src/main/java/org/hibernate/jmx/SessionFactoryStub.java
core/trunk/jmx/src/main/java/org/hibernate/jmx/StatisticsService.java
core/trunk/pom.xml
core/trunk/testing/pom.xml
core/trunk/testing/src/main/java/org/hibernate/junit/SkipLog.java
core/trunk/testing/src/main/java/org/hibernate/junit/UnitTestCase.java
core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestCase.java
core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java
core/trunk/testsuite/pom.xml
core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/functional/cache/SQLFunctionsInterSystemsTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulationTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/jpa/cascade/CascadeTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/typeparameters/DefaultValueIntegerType.java
core/trunk/testsuite/src/test/resources/log4j.properties
Log:
HHH-2704 : migrate to maven (testsuite)
HHH-2696 : migrate to slf4j
Modified: core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java
===================================================================
--- core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -16,15 +16,14 @@
*/
package org.hibernate.cache;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* EHCache plugin for Hibernate
@@ -39,7 +38,7 @@
* @author Emmanuel Bernard
*/
public class EhCache implements Cache {
- private static final Log log = LogFactory.getLog( EhCache.class );
+ private static final Logger log = LoggerFactory.getLogger( EhCache.class );
private static final int SIXTY_THOUSAND_MS = 60000;
Modified: core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCacheProvider.java
===================================================================
--- core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCacheProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-ehcache/src/main/java/org/hibernate/cache/EhCacheProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -20,8 +20,8 @@
import java.net.URL;
import net.sf.ehcache.CacheManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cfg.Environment;
import org.hibernate.util.StringHelper;
import org.hibernate.util.ConfigHelper;
@@ -62,7 +62,7 @@
*/
public class EhCacheProvider implements CacheProvider {
- private static final Log log = LogFactory.getLog(EhCacheProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(EhCacheProvider.class);
private CacheManager manager;
Modified: core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java
===================================================================
--- core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import java.util.Comparator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.config.Option;
@@ -27,7 +27,7 @@
// todo : eventually merge this with TreeCache and just add optional opt-lock support there.
- private static final Log log = LogFactory.getLog( OptimisticTreeCache.class);
+ private static final Logger log = LoggerFactory.getLogger( OptimisticTreeCache.class);
private static final String ITEM = "item";
Modified: core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCacheProvider.java
===================================================================
--- core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCacheProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCacheProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.util.Properties;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cfg.Environment;
import org.hibernate.transaction.TransactionManagerLookup;
import org.hibernate.transaction.TransactionManagerLookupFactory;
@@ -32,7 +32,7 @@
public static final String DEFAULT_CONFIG = "treecache.xml";
private static final String NODE_LOCKING_SCHEME = "OPTIMISTIC";
- private static final Log log = LogFactory.getLog( OptimisticTreeCacheProvider.class );
+ private static final Logger log = LoggerFactory.getLogger( OptimisticTreeCacheProvider.class );
private org.jboss.cache.TreeCache cache;
Modified: core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCache.java
===================================================================
--- core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.lock.TimeoutException;
@@ -22,7 +22,7 @@
*/
public class TreeCache implements Cache, TransactionAwareCache {
- private static final Log log = LogFactory.getLog(TreeCache.class);
+ private static final Logger log = LoggerFactory.getLogger(TreeCache.class);
private static final String ITEM = "item";
Modified: core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCacheProvider.java
===================================================================
--- core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCacheProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCacheProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.util.Properties;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.transaction.TransactionManagerLookup;
import org.hibernate.transaction.TransactionManagerLookupFactory;
import org.hibernate.cfg.Environment;
@@ -25,7 +25,7 @@
public static final String CONFIG_RESOURCE = "hibernate.cache.tree_cache.config";
public static final String DEFAULT_CONFIG = "treecache.xml";
- private static final Log log = LogFactory.getLog( TreeCacheProvider.class );
+ private static final Logger log = LoggerFactory.getLogger( TreeCacheProvider.class );
private org.jboss.cache.TreeCache cache;
private TransactionManager transactionManager;
Modified: core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/InvalidationCacheInstanceManager.java
===================================================================
--- core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/InvalidationCacheInstanceManager.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/builder/InvalidationCacheInstanceManager.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -18,8 +18,8 @@
import java.util.Properties;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
@@ -42,7 +42,7 @@
public static final String CACHE_RESOURCE_PROP = "hibernate.cache.region.jbc2.cfg.invalidation";
public static final String DEFAULT_CACHE_RESOURCE = "treecache.xml";
- private static final Log log = LogFactory.getLog( InvalidationCacheInstanceManager.class );
+ private static final Logger log = LoggerFactory.getLogger( InvalidationCacheInstanceManager.class );
private final Cache cache;
Modified: core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/ReadOnlyAccess.java
===================================================================
--- core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/ReadOnlyAccess.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/ReadOnlyAccess.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
*/
package org.hibernate.cache.jbc2.collection;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.SoftLock;
import org.hibernate.cache.CacheException;
@@ -30,7 +30,7 @@
* @author Steve Ebersole
*/
public class ReadOnlyAccess extends TransactionalAccess {
- private static final Log log = LogFactory.getLog( ReadOnlyAccess.class );
+ private static final Logger log = LoggerFactory.getLogger( ReadOnlyAccess.class );
public ReadOnlyAccess(CollectionRegionImpl region) {
super( region );
Modified: core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/TransactionalAccess.java
===================================================================
--- core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/TransactionalAccess.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/collection/TransactionalAccess.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
*/
package org.hibernate.cache.jbc2.collection;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.CollectionRegionAccessStrategy;
import org.hibernate.cache.access.SoftLock;
@@ -29,7 +29,7 @@
* @author Steve Ebersole
*/
public class TransactionalAccess implements CollectionRegionAccessStrategy {
- private static final Log log = LogFactory.getLog( TransactionalAccess.class );
+ private static final Logger log = LoggerFactory.getLogger( TransactionalAccess.class );
private final CollectionRegionImpl region;
Modified: core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/ReadOnlyAccess.java
===================================================================
--- core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/ReadOnlyAccess.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/ReadOnlyAccess.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
*/
package org.hibernate.cache.jbc2.entity;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.SoftLock;
import org.hibernate.cache.CacheException;
@@ -30,7 +30,7 @@
* @author Steve Ebersole
*/
public class ReadOnlyAccess extends TransactionalAccess {
- private static final Log log = LogFactory.getLog( ReadOnlyAccess.class );
+ private static final Logger log = LoggerFactory.getLogger( ReadOnlyAccess.class );
public ReadOnlyAccess(EntityRegionImpl region) {
super( region );
Modified: core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/TransactionalAccess.java
===================================================================
--- core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/TransactionalAccess.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/entity/TransactionalAccess.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
*/
package org.hibernate.cache.jbc2.entity;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.lock.TimeoutException;
@@ -32,7 +32,7 @@
* @author Steve Ebersole
*/
public class TransactionalAccess implements EntityRegionAccessStrategy {
- private static final Log log = LogFactory.getLog( TransactionalAccess.class );
+ private static final Logger log = LoggerFactory.getLogger( TransactionalAccess.class );
private final EntityRegionImpl region;
Modified: core/trunk/connection-c3p0/src/main/java/org/hibernate/connection/C3P0ConnectionProvider.java
===================================================================
--- core/trunk/connection-c3p0/src/main/java/org/hibernate/connection/C3P0ConnectionProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/connection-c3p0/src/main/java/org/hibernate/connection/C3P0ConnectionProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import javax.sql.DataSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.mchange.v2.c3p0.DataSources;
@@ -27,7 +27,7 @@
*/
public class C3P0ConnectionProvider implements ConnectionProvider {
- private static final Log log = LogFactory.getLog( C3P0ConnectionProvider.class );
+ private static final Logger log = LoggerFactory.getLogger( C3P0ConnectionProvider.class );
//swaldman 2006-08-28: define c3p0-style configuration parameters for properties with
// hibernate-specific overrides to detect and warn about conflicting
@@ -97,7 +97,7 @@
}
catch ( ClassNotFoundException e ) {
String msg = "JDBC Driver class not found: " + jdbcDriverClass;
- log.fatal( msg, e );
+ log.error( msg, e );
throw new HibernateException( msg, e );
}
}
@@ -159,7 +159,7 @@
ds = DataSources.pooledDataSource( unpooled, allProps );
}
catch ( Exception e ) {
- log.fatal( "could not instantiate C3P0 connection pool", e );
+ log.error( "could not instantiate C3P0 connection pool", e );
throw new HibernateException( "Could not instantiate C3P0 connection pool", e );
}
Modified: core/trunk/connection-proxool/src/main/java/org/hibernate/connection/ProxoolConnectionProvider.java
===================================================================
--- core/trunk/connection-proxool/src/main/java/org/hibernate/connection/ProxoolConnectionProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/connection-proxool/src/main/java/org/hibernate/connection/ProxoolConnectionProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -12,8 +12,8 @@
import org.hibernate.util.StringHelper;
import org.hibernate.util.ConfigHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.logicalcobwebs.proxool.ProxoolException;
import org.logicalcobwebs.proxool.ProxoolFacade;
@@ -30,7 +30,7 @@
private static final String PROXOOL_JDBC_STEM = "proxool.";
- private static final Log log = LogFactory.getLog(ProxoolConnectionProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(ProxoolConnectionProvider.class);
private String proxoolAlias;
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/pom.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -30,10 +30,6 @@
<version>3.1</version>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
Modified: core/trunk/core/src/main/antlr/hql-sql.g
===================================================================
--- core/trunk/core/src/main/antlr/hql-sql.g 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/antlr/hql-sql.g 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
// $Id: hql-sql.g 10001 2006-06-08 21:08:04Z steve.ebersole(a)jboss.com $
package org.hibernate.hql.antlr;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
}
/**
@@ -54,7 +54,7 @@
// -- Declarations --
{
- private static Log log = LogFactory.getLog( HqlSqlBaseWalker.class );
+ private static Logger log = LoggerFactory.getLogger( HqlSqlBaseWalker.class );
private int level = 0;
private boolean inSelect = false;
Modified: core/trunk/core/src/main/antlr/sql-gen.g
===================================================================
--- core/trunk/core/src/main/antlr/sql-gen.g 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/antlr/sql-gen.g 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
// $Id: sql-gen.g 10001 2006-06-08 21:08:04Z steve.ebersole(a)jboss.com $
package org.hibernate.hql.antlr;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
}
/**
@@ -28,7 +28,7 @@
}
{
- private static Log log = LogFactory.getLog(SqlGeneratorBase.class);
+ private static Logger log = LoggerFactory.getLogger(SqlGeneratorBase.class);
/** the buffer resulting SQL statement is written to */
private StringBuffer buf = new StringBuffer();
Modified: core/trunk/core/src/main/java/org/hibernate/AssertionFailure.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/AssertionFailure.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/AssertionFailure.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -2,8 +2,8 @@
package org.hibernate;
import org.hibernate.exception.NestableRuntimeException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Indicates failure of an assertion: a possible bug in Hibernate.
@@ -13,7 +13,7 @@
public class AssertionFailure extends NestableRuntimeException {
- private static final Log log = LogFactory.getLog(AssertionFailure.class);
+ private static final Logger log = LoggerFactory.getLogger(AssertionFailure.class);
private static final String MESSAGE = "an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)";
Modified: core/trunk/core/src/main/java/org/hibernate/LazyInitializationException.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/LazyInitializationException.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/LazyInitializationException.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,7 +1,7 @@
//$Id: LazyInitializationException.java 4458 2004-08-29 09:59:17Z oneovthafew $
package org.hibernate;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
/**
* Indicates access to unfetched data outside of a session context.
@@ -16,7 +16,7 @@
public LazyInitializationException(String msg) {
super(msg);
- LogFactory.getLog(LazyInitializationException.class).error(msg, this);
+ LoggerFactory.getLogger( LazyInitializationException.class ).error( msg, this );
}
}
Modified: core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import net.sf.cglib.transform.TransformingClassLoader;
import net.sf.cglib.transform.impl.InterceptFieldFilter;
import net.sf.cglib.transform.impl.InterceptFieldTransformer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.bytecode.BytecodeProvider;
import org.hibernate.bytecode.ProxyFactoryFactory;
import org.hibernate.bytecode.ReflectionOptimizer;
@@ -27,7 +27,7 @@
*/
public class BytecodeProviderImpl implements BytecodeProvider {
- private static final Log log = LogFactory.getLog( BytecodeProviderImpl.class );
+ private static final Logger log = LoggerFactory.getLogger( BytecodeProviderImpl.class );
public ProxyFactoryFactory getProxyFactoryFactory() {
return new ProxyFactoryFactoryImpl();
Modified: core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -14,8 +14,8 @@
import net.sf.cglib.transform.impl.InterceptFieldTransformer;
import net.sf.cglib.core.ClassNameReader;
import net.sf.cglib.core.DebuggingClassWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.bytecode.AbstractClassTransformerImpl;
import org.hibernate.bytecode.util.FieldFilter;
import org.hibernate.bytecode.util.ClassFilter;
@@ -34,7 +34,7 @@
*/
public class CglibClassTransformer extends AbstractClassTransformerImpl {
- private static Log log = LogFactory.getLog( CglibClassTransformer.class.getName() );
+ private static Logger log = LoggerFactory.getLogger( CglibClassTransformer.class.getName() );
public CglibClassTransformer(ClassFilter classFilter, FieldFilter fieldFilter) {
super( classFilter, fieldFilter );
Modified: core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/BytecodeProviderImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/BytecodeProviderImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/BytecodeProviderImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -2,8 +2,8 @@
import java.lang.reflect.Modifier;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.bytecode.BytecodeProvider;
import org.hibernate.bytecode.ClassTransformer;
import org.hibernate.bytecode.ProxyFactoryFactory;
@@ -19,7 +19,7 @@
*/
public class BytecodeProviderImpl implements BytecodeProvider {
- private static final Log log = LogFactory.getLog( BytecodeProviderImpl.class );
+ private static final Logger log = LoggerFactory.getLogger( BytecodeProviderImpl.class );
public ProxyFactoryFactory getProxyFactoryFactory() {
return new ProxyFactoryFactoryImpl();
Modified: core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/JavassistClassTransformer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/JavassistClassTransformer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/javassist/JavassistClassTransformer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.security.ProtectionDomain;
import javassist.bytecode.ClassFile;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.bytecode.AbstractClassTransformerImpl;
import org.hibernate.bytecode.util.ClassFilter;
@@ -24,7 +24,7 @@
*/
public class JavassistClassTransformer extends AbstractClassTransformerImpl {
- private static Log log = LogFactory.getLog( JavassistClassTransformer.class.getName() );
+ private static Logger log = LoggerFactory.getLogger( JavassistClassTransformer.class.getName() );
public JavassistClassTransformer(ClassFilter classFilter, org.hibernate.bytecode.util.FieldFilter fieldFilter) {
super( classFilter, fieldFilter );
Modified: core/trunk/core/src/main/java/org/hibernate/cache/AbstractJndiBoundCacheProvider.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/AbstractJndiBoundCacheProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/AbstractJndiBoundCacheProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cfg.Environment;
import org.hibernate.util.NamingHelper;
import org.hibernate.util.StringHelper;
@@ -21,7 +21,7 @@
*/
public abstract class AbstractJndiBoundCacheProvider implements CacheProvider {
- private static final Log log = LogFactory.getLog( AbstractJndiBoundCacheProvider.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractJndiBoundCacheProvider.class );
private Object cache;
protected void prepare(Properties properties) {
Modified: core/trunk/core/src/main/java/org/hibernate/cache/NonstrictReadWriteCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/NonstrictReadWriteCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/NonstrictReadWriteCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Comparator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.SoftLock;
@@ -22,7 +22,7 @@
private Cache cache;
- private static final Log log = LogFactory.getLog( NonstrictReadWriteCache.class );
+ private static final Logger log = LoggerFactory.getLogger( NonstrictReadWriteCache.class );
public NonstrictReadWriteCache() {
}
Modified: core/trunk/core/src/main/java/org/hibernate/cache/ReadOnlyCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/ReadOnlyCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/ReadOnlyCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Comparator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.SoftLock;
@@ -15,7 +15,7 @@
public class ReadOnlyCache implements CacheConcurrencyStrategy {
private Cache cache;
- private static final Log log = LogFactory.getLog(ReadOnlyCache.class);
+ private static final Logger log = LoggerFactory.getLogger(ReadOnlyCache.class);
public ReadOnlyCache() {}
Modified: core/trunk/core/src/main/java/org/hibernate/cache/ReadWriteCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/ReadWriteCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/ReadWriteCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Comparator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.SoftLock;
@@ -27,7 +27,7 @@
*/
public class ReadWriteCache implements CacheConcurrencyStrategy {
- private static final Log log = LogFactory.getLog(ReadWriteCache.class);
+ private static final Logger log = LoggerFactory.getLogger(ReadWriteCache.class);
private Cache cache;
private int nextLockId;
Modified: core/trunk/core/src/main/java/org/hibernate/cache/StandardQueryCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/StandardQueryCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/StandardQueryCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.Properties;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.UnresolvableObjectException;
@@ -28,7 +28,7 @@
*/
public class StandardQueryCache implements QueryCache {
- private static final Log log = LogFactory.getLog( StandardQueryCache.class );
+ private static final Logger log = LoggerFactory.getLogger( StandardQueryCache.class );
private QueryResultsRegion cacheRegion;
private UpdateTimestampsCache updateTimestampsCache;
Modified: core/trunk/core/src/main/java/org/hibernate/cache/TransactionalCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/TransactionalCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/TransactionalCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Comparator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.access.SoftLock;
@@ -18,7 +18,7 @@
*/
public class TransactionalCache implements CacheConcurrencyStrategy {
- private static final Log log = LogFactory.getLog( TransactionalCache.class );
+ private static final Logger log = LoggerFactory.getLogger( TransactionalCache.class );
private Cache cache;
Modified: core/trunk/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.util.Properties;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Settings;
@@ -24,7 +24,7 @@
*/
public class UpdateTimestampsCache {
public static final String REGION_NAME = UpdateTimestampsCache.class.getName();
- private static final Log log = LogFactory.getLog( UpdateTimestampsCache.class );
+ private static final Logger log = LoggerFactory.getLogger( UpdateTimestampsCache.class );
private final TimestampsRegion region;
Modified: core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/CollectionRegionAdapter.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/CollectionRegionAdapter.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/CollectionRegionAdapter.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,7 +1,7 @@
package org.hibernate.cache.impl.bridge;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.CollectionRegion;
import org.hibernate.cache.Cache;
@@ -23,7 +23,7 @@
* @author Steve Ebersole
*/
public class CollectionRegionAdapter extends BaseTransactionalDataRegionAdapter implements CollectionRegion {
- private static final Log log = LogFactory.getLog( CollectionRegionAdapter.class );
+ private static final Logger log = LoggerFactory.getLogger( CollectionRegionAdapter.class );
public CollectionRegionAdapter(Cache underlyingCache, Settings settings, CacheDataDescription metadata) {
super( underlyingCache, settings, metadata );
Modified: core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/EntityRegionAdapter.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/EntityRegionAdapter.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/EntityRegionAdapter.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,7 +1,7 @@
package org.hibernate.cache.impl.bridge;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.EntityRegion;
import org.hibernate.cache.Cache;
@@ -23,7 +23,7 @@
* @author Steve Ebersole
*/
public class EntityRegionAdapter extends BaseTransactionalDataRegionAdapter implements EntityRegion {
- private static final Log log = LogFactory.getLog( EntityRegionAdapter.class );
+ private static final Logger log = LoggerFactory.getLogger( EntityRegionAdapter.class );
public EntityRegionAdapter(Cache underlyingCache, Settings settings, CacheDataDescription metadata) {
super( underlyingCache, settings, metadata );
Modified: core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/RegionFactoryCacheProviderBridge.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/RegionFactoryCacheProviderBridge.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cache/impl/bridge/RegionFactoryCacheProviderBridge.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -2,8 +2,8 @@
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.RegionFactory;
import org.hibernate.cache.CacheProvider;
@@ -27,7 +27,7 @@
*/
public class RegionFactoryCacheProviderBridge implements RegionFactory {
public static final String DEF_PROVIDER = NoCacheProvider.class.getName();
- private static final Log log = LogFactory.getLog( RegionFactoryCacheProviderBridge.class );
+ private static final Logger log = LoggerFactory.getLogger( RegionFactoryCacheProviderBridge.class );
private CacheProvider cacheProvider;
private Settings settings;
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/CollectionSecondPass.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/CollectionSecondPass.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/CollectionSecondPass.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import java.util.Iterator;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.MappingException;
import org.hibernate.mapping.Collection;
import org.hibernate.mapping.IndexedCollection;
@@ -20,7 +20,7 @@
* @author Emmanuel Bernard
*/
public abstract class CollectionSecondPass implements SecondPass {
- private static Log log = LogFactory.getLog( CollectionSecondPass.class );
+ private static Logger log = LoggerFactory.getLogger( CollectionSecondPass.class );
Mappings mappings;
Collection collection;
private Map localInheritedMetas;
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -26,8 +26,8 @@
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.dom4j.Attribute;
import org.dom4j.DocumentException;
import org.dom4j.Element;
@@ -117,7 +117,7 @@
*/
public class Configuration implements Serializable {
- private static Log log = LogFactory.getLog( Configuration.class );
+ private static Logger log = LoggerFactory.getLogger( Configuration.class );
protected Map classes;
protected Map imports;
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/Environment.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/Environment.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/Environment.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.bytecode.BytecodeProvider;
@@ -490,7 +490,7 @@
private static final Map OBSOLETE_PROPERTIES = new HashMap();
private static final Map RENAMED_PROPERTIES = new HashMap();
- private static final Log log = LogFactory.getLog(Environment.class);
+ private static final Logger log = LoggerFactory.getLogger(Environment.class);
/**
* Issues warnings to the user when any obsolete property names are used.
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.Properties;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.Element;
@@ -85,7 +85,7 @@
*/
public final class HbmBinder {
- private static final Log log = LogFactory.getLog( HbmBinder.class );
+ private static final Logger log = LoggerFactory.getLogger( HbmBinder.class );
/**
* Private constructor to disallow instantiation.
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/Mappings.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/Mappings.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/Mappings.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import java.util.Properties;
import java.util.HashMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.DuplicateMappingException;
import org.hibernate.MappingException;
import org.hibernate.engine.FilterDefinition;
@@ -33,7 +33,7 @@
*/
public class Mappings implements Serializable {
- private static final Log log = LogFactory.getLog(Mappings.class);
+ private static final Logger log = LoggerFactory.getLogger(Mappings.class);
protected final Map classes;
protected final Map collections;
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/NamedSQLQuerySecondPass.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/NamedSQLQuerySecondPass.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/NamedSQLQuerySecondPass.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,14 +11,14 @@
import org.hibernate.engine.ResultSetMappingDefinition;
import org.dom4j.Attribute;
import org.dom4j.Element;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class NamedSQLQuerySecondPass extends ResultSetMappingBinder implements QuerySecondPass {
- private static Log log = LogFactory.getLog( NamedSQLQuerySecondPass.class);
+ private static Logger log = LoggerFactory.getLogger( NamedSQLQuerySecondPass.class);
private Element queryElem;
private String path;
private Mappings mappings;
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/SettingsFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/SettingsFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/SettingsFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
@@ -46,7 +46,7 @@
public class SettingsFactory implements Serializable {
public static final String DEF_CACHE_REG_FACTORY = NoCachingRegionFactory.class.getName();
- private static final Log log = LogFactory.getLog(SettingsFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(SettingsFactory.class);
protected SettingsFactory() {
}
Modified: core/trunk/core/src/main/java/org/hibernate/collection/PersistentArrayHolder.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/collection/PersistentArrayHolder.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/collection/PersistentArrayHolder.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.Collection;
import java.util.Iterator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.loader.CollectionAliases;
@@ -28,7 +28,7 @@
public class PersistentArrayHolder extends AbstractPersistentCollection {
protected Object array;
- private static final Log log = LogFactory.getLog(PersistentArrayHolder.class);
+ private static final Logger log = LoggerFactory.getLogger(PersistentArrayHolder.class);
//just to help out during the load (ugly, i know)
private transient Class elementClass;
Modified: core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -13,8 +13,8 @@
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
@@ -34,11 +34,11 @@
public final class ConnectionProviderFactory {
- private static final Log log = LogFactory.getLog(ConnectionProviderFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(ConnectionProviderFactory.class);
/**
* Instantiate a <tt>ConnectionProvider</tt> using <tt>System</tt> properties.
- * @return ConnectionProvider
+ * @return The created connection provider.
* @throws HibernateException
*/
public static ConnectionProvider newConnectionProvider() throws HibernateException {
@@ -57,11 +57,11 @@
}
/**
- * Instantiate a <tt>ConnectionProvider</tt> using given properties.
- * Method newConnectionProvider.
- * @param properties hibernate <tt>SessionFactory</tt> properties
- * @Param connectionProviderInjectionData object to be injected in the conenction provided
- * @return ConnectionProvider
+ * Create a connection provider based on the given information.
+ *
+ * @param properties Properties being used to build the {@link org.hibernate.SessionFactory}.
+ * @param connectionProviderInjectionData Soemthing to be injected in the conenction provided
+ * @return The created connection provider
* @throws HibernateException
*/
public static ConnectionProvider newConnectionProvider(Properties properties, Map connectionProviderInjectionData) throws HibernateException {
@@ -72,8 +72,8 @@
log.info("Initializing connection provider: " + providerClass);
connections = (ConnectionProvider) ReflectHelper.classForName(providerClass).newInstance();
}
- catch (Exception e) {
- log.fatal("Could not instantiate connection provider", e);
+ catch ( Exception e ) {
+ log.error( "Could not instantiate connection provider", e );
throw new HibernateException("Could not instantiate connection provider: " + providerClass);
}
}
Modified: core/trunk/core/src/main/java/org/hibernate/connection/DatasourceConnectionProvider.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/connection/DatasourceConnectionProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/connection/DatasourceConnectionProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import org.hibernate.cfg.Environment;
import org.hibernate.util.NamingHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A connection provider that uses a <tt>DataSource</tt> registered with JNDI.
@@ -26,7 +26,7 @@
private String user;
private String pass;
- private static final Log log = LogFactory.getLog(DatasourceConnectionProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(DatasourceConnectionProvider.class);
public DataSource getDataSource() {
return ds;
@@ -38,24 +38,24 @@
public void configure(Properties props) throws HibernateException {
- String jndiName = props.getProperty(Environment.DATASOURCE);
- if (jndiName==null) {
+ String jndiName = props.getProperty( Environment.DATASOURCE );
+ if ( jndiName == null ) {
String msg = "datasource JNDI name was not specified by property " + Environment.DATASOURCE;
- log.fatal(msg);
- throw new HibernateException(msg);
+ log.error( msg );
+ throw new HibernateException( msg );
}
- user = props.getProperty(Environment.USER);
- pass = props.getProperty(Environment.PASS);
+ user = props.getProperty( Environment.USER );
+ pass = props.getProperty( Environment.PASS );
try {
- ds = (DataSource) NamingHelper.getInitialContext(props).lookup(jndiName);
+ ds = ( DataSource ) NamingHelper.getInitialContext( props ).lookup( jndiName );
}
- catch (Exception e) {
- log.fatal( "Could not find datasource: " + jndiName, e );
+ catch ( Exception e ) {
+ log.error( "Could not find datasource: " + jndiName, e );
throw new HibernateException( "Could not find datasource", e );
}
- if (ds==null) {
+ if ( ds == null ) {
throw new HibernateException( "Could not find datasource: " + jndiName );
}
log.info( "Using datasource: " + jndiName );
Modified: core/trunk/core/src/main/java/org/hibernate/connection/DriverManagerConnectionProvider.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/connection/DriverManagerConnectionProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/connection/DriverManagerConnectionProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import java.util.Iterator;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
import org.hibernate.util.PropertiesHelper;
@@ -31,7 +31,7 @@
private int checkedOut = 0;
private boolean autocommit;
- private static final Log log = LogFactory.getLog(DriverManagerConnectionProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(DriverManagerConnectionProvider.class);
public void configure(Properties props) throws HibernateException {
@@ -62,20 +62,20 @@
}
catch (ClassNotFoundException e) {
String msg = "JDBC Driver class not found: " + driverClass;
- log.fatal(msg, e);
+ log.error( msg, e );
throw new HibernateException(msg, e);
}
}
}
- url = props.getProperty(Environment.URL);
- if (url==null) {
+ url = props.getProperty( Environment.URL );
+ if ( url == null ) {
String msg = "JDBC URL was not specified by property " + Environment.URL;
- log.fatal(msg);
- throw new HibernateException(msg);
+ log.error( msg );
+ throw new HibernateException( msg );
}
- connectionProps = ConnectionProviderFactory.getConnectionProperties(props);
+ connectionProps = ConnectionProviderFactory.getConnectionProperties( props );
log.info( "using driver: " + driverClass + " at URL: " + url );
// if debug level is enabled, then log the password, otherwise mask it
Modified: core/trunk/core/src/main/java/org/hibernate/connection/UserSuppliedConnectionProvider.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/connection/UserSuppliedConnectionProvider.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/connection/UserSuppliedConnectionProvider.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,7 +4,7 @@
import java.sql.Connection;
import java.util.Properties;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
/**
@@ -20,7 +20,8 @@
* @see org.hibernate.connection.ConnectionProvider#configure(Properties)
*/
public void configure(Properties props) throws HibernateException {
- LogFactory.getLog(UserSuppliedConnectionProvider.class).warn("No connection properties specified - the user must supply JDBC connections");
+ LoggerFactory.getLogger( UserSuppliedConnectionProvider.class )
+ .warn( "No connection properties specified - the user must supply JDBC connections" );
}
/**
Modified: core/trunk/core/src/main/java/org/hibernate/context/JTASessionContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/context/JTASessionContext.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/context/JTASessionContext.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import org.hibernate.classic.Session;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.util.JTAHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
@@ -39,7 +39,7 @@
*/
public class JTASessionContext implements CurrentSessionContext {
- private static final Log log = LogFactory.getLog( JTASessionContext.class );
+ private static final Logger log = LoggerFactory.getLogger( JTASessionContext.class );
protected final SessionFactoryImplementor factory;
private transient Map currentSessionMap = new Hashtable();
Modified: core/trunk/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -12,8 +12,8 @@
import java.util.Map;
import javax.transaction.Synchronization;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
@@ -48,7 +48,7 @@
*/
public class ThreadLocalSessionContext implements CurrentSessionContext {
- private static final Log log = LogFactory.getLog( ThreadLocalSessionContext.class );
+ private static final Logger log = LoggerFactory.getLogger( ThreadLocalSessionContext.class );
private static final Class[] SESS_PROXY_INTERFACES = new Class[] {
org.hibernate.classic.Session.class,
org.hibernate.engine.SessionImplementor.class,
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/Dialect.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/Dialect.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import java.util.Properties;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
@@ -56,7 +56,7 @@
*/
public abstract class Dialect {
- private static final Log log = LogFactory.getLog( Dialect.class );
+ private static final Logger log = LoggerFactory.getLogger( Dialect.class );
public static final String DEFAULT_BATCH_SIZE = "15";
public static final String NO_BATCH = "0";
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -21,8 +21,8 @@
import org.hibernate.exception.JDBCExceptionHelper;
import org.hibernate.exception.TemplatedViolatedConstraintNameExtracter;
import org.hibernate.exception.ViolatedConstraintNameExtracter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* An SQL dialect compatible with HSQLDB (Hypersonic SQL).
@@ -33,7 +33,7 @@
*/
public class HSQLDialect extends Dialect {
- private static final Log log = LogFactory.getLog( HSQLDialect.class );
+ private static final Logger log = LoggerFactory.getLogger( HSQLDialect.class );
private boolean schemaSupport;
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/Oracle9Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/Oracle9Dialect.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/Oracle9Dialect.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.sql.SQLException;
import java.sql.Types;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
@@ -30,7 +30,7 @@
*/
public class Oracle9Dialect extends Dialect {
- private static final Log log = LogFactory.getLog( Oracle9Dialect.class );
+ private static final Logger log = LoggerFactory.getLogger( Oracle9Dialect.class );
public Oracle9Dialect() {
super();
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/OracleDialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/OracleDialect.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/OracleDialect.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.sql.Types;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.sql.CaseFragment;
import org.hibernate.sql.DecodeCaseFragment;
@@ -19,7 +19,7 @@
*/
public class OracleDialect extends Oracle9Dialect {
- private static final Log log = LogFactory.getLog( OracleDialect.class );
+ private static final Logger log = LoggerFactory.getLogger( OracleDialect.class );
public OracleDialect() {
super();
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -24,14 +24,14 @@
import org.hibernate.persister.entity.Lockable;
import org.hibernate.sql.CaseFragment;
import org.hibernate.sql.DecodeCaseFragment;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Ploski and Hanson
*/
public class RDMSOS2200Dialect extends Dialect {
- private static Log log = LogFactory.getLog(RDMSOS2200Dialect.class);
+ private static Logger log = LoggerFactory.getLogger(RDMSOS2200Dialect.class);
public RDMSOS2200Dialect() {
super();
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/lock/UpdateLockingStrategy.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/lock/UpdateLockingStrategy.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/lock/UpdateLockingStrategy.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import org.hibernate.sql.Update;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.SessionFactoryImplementor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.sql.PreparedStatement;
@@ -27,7 +27,7 @@
* @author Steve Ebersole
*/
public class UpdateLockingStrategy implements LockingStrategy {
- private static final Log log = LogFactory.getLog( UpdateLockingStrategy.class );
+ private static final Logger log = LoggerFactory.getLogger( UpdateLockingStrategy.class );
private final Lockable lockable;
private final LockMode lockMode;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/ActionQueue.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/ActionQueue.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/ActionQueue.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -13,8 +13,8 @@
import org.hibernate.HibernateException;
import org.hibernate.AssertionFailure;
import org.hibernate.cache.CacheException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +37,7 @@
*/
public class ActionQueue {
- private static final Log log = LogFactory.getLog( ActionQueue.class );
+ private static final Logger log = LoggerFactory.getLogger( ActionQueue.class );
private static final int INIT_QUEUE_LIST_SIZE = 5;
private SessionImplementor session;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/Cascade.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/Cascade.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/Cascade.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.util.Collection;
import java.util.Iterator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.collection.PersistentCollection;
@@ -72,7 +72,7 @@
public static final int BEFORE_MERGE = 0;
- private static final Log log = LogFactory.getLog( Cascade.class );
+ private static final Logger log = LoggerFactory.getLogger( Cascade.class );
private int cascadeTo;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/CascadingAction.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/CascadingAction.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/CascadingAction.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.ReplicationMode;
@@ -26,7 +26,7 @@
*/
public abstract class CascadingAction {
- private static final Log log = LogFactory.getLog( CascadingAction.class );
+ private static final Logger log = LoggerFactory.getLogger( CascadingAction.class );
// the CascadingAction contract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: core/trunk/core/src/main/java/org/hibernate/engine/CollectionEntry.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/CollectionEntry.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/CollectionEntry.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.io.ObjectInputStream;
import java.util.Collection;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
@@ -24,7 +24,7 @@
*/
public final class CollectionEntry implements Serializable {
- private static final Log log = LogFactory.getLog(CollectionEntry.class);
+ private static final Logger log = LoggerFactory.getLogger(CollectionEntry.class);
//ATTRIBUTES MAINTAINED BETWEEN FLUSH CYCLES
Modified: core/trunk/core/src/main/java/org/hibernate/engine/Collections.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/Collections.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/Collections.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: Collections.java 8694 2005-11-28 19:28:17Z steveebersole $
package org.hibernate.engine;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
@@ -21,7 +21,7 @@
private Collections() {}
- private static final Log log = LogFactory.getLog(Collections.class);
+ private static final Logger log = LoggerFactory.getLogger(Collections.class);
/**
* record the fact that this collection was dereferenced
Modified: core/trunk/core/src/main/java/org/hibernate/engine/IdentifierValue.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/IdentifierValue.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/IdentifierValue.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A strategy for determining if an identifier value is an identifier of
@@ -16,7 +16,7 @@
*/
public class IdentifierValue {
- private static final Log log = LogFactory.getLog(IdentifierValue.class);
+ private static final Logger log = LoggerFactory.getLogger(IdentifierValue.class);
private final Serializable value;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/ParameterBinder.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/ParameterBinder.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/ParameterBinder.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import org.hibernate.HibernateException;
import org.hibernate.type.Type;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.PreparedStatement;
import java.sql.SQLException;
@@ -22,7 +22,7 @@
*/
public class ParameterBinder {
- private static final Log log = LogFactory.getLog( ParameterBinder.class );
+ private static final Logger log = LoggerFactory.getLogger( ParameterBinder.class );
public static interface NamedParameterSource {
public int[] getNamedParameterLocations(String name);
Modified: core/trunk/core/src/main/java/org/hibernate/engine/QueryParameters.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/QueryParameters.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/QueryParameters.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import java.util.Map;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.QueryException;
@@ -27,7 +27,7 @@
* @author Gavin King
*/
public final class QueryParameters {
- private static final Log log = LogFactory.getLog(QueryParameters.class);
+ private static final Logger log = LoggerFactory.getLogger(QueryParameters.class);
private Type[] positionalParameterTypes;
private Object[] positionalParameterValues;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -14,8 +14,8 @@
import java.util.Map;
import org.apache.commons.collections.map.ReferenceMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
@@ -51,8 +51,8 @@
public static final Object NO_ROW = new MarkerObject( "NO_ROW" );
- private static final Log log = LogFactory.getLog( StatefulPersistenceContext.class );
- private static final Log PROXY_WARN_LOG = LogFactory.getLog( StatefulPersistenceContext.class.getName() + ".ProxyWarnLog" );
+ private static final Logger log = LoggerFactory.getLogger( StatefulPersistenceContext.class );
+ private static final Logger PROXY_WARN_LOG = LoggerFactory.getLogger( StatefulPersistenceContext.class.getName() + ".ProxyWarnLog" );
private static final int INIT_COLL_SIZE = 8;
private SessionImplementor session;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/TwoPhaseLoad.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/TwoPhaseLoad.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/TwoPhaseLoad.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.CacheMode;
import org.hibernate.HibernateException;
@@ -31,7 +31,7 @@
*/
public final class TwoPhaseLoad {
- private static final Log log = LogFactory.getLog(TwoPhaseLoad.class);
+ private static final Logger log = LoggerFactory.getLogger(TwoPhaseLoad.class);
private TwoPhaseLoad() {}
Modified: core/trunk/core/src/main/java/org/hibernate/engine/VersionValue.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/VersionValue.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/VersionValue.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: VersionValue.java 7017 2005-06-05 04:31:34Z oneovthafew $
package org.hibernate.engine;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.MappingException;
import org.hibernate.id.IdentifierGeneratorFactory;
@@ -16,7 +16,7 @@
*/
public class VersionValue {
- private static final Log log = LogFactory.getLog(VersionValue.class);
+ private static final Logger log = LoggerFactory.getLogger(VersionValue.class);
private final Object value;
/**
Modified: core/trunk/core/src/main/java/org/hibernate/engine/Versioning.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/Versioning.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/Versioning.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: Versioning.java 10857 2006-11-21 23:28:07Z steve.ebersole(a)jboss.com $
package org.hibernate.engine;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.type.VersionType;
@@ -36,7 +36,7 @@
*/
public static final int OPTIMISTIC_LOCK_DIRTY = 1;
- private static final Log log = LogFactory.getLog( Versioning.class );
+ private static final Logger log = LoggerFactory.getLogger( Versioning.class );
/**
* Private constructor disallowing instantiation.
Modified: core/trunk/core/src/main/java/org/hibernate/engine/loading/CollectionLoadContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/loading/CollectionLoadContext.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/loading/CollectionLoadContext.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import java.util.Set;
import java.util.HashSet;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.persister.collection.CollectionPersister;
@@ -35,7 +35,7 @@
* @author Steve Ebersole
*/
public class CollectionLoadContext {
- private static final Log log = LogFactory.getLog( CollectionLoadContext.class );
+ private static final Logger log = LoggerFactory.getLogger( CollectionLoadContext.class );
private final LoadContexts loadContexts;
private final ResultSet resultSet;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/loading/EntityLoadContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/loading/EntityLoadContext.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/loading/EntityLoadContext.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.util.List;
import java.util.ArrayList;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* {@inheritDoc}
@@ -13,7 +13,7 @@
* @author Steve Ebersole
*/
public class EntityLoadContext {
- private static final Log log = LogFactory.getLog( EntityLoadContext.class );
+ private static final Logger log = LoggerFactory.getLogger( EntityLoadContext.class );
private final LoadContexts loadContexts;
private final ResultSet resultSet;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/loading/LoadContexts.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/loading/LoadContexts.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/loading/LoadContexts.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.HashMap;
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.util.IdentityMap;
import org.hibernate.engine.PersistenceContext;
@@ -36,7 +36,7 @@
* @author Steve Ebersole
*/
public class LoadContexts {
- private static final Log log = LogFactory.getLog( LoadContexts.class );
+ private static final Logger log = LoggerFactory.getLogger( LoadContexts.class );
private final PersistenceContext persistenceContext;
private Map collectionLoadContexts;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/query/HQLQueryPlan.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/query/HQLQueryPlan.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/query/HQLQueryPlan.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -17,8 +17,8 @@
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.RowSelection;
import org.hibernate.event.EventSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.util.Map;
@@ -38,7 +38,7 @@
// TODO : keep seperate notions of QT[] here for shallow/non-shallow queries...
- private static final Log log = LogFactory.getLog( HQLQueryPlan.class );
+ private static final Logger log = LoggerFactory.getLogger( HQLQueryPlan.class );
private final String sourceQuery;
private final QueryTranslator[] translators;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/query/NativeSQLQueryPlan.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/query/NativeSQLQueryPlan.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/query/NativeSQLQueryPlan.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.QueryException;
import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
@@ -33,7 +33,7 @@
private final SQLCustomQuery customQuery;
- private static final Log log = LogFactory.getLog(NativeSQLQueryPlan.class);
+ private static final Logger log = LoggerFactory.getLogger(NativeSQLQueryPlan.class);
public NativeSQLQueryPlan(
NativeSQLQuerySpecification specification,
Modified: core/trunk/core/src/main/java/org/hibernate/engine/query/QueryPlanCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/query/QueryPlanCache.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/query/QueryPlanCache.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
import org.hibernate.QueryException;
import org.hibernate.MappingException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.util.Map;
@@ -26,7 +26,7 @@
*/
public class QueryPlanCache implements Serializable {
- private static final Log log = LogFactory.getLog( QueryPlanCache.class );
+ private static final Logger log = LoggerFactory.getLogger( QueryPlanCache.class );
private SessionFactoryImplementor factory;
Modified: core/trunk/core/src/main/java/org/hibernate/engine/transaction/Isolater.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/transaction/Isolater.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/engine/transaction/Isolater.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.exception.JDBCExceptionHelper;
@@ -24,7 +24,7 @@
*/
public class Isolater {
- private static final Log log = LogFactory.getLog( Isolater.class );
+ private static final Logger log = LoggerFactory.getLogger( Isolater.class );
/**
* Ensures that all processing actually performed by the given work will
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/AbstractFlushingEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/AbstractFlushingEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/AbstractFlushingEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.action.CollectionRecreateAction;
import org.hibernate.action.CollectionRemoveAction;
@@ -39,7 +39,7 @@
*/
public abstract class AbstractFlushingEventListener implements Serializable {
- private static final Log log = LogFactory.getLog(AbstractFlushingEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(AbstractFlushingEventListener.class);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Pre-flushing section
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/AbstractLockUpgradeEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/AbstractLockUpgradeEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/AbstractLockUpgradeEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: AbstractLockUpgradeEventListener.java 11398 2007-04-10 14:54:07Z steve.ebersole(a)jboss.com $
package org.hibernate.event.def;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.LockMode;
import org.hibernate.ObjectDeletedException;
@@ -22,7 +22,7 @@
*/
public class AbstractLockUpgradeEventListener extends AbstractReassociateEventListener {
- private static final Log log = LogFactory.getLog(AbstractLockUpgradeEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(AbstractLockUpgradeEventListener.class);
/**
* Performs a pessimistic lock upgrade on a given entity, if needed.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/AbstractReassociateEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/AbstractReassociateEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/AbstractReassociateEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.LockMode;
import org.hibernate.engine.EntityEntry;
@@ -25,7 +25,7 @@
*/
public class AbstractReassociateEventListener implements Serializable {
- private static final Log log = LogFactory.getLog( AbstractReassociateEventListener.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractReassociateEventListener.class );
/**
* Associates a given entity (either transient or associated with another session) to
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/AbstractSaveEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/AbstractSaveEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/AbstractSaveEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.LockMode;
import org.hibernate.NonUniqueObjectException;
@@ -44,7 +44,7 @@
protected static final int DETACHED = 2;
protected static final int DELETED = 3;
- private static final Log log = LogFactory.getLog( AbstractSaveEventListener.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractSaveEventListener.class );
/**
* Prepares the save call using the given requested id.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultAutoFlushEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultAutoFlushEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultAutoFlushEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: DefaultAutoFlushEventListener.java 7785 2005-08-08 23:24:44Z oneovthafew $
package org.hibernate.event.def;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
import org.hibernate.event.AutoFlushEvent;
@@ -17,7 +17,7 @@
*/
public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener implements AutoFlushEventListener {
- private static final Log log = LogFactory.getLog(DefaultAutoFlushEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultAutoFlushEventListener.class);
/** Handle the given auto-flush event.
*
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDeleteEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDeleteEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDeleteEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.CacheMode;
import org.hibernate.HibernateException;
@@ -39,7 +39,7 @@
*/
public class DefaultDeleteEventListener implements DeleteEventListener {
- private static final Log log = LogFactory.getLog( DefaultDeleteEventListener.class );
+ private static final Logger log = LoggerFactory.getLogger( DefaultDeleteEventListener.class );
/**
* Handle the given delete event.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDirtyCheckEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDirtyCheckEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultDirtyCheckEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import org.hibernate.HibernateException;
import org.hibernate.event.DirtyCheckEvent;
import org.hibernate.event.DirtyCheckEventListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Defines the default dirty-check event listener used by hibernate for
@@ -16,7 +16,7 @@
*/
public class DefaultDirtyCheckEventListener extends AbstractFlushingEventListener implements DirtyCheckEventListener {
- private static final Log log = LogFactory.getLog(DefaultDirtyCheckEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultDirtyCheckEventListener.class);
/** Handle the given dirty-check event.
*
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultEvictEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultEvictEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultEvictEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.engine.Cascade;
import org.hibernate.engine.CascadingAction;
@@ -29,7 +29,7 @@
*/
public class DefaultEvictEventListener implements EvictEventListener {
- private static final Log log = LogFactory.getLog(DefaultEvictEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultEvictEventListener.class);
/**
* Handle the given evict event.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultFlushEntityEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultFlushEntityEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultFlushEntityEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
@@ -34,7 +34,7 @@
*/
public class DefaultFlushEntityEventListener implements FlushEntityEventListener {
- private static final Log log = LogFactory.getLog(DefaultFlushEntityEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultFlushEntityEventListener.class);
/**
* make sure user didn't mangle the id
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultInitializeCollectionEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultInitializeCollectionEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultInitializeCollectionEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cache.CacheKey;
import org.hibernate.cache.entry.CollectionCacheEntry;
@@ -23,7 +23,7 @@
*/
public class DefaultInitializeCollectionEventListener implements InitializeCollectionEventListener {
- private static final Log log = LogFactory.getLog(DefaultInitializeCollectionEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultInitializeCollectionEventListener.class);
/**
* called by a collection that wants to initialize itself
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.NonUniqueObjectException;
@@ -46,7 +46,7 @@
public static final Object INCONSISTENT_RTN_CLASS_MARKER = new Object();
public static final LockMode DEFAULT_LOCK_MODE = LockMode.NONE;
- private static final Log log = LogFactory.getLog(DefaultLoadEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultLoadEventListener.class);
/**
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.ObjectDeletedException;
@@ -37,7 +37,7 @@
public class DefaultMergeEventListener extends AbstractSaveEventListener
implements MergeEventListener {
- private static final Log log = LogFactory.getLog(DefaultMergeEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultMergeEventListener.class);
protected Map getMergeMap(Object anything) {
return IdentityMap.invert( (Map) anything );
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultPersistEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultPersistEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultPersistEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.ObjectDeletedException;
import org.hibernate.PersistentObjectException;
@@ -26,7 +26,7 @@
*/
public class DefaultPersistEventListener extends AbstractSaveEventListener implements PersistEventListener {
- private static final Log log = LogFactory.getLog(DefaultPersistEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultPersistEventListener.class);
/**
* Handle the given create event.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultRefreshEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultRefreshEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultRefreshEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.PersistentObjectException;
import org.hibernate.UnresolvableObjectException;
@@ -33,7 +33,7 @@
*/
public class DefaultRefreshEventListener implements RefreshEventListener {
- private static final Log log = LogFactory.getLog(DefaultRefreshEventListener.class);
+ private static final Logger log = LoggerFactory.getLogger(DefaultRefreshEventListener.class);
public void onRefresh(RefreshEvent event) throws HibernateException {
onRefresh( event, IdentityMap.instantiate(10) );
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultReplicateEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultReplicateEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultReplicateEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -19,8 +19,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Defines the default replicate event listener used by Hibernate to replicate
@@ -30,7 +30,7 @@
*/
public class DefaultReplicateEventListener extends AbstractSaveEventListener implements ReplicateEventListener {
- private static final Log log = LogFactory.getLog( DefaultReplicateEventListener.class );
+ private static final Logger log = LoggerFactory.getLogger( DefaultReplicateEventListener.class );
/**
* Handle the given replicate event.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultSaveOrUpdateEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultSaveOrUpdateEventListener.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultSaveOrUpdateEventListener.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
@@ -36,7 +36,7 @@
*/
public class DefaultSaveOrUpdateEventListener extends AbstractSaveEventListener implements SaveOrUpdateEventListener {
- private static final Log log = LogFactory.getLog( DefaultSaveOrUpdateEventListener.class );
+ private static final Logger log = LoggerFactory.getLogger( DefaultSaveOrUpdateEventListener.class );
/**
* Handle the given update event.
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/EvictVisitor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/EvictVisitor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/EvictVisitor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: EvictVisitor.java 6929 2005-05-27 03:54:08Z oneovthafew $
package org.hibernate.event.def;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.CollectionEntry;
@@ -20,7 +20,7 @@
*/
public class EvictVisitor extends AbstractVisitor {
- private static final Log log = LogFactory.getLog(EvictVisitor.class);
+ private static final Logger log = LoggerFactory.getLogger(EvictVisitor.class);
EvictVisitor(EventSource session) {
super(session);
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/ReattachVisitor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/ReattachVisitor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/ReattachVisitor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.action.CollectionRemoveAction;
import org.hibernate.event.EventSource;
@@ -20,7 +20,7 @@
*/
public abstract class ReattachVisitor extends ProxyVisitor {
- private static final Log log = LogFactory.getLog( ReattachVisitor.class );
+ private static final Logger log = LoggerFactory.getLogger( ReattachVisitor.class );
private final Serializable ownerIdentifier;
private final Object owner;
Modified: core/trunk/core/src/main/java/org/hibernate/event/def/WrapVisitor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/WrapVisitor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/WrapVisitor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: WrapVisitor.java 7181 2005-06-17 19:36:08Z oneovthafew $
package org.hibernate.event.def;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.collection.PersistentCollection;
@@ -22,7 +22,7 @@
*/
public class WrapVisitor extends ProxyVisitor {
- private static final Log log = LogFactory.getLog(WrapVisitor.class);
+ private static final Logger log = LoggerFactory.getLogger(WrapVisitor.class);
boolean substitute = false;
Modified: core/trunk/core/src/main/java/org/hibernate/exception/SQLExceptionConverterFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/exception/SQLExceptionConverterFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/exception/SQLExceptionConverterFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
// $Id: SQLExceptionConverterFactory.java 4782 2004-11-21 00:11:27Z pgmjsd $
package org.hibernate.exception;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.JDBCException;
import org.hibernate.cfg.Environment;
@@ -21,7 +21,7 @@
*/
public class SQLExceptionConverterFactory {
- private static final Log log = LogFactory.getLog( SQLExceptionConverterFactory.class );
+ private static final Logger log = LoggerFactory.getLogger( SQLExceptionConverterFactory.class );
private SQLExceptionConverterFactory() {
// Private constructor - stops checkstyle from complaining.
Modified: core/trunk/core/src/main/java/org/hibernate/hql/QuerySplitter.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/QuerySplitter.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/QuerySplitter.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: QuerySplitter.java 7646 2005-07-25 07:37:13Z oneovthafew $
package org.hibernate.hql;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.MappingException;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.hql.classic.ParserHelper;
@@ -21,7 +21,7 @@
*/
public final class QuerySplitter {
- private static final Log log = LogFactory.getLog( QuerySplitter.class );
+ private static final Logger log = LoggerFactory.getLogger( QuerySplitter.class );
private static final Set BEFORE_CLASS_TOKENS = new HashSet();
private static final Set NOT_AFTER_CLASS_TOKENS = new HashSet();
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/ASTQueryTranslatorFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/ASTQueryTranslatorFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/ASTQueryTranslatorFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: ASTQueryTranslatorFactory.java 9162 2006-01-27 23:40:32Z steveebersole $
package org.hibernate.hql.ast;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.hql.FilterTranslator;
import org.hibernate.hql.QueryTranslator;
@@ -18,7 +18,7 @@
*/
public class ASTQueryTranslatorFactory implements QueryTranslatorFactory {
- private static final Log log = LogFactory.getLog( ASTQueryTranslatorFactory.class );
+ private static final Logger log = LoggerFactory.getLogger( ASTQueryTranslatorFactory.class );
public ASTQueryTranslatorFactory() {
log.info( "Using ASTQueryTranslatorFactory" );
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/ErrorCounter.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/ErrorCounter.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/ErrorCounter.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -2,8 +2,8 @@
package org.hibernate.hql.ast;
import antlr.RecognitionException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.QueryException;
import java.util.ArrayList;
@@ -14,8 +14,8 @@
* An error handler that counts parsing errors and warnings.
*/
public class ErrorCounter implements ParseErrorHandler {
- private Log log = LogFactory.getLog( ErrorCounter.class );
- private Log hqlLog = LogFactory.getLog( "org.hibernate.hql.PARSER" );
+ private Logger log = LoggerFactory.getLogger( ErrorCounter.class );
+ private Logger hqlLog = LoggerFactory.getLogger( "org.hibernate.hql.PARSER" );
private List errorList = new ArrayList();
private List warningList = new ArrayList();
@@ -25,7 +25,7 @@
reportError( e.toString() );
recognitionExceptions.add( e );
if ( log.isDebugEnabled() ) {
- log.debug( e, e );
+ log.debug( e.toString(), e );
}
}
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlParser.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlParser.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlParser.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -12,8 +12,8 @@
import antlr.TokenStream;
import antlr.TokenStreamException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.hql.antlr.HqlBaseParser;
import org.hibernate.hql.antlr.HqlTokenTypes;
import org.hibernate.hql.ast.util.ASTPrinter;
@@ -30,7 +30,7 @@
/**
* A logger for this class.
*/
- private static final Log log = LogFactory.getLog( HqlParser.class );
+ private static final Logger log = LoggerFactory.getLogger( HqlParser.class );
private ParseErrorHandler parseErrorHandler;
private ASTPrinter printer = getASTPrinter();
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlSqlWalker.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlSqlWalker.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/HqlSqlWalker.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.QueryException;
import org.hibernate.HibernateException;
import org.hibernate.engine.JoinSequence;
@@ -88,7 +88,7 @@
* @see SqlASTFactory
*/
public class HqlSqlWalker extends HqlSqlBaseWalker implements ErrorReporter, ParameterBinder.NamedParameterSource {
- private static final Log log = LogFactory.getLog( HqlSqlWalker.class );
+ private static final Logger log = LoggerFactory.getLogger( HqlSqlWalker.class );
private final QueryTranslatorImpl queryTranslatorImpl;
private final HqlParser hqlParser;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/QueryTranslatorImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/QueryTranslatorImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/QueryTranslatorImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import antlr.RecognitionException;
import antlr.TokenStreamException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.QueryException;
@@ -54,8 +54,8 @@
*/
public class QueryTranslatorImpl implements FilterTranslator {
- private static final Log log = LogFactory.getLog( QueryTranslatorImpl.class );
- private static final Log AST_LOG = LogFactory.getLog( "org.hibernate.hql.ast.AST" );
+ private static final Logger log = LoggerFactory.getLogger( QueryTranslatorImpl.class );
+ private static final Logger AST_LOG = LoggerFactory.getLogger( "org.hibernate.hql.ast.AST" );
private SessionFactoryImplementor factory;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -23,7 +23,7 @@
import antlr.RecognitionException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
/**
* Implementation of AbstractStatementExecutor.
@@ -32,10 +32,10 @@
*/
public abstract class AbstractStatementExecutor implements StatementExecutor {
- private final Log log;
+ private final Logger log;
private final HqlSqlWalker walker;
- public AbstractStatementExecutor(HqlSqlWalker walker, Log log) {
+ public AbstractStatementExecutor(HqlSqlWalker walker, Logger log) {
this.walker = walker;
this.log = log;
}
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/BasicExecutor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/BasicExecutor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/BasicExecutor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -18,8 +18,8 @@
import antlr.RecognitionException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implementation of BasicExecutor.
@@ -27,7 +27,7 @@
* @author Steve Ebersole
*/
public class BasicExecutor extends AbstractStatementExecutor {
- private static final Log log = LogFactory.getLog( BasicExecutor.class );
+ private static final Logger log = LoggerFactory.getLogger( BasicExecutor.class );
private final Queryable persister;
private final String sql;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableDeleteExecutor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableDeleteExecutor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableDeleteExecutor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -17,8 +17,8 @@
import org.hibernate.sql.Delete;
import org.hibernate.util.StringHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implementation of MultiTableDeleteExecutor.
@@ -26,7 +26,7 @@
* @author Steve Ebersole
*/
public class MultiTableDeleteExecutor extends AbstractStatementExecutor {
- private static final Log log = LogFactory.getLog( MultiTableDeleteExecutor.class );
+ private static final Logger log = LoggerFactory.getLogger( MultiTableDeleteExecutor.class );
private final Queryable persister;
private final String idInsertSelect;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -20,8 +20,8 @@
import org.hibernate.sql.Update;
import org.hibernate.util.StringHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implementation of MultiTableUpdateExecutor.
@@ -29,7 +29,7 @@
* @author Steve Ebersole
*/
public class MultiTableUpdateExecutor extends AbstractStatementExecutor {
- private static final Log log = LogFactory.getLog( MultiTableUpdateExecutor.class );
+ private static final Logger log = LoggerFactory.getLogger( MultiTableUpdateExecutor.class );
private final Queryable persister;
private final String idInsertSelect;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/AbstractRestrictableStatement.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/AbstractRestrictableStatement.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/AbstractRestrictableStatement.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,7 +6,7 @@
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
/**
* Convenience implementation of RestrictableStatement to centralize common functionality.
@@ -19,7 +19,7 @@
private AST whereClause;
protected abstract int getWhereClauseParentTokenType();
- protected abstract Log getLog();
+ protected abstract Logger getLog();
/**
* @see org.hibernate.hql.ast.tree.RestrictableStatement#getFromClause
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DeleteStatement.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DeleteStatement.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DeleteStatement.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import org.hibernate.hql.antlr.HqlSqlTokenTypes;
import org.hibernate.hql.antlr.SqlTokenTypes;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Defines a top-level AST node representing an HQL delete statement.
@@ -14,7 +14,7 @@
*/
public class DeleteStatement extends AbstractRestrictableStatement {
- private static final Log log = LogFactory.getLog( DeleteStatement.class );
+ private static final Logger log = LoggerFactory.getLogger( DeleteStatement.class );
/**
* @see org.hibernate.hql.ast.tree.Statement#getStatementType()
@@ -34,7 +34,7 @@
return SqlTokenTypes.FROM;
}
- protected Log getLog() {
+ protected Logger getLog() {
return log;
}
}
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DotNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DotNode.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/DotNode.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -19,8 +19,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Represents a reference to a property or alias expression. This should duplicate the relevant behaviors in
@@ -49,7 +49,7 @@
public static IllegalCollectionDereferenceExceptionBuilder ILLEGAL_COLL_DEREF_EXCP_BUILDER = DEF_ILLEGAL_COLL_DEREF_EXCP_BUILDER;
///////////////////////////////////////////////////////////////////////////
- private static final Log log = LogFactory.getLog( DotNode.class );
+ private static final Logger log = LoggerFactory.getLogger( DotNode.class );
private static final int DEREF_UNKNOWN = 0;
private static final int DEREF_ENTITY = 1;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromClause.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromClause.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromClause.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.hql.antlr.HqlSqlTokenTypes;
import org.hibernate.hql.ast.util.ASTIterator;
import org.hibernate.hql.ast.util.ASTUtil;
@@ -24,7 +24,7 @@
* @author josh
*/
public class FromClause extends HqlSqlWalkerNode implements HqlSqlTokenTypes, DisplayableNode {
- private static Log log = LogFactory.getLog( FromClause.class );
+ private static Logger log = LoggerFactory.getLogger( FromClause.class );
public static final int ROOT_LEVEL = 1;
private int level = ROOT_LEVEL;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElement.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElement.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElement.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -19,8 +19,8 @@
import org.hibernate.type.Type;
import org.hibernate.util.StringHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Represents a single mapped class mentioned in an HQL FROM clause. Each
@@ -37,7 +37,7 @@
* Time: 10:28:17 AM<br>
*/
public class FromElement extends HqlSqlWalkerNode implements DisplayableNode {
- private static final Log log = LogFactory.getLog( FromElement.class );
+ private static final Logger log = LoggerFactory.getLogger( FromElement.class );
private String className;
private String classAlias;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -22,8 +22,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Encapsulates the creation of FromElements and JoinSequences.
@@ -32,7 +32,7 @@
*/
class FromElementFactory implements SqlTokenTypes {
- private static final Log log = LogFactory.getLog( FromElementFactory.class );
+ private static final Logger log = LoggerFactory.getLogger( FromElementFactory.class );
private FromClause fromClause;
private FromElement origin;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementType.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementType.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromElementType.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -21,8 +21,8 @@
import org.hibernate.type.Type;
import org.hibernate.type.TypeFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Delegate that handles the type and join sequence information for a FromElement.
@@ -30,7 +30,7 @@
* @author josh Feb 12, 2005 10:17:34 AM
*/
class FromElementType {
- private static final Log log = LogFactory.getLog( FromElementType.class );
+ private static final Logger log = LoggerFactory.getLogger( FromElementType.class );
private FromElement fromElement;
private EntityType entityType;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromReferenceNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromReferenceNode.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/FromReferenceNode.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Represents a reference to a FROM element, for example a class alias in a WHERE clause.
@@ -15,7 +15,7 @@
public abstract class FromReferenceNode extends AbstractSelectExpression
implements ResolvableNode, DisplayableNode, InitializeableNode, PathNode {
- private static final Log log = LogFactory.getLog( FromReferenceNode.class );
+ private static final Logger log = LoggerFactory.getLogger( FromReferenceNode.class );
private FromElement fromElement;
private boolean resolved = false;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IndexNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IndexNode.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IndexNode.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -13,8 +13,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Represents the [] operator and provides it's semantics.
@@ -23,7 +23,7 @@
*/
public class IndexNode extends FromReferenceNode {
- private static final Log log = LogFactory.getLog( IndexNode.class );
+ private static final Logger log = LoggerFactory.getLogger( IndexNode.class );
public void setScalarColumnText(int i) throws SemanticException {
throw new UnsupportedOperationException( "An IndexNode cannot generate column text!" );
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/MethodNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/MethodNode.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/MethodNode.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Represents a method call.
@@ -25,7 +25,7 @@
*/
public class MethodNode extends AbstractSelectExpression implements SelectExpression {
- private static final Log log = LogFactory.getLog( MethodNode.class );
+ private static final Logger log = LoggerFactory.getLogger( MethodNode.class );
private String methodName;
private FromElement fromElement;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/QueryNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/QueryNode.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/QueryNode.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Defines a top-level AST node representing an HQL select statement.
@@ -20,7 +20,7 @@
*/
public class QueryNode extends AbstractRestrictableStatement implements SelectExpression {
- private static final Log log = LogFactory.getLog( QueryNode.class );
+ private static final Logger log = LoggerFactory.getLogger( QueryNode.class );
private OrderByClause orderByClause;
@@ -42,7 +42,7 @@
return SqlTokenTypes.FROM;
}
- protected Log getLog() {
+ protected Logger getLog() {
return log;
}
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/UpdateStatement.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/UpdateStatement.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/UpdateStatement.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Defines a top-level AST node representing an HQL update statement.
@@ -17,7 +17,7 @@
*/
public class UpdateStatement extends AbstractRestrictableStatement {
- private static final Log log = LogFactory.getLog( UpdateStatement.class );
+ private static final Logger log = LoggerFactory.getLogger( UpdateStatement.class );
/**
* @see org.hibernate.hql.ast.tree.Statement#getStatementType()
@@ -37,7 +37,7 @@
return SqlTokenTypes.SET;
}
- protected Log getLog() {
+ protected Logger getLog() {
return log;
}
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/util/JoinProcessor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/util/JoinProcessor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/util/JoinProcessor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -20,8 +20,8 @@
import antlr.ASTFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Performs the post-processing of the join information gathered during semantic analysis.
@@ -32,7 +32,7 @@
*/
public class JoinProcessor implements SqlTokenTypes {
- private static final Log log = LogFactory.getLog( JoinProcessor.class );
+ private static final Logger log = LoggerFactory.getLogger( JoinProcessor.class );
private QueryTranslatorImpl queryTranslatorImpl;
private SyntheticAndFactory andFactory;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/util/LiteralProcessor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/util/LiteralProcessor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/util/LiteralProcessor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -23,8 +23,8 @@
import antlr.SemanticException;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.text.DecimalFormat;
@@ -53,7 +53,7 @@
*/
public static int DECIMAL_LITERAL_FORMAT = EXACT;
- private static final Log log = LogFactory.getLog( LiteralProcessor.class );
+ private static final Logger log = LoggerFactory.getLogger( LiteralProcessor.class );
private HqlSqlWalker walker;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/util/PathHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/util/PathHelper.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/util/PathHelper.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import antlr.ASTFactory;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Provides utility methods for paths.
@@ -17,7 +17,7 @@
*/
public final class PathHelper {
- private static final Log log = LogFactory.getLog( PathHelper.class );
+ private static final Logger log = LoggerFactory.getLogger( PathHelper.class );
private PathHelper() {
}
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/util/SyntheticAndFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/util/SyntheticAndFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/util/SyntheticAndFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -16,8 +16,8 @@
import antlr.ASTFactory;
import antlr.collections.AST;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Creates synthetic and nodes based on the where fragment part of a JoinSequence.
@@ -25,7 +25,7 @@
* @author josh Dec 5, 2004 12:25:20 PM
*/
public class SyntheticAndFactory implements HqlSqlTokenTypes {
- private static final Log log = LogFactory.getLog( SyntheticAndFactory.class );
+ private static final Logger log = LoggerFactory.getLogger( SyntheticAndFactory.class );
private ASTFactory astFactory;
private AST thetaJoins;
Modified: core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
@@ -116,7 +116,7 @@
private Map enabledFilters;
- private static final Log log = LogFactory.getLog( QueryTranslatorImpl.class );
+ private static final Logger log = LoggerFactory.getLogger( QueryTranslatorImpl.class );
/**
* Construct a query translator
Modified: core/trunk/core/src/main/java/org/hibernate/id/GUIDGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/GUIDGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/GUIDGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.sql.ResultSet;
import java.sql.SQLException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.exception.JDBCExceptionHelper;
@@ -19,7 +19,7 @@
*/
public class GUIDGenerator implements IdentifierGenerator {
- private static final Log log = LogFactory.getLog(GUIDGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(GUIDGenerator.class);
public Serializable generate(SessionImplementor session, Object obj)
throws HibernateException {
Modified: core/trunk/core/src/main/java/org/hibernate/id/IdentifierGeneratorFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/IdentifierGeneratorFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/IdentifierGeneratorFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.HashMap;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.dialect.Dialect;
@@ -22,7 +22,7 @@
*/
public final class IdentifierGeneratorFactory {
- private static final Log log = LogFactory.getLog(IdentifierGeneratorFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(IdentifierGeneratorFactory.class);
/**
* Get the generated identifier when using identity columns
Modified: core/trunk/core/src/main/java/org/hibernate/id/IncrementGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/IncrementGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/IncrementGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.sql.SQLException;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.dialect.Dialect;
@@ -31,7 +31,7 @@
*/
public class IncrementGenerator implements IdentifierGenerator, Configurable {
- private static final Log log = LogFactory.getLog(IncrementGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(IncrementGenerator.class);
private long next;
private String sql;
Modified: core/trunk/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.sql.Types;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.MappingException;
@@ -56,7 +56,7 @@
extends TransactionHelper
implements PersistentIdentifierGenerator, Configurable {
- private static final Log log = LogFactory.getLog(MultipleHiLoPerTableGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(MultipleHiLoPerTableGenerator.class);
public static final String ID_TABLE = "table";
public static final String PK_COLUMN_NAME = "primary_key_column";
Modified: core/trunk/core/src/main/java/org/hibernate/id/PersistentIdentifierGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/PersistentIdentifierGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/PersistentIdentifierGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,8 +1,8 @@
//$Id: PersistentIdentifierGenerator.java 6514 2005-04-26 06:37:54Z oneovthafew $
package org.hibernate.id;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.dialect.Dialect;
@@ -69,7 +69,7 @@
*/
public Object generatorKey();
- static final Log SQL = LogFactory.getLog("org.hibernate.SQL");
+ static final Logger SQL = LoggerFactory.getLogger( "org.hibernate.SQL" );
}
Modified: core/trunk/core/src/main/java/org/hibernate/id/SequenceGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/SequenceGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/SequenceGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.sql.SQLException;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.exception.JDBCExceptionHelper;
@@ -49,7 +49,7 @@
private Type identifierType;
private String sql;
- private static final Log log = LogFactory.getLog(SequenceGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(SequenceGenerator.class);
public void configure(Type type, Properties params, Dialect dialect) throws MappingException {
sequenceName = PropertiesHelper.getString(SEQUENCE, params, "hibernate_sequence");
Modified: core/trunk/core/src/main/java/org/hibernate/id/SequenceHiLoGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/SequenceHiLoGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/SequenceHiLoGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.dialect.Dialect;
@@ -32,7 +32,7 @@
public static final String MAX_LO = "max_lo";
- private static final Log log = LogFactory.getLog(SequenceHiLoGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(SequenceHiLoGenerator.class);
private int maxLo;
private int lo;
Modified: core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import org.hibernate.sql.Insert;
import org.hibernate.type.Type;
import org.hibernate.engine.SessionImplementor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.sql.PreparedStatement;
@@ -33,7 +33,7 @@
public class SequenceIdentityGenerator extends SequenceGenerator
implements PostInsertIdentifierGenerator {
- private static final Log log = LogFactory.getLog( SequenceIdentityGenerator.class );
+ private static final Logger log = LoggerFactory.getLogger( SequenceIdentityGenerator.class );
public Serializable generate(SessionImplementor s, Object obj) {
return IdentifierGeneratorFactory.POST_INSERT_INDICATOR;
Modified: core/trunk/core/src/main/java/org/hibernate/id/TableGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/TableGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/TableGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.sql.Types;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.dialect.Dialect;
@@ -56,7 +56,7 @@
/** Default table name */
public static final String DEFAULT_TABLE_NAME = "hibernate_unique_key";
- private static final Log log = LogFactory.getLog(TableGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(TableGenerator.class);
private String tableName;
private String columnName;
Modified: core/trunk/core/src/main/java/org/hibernate/id/TableHiLoGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/TableHiLoGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/TableHiLoGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
@@ -41,7 +41,7 @@
private int maxLo;
private Class returnClass;
- private static final Log log = LogFactory.getLog(TableHiLoGenerator.class);
+ private static final Logger log = LoggerFactory.getLogger(TableHiLoGenerator.class);
public void configure(Type type, Properties params, Dialect d) {
super.configure(type, params, d);
Modified: core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.lang.reflect.Constructor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.util.ReflectHelper;
@@ -16,7 +16,7 @@
* @author Steve Ebersole
*/
public class OptimizerFactory {
- private static final Log log = LogFactory.getLog( OptimizerFactory.class );
+ private static final Logger log = LoggerFactory.getLogger( OptimizerFactory.class );
public static final String NONE = "none";
public static final String HILO = "hilo";
Modified: core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStructure.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStructure.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStructure.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import java.sql.ResultSet;
import java.sql.SQLException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
@@ -18,7 +18,7 @@
* @author Steve Ebersole
*/
public class SequenceStructure implements DatabaseStructure {
- private static final Log log = LogFactory.getLog( SequenceStructure.class );
+ private static final Logger log = LoggerFactory.getLogger( SequenceStructure.class );
private final String sequenceName;
private final int initialValue;
Modified: core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Properties;
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.id.PersistentIdentifierGenerator;
import org.hibernate.id.Configurable;
@@ -72,7 +72,7 @@
* @author Steve Ebersole
*/
public class SequenceStyleGenerator implements PersistentIdentifierGenerator, Configurable {
- private static final Log log = LogFactory.getLog( SequenceStyleGenerator.class );
+ private static final Logger log = LoggerFactory.getLogger( SequenceStyleGenerator.class );
// general purpose parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public static final String SEQUENCE_PARAM = "sequence_name";
Modified: core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.HashMap;
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.engine.TransactionHelper;
import org.hibernate.engine.SessionImplementor;
@@ -87,7 +87,7 @@
* @author Steve Ebersole
*/
public class TableGenerator extends TransactionHelper implements PersistentIdentifierGenerator, Configurable {
- private static final Log log = LogFactory.getLog( TableGenerator.class );
+ private static final Logger log = LoggerFactory.getLogger( TableGenerator.class );
public static final String TABLE_PARAM = "table_name";
public static final String DEF_TABLE = "hibernate_sequences";
Modified: core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.sql.ResultSet;
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.dialect.Dialect;
import org.hibernate.LockMode;
@@ -23,8 +23,8 @@
* @author Steve Ebersole
*/
public class TableStructure extends TransactionHelper implements DatabaseStructure {
- private static final Log log = LogFactory.getLog( TableStructure.class );
- private static final Log SQL_LOG = LogFactory.getLog( "org.hibernate.SQL" );
+ private static final Logger log = LoggerFactory.getLogger( TableStructure.class );
+ private static final Logger SQL_LOG = LoggerFactory.getLogger( "org.hibernate.SQL" );
private final String tableName;
private final String valueColumnName;
Modified: core/trunk/core/src/main/java/org/hibernate/impl/AbstractScrollableResults.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/AbstractScrollableResults.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/impl/AbstractScrollableResults.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -13,8 +13,8 @@
import java.util.Locale;
import java.util.TimeZone;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
@@ -34,7 +34,7 @@
*/
public abstract class AbstractScrollableResults implements ScrollableResults {
- private static final Log log = LogFactory.getLog( AbstractScrollableResults.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractScrollableResults.class );
private final ResultSet resultSet;
private final PreparedStatement ps;
Modified: core/trunk/core/src/main/java/org/hibernate/impl/IteratorImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/IteratorImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/impl/IteratorImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.sql.SQLException;
import java.util.NoSuchElementException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.JDBCException;
import org.hibernate.engine.HibernateIterator;
@@ -24,7 +24,7 @@
*/
public final class IteratorImpl implements HibernateIterator {
- private static final Log log = LogFactory.getLog(IteratorImpl.class);
+ private static final Logger log = LoggerFactory.getLogger(IteratorImpl.class);
private ResultSet rs;
private final EventSource session;
Modified: core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -22,8 +22,8 @@
import javax.naming.StringRefAddr;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.EntityMode;
@@ -152,7 +152,7 @@
private static final IdentifierGenerator UUID_GENERATOR = new UUIDHexGenerator();
- private static final Log log = LogFactory.getLog(SessionFactoryImpl.class);
+ private static final Logger log = LoggerFactory.getLogger(SessionFactoryImpl.class);
public SessionFactoryImpl(
Configuration cfg,
Modified: core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryObjectFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryObjectFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/impl/SessionFactoryObjectFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -21,8 +21,8 @@
import org.hibernate.util.FastHashMap;
import org.hibernate.util.NamingHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Resolves <tt>SessionFactory</tt> JNDI lookups and deserialization
@@ -31,10 +31,10 @@
private static final SessionFactoryObjectFactory INSTANCE; //to stop the class from being unloaded
- private static final Log log;
+ private static final Logger log;
static {
- log = LogFactory.getLog(SessionFactoryObjectFactory.class);
+ log = LoggerFactory.getLogger( SessionFactoryObjectFactory.class );
INSTANCE = new SessionFactoryObjectFactory();
log.debug("initializing class SessionFactoryObjectFactory");
}
@@ -136,7 +136,7 @@
Object result = NAMED_INSTANCES.get(name);
if (result==null) {
log.debug("Not found: " + name);
- log.debug(NAMED_INSTANCES);
+ log.debug( NAMED_INSTANCES.toString() );
}
return result;
}
@@ -146,7 +146,7 @@
Object result = INSTANCES.get(uid);
if (result==null) {
log.debug("Not found: " + uid);
- log.debug(INSTANCES);
+ log.debug( INSTANCES.toString() );
}
return result;
}
Modified: core/trunk/core/src/main/java/org/hibernate/impl/SessionImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/SessionImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/impl/SessionImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.dom4j.Element;
import org.hibernate.CacheMode;
import org.hibernate.ConnectionReleaseMode;
@@ -119,7 +119,7 @@
// a seperate classs responsible for generating/dispatching events just duplicates most of the Session methods...
// passing around seperate reto interceptor, factory, actionQueue, and persistentContext is not manageable...
- private static final Log log = LogFactory.getLog(SessionImpl.class);
+ private static final Logger log = LoggerFactory.getLogger(SessionImpl.class);
private transient EntityMode entityMode = EntityMode.POJO;
private transient boolean autoClear; //for EJB3
Modified: core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.CacheMode;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.Criteria;
@@ -57,7 +57,7 @@
public class StatelessSessionImpl extends AbstractSessionImpl
implements JDBCContext.Context, StatelessSession {
- private static final Log log = LogFactory.getLog( StatelessSessionImpl.class );
+ private static final Logger log = LoggerFactory.getLogger( StatelessSessionImpl.class );
private JDBCContext jdbcContext;
private PersistenceContext temporaryPersistenceContext = new StatefulPersistenceContext( this );
Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.HashSet;
import java.util.Iterator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
@@ -35,8 +35,8 @@
private int openPreparedStatementCount;
private int openResultSetCount;
- protected static final Log log = LogFactory.getLog(AbstractBatcher.class);
- protected static final Log SQL_LOG = LogFactory.getLog("org.hibernate.SQL");
+ protected static final Logger log = LoggerFactory.getLogger( AbstractBatcher.class );
+ protected static final Logger SQL_LOG = LoggerFactory.getLogger( "org.hibernate.SQL" );
private final ConnectionManager connectionManager;
private final SessionFactoryImplementor factory;
Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/ConnectionManager.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/jdbc/ConnectionManager.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/jdbc/ConnectionManager.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import java.sql.Connection;
import java.sql.SQLException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
@@ -27,7 +27,7 @@
*/
public class ConnectionManager implements Serializable {
- private static final Log log = LogFactory.getLog( ConnectionManager.class );
+ private static final Logger log = LoggerFactory.getLogger( ConnectionManager.class );
public static interface Callback {
public void connectionOpened();
Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/Expectations.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/jdbc/Expectations.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/jdbc/Expectations.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,7 +1,7 @@
package org.hibernate.jdbc;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.StaleStateException;
import org.hibernate.HibernateException;
import org.hibernate.engine.ExecuteUpdateResultCheckStyle;
@@ -19,7 +19,7 @@
* @author Steve Ebersole
*/
public class Expectations {
- private static final Log log = LogFactory.getLog( Expectations.class );
+ private static final Logger log = LoggerFactory.getLogger( Expectations.class );
public static final int USUAL_EXPECTED_COUNT = 1;
public static final int USUAL_PARAM_POSITION = 1;
Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/JDBCContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/jdbc/JDBCContext.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/jdbc/JDBCContext.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
@@ -40,7 +40,7 @@
// ConnectionManager is a "JDBCContext"? A "SessionContext" should
// live in the impl package...
- private static final Log log = LogFactory.getLog( JDBCContext.class );
+ private static final Logger log = LoggerFactory.getLogger( JDBCContext.class );
public static interface Context extends TransactionFactory.Context {
/**
Modified: core/trunk/core/src/main/java/org/hibernate/loader/Loader.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/Loader.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/Loader.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
@@ -78,7 +78,7 @@
*/
public abstract class Loader {
- private static final Log log = LogFactory.getLog( Loader.class );
+ private static final Logger log = LoggerFactory.getLogger( Loader.class );
private final SessionFactoryImplementor factory;
private ColumnNameCache columnNameCache;
Modified: core/trunk/core/src/main/java/org/hibernate/loader/collection/BasicCollectionLoader.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/collection/BasicCollectionLoader.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/collection/BasicCollectionLoader.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.MappingException;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.loader.JoinWalker;
@@ -21,7 +21,7 @@
*/
public class BasicCollectionLoader extends CollectionLoader {
- private static final Log log = LogFactory.getLog(BasicCollectionLoader.class);
+ private static final Logger log = LoggerFactory.getLogger(BasicCollectionLoader.class);
public BasicCollectionLoader(
QueryableCollection collectionPersister,
Modified: core/trunk/core/src/main/java/org/hibernate/loader/collection/OneToManyLoader.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/collection/OneToManyLoader.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/collection/OneToManyLoader.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.MappingException;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.loader.JoinWalker;
@@ -21,7 +21,7 @@
*/
public class OneToManyLoader extends CollectionLoader {
- private static final Log log = LogFactory.getLog(OneToManyLoader.class);
+ private static final Logger log = LoggerFactory.getLogger(OneToManyLoader.class);
public OneToManyLoader(
QueryableCollection oneToManyPersister,
Modified: core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLCustomQuery.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLCustomQuery.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLCustomQuery.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -15,8 +15,8 @@
import org.hibernate.loader.custom.CustomQuery;
import org.hibernate.persister.collection.SQLLoadableCollection;
import org.hibernate.persister.entity.SQLLoadable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implements Hibernate's built-in support for native SQL queries.
@@ -29,7 +29,7 @@
*/
public class SQLCustomQuery implements CustomQuery {
- public static final Log log = LogFactory.getLog( SQLCustomQuery.class );
+ public static final Logger log = LoggerFactory.getLogger( SQLCustomQuery.class );
private final String sql;
private final Set querySpaces = new HashSet();
Modified: core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -36,8 +36,8 @@
import org.hibernate.persister.entity.SQLLoadable;
import org.hibernate.type.EntityType;
import org.hibernate.type.Type;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Responsible for processing the series of {@link org.hibernate.engine.query.sql.NativeSQLQueryReturn returns}
@@ -51,7 +51,7 @@
*/
public class SQLQueryReturnProcessor {
- public static final Log log = LogFactory.getLog( SQLQueryReturnProcessor.class );
+ public static final Logger log = LoggerFactory.getLogger( SQLQueryReturnProcessor.class );
private NativeSQLQueryReturn[] queryReturns;
Modified: core/trunk/core/src/main/java/org/hibernate/loader/entity/AbstractEntityLoader.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/entity/AbstractEntityLoader.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/entity/AbstractEntityLoader.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor;
@@ -20,7 +20,7 @@
public abstract class AbstractEntityLoader extends OuterJoinLoader
implements UniqueEntityLoader {
- protected static final Log log = LogFactory.getLog(EntityLoader.class);
+ protected static final Logger log = LoggerFactory.getLogger(EntityLoader.class);
protected final OuterJoinLoadable persister;
protected final Type uniqueKeyType;
protected final String entityName;
Modified: core/trunk/core/src/main/java/org/hibernate/loader/entity/CollectionElementLoader.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/entity/CollectionElementLoader.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/loader/entity/CollectionElementLoader.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.MappingException;
@@ -28,7 +28,7 @@
*/
public class CollectionElementLoader extends OuterJoinLoader {
- private static final Log log = LogFactory.getLog(CollectionElementLoader.class);
+ private static final Logger log = LoggerFactory.getLogger(CollectionElementLoader.class);
private final OuterJoinLoadable persister;
private final Type keyType;
Modified: core/trunk/core/src/main/java/org/hibernate/mapping/RootClass.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/mapping/RootClass.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/mapping/RootClass.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,7 +6,7 @@
import java.util.Iterator;
import java.util.Set;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
import org.hibernate.MappingException;
import org.hibernate.engine.Mapping;
import org.hibernate.util.ReflectHelper;
@@ -207,12 +207,12 @@
if ( !id.isDynamic() ) {
Class idClass = id.getComponentClass();
if ( idClass != null && !ReflectHelper.overridesEquals( idClass ) ) {
- LogFactory.getLog(RootClass.class)
+ LoggerFactory.getLogger( RootClass.class )
.warn( "composite-id class does not override equals(): "
+ id.getComponentClass().getName() );
}
if ( !ReflectHelper.overridesHashCode( idClass ) ) {
- LogFactory.getLog(RootClass.class)
+ LoggerFactory.getLogger( RootClass.class )
.warn( "composite-id class does not override hashCode(): "
+ id.getComponentClass().getName() );
}
Modified: core/trunk/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import java.util.Iterator;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.FetchMode;
import org.hibernate.HibernateException;
@@ -191,7 +191,7 @@
private Map collectionPropertyColumnAliases = new HashMap();
private Map collectionPropertyColumnNames = new HashMap();
- private static final Log log = LogFactory.getLog( AbstractCollectionPersister.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractCollectionPersister.class );
public AbstractCollectionPersister(
final Collection collection,
Modified: core/trunk/core/src/main/java/org/hibernate/persister/collection/NamedQueryCollectionInitializer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/persister/collection/NamedQueryCollectionInitializer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/persister/collection/NamedQueryCollectionInitializer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor;
@@ -19,7 +19,7 @@
private final String queryName;
private final CollectionPersister persister;
- private static final Log log = LogFactory.getLog(NamedQueryCollectionInitializer.class);
+ private static final Logger log = LoggerFactory.getLogger(NamedQueryCollectionInitializer.class);
public NamedQueryCollectionInitializer(String queryName, CollectionPersister persister) {
super();
Modified: core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -14,8 +14,8 @@
import java.util.Set;
import java.util.Comparator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
import org.hibernate.FetchMode;
@@ -100,7 +100,7 @@
implements OuterJoinLoadable, Queryable, ClassMetadata, UniqueKeyLoadable,
SQLLoadable, LazyPropertyInitializer, PostInsertIdentityPersister, Lockable {
- private static final Log log = LogFactory.getLog( AbstractEntityPersister.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractEntityPersister.class );
public static final String ENTITY_CLASS = "class";
Modified: core/trunk/core/src/main/java/org/hibernate/persister/entity/NamedQueryLoader.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/persister/entity/NamedQueryLoader.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/persister/entity/NamedQueryLoader.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
import org.hibernate.engine.EntityKey;
@@ -21,7 +21,7 @@
private final String queryName;
private final EntityPersister persister;
- private static final Log log = LogFactory.getLog(NamedQueryLoader.class);
+ private static final Logger log = LoggerFactory.getLogger(NamedQueryLoader.class);
public NamedQueryLoader(String queryName, EntityPersister persister) {
super();
Modified: core/trunk/core/src/main/java/org/hibernate/pretty/Printer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/pretty/Printer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/pretty/Printer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.EntityMode;
import org.hibernate.engine.SessionFactoryImplementor;
@@ -24,7 +24,7 @@
public final class Printer {
private SessionFactoryImplementor factory;
- private static final Log log = LogFactory.getLog(Printer.class);
+ private static final Logger log = LoggerFactory.getLogger(Printer.class);
/**
* @param entity an actual entity object, not a proxy!
Modified: core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.lang.reflect.Method;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.PropertyAccessException;
@@ -23,7 +23,7 @@
*/
public class BasicPropertyAccessor implements PropertyAccessor {
- private static final Log log = LogFactory.getLog(BasicPropertyAccessor.class);
+ private static final Logger log = LoggerFactory.getLogger(BasicPropertyAccessor.class);
public static final class BasicSetter implements Setter {
private Class clazz;
Modified: core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -19,7 +19,7 @@
import org.hibernate.type.AbstractComponentType;
import org.hibernate.util.ReflectHelper;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
/**
* A <tt>LazyInitializer</tt> implemented using the CGLIB bytecode generation library
@@ -65,7 +65,7 @@
return proxy;
}
catch (Throwable t) {
- LogFactory.getLog( BasicLazyInitializer.class )
+ LoggerFactory.getLogger( BasicLazyInitializer.class )
.error( "CGLIB Enhancement failed: " + entityName, t );
throw new HibernateException( "CGLIB Enhancement failed: " + entityName, t );
}
Modified: core/trunk/core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,7 +9,7 @@
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.proxy.pojo.BasicLazyInitializer;
@@ -79,7 +79,7 @@
return proxy;
}
catch ( Throwable t ) {
- LogFactory.getLog( BasicLazyInitializer.class ).error(
+ LoggerFactory.getLogger( BasicLazyInitializer.class ).error(
"Javassist Enhancement failed: " + entityName, t
);
throw new HibernateException(
@@ -138,7 +138,7 @@
return factory.createClass();
}
catch ( Throwable t ) {
- LogFactory.getLog( BasicLazyInitializer.class ).error(
+ LoggerFactory.getLogger( BasicLazyInitializer.class ).error(
"Javassist Enhancement failed: "
+ persistentClass.getName(), t
);
Modified: core/trunk/core/src/main/java/org/hibernate/secure/JACCConfiguration.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/secure/JACCConfiguration.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/secure/JACCConfiguration.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import javax.security.jacc.PolicyConfigurationFactory;
import javax.security.jacc.PolicyContextException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
/**
@@ -19,7 +19,7 @@
*/
public class JACCConfiguration {
- private static final Log log = LogFactory.getLog( JACCConfiguration.class );
+ private static final Logger log = LoggerFactory.getLogger( JACCConfiguration.class );
private final PolicyConfiguration policyConfiguration;
Modified: core/trunk/core/src/main/java/org/hibernate/stat/StatisticsImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/stat/StatisticsImpl.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/stat/StatisticsImpl.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cache.Cache;
import org.hibernate.cache.Region;
import org.hibernate.engine.SessionFactoryImplementor;
@@ -19,7 +19,7 @@
//TODO: we should provide some way to get keys of collection of statistics to make it easier to retrieve from a GUI perspective
- private static final Log log = LogFactory.getLog(StatisticsImpl.class);
+ private static final Logger log = LoggerFactory.getLogger(StatisticsImpl.class);
private SessionFactoryImplementor sessionFactory;
Modified: core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseMetadata.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseMetadata.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseMetadata.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.exception.JDBCExceptionHelper;
import org.hibernate.exception.SQLExceptionConverter;
@@ -26,7 +26,7 @@
*/
public class DatabaseMetadata {
- private static final Log log = LogFactory.getLog(DatabaseMetadata.class);
+ private static final Logger log = LoggerFactory.getLogger(DatabaseMetadata.class);
private final Map tables = new HashMap();
private final Set sequences = new HashSet();
Modified: core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -18,8 +18,8 @@
import java.util.List;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.JDBCException;
import org.hibernate.cfg.Configuration;
@@ -41,7 +41,7 @@
*/
public class SchemaExport {
- private static final Log log = LogFactory.getLog( SchemaExport.class );
+ private static final Logger log = LoggerFactory.getLogger( SchemaExport.class );
private ConnectionHelper connectionHelper;
private String[] dropSQL;
Modified: core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.util.List;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.NamingStrategy;
@@ -26,7 +26,7 @@
*/
public class SchemaUpdate {
- private static final Log log = LogFactory.getLog( SchemaUpdate.class );
+ private static final Logger log = LoggerFactory.getLogger( SchemaUpdate.class );
private ConnectionHelper connectionHelper;
private Configuration configuration;
private Dialect dialect;
Modified: core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import java.sql.SQLException;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.NamingStrategy;
@@ -23,7 +23,7 @@
*/
public class SchemaValidator {
- private static final Log log = LogFactory.getLog( SchemaValidator.class );
+ private static final Logger log = LoggerFactory.getLogger( SchemaValidator.class );
private ConnectionHelper connectionHelper;
private Configuration configuration;
private Dialect dialect;
Modified: core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,8 +7,8 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* JDBC table metadata
@@ -16,7 +16,7 @@
*/
public class TableMetadata {
- private static final Log log = LogFactory.getLog(TableMetadata.class);
+ private static final Logger log = LoggerFactory.getLogger(TableMetadata.class);
private final String catalog;
private final String schema;
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/CMTTransaction.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/CMTTransaction.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/CMTTransaction.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.Transaction;
import org.hibernate.TransactionException;
@@ -20,7 +20,7 @@
*/
public class CMTTransaction implements Transaction {
- private static final Log log = LogFactory.getLog(CMTTransaction.class);
+ private static final Logger log = LoggerFactory.getLogger(CMTTransaction.class);
protected final JDBCContext jdbcContext;
protected final TransactionFactory.Context transactionContext;
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/CacheSynchronization.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/CacheSynchronization.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/CacheSynchronization.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import javax.transaction.SystemException;
import javax.transaction.Transaction;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.TransactionException;
import org.hibernate.jdbc.JDBCContext;
import org.hibernate.util.JTAHelper;
@@ -17,7 +17,7 @@
*/
public final class CacheSynchronization implements Synchronization {
- private static final Log log = LogFactory.getLog(CacheSynchronization.class);
+ private static final Logger log = LoggerFactory.getLogger(CacheSynchronization.class);
private final TransactionFactory.Context ctx;
private JDBCContext jdbcContext;
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/JDBCTransaction.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/JDBCTransaction.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/JDBCTransaction.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import javax.transaction.Status;
import javax.transaction.Synchronization;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.Transaction;
@@ -24,7 +24,7 @@
*/
public class JDBCTransaction implements Transaction {
- private static final Log log = LogFactory.getLog(JDBCTransaction.class);
+ private static final Logger log = LoggerFactory.getLogger(JDBCTransaction.class);
private final JDBCContext jdbcContext;
private final TransactionFactory.Context transactionContext;
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/JTATransaction.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/JTATransaction.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/JTATransaction.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.Transaction;
@@ -33,7 +33,7 @@
*/
public class JTATransaction implements Transaction {
- private static final Log log = LogFactory.getLog(JTATransaction.class);
+ private static final Logger log = LoggerFactory.getLogger(JTATransaction.class);
private final JDBCContext jdbcContext;
private final TransactionFactory.Context transactionContext;
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/JTATransactionFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/JTATransactionFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/JTATransactionFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.Transaction;
@@ -27,7 +27,7 @@
*/
public class JTATransactionFactory implements TransactionFactory {
- private static final Log log = LogFactory.getLog(JTATransactionFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(JTATransactionFactory.class);
private static final String DEFAULT_USER_TRANSACTION_NAME = "java:comp/UserTransaction";
protected InitialContext context;
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/TransactionFactoryFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/TransactionFactoryFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/TransactionFactoryFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -2,8 +2,8 @@
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
@@ -14,7 +14,7 @@
*/
public final class TransactionFactoryFactory {
- private static final Log log = LogFactory.getLog(TransactionFactoryFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(TransactionFactoryFactory.class);
/**
* Obtain a TransactionFactory with the transaction handling strategy
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/TransactionManagerLookupFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/TransactionManagerLookupFactory.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/TransactionManagerLookupFactory.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
@@ -17,7 +17,7 @@
*/
public final class TransactionManagerLookupFactory {
- private static final Log log = LogFactory.getLog(TransactionManagerLookupFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(TransactionManagerLookupFactory.class);
private TransactionManagerLookupFactory() {}
Modified: core/trunk/core/src/main/java/org/hibernate/transaction/WebSphereTransactionManagerLookup.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transaction/WebSphereTransactionManagerLookup.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transaction/WebSphereTransactionManagerLookup.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
@@ -16,7 +16,7 @@
*/
public class WebSphereTransactionManagerLookup implements TransactionManagerLookup {
- private static final Log log = LogFactory.getLog(WebSphereTransactionManagerLookup.class);
+ private static final Logger log = LoggerFactory.getLogger(WebSphereTransactionManagerLookup.class);
private final int wsVersion;
private final Class tmfClass;
Modified: core/trunk/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,15 +6,15 @@
import java.util.List;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Gavin King
*/
public class DistinctRootEntityResultTransformer implements ResultTransformer {
- private static final Log log = LogFactory.getLog(DistinctRootEntityResultTransformer.class);
+ private static final Logger log = LoggerFactory.getLogger(DistinctRootEntityResultTransformer.class);
static final class Identity {
final Object entity;
Modified: core/trunk/core/src/main/java/org/hibernate/tuple/PojoInstantiator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tuple/PojoInstantiator.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tuple/PojoInstantiator.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import java.io.Serializable;
import java.lang.reflect.Constructor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.InstantiationException;
import org.hibernate.PropertyNotFoundException;
import org.hibernate.bytecode.ReflectionOptimizer;
@@ -19,7 +19,7 @@
*/
public class PojoInstantiator implements Instantiator, Serializable {
- private static final Log log = LogFactory.getLog(PojoInstantiator.class);
+ private static final Logger log = LoggerFactory.getLogger(PojoInstantiator.class);
private transient Constructor constructor;
Modified: core/trunk/core/src/main/java/org/hibernate/tuple/entity/Dom4jEntityTuplizer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tuple/entity/Dom4jEntityTuplizer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tuple/entity/Dom4jEntityTuplizer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -16,8 +16,8 @@
import org.hibernate.tuple.Dom4jInstantiator;
import org.hibernate.type.AbstractComponentType;
import org.dom4j.Element;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.util.HashSet;
@@ -32,7 +32,7 @@
*/
public class Dom4jEntityTuplizer extends AbstractEntityTuplizer {
- static final Log log = LogFactory.getLog( Dom4jEntityTuplizer.class );
+ static final Logger log = LoggerFactory.getLogger( Dom4jEntityTuplizer.class );
private Set subclassNodeNames = new HashSet();
Modified: core/trunk/core/src/main/java/org/hibernate/tuple/entity/DynamicMapEntityTuplizer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tuple/entity/DynamicMapEntityTuplizer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tuple/entity/DynamicMapEntityTuplizer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -16,8 +16,8 @@
import org.hibernate.property.Setter;
import org.hibernate.proxy.map.MapProxyFactory;
import org.hibernate.proxy.ProxyFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* An {@link EntityTuplizer} specific to the dynamic-map entity mode.
@@ -27,7 +27,7 @@
*/
public class DynamicMapEntityTuplizer extends AbstractEntityTuplizer {
- static final Log log = LogFactory.getLog( DynamicMapEntityTuplizer.class );
+ static final Logger log = LoggerFactory.getLogger( DynamicMapEntityTuplizer.class );
DynamicMapEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity) {
super(entityMetamodel, mappedEntity);
Modified: core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
@@ -43,7 +43,7 @@
*/
public class EntityMetamodel implements Serializable {
- private static final Log log = LogFactory.getLog(EntityMetamodel.class);
+ private static final Logger log = LoggerFactory.getLogger(EntityMetamodel.class);
private static final int NO_VERSION_INDX = -66;
Modified: core/trunk/core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
@@ -42,7 +42,7 @@
*/
public class PojoEntityTuplizer extends AbstractEntityTuplizer {
- static final Log log = LogFactory.getLog( PojoEntityTuplizer.class );
+ static final Logger log = LoggerFactory.getLogger( PojoEntityTuplizer.class );
private final Class mappedClass;
private final Class proxyInterface;
Modified: core/trunk/core/src/main/java/org/hibernate/type/DbTimestampType.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/type/DbTimestampType.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/type/DbTimestampType.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import org.hibernate.dialect.Dialect;
import org.hibernate.exception.JDBCExceptionHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* <tt>dbtimestamp</tt>: An extension of {@link TimestampType} which
@@ -27,7 +27,7 @@
*/
public class DbTimestampType extends TimestampType implements VersionType {
- private static final Log log = LogFactory.getLog( DbTimestampType.class );
+ private static final Logger log = LoggerFactory.getLogger( DbTimestampType.class );
public String getName() { return "dbtimestamp"; }
Modified: core/trunk/core/src/main/java/org/hibernate/type/NullableType.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/type/NullableType.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/type/NullableType.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import java.sql.ResultSet;
import java.sql.SQLException;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
import org.dom4j.Node;
import org.hibernate.EntityMode;
@@ -33,12 +33,12 @@
* in order to check the trace-enablement. Driving this via a central Log-specific class
* would alleviate that performance hit, and yet still allow more "normal" logging usage/config.
*/
- private static final boolean IS_VALUE_TRACING_ENABLED = LogFactory.getLog( StringHelper.qualifier( Type.class.getName() ) ).isTraceEnabled();
- private transient Log log;
+ private static final boolean IS_VALUE_TRACING_ENABLED = LoggerFactory.getLogger( StringHelper.qualifier( Type.class.getName() ) ).isTraceEnabled();
+ private transient Logger log;
- private Log log() {
+ private Logger log() {
if ( log == null ) {
- log = LogFactory.getLog( getClass() );
+ log = LoggerFactory.getLogger( getClass() );
}
return log;
}
Modified: core/trunk/core/src/main/java/org/hibernate/util/ConfigHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/ConfigHelper.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/util/ConfigHelper.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -9,8 +9,8 @@
import java.net.URL;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
@@ -20,7 +20,7 @@
* @author Steve
*/
public final class ConfigHelper {
- private static final Log log = LogFactory.getLog(ConfigHelper.class);
+ private static final Logger log = LoggerFactory.getLogger(ConfigHelper.class);
/** Try to locate a local URL representing the incoming path. The first attempt
* assumes that the incoming path is an actual URL string (file://, etc). If this
@@ -84,7 +84,7 @@
if (url == null) {
String msg = "Unable to locate config file: " + path;
- log.fatal(msg);
+ log.error( msg );
throw new HibernateException(msg);
}
Modified: core/trunk/core/src/main/java/org/hibernate/util/DTDEntityResolver.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/DTDEntityResolver.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/util/DTDEntityResolver.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,8 +5,8 @@
import java.io.InputStream;
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
@@ -28,7 +28,7 @@
*/
public class DTDEntityResolver implements EntityResolver, Serializable {
- private static final Log log = LogFactory.getLog( DTDEntityResolver.class );
+ private static final Logger log = LoggerFactory.getLogger( DTDEntityResolver.class );
private static final String HIBERNATE_NAMESPACE = "http://hibernate.sourceforge.net/";
private static final String USER_NAMESPACE = "classpath://";
Modified: core/trunk/core/src/main/java/org/hibernate/util/JDBCExceptionReporter.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/JDBCExceptionReporter.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/util/JDBCExceptionReporter.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -5,12 +5,12 @@
import java.sql.SQLException;
import java.sql.SQLWarning;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public final class JDBCExceptionReporter {
- public static final Log log = LogFactory.getLog(JDBCExceptionReporter.class);
+ public static final Logger log = LoggerFactory.getLogger(JDBCExceptionReporter.class);
public static final String DEFAULT_EXCEPTION_MSG = "SQL Exception";
public static final String DEFAULT_WARNING_MSG = "SQL Warning";
Modified: core/trunk/core/src/main/java/org/hibernate/util/NamingHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/NamingHelper.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/util/NamingHelper.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,14 +11,14 @@
import javax.naming.Name;
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.cfg.Environment;
public final class NamingHelper {
- private static final Log log = LogFactory.getLog(NamingHelper.class);
+ private static final Logger log = LoggerFactory.getLogger(NamingHelper.class);
public static InitialContext getInitialContext(Properties props) throws NamingException {
Modified: core/trunk/core/src/main/java/org/hibernate/util/SerializationHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/SerializationHelper.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/util/SerializationHelper.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -65,8 +65,8 @@
import org.hibernate.type.SerializationException;
import org.hibernate.Hibernate;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* <p>Assists with the serialization process and performs additional functionality based
@@ -92,7 +92,7 @@
*/
public final class SerializationHelper {
- private static final Log log = LogFactory.getLog(SerializationHelper.class);
+ private static final Logger log = LoggerFactory.getLogger(SerializationHelper.class);
private SerializationHelper() {}
Modified: core/trunk/core/src/main/java/org/hibernate/util/XMLHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/XMLHelper.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/core/src/main/java/org/hibernate/util/XMLHelper.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,8 +3,8 @@
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.dom4j.io.DOMReader;
import org.dom4j.io.SAXReader;
import org.dom4j.io.OutputFormat;
@@ -23,7 +23,7 @@
*/
public final class XMLHelper {
- private static final Log log = LogFactory.getLog(XMLHelper.class);
+ private static final Logger log = LoggerFactory.getLogger(XMLHelper.class);
public static final EntityResolver DEFAULT_DTD_RESOLVER = new DTDEntityResolver();
private DOMReader domReader;
Modified: core/trunk/documentation/manual/es-ES/src/main/docbook/modules/quickstart.xml
===================================================================
--- core/trunk/documentation/manual/es-ES/src/main/docbook/modules/quickstart.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/documentation/manual/es-ES/src/main/docbook/modules/quickstart.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -515,7 +515,7 @@
public class HibernateUtil {
- private static Log log = LogFactory.getLog(HibernateUtil.class);
+ private static Logger log = LoggerFactory.getLogger(HibernateUtil.class);
private static final SessionFactory sessionFactory;
Modified: core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/quickstart.xml
===================================================================
--- core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/quickstart.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/quickstart.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -444,7 +444,7 @@
public class HibernateUtil {
- private static Log log = LogFactory.getLog(HibernateUtil.class);
+ private static Logger log = LoggerFactory.getLogger(HibernateUtil.class);
private static final SessionFactory sessionFactory;
Modified: core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/quickstart.xml
===================================================================
--- core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/quickstart.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/quickstart.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -353,7 +353,7 @@
public class HibernateUtil {
- private static Log log = LogFactory.getLog(HibernateUtil.class);
+ private static Logger log = LoggerFactory.getLogger(HibernateUtil.class);
private static final SessionFactory sessionFactory;
Modified: core/trunk/documentation/tutorial/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java
===================================================================
--- core/trunk/documentation/tutorial/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/documentation/tutorial/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -8,8 +8,8 @@
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.classic.Session;
import org.hibernate.context.ManagedSessionContext;
@@ -23,7 +23,7 @@
*/
public class SessionInterceptor implements Filter {
- private static final Log log = LogFactory.getLog( SessionInterceptor.class );
+ private static final Logger log = LoggerFactory.getLogger( SessionInterceptor.class );
public void doFilter(
ServletRequest request,
Modified: core/trunk/jmx/pom.xml
===================================================================
--- core/trunk/jmx/pom.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/jmx/pom.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -3,13 +3,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
+
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core-parent</artifactId>
<version>1</version>
</parent>
-
+
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jmx</artifactId>
<version>3.3.0-SNAPSHOT</version>
@@ -24,10 +24,17 @@
<artifactId>hibernate-core</artifactId>
<version>${version}</version>
</dependency>
+ <!-- logging setup for the test suite -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
</dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
</dependencies>
</project>
Modified: core/trunk/jmx/src/main/java/org/hibernate/jmx/HibernateService.java
===================================================================
--- core/trunk/jmx/src/main/java/org/hibernate/jmx/HibernateService.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/jmx/src/main/java/org/hibernate/jmx/HibernateService.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import javax.naming.InitialContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
@@ -28,7 +28,7 @@
*/
public class HibernateService extends ExternalSessionFactoryConfig implements HibernateServiceMBean {
- private static final Log log = LogFactory.getLog(HibernateServiceMBean.class);
+ private static final Logger log = LoggerFactory.getLogger(HibernateServiceMBean.class);
private String boundName;
private Properties properties = new Properties();
Modified: core/trunk/jmx/src/main/java/org/hibernate/jmx/SessionFactoryStub.java
===================================================================
--- core/trunk/jmx/src/main/java/org/hibernate/jmx/SessionFactoryStub.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/jmx/src/main/java/org/hibernate/jmx/SessionFactoryStub.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -12,8 +12,8 @@
import javax.naming.Reference;
import javax.naming.StringRefAddr;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
@@ -36,7 +36,7 @@
*/
public class SessionFactoryStub implements SessionFactory {
- private static final Log log = LogFactory.getLog(SessionFactoryStub.class);
+ private static final Logger log = LoggerFactory.getLogger(SessionFactoryStub.class);
private static final IdentifierGenerator UUID_GENERATOR = new UUIDHexGenerator();
Modified: core/trunk/jmx/src/main/java/org/hibernate/jmx/StatisticsService.java
===================================================================
--- core/trunk/jmx/src/main/java/org/hibernate/jmx/StatisticsService.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/jmx/src/main/java/org/hibernate/jmx/StatisticsService.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -6,8 +6,8 @@
import javax.naming.NamingException;
import javax.naming.Reference;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.SessionFactory;
import org.hibernate.impl.SessionFactoryObjectFactory;
import org.hibernate.stat.CollectionStatistics;
@@ -55,7 +55,7 @@
SessionFactory sf;
String sfJNDIName;
- Log log = LogFactory.getLog(StatisticsService.class);
+ Logger log = LoggerFactory.getLogger(StatisticsService.class);
Statistics stats = new StatisticsImpl();
/**
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/pom.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,4 +1,4 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -17,6 +17,7 @@
<name>Hibernate Core Aggregator</name>
<description>Aggregator of the Hibernate Core modules.</description>
+ <url>http://hibernate.org</url>
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</connection>
Modified: core/trunk/testing/pom.xml
===================================================================
--- core/trunk/testing/pom.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testing/pom.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -28,6 +28,7 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<!-- here we need to pull JUnit deps into compile scope... -->
+ <version>3.8.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
Modified: core/trunk/testing/src/main/java/org/hibernate/junit/SkipLog.java
===================================================================
--- core/trunk/testing/src/main/java/org/hibernate/junit/SkipLog.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testing/src/main/java/org/hibernate/junit/SkipLog.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,7 +1,7 @@
package org.hibernate.junit;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Well-known-location lookup for the test-skip log...
@@ -9,5 +9,5 @@
* @author Steve Ebersole
*/
public class SkipLog {
- public static final Log LOG = LogFactory.getLog( "org.hibernate.test.SKIPPED" );
+ public static final Logger LOG = LoggerFactory.getLogger( "org.hibernate.test.SKIPPED" );
}
Modified: core/trunk/testing/src/main/java/org/hibernate/junit/UnitTestCase.java
===================================================================
--- core/trunk/testing/src/main/java/org/hibernate/junit/UnitTestCase.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testing/src/main/java/org/hibernate/junit/UnitTestCase.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -2,8 +2,8 @@
import java.util.Iterator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import junit.framework.AssertionFailedError;
@@ -15,7 +15,7 @@
*/
public abstract class UnitTestCase extends junit.framework.TestCase {
- private static final Log log = LogFactory.getLog( UnitTestCase.class );
+ private static final Logger log = LoggerFactory.getLogger( UnitTestCase.class );
public UnitTestCase(String string) {
super( string );
Modified: core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestCase.java
===================================================================
--- core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestCase.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestCase.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -17,8 +17,8 @@
import org.hibernate.junit.UnitTestCase;
import org.hibernate.engine.SessionFactoryImplementor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Most of the Hibernate test suite in fact is a series of functional tests, not
@@ -28,7 +28,7 @@
*/
public abstract class FunctionalTestCase extends UnitTestCase implements ExecutionEnvironment.Settings {
- private static final Log log = LogFactory.getLog( FunctionalTestCase.class );
+ private static final Logger log = LoggerFactory.getLogger( FunctionalTestCase.class );
private ExecutionEnvironment environment;
private boolean isEnvironmentLocallyManaged;
Modified: core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java
===================================================================
--- core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testing/src/main/java/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,8 +4,8 @@
import junit.framework.Test;
import junit.framework.TestResult;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A specialized {@link junit.framework.TestSuite} implementation intended
@@ -17,7 +17,7 @@
*/
public class FunctionalTestClassTestSuite extends TestSuite {
- private static final Log log = LogFactory.getLog( FunctionalTestClassTestSuite.class );
+ private static final Logger log = LoggerFactory.getLogger( FunctionalTestClassTestSuite.class );
private ExecutionEnvironment.Settings settings;
private ExecutionEnvironment environment;
Modified: core/trunk/testsuite/pom.xml
===================================================================
--- core/trunk/testsuite/pom.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/pom.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -20,18 +20,6 @@
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
<groupId>${groupId}</groupId>
<artifactId>hibernate-core</artifactId>
<version>${version}</version>
@@ -83,6 +71,17 @@
<artifactId>jaxen</artifactId>
<version>1.1</version>
</dependency>
+ <!-- logging setup for the test suite -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
</dependencies>
<build>
@@ -95,7 +94,7 @@
</includes>
</testResource>
<testResource>
- <filtering>false</filtering>
+ <filtering>true</filtering>
<directory>src/test/resources</directory>
</testResource>
</testResources>
@@ -128,7 +127,6 @@
</plugins>
</build>
- <!-- Set up profiles defining test environments -->
<profiles>
<!-- HSQLDB is the default (eventually move to H2) -->
<profile>
@@ -143,17 +141,14 @@
<version>1.8.0.2</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/hsqldb</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
+ <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
+ <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass/>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!-- The H2 test envionment -->
@@ -166,21 +161,22 @@
<version>1.0.20061217</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/h2</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+ <jdbc.driver>org.h2.Driver</jdbc.driver>
+ <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass/>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!--
+ ###################################################################
Profiles naming db instances in the Red Hat QA/QE lab
+
+ First, those with OSS drivers
+ ###################################################################
-->
<!-- The MySQL5 test envionment -->
@@ -193,17 +189,14 @@
<version>5.0.5</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/mysql5</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
+ <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!-- The PostgreSQL test envionment -->
@@ -217,19 +210,22 @@
<classifier>jdbc3</classifier>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/pgsql8</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
+ <jdbc.driver>org.postgresql.Driver</jdbc.driver>
+ <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
+ <!--
+ ###################################################################
+ Then, those with commercial drivers
+ ###################################################################
+ -->
+
<!-- The Oracle9i test envionment -->
<profile>
<id>oracle9i</id>
@@ -241,17 +237,14 @@
<version>10.0.2.0</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/oracle9i</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!-- The Oracle10g test envionment -->
@@ -265,40 +258,39 @@
<version>10.0.2.0</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/oracle10g</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
- <!-- The DB2 8.x test envionment -->
+ <!-- The DB2 8.x test envionment (using 9x drivers)-->
<profile>
<id>db2-8</id>
<dependencies>
<dependency>
<groupId>com.ibm</groupId>
- <artifactId>ojdbc14</artifactId>
- <version>10.0.2.0</version>
+ <artifactId>db2jcc</artifactId>
+ <version>3.1.57</version>
</dependency>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc_license_cu</artifactId>
+ <version>3.1.57</version>
+ </dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/db2-8</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
+ <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
+ <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
+ <jdbc.user>hiber</jdbc.user>
+ <jdbc.pass>hiber</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!-- The Sybase 12 test envionment -->
@@ -311,17 +303,14 @@
<version>6.0.5</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/sybase12</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
+ <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
+ <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!-- The SQLServer2005 (jTDS) test envionment -->
@@ -334,17 +323,14 @@
<version>1.2</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/sqlserver2005/jtds</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation/>
+ </properties>
</profile>
<!-- The SQLServer2005 (MS JDBC) test envionment -->
@@ -357,17 +343,14 @@
<version>1.1</version>
</dependency>
</dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/rh-qa/sqlserver2005/msjdbc</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- </build>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
+ <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation>4096</jdbc.isolation>
+ </properties>
</profile>
</profiles>
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/functional/cache/SQLFunctionsInterSystemsTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/functional/cache/SQLFunctionsInterSystemsTest.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/functional/cache/SQLFunctionsInterSystemsTest.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import java.util.Map;
import junit.framework.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.Hibernate;
import org.hibernate.LockMode;
@@ -45,7 +45,7 @@
*/
public class SQLFunctionsInterSystemsTest extends DatabaseSpecificFunctionalTestCase {
- private static final Log log = LogFactory.getLog(SQLFunctionsInterSystemsTest.class);
+ private static final Logger log = LoggerFactory.getLogger(SQLFunctionsInterSystemsTest.class);
public SQLFunctionsInterSystemsTest(String name) {
super(name);
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import junit.framework.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.EntityMode;
import org.hibernate.FetchMode;
import org.hibernate.Hibernate;
@@ -37,7 +37,7 @@
*/
public class DynamicFilterTest extends FunctionalTestCase {
- private Log log = LogFactory.getLog( DynamicFilterTest.class );
+ private Logger log = LoggerFactory.getLogger( DynamicFilterTest.class );
public DynamicFilterTest(String testName) {
super( testName );
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -51,8 +51,8 @@
import org.hibernate.type.Type;
import org.hibernate.util.StringHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Tests the integration of the new AST parser into the loading of query results using
@@ -66,7 +66,7 @@
*/
public class ASTParserLoadingTest extends FunctionalTestCase {
- private static final Log log = LogFactory.getLog( ASTParserLoadingTest.class );
+ private static final Logger log = LoggerFactory.getLogger( ASTParserLoadingTest.class );
private List createdAnimalIds = new ArrayList();
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulationTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulationTest.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulationTest.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -17,8 +17,8 @@
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
import org.hibernate.persister.entity.EntityPersister;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -28,7 +28,7 @@
*/
public class BulkManipulationTest extends FunctionalTestCase {
- private static final Log log = LogFactory.getLog( BulkManipulationTest.class );
+ private static final Logger log = LoggerFactory.getLogger( BulkManipulationTest.class );
public BulkManipulationTest(String name) {
super( name );
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/jpa/cascade/CascadeTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/jpa/cascade/CascadeTest.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/jpa/cascade/CascadeTest.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -11,8 +11,8 @@
import org.hibernate.event.FlushEntityEventListener;
import org.hibernate.event.FlushEntityEvent;
import org.hibernate.cfg.Configuration;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import junit.framework.Test;
/**
@@ -30,7 +30,7 @@
*/
public class CascadeTest extends AbstractJPATest {
- public static final Log log = LogFactory.getLog( CascadeTest.class );
+ public static final Logger log = LoggerFactory.getLogger( CascadeTest.class );
public CascadeTest(String name) {
super( name );
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -10,8 +10,8 @@
import java.util.Map;
import junit.framework.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.hibernate.Hibernate;
import org.hibernate.Query;
@@ -33,7 +33,7 @@
public class SQLFunctionsTest extends LegacyTestCase {
- private static final Log log = LogFactory.getLog(SQLFunctionsTest.class);
+ private static final Logger log = LoggerFactory.getLogger(SQLFunctionsTest.class);
public SQLFunctionsTest(String name) {
super(name);
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/typeparameters/DefaultValueIntegerType.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/typeparameters/DefaultValueIntegerType.java 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/typeparameters/DefaultValueIntegerType.java 2007-08-03 04:09:17 UTC (rev 12891)
@@ -7,7 +7,7 @@
import java.sql.Types;
import java.util.Properties;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.usertype.ParameterizedType;
import org.hibernate.usertype.UserType;
@@ -41,10 +41,10 @@
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
if (value == null || defaultValue.equals(value) ) {
- LogFactory.getLog( getClass() ).trace("binding null to parameter: " + index);
+ LoggerFactory.getLogger( getClass() ).trace("binding null to parameter: " + index);
st.setNull(index, Types.INTEGER);
} else {
- LogFactory.getLog( getClass() ).trace("binding " + value + " to parameter: " + index);
+ LoggerFactory.getLogger( getClass() ).trace("binding " + value + " to parameter: " + index);
st.setInt(index, ((Integer)value).intValue());
}
}
Deleted: core/trunk/testsuite/src/test/profile/hsqldb/hsqldb-env.xml
===================================================================
--- core/trunk/testsuite/src/test/profile/hsqldb/hsqldb-env.xml 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/profile/hsqldb/hsqldb-env.xml 2007-08-03 04:09:17 UTC (rev 12891)
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<environments>
- <environment name="hsqldb">
- <testResources>
- <testResource>
- <directory>${basedir}/src/test/profile/hsqldb</directory>
- <filtering>false</filtering>
- <includes>
- <include>hibernate.properties</include>
- </includes>
- </testResource>
- </testResources>
- <dependencies>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- </dependency>
- </dependencies>
- </environment>
-</environments>
\ No newline at end of file
Added: core/trunk/testsuite/src/test/resources/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/resources/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/resources/hibernate.properties 2007-08-03 04:09:17 UTC (rev 12891)
@@ -0,0 +1,30 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# This copyrighted material is made available to anyone wishing to use, modify,#
+# copy, or redistribute it subject to the terms and conditions of the GNU #
+# Lesser General Public License, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A WARRANTY; without even the implied#
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
+# Lesser General Public License for more details. You should have received a #
+# copy of the GNU Lesser General Public License, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect ${db.dialect}
+hibernate.connection.driver_class ${jdbc.driver}
+hibernate.connection.url ${jdbc.url}
+hibernate.connection.username ${jdbc.user}
+hibernate.connection.password ${jdbc.pass}
+hibernate.connection.isolation ${jdbc.isolation}
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
Modified: core/trunk/testsuite/src/test/resources/log4j.properties
===================================================================
--- core/trunk/testsuite/src/test/resources/log4j.properties 2007-08-03 03:58:13 UTC (rev 12890)
+++ core/trunk/testsuite/src/test/resources/log4j.properties 2007-08-03 04:09:17 UTC (rev 12891)
@@ -4,6 +4,6 @@
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-log4j.rootLogger=warn, stdout
+log4j.rootLogger=info, stdout
log4j.logger.org.hibernate.test=info
\ No newline at end of file
17 years, 5 months
Hibernate SVN: r12890 - core/branches/Branch_3_2/src/org/hibernate/util.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-02 23:58:13 -0400 (Thu, 02 Aug 2007)
New Revision: 12890
Modified:
core/branches/Branch_3_2/src/org/hibernate/util/PropertiesHelper.java
Log:
HHH-2761 : null and empty string consistency in PropertiesHelper
Modified: core/branches/Branch_3_2/src/org/hibernate/util/PropertiesHelper.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/util/PropertiesHelper.java 2007-08-03 03:57:59 UTC (rev 12889)
+++ core/branches/Branch_3_2/src/org/hibernate/util/PropertiesHelper.java 2007-08-03 03:58:13 UTC (rev 12890)
@@ -7,58 +7,178 @@
import java.util.StringTokenizer;
import java.util.Iterator;
-
+/**
+ * Collection of helper methods for dealing with {@link java.util.Properties}
+ * objects.
+ *
+ * @author Gavin King
+ * @author Steve Ebersole
+ */
public final class PropertiesHelper {
private static final String PLACEHOLDER_START = "${";
- public static boolean getBoolean(String property, Properties properties) {
- String setting = properties.getProperty(property);
- return setting != null && Boolean.valueOf( setting.trim() ).booleanValue();
+ /**
+ * Disallow instantiation
+ */
+ private PropertiesHelper() {
}
- public static boolean getBoolean(String property, Properties properties, boolean defaultValue) {
- String setting = properties.getProperty(property);
- return setting==null ? defaultValue : Boolean.valueOf( setting.trim() ).booleanValue();
+ /**
+ * Get a property value as a string.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @param defaultValue The default property value to use.
+ * @return The property value; may be null.
+ */
+ public static String getString(String propertyName, Properties properties, String defaultValue) {
+ String value = extractPropertyValue( propertyName, properties );
+ return value == null ? defaultValue : value;
}
- public static int getInt(String property, Properties properties, int defaultValue) {
- String propValue = properties.getProperty(property);
- return propValue==null ? defaultValue : Integer.parseInt( propValue.trim() );
+ /**
+ * Extract a property value by name from the given properties object.
+ * <p/>
+ * Both <tt>null</tt> and <tt>empty string</tt> are viewed as the same, and return null.
+ *
+ * @param propertyName The name of the property for which to extract value
+ * @param properties The properties object
+ * @return The property value; may be null.
+ */
+ public static String extractPropertyValue(String propertyName, Properties properties) {
+ String value = properties.getProperty( propertyName );
+ if ( value == null ) {
+ return null;
+ }
+ value = value.trim();
+ if ( StringHelper.isEmpty( value ) ) {
+ return null;
+ }
+ return value;
}
- public static String getString(String property, Properties properties, String defaultValue) {
- String propValue = properties.getProperty(property);
- return propValue==null ? defaultValue : propValue;
+ /**
+ * Get a property value as a boolean. Shorthand for calling
+ * {@link #getBoolean(String, java.util.Properties, boolean)} with <tt>false</tt>
+ * as the default value.
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @return The property value.
+ */
+ public static boolean getBoolean(String propertyName, Properties properties) {
+ return getBoolean( propertyName, properties, false );
}
- public static Integer getInteger(String property, Properties properties) {
- String propValue = properties.getProperty(property);
- return propValue==null ? null : Integer.valueOf( propValue.trim() );
+ /**
+ * Get a property value as a boolean.
+ * <p/>
+ * First, the string value is extracted, and then {@link Boolean#valueOf(String)} is
+ * used to determine the correct boolean value.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @param defaultValue The default property value to use.
+ * @return The property value.
+ */
+ public static boolean getBoolean(String propertyName, Properties properties, boolean defaultValue) {
+ String value = extractPropertyValue( propertyName, properties );
+ return value == null ? defaultValue : Boolean.valueOf( value ).booleanValue();
}
- public static Map toMap(String property, String delim, Properties properties) {
+ /**
+ * Get a property value as an int.
+ * <p/>
+ * First, the string value is extracted, and then {@link Integer#parseInt(String)} is
+ * used to determine the correct int value for any non-null property values.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @param defaultValue The default property value to use.
+ * @return The property value.
+ */
+ public static int getInt(String propertyName, Properties properties, int defaultValue) {
+ String value = extractPropertyValue( propertyName, properties );
+ return value == null ? defaultValue : Integer.parseInt( value );
+ }
+
+ /**
+ * Get a property value as an Integer.
+ * <p/>
+ * First, the string value is extracted, and then {@link Integer#valueOf(String)} is
+ * used to determine the correct boolean value for any non-null property values.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @return The property value; may be null.
+ */
+ public static Integer getInteger(String propertyName, Properties properties) {
+ String value = extractPropertyValue( propertyName, properties );
+ return value == null ? null : Integer.valueOf( value );
+ }
+
+ /**
+ * Constructs a map from a property value.
+ * <p/>
+ * The exact behavior here is largely dependant upon what is passed in as
+ * the delimiter.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param delim The string defining tokens used as both entry and key/value delimiters.
+ * @param properties The properties object
+ * @return The resulting map; never null, though perhaps empty.
+ */
+ public static Map toMap(String propertyName, String delim, Properties properties) {
Map map = new HashMap();
- String propValue = properties.getProperty(property);
- if (propValue!=null) {
- StringTokenizer tokens = new StringTokenizer(propValue, delim);
+ String value = extractPropertyValue( propertyName, properties );
+ if ( value != null ) {
+ StringTokenizer tokens = new StringTokenizer( value, delim );
while ( tokens.hasMoreTokens() ) {
- map.put(
- tokens.nextToken(),
- tokens.hasMoreElements() ? tokens.nextToken() : ""
- );
+ map.put( tokens.nextToken(), tokens.hasMoreElements() ? tokens.nextToken() : "" );
}
}
return map;
}
- public static String[] toStringArray(String property, String delim, Properties properties) {
- return toStringArray( properties.getProperty(property), delim );
+ /**
+ * Get a property value as a string array.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ * @see #toStringArray(String, String)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param delim The delimiter used to separate individual array elements.
+ * @param properties The properties object
+ * @return The array; never null, though may be empty.
+ */
+ public static String[] toStringArray(String propertyName, String delim, Properties properties) {
+ return toStringArray( extractPropertyValue( propertyName, properties ), delim );
}
- public static String[] toStringArray(String propValue, String delim) {
- if (propValue!=null) {
- return StringHelper.split(delim, propValue);
+ /**
+ * Convert a string to an array of strings. The assumption is that
+ * the individual array elements are delimited in the source stringForm
+ * param by the delim param.
+ *
+ * @param stringForm The string form of the string array.
+ * @param delim The delimiter used to separate individual array elements.
+ * @return The array; never null, though may be empty.
+ */
+ public static String[] toStringArray(String stringForm, String delim) {
+ // todo : move to StringHelper?
+ if ( stringForm != null ) {
+ return StringHelper.split( delim, stringForm );
}
else {
return ArrayHelper.EMPTY_STRING_ARRAY;
@@ -73,13 +193,18 @@
* @return cloned and masked properties
*/
public static Properties maskOut(Properties props, String key) {
- Properties clone = (Properties) props.clone();
- if (clone.get(key) != null) {
- clone.setProperty(key, "****");
+ Properties clone = ( Properties ) props.clone();
+ if ( clone.get( key ) != null ) {
+ clone.setProperty( key, "****" );
}
return clone;
}
+ /**
+ * Handles interpolation processing for all entries in a properties object.
+ *
+ * @param properties The properties object.
+ */
public static void resolvePlaceHolders(Properties properties) {
Iterator itr = properties.entrySet().iterator();
while ( itr.hasNext() ) {
@@ -99,6 +224,12 @@
}
}
+ /**
+ * Handles interpolation processing for a single property.
+ *
+ * @param property The property value to be processed for interpolation.
+ * @return The (possibly) interpolated property value.
+ */
public static String resolvePlaceHolder(String property) {
if ( property.indexOf( PLACEHOLDER_START ) < 0 ) {
return property;
@@ -143,7 +274,4 @@
return null;
}
}
-
-
- private PropertiesHelper() {}
}
17 years, 5 months
Hibernate SVN: r12889 - core/trunk/core/src/main/java/org/hibernate/util.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-02 23:57:59 -0400 (Thu, 02 Aug 2007)
New Revision: 12889
Modified:
core/trunk/core/src/main/java/org/hibernate/util/PropertiesHelper.java
Log:
HHH-2761 : null and empty string consistency in PropertiesHelper (javadocs)
Modified: core/trunk/core/src/main/java/org/hibernate/util/PropertiesHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/PropertiesHelper.java 2007-08-02 20:33:20 UTC (rev 12888)
+++ core/trunk/core/src/main/java/org/hibernate/util/PropertiesHelper.java 2007-08-03 03:57:59 UTC (rev 12889)
@@ -7,16 +7,48 @@
import java.util.StringTokenizer;
import java.util.Iterator;
+/**
+ * Collection of helper methods for dealing with {@link java.util.Properties}
+ * objects.
+ *
+ * @author Gavin King
+ * @author Steve Ebersole
+ */
public final class PropertiesHelper {
private static final String PLACEHOLDER_START = "${";
+ /**
+ * Disallow instantiation
+ */
+ private PropertiesHelper() {
+ }
+
+ /**
+ * Get a property value as a string.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @param defaultValue The default property value to use.
+ * @return The property value; may be null.
+ */
public static String getString(String propertyName, Properties properties, String defaultValue) {
String value = extractPropertyValue( propertyName, properties );
return value == null ? defaultValue : value;
}
- private static String extractPropertyValue(String propertyName, Properties properties) {
+ /**
+ * Extract a property value by name from the given properties object.
+ * <p/>
+ * Both <tt>null</tt> and <tt>empty string</tt> are viewed as the same, and return null.
+ *
+ * @param propertyName The name of the property for which to extract value
+ * @param properties The properties object
+ * @return The property value; may be null.
+ */
+ public static String extractPropertyValue(String propertyName, Properties properties) {
String value = properties.getProperty( propertyName );
if ( value == null ) {
return null;
@@ -28,25 +60,85 @@
return value;
}
- public static boolean getBoolean(String property, Properties properties) {
- return getBoolean( property, properties, false );
+ /**
+ * Get a property value as a boolean. Shorthand for calling
+ * {@link #getBoolean(String, java.util.Properties, boolean)} with <tt>false</tt>
+ * as the default value.
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @return The property value.
+ */
+ public static boolean getBoolean(String propertyName, Properties properties) {
+ return getBoolean( propertyName, properties, false );
}
+ /**
+ * Get a property value as a boolean.
+ * <p/>
+ * First, the string value is extracted, and then {@link Boolean#valueOf(String)} is
+ * used to determine the correct boolean value.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @param defaultValue The default property value to use.
+ * @return The property value.
+ */
public static boolean getBoolean(String propertyName, Properties properties, boolean defaultValue) {
String value = extractPropertyValue( propertyName, properties );
return value == null ? defaultValue : Boolean.valueOf( value ).booleanValue();
}
+ /**
+ * Get a property value as an int.
+ * <p/>
+ * First, the string value is extracted, and then {@link Integer#parseInt(String)} is
+ * used to determine the correct int value for any non-null property values.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @param defaultValue The default property value to use.
+ * @return The property value.
+ */
public static int getInt(String propertyName, Properties properties, int defaultValue) {
String value = extractPropertyValue( propertyName, properties );
return value == null ? defaultValue : Integer.parseInt( value );
}
+ /**
+ * Get a property value as an Integer.
+ * <p/>
+ * First, the string value is extracted, and then {@link Integer#valueOf(String)} is
+ * used to determine the correct boolean value for any non-null property values.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param properties The properties object
+ * @return The property value; may be null.
+ */
public static Integer getInteger(String propertyName, Properties properties) {
String value = extractPropertyValue( propertyName, properties );
return value == null ? null : Integer.valueOf( value );
}
+ /**
+ * Constructs a map from a property value.
+ * <p/>
+ * The exact behavior here is largely dependant upon what is passed in as
+ * the delimiter.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param delim The string defining tokens used as both entry and key/value delimiters.
+ * @param properties The properties object
+ * @return The resulting map; never null, though perhaps empty.
+ */
public static Map toMap(String propertyName, String delim, Properties properties) {
Map map = new HashMap();
String value = extractPropertyValue( propertyName, properties );
@@ -59,11 +151,32 @@
return map;
}
+ /**
+ * Get a property value as a string array.
+ *
+ * @see #extractPropertyValue(String, java.util.Properties)
+ * @see #toStringArray(String, String)
+ *
+ * @param propertyName The name of the property for which to retrieve value
+ * @param delim The delimiter used to separate individual array elements.
+ * @param properties The properties object
+ * @return The array; never null, though may be empty.
+ */
public static String[] toStringArray(String propertyName, String delim, Properties properties) {
return toStringArray( extractPropertyValue( propertyName, properties ), delim );
}
+ /**
+ * Convert a string to an array of strings. The assumption is that
+ * the individual array elements are delimited in the source stringForm
+ * param by the delim param.
+ *
+ * @param stringForm The string form of the string array.
+ * @param delim The delimiter used to separate individual array elements.
+ * @return The array; never null, though may be empty.
+ */
public static String[] toStringArray(String stringForm, String delim) {
+ // todo : move to StringHelper?
if ( stringForm != null ) {
return StringHelper.split( delim, stringForm );
}
@@ -87,6 +200,11 @@
return clone;
}
+ /**
+ * Handles interpolation processing for all entries in a properties object.
+ *
+ * @param properties The properties object.
+ */
public static void resolvePlaceHolders(Properties properties) {
Iterator itr = properties.entrySet().iterator();
while ( itr.hasNext() ) {
@@ -106,6 +224,12 @@
}
}
+ /**
+ * Handles interpolation processing for a single property.
+ *
+ * @param property The property value to be processed for interpolation.
+ * @return The (possibly) interpolated property value.
+ */
public static String resolvePlaceHolder(String property) {
if ( property.indexOf( PLACEHOLDER_START ) < 0 ) {
return property;
@@ -150,8 +274,4 @@
return null;
}
}
-
-
- private PropertiesHelper() {
- }
}
17 years, 5 months
Hibernate SVN: r12888 - shards/tags.
by hibernate-commits@lists.jboss.org
Author: max.ross
Date: 2007-08-02 16:33:20 -0400 (Thu, 02 Aug 2007)
New Revision: 12888
Added:
shards/tags/v3_0_0_Beta1/
Removed:
shards/tags/shards_3_0_0_Beta1/
Log:
renaming tag for 3.0.0.Beta1
Copied: shards/tags/v3_0_0_Beta1 (from rev 12887, shards/tags/shards_3_0_0_Beta1)
17 years, 5 months
Hibernate SVN: r12887 - in shards: tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: max.ross
Date: 2007-08-02 16:32:42 -0400 (Thu, 02 Aug 2007)
New Revision: 12887
Added:
shards/tags/v3_0_0_Beta2/
Removed:
shards/v3_0_0_Beta2/
Log:
3.0.0.Beta2 release
Copied: shards/tags/v3_0_0_Beta2 (from rev 12886, shards/v3_0_0_Beta2)
17 years, 5 months