Hibernate SVN: r14679 - cglib/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-05-21 14:32:13 -0400 (Wed, 21 May 2008)
New Revision: 14679
Modified:
cglib/trunk/
Log:
added svn:ignore
Property changes on: cglib/trunk
___________________________________________________________________
Name: svn:ignore
+ target
local
*.ipr
*.iws
*.iml
.classpath
.project
.nbattrs
*.log
*.properties
.clover
16 years, 7 months
Hibernate SVN: r14678 - cglib/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-05-21 14:22:38 -0400 (Wed, 21 May 2008)
New Revision: 14678
Removed:
cglib/trunk/hibernate-cglib-repack.ipr
cglib/trunk/hibernate-cglib-repack.iws
cglib/trunk/target/
Log:
cleaning up import
Deleted: cglib/trunk/hibernate-cglib-repack.ipr
===================================================================
--- cglib/trunk/hibernate-cglib-repack.ipr 2008-05-21 18:20:50 UTC (rev 14677)
+++ cglib/trunk/hibernate-cglib-repack.ipr 2008-05-21 18:22:38 UTC (rev 14678)
@@ -1,304 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project relativePaths="false" version="4">
- <component name="AntConfiguration">
- <defaultAnt bundledAnt="true" />
- </component>
- <component name="BuildJarProjectSettings">
- <option name="BUILD_JARS_ON_MAKE" value="false" />
- </component>
- <component name="CodeStyleProjectProfileManger">
- <option name="PROJECT_PROFILE" />
- <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
- </component>
- <component name="CodeStyleSettingsManager">
- <option name="PER_PROJECT_SETTINGS" />
- <option name="USE_PER_PROJECT_SETTINGS" value="false" />
- </component>
- <component name="CompilerConfiguration">
- <option name="DEFAULT_COMPILER" value="Javac" />
- <option name="DEPLOY_AFTER_MAKE" value="0" />
- <resourceExtensions>
- <entry name=".+\.(properties|xml|html|dtd|tld)" />
- <entry name=".+\.(gif|png|jpeg|jpg)" />
- </resourceExtensions>
- <wildcardResourcePatterns>
- <entry name="?*.properties" />
- <entry name="?*.xml" />
- <entry name="?*.gif" />
- <entry name="?*.png" />
- <entry name="?*.jpeg" />
- <entry name="?*.jpg" />
- <entry name="?*.html" />
- <entry name="?*.dtd" />
- <entry name="?*.tld" />
- </wildcardResourcePatterns>
- </component>
- <component name="DependenciesAnalyzeManager">
- <option name="myForwardDirection" value="false" />
- </component>
- <component name="DependencyValidationManager">
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </component>
- <component name="EclipseCompilerSettings">
- <option name="DEBUGGING_INFO" value="true" />
- <option name="GENERATE_NO_WARNINGS" value="true" />
- <option name="DEPRECATION" value="false" />
- <option name="ADDITIONAL_OPTIONS_STRING" value="" />
- <option name="MAXIMUM_HEAP_SIZE" value="128" />
- </component>
- <component name="EclipseEmbeddedCompilerSettings">
- <option name="DEBUGGING_INFO" value="true" />
- <option name="GENERATE_NO_WARNINGS" value="true" />
- <option name="DEPRECATION" value="false" />
- <option name="ADDITIONAL_OPTIONS_STRING" value="" />
- <option name="MAXIMUM_HEAP_SIZE" value="128" />
- </component>
- <component name="EntryPointsManager">
- <entry_points version="2.0" />
- </component>
- <component name="InspectionProjectProfileManager">
- <option name="PROJECT_PROFILE" value="Project Default" />
- <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
- <scopes />
- <profiles>
- <profile version="1.0" is_locked="false">
- <option name="myName" value="Project Default" />
- <option name="myLocal" value="false" />
- </profile>
- </profiles>
- <list size="0" />
- </component>
- <component name="JavacSettings">
- <option name="DEBUGGING_INFO" value="true" />
- <option name="GENERATE_NO_WARNINGS" value="false" />
- <option name="DEPRECATION" value="true" />
- <option name="ADDITIONAL_OPTIONS_STRING" value="" />
- <option name="MAXIMUM_HEAP_SIZE" value="128" />
- </component>
- <component name="JavadocGenerationManager">
- <option name="OUTPUT_DIRECTORY" />
- <option name="OPTION_SCOPE" value="protected" />
- <option name="OPTION_HIERARCHY" value="true" />
- <option name="OPTION_NAVIGATOR" value="true" />
- <option name="OPTION_INDEX" value="true" />
- <option name="OPTION_SEPARATE_INDEX" value="true" />
- <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
- <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
- <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
- <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
- <option name="OPTION_DEPRECATED_LIST" value="true" />
- <option name="OTHER_OPTIONS" value="" />
- <option name="HEAP_SIZE" />
- <option name="LOCALE" />
- <option name="OPEN_IN_BROWSER" value="true" />
- </component>
- <component name="JikesSettings">
- <option name="JIKES_PATH" value="" />
- <option name="DEBUGGING_INFO" value="true" />
- <option name="DEPRECATION" value="true" />
- <option name="GENERATE_NO_WARNINGS" value="false" />
- <option name="IS_EMACS_ERRORS_MODE" value="true" />
- <option name="ADDITIONAL_OPTIONS_STRING" value="" />
- </component>
- <component name="MavenImporterState">
- <option name="autoImport">
- <set>
- <option value="$PROJECT_DIR$/pom.xml" />
- </set>
- </option>
- </component>
- <component name="ProjectFileVersion" converted="true" />
- <component name="ProjectModuleManager">
- <modules />
- </component>
- <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
- <output url="file://$PROJECT_DIR$/out" />
- </component>
- <component name="ResourceManagerContainer">
- <option name="myResourceBundles">
- <value>
- <list size="0" />
- </value>
- </option>
- </component>
- <component name="RmicSettings">
- <option name="IS_EANABLED" value="false" />
- <option name="DEBUGGING_INFO" value="true" />
- <option name="GENERATE_NO_WARNINGS" value="false" />
- <option name="GENERATE_IIOP_STUBS" value="false" />
- <option name="ADDITIONAL_OPTIONS_STRING" value="" />
- </component>
- <component name="VcsDirectoryMappings">
- <mapping directory="" vcs="" />
- </component>
- <component name="copyright">
- <Base>
- <setting name="state" value="1" />
- </Base>
- <LanguageOptions name="$TEMPLATE$">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Hibernate, Relational Persistence for Idiomatic Java Copyright (c) &#36;today.year, Red Hat Middleware LLC or third-party contributors as indicated by the @author tags or express copyright attribution statements applied by the authors. All third-party contributions are distributed under license by Red Hat Middleware LLC. 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, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY 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 along w!
ith this distribution; if not, write to: Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA " />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="4" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="1" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- <LanguageOptions name="HTML">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="2" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- <LanguageOptions name="JAVA">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="1" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- <LanguageOptions name="JSP">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="2" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- <LanguageOptions name="JavaScript">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="1" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- <LanguageOptions name="Properties">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="1" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- <LanguageOptions name="XML">
- <option name="templateOptions">
- <value>
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </value>
- </option>
- <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
- <option name="keyword" value="Copyright" />
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="false" />
- <option name="fileLocation" value="2" />
- <option name="useAlternate" value="false" />
- </LanguageOptions>
- </component>
- <component name="ideadoc.IdeaDocConfigurationGUI">
- <doccer class="nl.piraya.ideadoc.doccer.DoccerForOverridingMethod" enabled="true">
- <template>/**$s${@inheritDoc}$s$*/</template>
- </doccer>
- <doccer class="nl.piraya.ideadoc.doccer.DoccerForGetter" enabled="true">
- <template>/**$n$$s$*$s$Getter$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*$n$$s$*$s$@return$s$Value$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*/</template>
- </doccer>
- <doccer class="nl.piraya.ideadoc.doccer.DoccerForSetter" enabled="true">
- <template>/**$n$$s$*$s$Setter$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*$n$$s$*$s$@param$s$${PARAM_NAME}$s$Value$s$to$s$set$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*/</template>
- </doccer>
- <doccer class="nl.piraya.ideadoc.doccer.DoccerForDefaultConstructor" enabled="true">
- <template>/**$s$Constructs$s$a$s$new$s$${CLASS_NAME}.$s$*/</template>
- </doccer>
- <doccer class="nl.piraya.ideadoc.doccer.DoccerForPrivateDefaultConstructor" enabled="true">
- <template>/**$s$Do$s$not$s$instantiate$s$${CLASS_NAME}.$s$*/</template>
- </doccer>
- </component>
-</project>
-
Deleted: cglib/trunk/hibernate-cglib-repack.iws
===================================================================
--- cglib/trunk/hibernate-cglib-repack.iws 2008-05-21 18:20:50 UTC (rev 14677)
+++ cglib/trunk/hibernate-cglib-repack.iws 2008-05-21 18:22:38 UTC (rev 14678)
@@ -1,319 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project relativePaths="false" version="4">
- <component name="ChangeListManager">
- <list default="true" name="Default" comment="" />
- <ignored path="hibernate-cglib-repack.iws" />
- <ignored path=".idea/workspace.xml" />
- </component>
- <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
- <component name="CreatePatchCommitExecutor">
- <option name="PATCH_PATH" value="" />
- <option name="REVERSE_PATCH" value="false" />
- </component>
- <component name="DaemonCodeAnalyzer">
- <disable_hints />
- </component>
- <component name="DebuggerManager">
- <breakpoint_any>
- <breakpoint>
- <option name="NOTIFY_CAUGHT" value="true" />
- <option name="NOTIFY_UNCAUGHT" value="true" />
- <option name="ENABLED" value="false" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- <breakpoint>
- <option name="NOTIFY_CAUGHT" value="true" />
- <option name="NOTIFY_UNCAUGHT" value="true" />
- <option name="ENABLED" value="false" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- </breakpoint_any>
- <breakpoint_rules />
- <ui_properties />
- </component>
- <component name="ErrorTreeViewConfiguration">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="HIDE_WARNINGS" value="false" />
- </component>
- <component name="FavoritesManager">
- <favorites_list name="hibernate-cglib-repack" />
- </component>
- <component name="FileEditorManager">
- <leaf>
- <file leaf-file-name="pom.xml" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/pom.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="109" column="3" selection-start="4533" selection-end="4533" vertical-scroll-proportion="0.4861111">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="FindManager">
- <FindUsagesManager>
- <setting name="OPEN_NEW_TAB" value="false" />
- </FindUsagesManager>
- </component>
- <component name="HierarchyBrowserManager">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="SORT_ALPHABETICALLY" value="false" />
- <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
- </component>
- <component name="ModuleEditorState">
- <option name="LAST_EDITED_MODULE_NAME" />
- <option name="LAST_EDITED_TAB_NAME" />
- </component>
- <component name="ProjectLevelVcsManager">
- <OptionsSetting value="true" id="Add" />
- <OptionsSetting value="true" id="Remove" />
- <OptionsSetting value="true" id="Checkout" />
- <OptionsSetting value="true" id="Update" />
- <OptionsSetting value="true" id="Status" />
- <OptionsSetting value="true" id="Edit" />
- <ConfirmationsSetting value="0" id="Add" />
- <ConfirmationsSetting value="0" id="Remove" />
- </component>
- <component name="ProjectPane">
- <subPane>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="hibernate-cglib-repack" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="hibernate-cglib-repack" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="hibernate-cglib-repack" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="hibernate-cglib-repack" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="hibernate-cglib-repack" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="hibernate-cglib-repack" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/target" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- </subPane>
- </component>
- <component name="ProjectReloadState">
- <option name="STATE" value="0" />
- </component>
- <component name="ProjectView">
- <navigator currentView="ProjectPane" proportions="0.11111111" version="1" splitterProportion="0.5">
- <flattenPackages />
- <showMembers />
- <showModules />
- <showLibraryContents />
- <hideEmptyPackages />
- <abbreviatePackageNames />
- <showStructure ProjectPane="false" />
- <autoscrollToSource />
- <autoscrollFromSource />
- <sortByType />
- </navigator>
- </component>
- <component name="PropertiesComponent">
- <property name="MemberChooser.copyJavadoc" value="false" />
- <property name="GoToClass.includeLibraries" value="false" />
- <property name="MemberChooser.showClasses" value="true" />
- <property name="MemberChooser.sorted" value="false" />
- <property name="GoToFile.includeJavaFiles" value="false" />
- <property name="GoToClass.toSaveIncludeLibraries" value="false" />
- </component>
- <component name="RunManager">
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- </configuration>
- <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="" />
- </configuration>
- <configuration default="true" type="Remote" factoryName="Remote">
- <option name="USE_SOCKET_TRANSPORT" value="true" />
- <option name="SERVER_MODE" value="false" />
- <option name="SHMEM_ADDRESS" value="javadebug" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
- </configuration>
- <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
- <module name="" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <option name="ADDITIONAL_CLASS_PATH" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="wholeProject" />
- </option>
- </configuration>
- <list size="0" />
- <configuration name="<template>" type="WebApp" default="true" selected="false">
- <Host>localhost</Host>
- <Port>5050</Port>
- </configuration>
- </component>
- <component name="StructureViewFactory">
- <option name="AUTOSCROLL_MODE" value="true" />
- <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
- <option name="ACTIVE_ACTIONS" value="" />
- </component>
- <component name="SvnConfiguration">
- <option name="USER" value="" />
- <option name="PASSWORD" value="" />
- <option name="LAST_MERGED_REVISION" />
- <option name="UPDATE_RUN_STATUS" value="false" />
- <option name="UPDATE_RECURSIVELY" value="true" />
- <option name="MERGE_DRY_RUN" value="false" />
- <configuration useDefault="true">/Users/steve/.subversion</configuration>
- </component>
- <component name="TodoView" selected-index="0">
- <todo-panel id="selected-file">
- <are-packages-shown value="false" />
- <are-modules-shown value="false" />
- <flatten-packages value="false" />
- <is-autoscroll-to-source value="true" />
- </todo-panel>
- <todo-panel id="all">
- <are-packages-shown value="true" />
- <are-modules-shown value="false" />
- <flatten-packages value="false" />
- <is-autoscroll-to-source value="true" />
- </todo-panel>
- <todo-panel id="default-changelist">
- <are-packages-shown value="false" />
- <are-modules-shown value="false" />
- <flatten-packages value="false" />
- <is-autoscroll-to-source value="false" />
- </todo-panel>
- </component>
- <component name="ToolWindowManager">
- <frame x="0" y="22" width="1680" height="1024" extended-state="0" />
- <editor active="true" />
- <layout>
- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" order="0" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="1" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
- <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
- <window_info id="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
- <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
- <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
- <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
- <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
- </layout>
- </component>
- <component name="VcsManagerConfiguration">
- <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
- <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
- <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
- <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
- <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
- <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
- <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" />
- <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
- <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
- <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
- <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
- <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
- <option name="ACTIVE_VCS_NAME" />
- <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
- <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
- <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
- <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
- </component>
- <component name="antWorkspaceConfiguration">
- <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
- <option name="FILTER_TARGETS" value="false" />
- </component>
- <component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/pom.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="109" column="3" selection-start="4533" selection-end="4533" vertical-scroll-proportion="0.4861111">
- <folding />
- </state>
- </provider>
- </entry>
- </component>
-</project>
-
16 years, 7 months
Hibernate SVN: r14677 - cglib and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-05-21 14:20:50 -0400 (Wed, 21 May 2008)
New Revision: 14677
Added:
cglib/
cglib/branches/
cglib/tags/
cglib/trunk/
cglib/trunk/hibernate-cglib-repack.ipr
cglib/trunk/hibernate-cglib-repack.iws
cglib/trunk/pom.xml
cglib/trunk/target/
cglib/trunk/target/dependency-reduced-pom.xml
cglib/trunk/target/hibernate-cglib-repack-2.1_3.jar
cglib/trunk/target/original-hibernate-cglib-repack-2.1_3.jar
Log:
Importing cglib repackaging project
Added: cglib/trunk/hibernate-cglib-repack.ipr
===================================================================
--- cglib/trunk/hibernate-cglib-repack.ipr (rev 0)
+++ cglib/trunk/hibernate-cglib-repack.ipr 2008-05-21 18:20:50 UTC (rev 14677)
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project relativePaths="false" version="4">
+ <component name="AntConfiguration">
+ <defaultAnt bundledAnt="true" />
+ </component>
+ <component name="BuildJarProjectSettings">
+ <option name="BUILD_JARS_ON_MAKE" value="false" />
+ </component>
+ <component name="CodeStyleProjectProfileManger">
+ <option name="PROJECT_PROFILE" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ </component>
+ <component name="CodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS" />
+ <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+ </component>
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <option name="DEPLOY_AFTER_MAKE" value="0" />
+ <resourceExtensions>
+ <entry name=".+\.(properties|xml|html|dtd|tld)" />
+ <entry name=".+\.(gif|png|jpeg|jpg)" />
+ </resourceExtensions>
+ <wildcardResourcePatterns>
+ <entry name="?*.properties" />
+ <entry name="?*.xml" />
+ <entry name="?*.gif" />
+ <entry name="?*.png" />
+ <entry name="?*.jpeg" />
+ <entry name="?*.jpg" />
+ <entry name="?*.html" />
+ <entry name="?*.dtd" />
+ <entry name="?*.tld" />
+ </wildcardResourcePatterns>
+ </component>
+ <component name="DependenciesAnalyzeManager">
+ <option name="myForwardDirection" value="false" />
+ </component>
+ <component name="DependencyValidationManager">
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="EclipseCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EclipseEmbeddedCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EntryPointsManager">
+ <entry_points version="2.0" />
+ </component>
+ <component name="InspectionProjectProfileManager">
+ <option name="PROJECT_PROFILE" value="Project Default" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ <scopes />
+ <profiles>
+ <profile version="1.0" is_locked="false">
+ <option name="myName" value="Project Default" />
+ <option name="myLocal" value="false" />
+ </profile>
+ </profiles>
+ <list size="0" />
+ </component>
+ <component name="JavacSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="DEPRECATION" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="JavadocGenerationManager">
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="OPTION_SCOPE" value="protected" />
+ <option name="OPTION_HIERARCHY" value="true" />
+ <option name="OPTION_NAVIGATOR" value="true" />
+ <option name="OPTION_INDEX" value="true" />
+ <option name="OPTION_SEPARATE_INDEX" value="true" />
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+ <option name="OPTION_DEPRECATED_LIST" value="true" />
+ <option name="OTHER_OPTIONS" value="" />
+ <option name="HEAP_SIZE" />
+ <option name="LOCALE" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ </component>
+ <component name="JikesSettings">
+ <option name="JIKES_PATH" value="" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="DEPRECATION" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="IS_EMACS_ERRORS_MODE" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="MavenImporterState">
+ <option name="autoImport">
+ <set>
+ <option value="$PROJECT_DIR$/pom.xml" />
+ </set>
+ </option>
+ </component>
+ <component name="ProjectFileVersion" converted="true" />
+ <component name="ProjectModuleManager">
+ <modules />
+ </component>
+ <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+ <component name="ResourceManagerContainer">
+ <option name="myResourceBundles">
+ <value>
+ <list size="0" />
+ </value>
+ </option>
+ </component>
+ <component name="RmicSettings">
+ <option name="IS_EANABLED" value="false" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="GENERATE_IIOP_STUBS" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ </component>
+ <component name="copyright">
+ <Base>
+ <setting name="state" value="1" />
+ </Base>
+ <LanguageOptions name="$TEMPLATE$">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Hibernate, Relational Persistence for Idiomatic Java Copyright (c) &#36;today.year, Red Hat Middleware LLC or third-party contributors as indicated by the @author tags or express copyright attribution statements applied by the authors. All third-party contributions are distributed under license by Red Hat Middleware LLC. 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, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY 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 along w!
ith this distribution; if not, write to: Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA " />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="4" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="HTML">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="2" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JAVA">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JSP">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="2" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JavaScript">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="Properties">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="XML">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="false" />
+ <option name="fileLocation" value="2" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ </component>
+ <component name="ideadoc.IdeaDocConfigurationGUI">
+ <doccer class="nl.piraya.ideadoc.doccer.DoccerForOverridingMethod" enabled="true">
+ <template>/**$s${@inheritDoc}$s$*/</template>
+ </doccer>
+ <doccer class="nl.piraya.ideadoc.doccer.DoccerForGetter" enabled="true">
+ <template>/**$n$$s$*$s$Getter$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*$n$$s$*$s$@return$s$Value$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*/</template>
+ </doccer>
+ <doccer class="nl.piraya.ideadoc.doccer.DoccerForSetter" enabled="true">
+ <template>/**$n$$s$*$s$Setter$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*$n$$s$*$s$@param$s$${PARAM_NAME}$s$Value$s$to$s$set$s$for$s$property$s$'${PROPERTY_NAME}'.$n$$s$*/</template>
+ </doccer>
+ <doccer class="nl.piraya.ideadoc.doccer.DoccerForDefaultConstructor" enabled="true">
+ <template>/**$s$Constructs$s$a$s$new$s$${CLASS_NAME}.$s$*/</template>
+ </doccer>
+ <doccer class="nl.piraya.ideadoc.doccer.DoccerForPrivateDefaultConstructor" enabled="true">
+ <template>/**$s$Do$s$not$s$instantiate$s$${CLASS_NAME}.$s$*/</template>
+ </doccer>
+ </component>
+</project>
+
Added: cglib/trunk/hibernate-cglib-repack.iws
===================================================================
--- cglib/trunk/hibernate-cglib-repack.iws (rev 0)
+++ cglib/trunk/hibernate-cglib-repack.iws 2008-05-21 18:20:50 UTC (rev 14677)
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project relativePaths="false" version="4">
+ <component name="ChangeListManager">
+ <list default="true" name="Default" comment="" />
+ <ignored path="hibernate-cglib-repack.iws" />
+ <ignored path=".idea/workspace.xml" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ <option name="REVERSE_PATCH" value="false" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="DebuggerManager">
+ <breakpoint_any>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ </breakpoint_any>
+ <breakpoint_rules />
+ <ui_properties />
+ </component>
+ <component name="ErrorTreeViewConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="HIDE_WARNINGS" value="false" />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="hibernate-cglib-repack" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="pom.xml" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/pom.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="109" column="3" selection-start="4533" selection-end="4533" vertical-scroll-proportion="0.4861111">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="HierarchyBrowserManager">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="SORT_ALPHABETICALLY" value="false" />
+ <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
+ </component>
+ <component name="ModuleEditorState">
+ <option name="LAST_EDITED_MODULE_NAME" />
+ <option name="LAST_EDITED_TAB_NAME" />
+ </component>
+ <component name="ProjectLevelVcsManager">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="hibernate-cglib-repack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="hibernate-cglib-repack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="hibernate-cglib-repack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="hibernate-cglib-repack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="hibernate-cglib-repack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="hibernate-cglib-repack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/target" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="0.11111111" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <showStructure ProjectPane="false" />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="MemberChooser.copyJavadoc" value="false" />
+ <property name="GoToClass.includeLibraries" value="false" />
+ <property name="MemberChooser.showClasses" value="true" />
+ <property name="MemberChooser.sorted" value="false" />
+ <property name="GoToFile.includeJavaFiles" value="false" />
+ <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ </component>
+ <component name="RunManager">
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
+ <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="" />
+ </configuration>
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ </configuration>
+ <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+ <module name="" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="PACKAGE_NAME" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="METHOD_NAME" />
+ <option name="TEST_OBJECT" value="class" />
+ <option name="VM_PARAMETERS" />
+ <option name="PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <option name="ADDITIONAL_CLASS_PATH" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="wholeProject" />
+ </option>
+ </configuration>
+ <list size="0" />
+ <configuration name="<template>" type="WebApp" default="true" selected="false">
+ <Host>localhost</Host>
+ <Port>5050</Port>
+ </configuration>
+ </component>
+ <component name="StructureViewFactory">
+ <option name="AUTOSCROLL_MODE" value="true" />
+ <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+ <option name="ACTIVE_ACTIONS" value="" />
+ </component>
+ <component name="SvnConfiguration">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="UPDATE_RUN_STATUS" value="false" />
+ <option name="UPDATE_RECURSIVELY" value="true" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <configuration useDefault="true">/Users/steve/.subversion</configuration>
+ </component>
+ <component name="TodoView" selected-index="0">
+ <todo-panel id="selected-file">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ <todo-panel id="all">
+ <are-packages-shown value="true" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ <todo-panel id="default-changelist">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="0" y="22" width="1680" height="1024" extended-state="0" />
+ <editor active="true" />
+ <layout>
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
+ <window_info id="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
+ <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
+ </layout>
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ACTIVE_VCS_NAME" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ </component>
+ <component name="antWorkspaceConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="FILTER_TARGETS" value="false" />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/pom.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="109" column="3" selection-start="4533" selection-end="4533" vertical-scroll-proportion="0.4861111">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
Added: cglib/trunk/pom.xml
===================================================================
--- cglib/trunk/pom.xml (rev 0)
+++ cglib/trunk/pom.xml 2008-05-21 18:20:50 UTC (rev 14677)
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ 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, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY 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
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ ~
+ -->
+
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-cglib-repack</artifactId>
+ <version>2.1_3</version>
+ <packaging>jar</packaging>
+
+ <name>Hibernate CGLIB Repackaging</name>
+ <description>
+ A repackaging of CGLIB (and its ASM dependencies) under the org.hibernate namespace to avoid version
+ conflicts. The produced artifact is not intended for any use other than to be consumed by hibernate.
+ </description>
+
+ <url>http://hibernate.org</url>
+ <organization>
+ <name>Hibernate.org</name>
+ <url>http://hibernate.org</url>
+ </organization>
+
+ <scm>
+ <connection>scm:svn:https://svn.jboss.org/repos/hibernate/cglib/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/cglib/trunk</developerConnection>
+ <url>https://svn.jboss.org/repos/hibernate/cglib/trunk</url>
+ </scm>
+
+ <dependencies>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>cglib:cglib-nodep</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>net.sf.cglib</pattern>
+ <shadedPattern>org.hibernate.repackage.cglib</shadedPattern>
+ </relocation>
+ </relocations>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- compile to JDK 1.4 compatibility -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <!-- add specification/implementation details to the manifests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-URL>${pom.url}</Implementation-URL>
+ </manifestEntries>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
\ No newline at end of file
Added: cglib/trunk/target/dependency-reduced-pom.xml
===================================================================
--- cglib/trunk/target/dependency-reduced-pom.xml (rev 0)
+++ cglib/trunk/target/dependency-reduced-pom.xml 2008-05-21 18:20:50 UTC (rev 14677)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-cglib-repack</artifactId>
+ <name>Hibernate CGLIB Repackaging</name>
+ <version>2.1_3</version>
+ <description>A repackaging of CGLIB (and its ASM dependencies) under the org.hibernate namespace to avoid version
+ conflicts. The produced artifact is not intended for any use other than to be consumed by hibernate.</description>
+ <url>http://hibernate.org</url>
+ <scm>
+ <connection>scm:svn:https://svn.jboss.org/repos/hibernate/cglib/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/cglib/trunk</developerConnection>
+ <url>https://svn.jboss.org/repos/hibernate/cglib/trunk</url>
+ </scm>
+ <organization>
+ <name>Hibernate.org</name>
+ <url>http://hibernate.org</url>
+ </organization>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>cglib:cglib-nodep</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>net.sf.cglib</pattern>
+ <shadedPattern>org.hibernate.repackage.cglib</shadedPattern>
+ </relocation>
+ </relocations>
+ <transformers>
+ <transformer />
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-URL>${pom.url}</Implementation-URL>
+ </manifestEntries>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <distributionManagement>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
+
Added: cglib/trunk/target/hibernate-cglib-repack-2.1_3.jar
===================================================================
(Binary files differ)
Property changes on: cglib/trunk/target/hibernate-cglib-repack-2.1_3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: cglib/trunk/target/original-hibernate-cglib-repack-2.1_3.jar
===================================================================
(Binary files differ)
Property changes on: cglib/trunk/target/original-hibernate-cglib-repack-2.1_3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 7 months
Hibernate SVN: r14676 - in core/branches/Branch_3_2_4_SP1_CP: src/org/hibernate/loader and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: anthonyHib
Date: 2008-05-20 02:44:01 -0400 (Tue, 20 May 2008)
New Revision: 14676
Modified:
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryExpression.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/AbstractEntityJoinWalker.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/criteria/CriteriaJoinWalker.java
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/CriteriaQueryTest.java
Log:
fix for JBPAPP-838/HHH-957/HHH-952
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryExpression.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryExpression.java 2008-05-19 15:22:26 UTC (rev 14675)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryExpression.java 2008-05-20 06:44:01 UTC (rev 14676)
@@ -1,17 +1,18 @@
//$Id$
package org.hibernate.criterion;
+import java.util.HashMap;
+
import org.hibernate.Criteria;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.engine.QueryParameters;
import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.TypedValue;
import org.hibernate.impl.CriteriaImpl;
+import org.hibernate.loader.criteria.CriteriaJoinWalker;
import org.hibernate.loader.criteria.CriteriaQueryTranslator;
import org.hibernate.persister.entity.OuterJoinLoadable;
-import org.hibernate.sql.Select;
import org.hibernate.type.Type;
/**
@@ -24,7 +25,8 @@
private String op;
private QueryParameters params;
private Type[] types;
-
+ private CriteriaQueryTranslator innerQuery;
+
protected Type[] getTypes() {
return types;
}
@@ -39,34 +41,23 @@
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException {
-
- final SessionImplementor session = ( (CriteriaImpl) criteria ).getSession(); //ugly!
- final SessionFactoryImplementor factory = session.getFactory();
-
+
+ final SessionFactoryImplementor factory = criteriaQuery.getFactory();
final OuterJoinLoadable persister = (OuterJoinLoadable) factory.getEntityPersister( criteriaImpl.getEntityOrClassName() );
- CriteriaQueryTranslator innerQuery = new CriteriaQueryTranslator(
- factory,
- criteriaImpl,
- criteriaImpl.getEntityOrClassName(), //implicit polymorphism not supported (would need a union)
- criteriaQuery.generateSQLAlias(),
- criteriaQuery
- );
+
+ createAndSetInnerQuery( criteriaQuery, factory );
- params = innerQuery.getQueryParameters(); //TODO: bad lifecycle....
- types = innerQuery.getProjectedTypes();
-
- //String filter = persister.filterFragment( innerQuery.getRootSQLALias(), session.getEnabledFilters() );
-
- String sql = new Select( factory.getDialect() )
- .setWhereClause( innerQuery.getWhereCondition() )
- .setGroupByClause( innerQuery.getGroupBy() )
- .setSelectClause( innerQuery.getSelect() )
- .setFromClause(
- persister.fromTableFragment( innerQuery.getRootSQLALias() ) +
- persister.fromJoinFragment( innerQuery.getRootSQLALias(), true, false )
- )
- .toStatementString();
-
+ CriteriaJoinWalker walker = new CriteriaJoinWalker(
+ persister,
+ innerQuery,
+ factory,
+ criteriaImpl,
+ criteriaImpl.getEntityOrClassName(),
+ new HashMap(),
+ innerQuery.getRootSQLALias());
+
+ String sql = walker.getSQLString();
+
final StringBuffer buf = new StringBuffer()
.append( toLeftSqlString(criteria, criteriaQuery) );
if (op!=null) buf.append(' ').append(op).append(' ');
@@ -77,13 +68,49 @@
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException {
- Type[] types = params.getPositionalParameterTypes();
- Object[] values = params.getPositionalParameterValues();
- TypedValue[] tv = new TypedValue[types.length];
- for ( int i=0; i<types.length; i++ ) {
- tv[i] = new TypedValue( types[i], values[i], EntityMode.POJO );
+ //the following two lines were added to ensure that this.params is not null, which
+ //can happen with two-deep nested subqueries
+ SessionFactoryImplementor factory = criteriaQuery.getFactory();
+ createAndSetInnerQuery(criteriaQuery, factory);
+
+ Type[] ppTypes = params.getPositionalParameterTypes();
+ Object[] ppValues = params.getPositionalParameterValues();
+ TypedValue[] tv = new TypedValue[ppTypes.length];
+ for ( int i=0; i<ppTypes.length; i++ ) {
+ tv[i] = new TypedValue( ppTypes[i], ppValues[i], EntityMode.POJO );
}
return tv;
}
+ /**
+ * Creates the inner query used to extract some useful information about
+ * types, since it is needed in both methods.
+ * @param criteriaQuery
+ * @param factory
+ */
+ private void createAndSetInnerQuery(CriteriaQuery criteriaQuery, final SessionFactoryImplementor factory) {
+ if ( innerQuery == null ) {
+ //with two-deep subqueries, the same alias would get generated for
+ //both using the old method (criteriaQuery.generateSQLAlias()), so
+ //that is now used as a fallback if the main criteria alias isn't set
+ String alias;
+ if ( this.criteriaImpl.getAlias() == null ) {
+ alias = criteriaQuery.generateSQLAlias();
+ }
+ else {
+ alias = this.criteriaImpl.getAlias() + "_";
+ }
+
+ innerQuery = new CriteriaQueryTranslator(
+ factory,
+ criteriaImpl,
+ criteriaImpl.getEntityOrClassName(), //implicit polymorphism not supported (would need a union)
+ alias,
+ criteriaQuery
+ );
+
+ params = innerQuery.getQueryParameters();
+ types = innerQuery.getProjectedTypes();
+ }
+ }
}
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/AbstractEntityJoinWalker.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/AbstractEntityJoinWalker.java 2008-05-19 15:22:26 UTC (rev 14675)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/AbstractEntityJoinWalker.java 2008-05-20 06:44:01 UTC (rev 14676)
@@ -26,12 +26,16 @@
public abstract class AbstractEntityJoinWalker extends JoinWalker {
private final OuterJoinLoadable persister;
- private String alias;
+ private final String alias;
public AbstractEntityJoinWalker(OuterJoinLoadable persister, SessionFactoryImplementor factory, Map enabledFilters) {
+ this( persister, factory, enabledFilters, null );
+ }
+
+ public AbstractEntityJoinWalker(OuterJoinLoadable persister, SessionFactoryImplementor factory, Map enabledFilters, String alias) {
super( factory, enabledFilters );
this.persister = persister;
- alias = generateRootAlias( persister.getEntityName() );
+ this.alias = ( alias == null ) ? generateRootAlias( persister.getEntityName() ) : alias;
}
protected final void initAll(
@@ -39,9 +43,7 @@
final String orderByString,
final LockMode lockMode)
throws MappingException {
-
walkEntityTree( persister, getAlias() );
-
List allAssociations = new ArrayList();
allAssociations.addAll(associations);
allAssociations.add( new OuterJoinableAssociation(
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/criteria/CriteriaJoinWalker.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/criteria/CriteriaJoinWalker.java 2008-05-19 15:22:26 UTC (rev 14675)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/criteria/CriteriaJoinWalker.java 2008-05-20 06:44:01 UTC (rev 14676)
@@ -8,7 +8,6 @@
import org.hibernate.Criteria;
import org.hibernate.FetchMode;
-import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.MappingException;
import org.hibernate.engine.CascadeStyle;
@@ -18,7 +17,6 @@
import org.hibernate.persister.entity.Joinable;
import org.hibernate.persister.entity.OuterJoinLoadable;
import org.hibernate.persister.entity.Queryable;
-import org.hibernate.sql.JoinFragment;
import org.hibernate.type.AssociationType;
import org.hibernate.type.Type;
import org.hibernate.type.TypeFactory;
@@ -57,10 +55,20 @@
final SessionFactoryImplementor factory,
final CriteriaImpl criteria,
final String rootEntityName,
- final Map enabledFilters)
- throws HibernateException {
- super(persister, factory, enabledFilters);
+ final Map enabledFilters) {
+ this(persister, translator, factory, criteria, rootEntityName, enabledFilters, null);
+ }
+ public CriteriaJoinWalker(
+ final OuterJoinLoadable persister,
+ final CriteriaQueryTranslator translator,
+ final SessionFactoryImplementor factory,
+ final CriteriaImpl criteria,
+ final String rootEntityName,
+ final Map enabledFilters,
+ final String alias) {
+ super(persister, factory, enabledFilters, alias);
+
this.translator = translator;
querySpaces = translator.getQuerySpaces();
Modified: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/CriteriaQueryTest.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/CriteriaQueryTest.java 2008-05-19 15:22:26 UTC (rev 14675)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/CriteriaQueryTest.java 2008-05-20 06:44:01 UTC (rev 14676)
@@ -16,7 +16,6 @@
import org.hibernate.cfg.Environment;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Example;
-import org.hibernate.criterion.Expression;
import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
@@ -154,8 +153,8 @@
.list();
session.createCriteria(Student.class)
- .add( Property.forName("name").eqAll(dc) )
- .list();
+ .add( Property.forName("name").eqAll(dc) )
+ .list();
session.createCriteria(Student.class)
.add( Subqueries.in("Gavin King", dc) )
@@ -169,8 +168,7 @@
.add( Subqueries.eq("Gavin King", dc2) )
.list();
- //TODO: join in subselect: HHH-952
- /*DetachedCriteria dc3 = DetachedCriteria.forClass(Student.class, "st")
+ DetachedCriteria dc3 = DetachedCriteria.forClass(Student.class, "st")
.createCriteria("enrolments")
.createCriteria("course")
.add( Property.forName("description").eq("Hibernate Training") )
@@ -178,7 +176,7 @@
session.createCriteria(Enrolment.class, "e")
.add( Subqueries.eq("Gavin King", dc3) )
- .list();*/
+ .list();
session.delete(enrolment2);
session.delete(gavin);
@@ -225,110 +223,130 @@
session.close();
}
- public void testProjectionCache() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
-
- Course course = new Course();
- course.setCourseCode("HIB");
- course.setDescription("Hibernate Training");
- s.save(course);
-
- Student gavin = new Student();
- gavin.setName("Gavin King");
- gavin.setStudentNumber(666);
- s.save(gavin);
-
- Student xam = new Student();
- xam.setName("Max Rydahl Andersen");
- xam.setStudentNumber(101);
- s.save(xam);
-
- Enrolment enrolment1 = new Enrolment();
- enrolment1.setCourse(course);
- enrolment1.setCourseCode(course.getCourseCode());
- enrolment1.setSemester((short) 1);
- enrolment1.setYear((short) 1999);
- enrolment1.setStudent(xam);
- enrolment1.setStudentNumber(xam.getStudentNumber());
- xam.getEnrolments().add(enrolment1);
- s.save(enrolment1);
-
- Enrolment enrolment2 = new Enrolment();
- enrolment2.setCourse(course);
- enrolment2.setCourseCode(course.getCourseCode());
- enrolment2.setSemester((short) 3);
- enrolment2.setYear((short) 1998);
- enrolment2.setStudent(gavin);
- enrolment2.setStudentNumber(gavin.getStudentNumber());
- gavin.getEnrolments().add(enrolment2);
- s.save(enrolment2);
-
- List list = s.createCriteria(Enrolment.class)
- .createAlias("student", "s")
- .createAlias("course", "c")
- .add( Restrictions.isNotEmpty("s.enrolments") )
- .setProjection( Projections.projectionList()
- .add( Projections.property("s.name") )
- .add( Projections.property("c.description") )
- )
- .setCacheable(true)
- .list();
-
- assertEquals( list.size(), 2 );
- assertEquals( ( (Object[]) list.get(0) ).length, 2 );
- assertEquals( ( (Object[]) list.get(1) ).length, 2 );
-
- t.commit();
- s.close();
+ // test for HHH-957/JBPAPP-838
+ public void testDetachedCriteriaAsSubQuery() {
+
+ DetachedCriteria subselect = DetachedCriteria.forClass(Course.class);
+ subselect.add(Restrictions.like("description","test",MatchMode.START)).setProjection(Projections.property("courseCode"));
+
+ DetachedCriteria mainselect = DetachedCriteria.forClass(Enrolment.class);
+ mainselect.createCriteria("student").add(Subqueries.in("preferredCourse",subselect));
+
+
+ Session session = openSession();
+ Transaction t = session.beginTransaction();
+
+ mainselect.getExecutableCriteria(session).list();
+
+ t.commit();
+ session.close();
+ }
+
+
+ public void testProjectionCache() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ Course course = new Course();
+ course.setCourseCode("HIB");
+ course.setDescription("Hibernate Training");
+ s.save(course);
+
+ Student gavin = new Student();
+ gavin.setName("Gavin King");
+ gavin.setStudentNumber(666);
+ s.save(gavin);
+
+ Student xam = new Student();
+ xam.setName("Max Rydahl Andersen");
+ xam.setStudentNumber(101);
+ s.save(xam);
+
+ Enrolment enrolment1 = new Enrolment();
+ enrolment1.setCourse(course);
+ enrolment1.setCourseCode(course.getCourseCode());
+ enrolment1.setSemester((short) 1);
+ enrolment1.setYear((short) 1999);
+ enrolment1.setStudent(xam);
+ enrolment1.setStudentNumber(xam.getStudentNumber());
+ xam.getEnrolments().add(enrolment1);
+ s.save(enrolment1);
+
+ Enrolment enrolment2 = new Enrolment();
+ enrolment2.setCourse(course);
+ enrolment2.setCourseCode(course.getCourseCode());
+ enrolment2.setSemester((short) 3);
+ enrolment2.setYear((short) 1998);
+ enrolment2.setStudent(gavin);
+ enrolment2.setStudentNumber(gavin.getStudentNumber());
+ gavin.getEnrolments().add(enrolment2);
+ s.save(enrolment2);
+
+ List list = s.createCriteria(Enrolment.class)
+ .createAlias("student", "s")
+ .createAlias("course", "c")
+ .add( Restrictions.isNotEmpty("s.enrolments") )
+ .setProjection( Projections.projectionList()
+ .add( Projections.property("s.name") )
+ .add( Projections.property("c.description") )
+ )
+ .setCacheable(true)
+ .list();
+
+ assertEquals( list.size(), 2 );
+ assertEquals( ( (Object[]) list.get(0) ).length, 2 );
+ assertEquals( ( (Object[]) list.get(1) ).length, 2 );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ s.createCriteria(Enrolment.class)
+ .createAlias("student", "s")
+ .createAlias("course", "c")
+ .add( Restrictions.isNotEmpty("s.enrolments") )
+ .setProjection( Projections.projectionList()
+ .add( Projections.property("s.name") )
+ .add( Projections.property("c.description") )
+ )
+ .setCacheable(true)
+ .list();
- s = openSession();
- t = s.beginTransaction();
-
- s.createCriteria(Enrolment.class)
- .createAlias("student", "s")
- .createAlias("course", "c")
- .add( Restrictions.isNotEmpty("s.enrolments") )
- .setProjection( Projections.projectionList()
- .add( Projections.property("s.name") )
- .add( Projections.property("c.description") )
- )
- .setCacheable(true)
- .list();
+ assertEquals( list.size(), 2 );
+ assertEquals( ( (Object[]) list.get(0) ).length, 2 );
+ assertEquals( ( (Object[]) list.get(1) ).length, 2 );
- assertEquals( list.size(), 2 );
- assertEquals( ( (Object[]) list.get(0) ).length, 2 );
- assertEquals( ( (Object[]) list.get(1) ).length, 2 );
-
- t.commit();
- s.close();
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ s.createCriteria(Enrolment.class)
+ .createAlias("student", "s")
+ .createAlias("course", "c")
+ .add( Restrictions.isNotEmpty("s.enrolments") )
+ .setProjection( Projections.projectionList()
+ .add( Projections.property("s.name") )
+ .add( Projections.property("c.description") )
+ )
+ .setCacheable(true)
+ .list();
+
+ assertEquals( list.size(), 2 );
+ assertEquals( ( (Object[]) list.get(0) ).length, 2 );
+ assertEquals( ( (Object[]) list.get(1) ).length, 2 );
+
+ s.delete(enrolment1);
+ s.delete(enrolment2);
+ s.delete(course);
+ s.delete(gavin);
+ s.delete(xam);
- s = openSession();
- t = s.beginTransaction();
-
- s.createCriteria(Enrolment.class)
- .createAlias("student", "s")
- .createAlias("course", "c")
- .add( Restrictions.isNotEmpty("s.enrolments") )
- .setProjection( Projections.projectionList()
- .add( Projections.property("s.name") )
- .add( Projections.property("c.description") )
- )
- .setCacheable(true)
- .list();
-
- assertEquals( list.size(), 2 );
- assertEquals( ( (Object[]) list.get(0) ).length, 2 );
- assertEquals( ( (Object[]) list.get(1) ).length, 2 );
-
- s.delete(enrolment1);
- s.delete(enrolment2);
- s.delete(course);
- s.delete(gavin);
- s.delete(xam);
-
- t.commit();
- s.close();
+ t.commit();
+ s.close();
}
public void testProjections() {
@@ -398,8 +416,8 @@
.add( Projections.property("studentNumber"), "stNumber" )
.add( Projections.property("courseCode"), "cCode" ) )
)
- .add( Expression.gt( "studentNumber", new Long(665) ) )
- .add( Expression.lt( "studentNumber", new Long(668) ) )
+ .add( Restrictions.gt( "studentNumber", new Long(665) ) )
+ .add( Restrictions.lt( "studentNumber", new Long(668) ) )
.addOrder( Order.asc("stNumber") )
.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)
.list();
@@ -797,4 +815,3 @@
session.close();
}
}
-
16 years, 7 months
Hibernate SVN: r14675 - branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x.
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-05-19 11:22:26 -0400 (Mon, 19 May 2008)
New Revision: 14675
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/Hbm2DDLExporter.java
Log:
JBIDE-2232 BuildException
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/Hbm2DDLExporter.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/Hbm2DDLExporter.java 2008-05-17 12:54:06 UTC (rev 14674)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/Hbm2DDLExporter.java 2008-05-19 15:22:26 UTC (rev 14675)
@@ -13,7 +13,6 @@
import java.io.File;
import java.util.Iterator;
-import org.apache.tools.ant.BuildException;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.hibernate.tool.hbm2ddl.SchemaUpdate;
@@ -100,9 +99,9 @@
log.warn("Error #" + i + ": ", element);
}
- log.error(i - 1 + " occurred while performing Hbm2DDLExporter.");
+ log.error(i - 1 + " errors occurred while performing Hbm2DDLExporter.");
if (haltOnError) {
- throw new BuildException(
+ throw new ExporterException(
"Errors while performing Hbm2DDLExporter");
}
}
16 years, 7 months
Hibernate SVN: r14674 - in search/trunk: src/java/org/hibernate/search and 11 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-17 08:54:06 -0400 (Sat, 17 May 2008)
New Revision: 14674
Modified:
search/trunk/ivy.xml
search/trunk/pom.xml
search/trunk/src/java/org/hibernate/search/Version.java
search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
search/trunk/src/java/org/hibernate/search/backend/Workspace.java
search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMSHibernateSearchController.java
search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBackendQueueProcessor.java
search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWorker.java
search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java
search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java
search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java
search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollectionEventListener.java
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java
search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.java
search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java
search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java
search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java
search/trunk/src/java/org/hibernate/search/store/optimization/IncrementalOptimizerStrategy.java
search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java
search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java
search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.java
Log:
HSEARCH-197 move to slf4j
Modified: search/trunk/ivy.xml
===================================================================
--- search/trunk/ivy.xml 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/ivy.xml 2008-05-17 12:54:06 UTC (rev 14674)
@@ -16,8 +16,8 @@
<!-- compile time dependencies -->
<dependency name="ejb3-persistence" rev="1.0.2.GA" conf="default->default"/>
<dependency name="commons-annotations" rev="latest" conf="default->default"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="default->default"/>
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.0.CR1" conf="default->default"/>
- <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="default->default"/>
<dependency org="javax.transaction" name="jta" rev="1.1" conf="default->default"/>
<dependency org="org.apache.lucene" name="lucene-core" rev="2.3.1" conf="default->default"/>
<dependency org="javax.jms" name="jms" rev="1.1" conf="default->default"/> <!-- optional -->
@@ -25,7 +25,6 @@
<dependency org="org.hibernate.apache.lucene.solr" name="apache-solr-analyzer" rev="1.2.0" conf="default->default"/> <!-- optional -->
<!-- transitive dependencies -->
- <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="test->default"/>
<dependency org="antlr" name="antlr" rev="2.7.6" conf="test->default"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1" conf="test->default"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1" conf="test->default"/>
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/pom.xml 2008-05-17 12:54:06 UTC (rev 14674)
@@ -28,10 +28,10 @@
<version>2.3.1</version>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
Modified: search/trunk/src/java/org/hibernate/search/Version.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/Version.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/Version.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -3,18 +3,19 @@
import java.util.Date;
-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 Version {
public static final String VERSION = "3.1.x." + new Date();
- private static Log log = LogFactory.getLog( Version.class );
+ private static Logger log = LoggerFactory.getLogger( Version.class );
static {
- log.info( "Hibernate Search " + VERSION );
+ log.info( "Hibernate Search {}", VERSION );
}
public static void touch() {
Modified: search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -6,11 +6,11 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.index.IndexWriter;
import org.hibernate.search.SearchException;
import org.hibernate.search.backend.configuration.IndexWriterSetting;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Wrapper class around the Lucene indexing parameters <i>mergeFactor</i>, <i>maxMergeDocs</i>,
@@ -24,8 +24,6 @@
*/
public class LuceneIndexingParameters implements Serializable {
- private static final Log log = LogFactory.getLog( LuceneIndexingParameters.class );
-
// value keyword
public static final String EXPLICIT_DEFAULT_VALUE = "default";
// property path keywords
Modified: search/trunk/src/java/org/hibernate/search/backend/Workspace.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -8,8 +8,6 @@
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.SimpleAnalyzer;
import org.apache.lucene.index.IndexReader;
@@ -20,6 +18,8 @@
import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.search.store.DirectoryProvider;
import org.hibernate.search.store.optimization.OptimizerStrategy;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* Lucene workspace.
@@ -43,7 +43,7 @@
*/
//TODO introduce the notion of read only IndexReader? We cannot enforce it because Lucene use abstract classes, not interfaces
public class Workspace {
- private static Log log = LogFactory.getLog( Workspace.class );
+ private final Logger log = LoggerFactory.getLogger( Workspace.class );
private Map<DirectoryProvider, IndexReader> readers = new HashMap<DirectoryProvider, IndexReader>();
private Map<DirectoryProvider, IndexWriter> writers = new HashMap<DirectoryProvider, IndexWriter>();
private List<DirectoryProvider> lockedProviders = new ArrayList<DirectoryProvider>();
Modified: search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMSHibernateSearchController.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMSHibernateSearchController.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMSHibernateSearchController.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -9,12 +9,12 @@
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;
import org.hibernate.search.backend.LuceneWork;
import org.hibernate.search.util.ContextHelper;
import org.hibernate.search.engine.SearchFactoryImplementor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implement the Hibernate Search controller responsible for processing the
@@ -26,7 +26,7 @@
* @author Emmanuel Bernard
*/
public abstract class AbstractJMSHibernateSearchController implements MessageListener {
- private static Log log = LogFactory.getLog( AbstractJMSHibernateSearchController.class );
+ private static Logger log = LoggerFactory.getLogger( AbstractJMSHibernateSearchController.class );
/**
* return the current or give a new session
@@ -62,7 +62,7 @@
*/
public void onMessage(Message message) {
if ( !( message instanceof ObjectMessage ) ) {
- log.error( "Incorrect message type: " + message.getClass() );
+ log.error( "Incorrect message type: {}", message.getClass() );
return;
}
ObjectMessage objectMessage = (ObjectMessage) message;
Modified: search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBackendQueueProcessor.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBackendQueueProcessor.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBackendQueueProcessor.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -6,8 +6,6 @@
import java.util.List;
import java.util.ArrayList;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.search.backend.AddLuceneWork;
import org.hibernate.search.backend.LuceneWork;
import org.hibernate.search.backend.Workspace;
@@ -19,6 +17,8 @@
import org.hibernate.search.store.DirectoryProvider;
import org.hibernate.search.store.IndexShardingStrategy;
import org.hibernate.annotations.common.AssertionFailure;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Apply the operations to Lucene directories avoiding deadlocks.
@@ -32,7 +32,7 @@
/**
* Class logger.
*/
- private static Log log = LogFactory.getLog( LuceneBackendQueueProcessor.class );
+ private static Logger log = LoggerFactory.getLogger( LuceneBackendQueueProcessor.class );
private List<LuceneWork> queue;
private SearchFactoryImplementor searchFactoryImplementor;
Modified: search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWorker.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWorker.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWorker.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -4,8 +4,6 @@
import java.io.IOException;
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
@@ -21,6 +19,8 @@
import org.hibernate.search.backend.PurgeAllLuceneWork;
import org.hibernate.search.engine.DocumentBuilder;
import org.hibernate.search.store.DirectoryProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Stateless implementation that performs a unit of work.
@@ -31,7 +31,7 @@
*/
public class LuceneWorker {
private Workspace workspace;
- private static Log log = LogFactory.getLog( LuceneWorker.class );
+ private static final Logger log = LoggerFactory.getLogger( LuceneWorker.class );
public LuceneWorker(Workspace workspace) {
this.workspace = workspace;
@@ -63,8 +63,7 @@
}
private void add(Class entity, Serializable id, Document document, DirectoryProvider provider) {
- if ( log.isTraceEnabled() )
- log.trace( "add to Lucene index: " + entity + "#" + id + ": " + document );
+ log.trace( "add to Lucene index: {}#{}:{}", new Object[] { entity, id, document } );
IndexWriter writer = workspace.getIndexWriter( provider, entity, true );
try {
writer.addDocument( document );
@@ -86,7 +85,7 @@
* We can only delete by term, and the index doesn't have a termt that
* uniquely identify the entry. See logic below
*/
- log.trace( "remove from Lucene index: " + entity + "#" + id );
+ log.trace( "remove from Lucene index: {}#{}", entity, id );
DocumentBuilder builder = workspace.getDocumentBuilder( entity );
Term term = builder.getTerm( id );
IndexReader reader = workspace.getIndexReader( provider, entity );
@@ -121,8 +120,7 @@
public void performWork(OptimizeLuceneWork work, DirectoryProvider provider) {
Class entity = work.getEntityClass();
- if ( log.isTraceEnabled() )
- log.trace( "optimize Lucene index: " + entity );
+ log.trace( "optimize Lucene index: {}", entity );
IndexWriter writer = workspace.getIndexWriter( provider, entity, false );
try {
writer.optimize();
@@ -135,8 +133,7 @@
public void performWork(PurgeAllLuceneWork work, DirectoryProvider provider) {
Class entity = work.getEntityClass();
- if ( log.isTraceEnabled() )
- log.trace( "purgeAll Lucene index: " + entity );
+ log.trace( "purgeAll Lucene index: {}", entity );
IndexReader reader = workspace.getIndexReader( provider, entity );
try {
Term term = new Term( DocumentBuilder.CLASS_FIELDNAME, entity.getName() );
Modified: search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -11,8 +11,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
@@ -53,6 +51,8 @@
import org.hibernate.search.store.IndexShardingStrategy;
import org.hibernate.search.util.BinderHelper;
import org.hibernate.search.util.ScopedAnalyzer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Set up and provide a manager for indexes classes
@@ -64,7 +64,7 @@
* @author Hardy Ferentschik
*/
public class DocumentBuilder<T> {
- private static final Log log = LogFactory.getLog( DocumentBuilder.class );
+ private static final Logger log = LoggerFactory.getLogger( DocumentBuilder.class );
private final PropertiesMetadata rootPropertiesMetadata;
private final XClass beanClass;
@@ -203,8 +203,8 @@
similarity = (Similarity) similarityClass.newInstance();
}
catch (Exception e) {
- log.error( "Exception attempting to instantiate Similarity '" + similarityClass.getName()
- + "' set for " + beanClass.getName() );
+ log.error( "Exception attempting to instantiate Similarity '{}' set for {}",
+ similarityClass.getName(), beanClass.getName() );
}
}
}
@@ -348,7 +348,7 @@
}
else if ( log.isTraceEnabled() ) {
String localPrefix = buildEmbeddedPrefix( prefix, embeddedAnn, member );
- log.trace( "depth reached, ignoring " + localPrefix );
+ log.trace( "depth reached, ignoring {}", localPrefix );
}
level--;
@@ -760,7 +760,7 @@
if ( store != Field.Store.NO && TwoWayFieldBridge.class.isAssignableFrom( fieldBridge.getClass() ) ) {
result[matchingPosition] = ( (TwoWayFieldBridge) fieldBridge ).get( fieldName, document );
if ( log.isTraceEnabled() ) {
- log.trace( "Field " + fieldName + " projected as " + result[matchingPosition] );
+ log.trace( "Field {} projected as {}", fieldName, result[matchingPosition] );
}
}
else {
Modified: search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -4,16 +4,16 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.Hibernate;
import org.hibernate.Session;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class ObjectLoader implements Loader {
- private static final Log log = LogFactory.getLog( ObjectLoader.class );
+ private static final Logger log = LoggerFactory.getLogger( ObjectLoader.class );
private Session session;
public void init(Session session, SearchFactoryImplementor searchFactoryImplementor) {
@@ -28,8 +28,8 @@
}
catch (RuntimeException e) {
if ( LoaderHelper.isObjectNotFoundException( e ) ) {
- log.debug( "Object found in Search index but not in database: "
- + entityInfo.clazz + " wih id " + entityInfo.id );
+ log.debug( "Object found in Search index but not in database: {} with id {}",
+ entityInfo.clazz, entityInfo.id );
maybeProxy = null;
}
else {
@@ -54,8 +54,8 @@
}
catch (RuntimeException e) {
if ( LoaderHelper.isObjectNotFoundException( e ) ) {
- log.debug( "Object found in Search index but not in database: "
- + entityInfo.clazz + " wih id " + entityInfo.id );
+ log.debug( "Object found in Search index but not in database: {} with id {}",
+ entityInfo.clazz, entityInfo.id );
}
else {
throw e;
Modified: search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -4,14 +4,14 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.annotations.common.AssertionFailure;
import org.hibernate.criterion.Disjunction;
import org.hibernate.criterion.Restrictions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
@@ -19,7 +19,7 @@
public class QueryLoader implements Loader {
private static final int MAX_IN_CLAUSE = 500;
private static final List EMPTY_LIST = new ArrayList( 0 );
- private static Log log = LogFactory.getLog( QueryLoader.class );
+ private final Logger log = LoggerFactory.getLogger( QueryLoader.class );
private Session session;
private Class entityType;
@@ -44,8 +44,8 @@
}
catch (RuntimeException e) {
if ( LoaderHelper.isObjectNotFoundException( e ) ) {
- log.debug( "Object found in Search index but not in database: "
- + entityInfo.clazz + " wih id " + entityInfo.id );
+ log.debug( "Object found in Search index but not in database: {} with id {}",
+ entityInfo.clazz, entityInfo.id );
maybeProxy = null;
}
else {
@@ -91,8 +91,8 @@
}
else {
if ( log.isDebugEnabled() ) {
- log.debug( "Object found in Search index but not in database: "
- + entityInfo.clazz + " wih id " + entityInfo.id );
+ log.debug( "Object found in Search index but not in database: {} with {}",
+ entityInfo.clazz, entityInfo.id );
}
}
}
Modified: search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollectionEventListener.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollectionEventListener.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollectionEventListener.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -9,12 +9,11 @@
import org.hibernate.event.PostCollectionRecreateEvent;
import org.hibernate.event.PostCollectionRemoveEvent;
import org.hibernate.event.PostCollectionUpdateEvent;
-import org.hibernate.event.AbstractEvent;
import org.hibernate.event.AbstractCollectionEvent;
import org.hibernate.search.backend.WorkType;
import org.hibernate.engine.EntityEntry;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Support collection event listening (starts from hibernate core 3.2.6)
@@ -26,7 +25,7 @@
implements PostCollectionRecreateEventListener,
PostCollectionRemoveEventListener,
PostCollectionUpdateEventListener {
- private static Log log = LogFactory.getLog( FullTextIndexCollectionEventListener.class );
+ private final Logger log = LoggerFactory.getLogger( FullTextIndexCollectionEventListener.class );
public void onPostRecreateCollection(PostCollectionRecreateEvent event) {
processCollectionEvent( event );
@@ -43,7 +42,10 @@
if ( used && searchFactoryImplementor.getDocumentBuilders().containsKey( entity.getClass() ) ) {
Serializable id = getId( entity, event );
if (id == null) {
- log.warn( "Unable to reindex entity on collection change, id cannot be extracted: " + event.getAffectedOwnerEntityName() );
+ log.warn(
+ "Unable to reindex entity on collection change, id cannot be extracted: {}",
+ event.getAffectedOwnerEntityName()
+ );
return;
}
processWork( entity, id, WorkType.COLLECTION, event );
Modified: search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -3,8 +3,6 @@
import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.event.AbstractEvent;
import org.hibernate.event.Initializable;
Modified: search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -12,8 +12,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause;
@@ -56,6 +54,8 @@
import org.hibernate.search.store.DirectoryProvider;
import org.hibernate.search.util.ContextHelper;
import org.hibernate.transform.ResultTransformer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implementation of {@link org.hibernate.search.FullTextQuery}
@@ -65,7 +65,7 @@
*/
//TODO implements setParameter()
public class FullTextQueryImpl extends AbstractQueryImpl implements FullTextQuery {
- private static final Log log = LogFactory.getLog( FullTextQueryImpl.class );
+ private final Logger log = LoggerFactory.getLogger( FullTextQueryImpl.class );
private org.apache.lucene.search.Query luceneQuery;
private Class[] classes;
private Set<Class> classesAndSubclasses;
Modified: search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -15,8 +15,6 @@
import java.util.Map;
import java.util.TimeZone;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
import org.hibernate.HibernateException;
@@ -27,6 +25,8 @@
import org.hibernate.search.engine.EntityInfo;
import org.hibernate.search.engine.Loader;
import org.hibernate.type.Type;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implements scollable and paginated resultsets.
@@ -50,7 +50,7 @@
* @author John Griffin
*/
public class ScrollableResultsImpl implements ScrollableResults {
- private static Log log = LogFactory.getLog( ScrollableResultsImpl.class );
+ private static Logger log = LoggerFactory.getLogger( ScrollableResultsImpl.class );
private final IndexSearcher searcher;
private final SearchFactory searchFactory;
private final Hits hits;
Modified: search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -11,8 +11,6 @@
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiReader;
import org.hibernate.annotations.common.AssertionFailure;
@@ -21,6 +19,8 @@
import static org.hibernate.search.reader.ReaderProviderHelper.buildMultiReader;
import static org.hibernate.search.reader.ReaderProviderHelper.clean;
import org.hibernate.search.store.DirectoryProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Share readers per SearchFactory, reusing them iff they are still valid.
@@ -29,7 +29,7 @@
*/
public class SharedReaderProvider implements ReaderProvider {
private static Field subReadersField;
- private static Log log = LogFactory.getLog( SharedReaderProvider.class );
+ private final Logger log = LoggerFactory.getLogger ( SharedReaderProvider.class );
/**
* nonfair lock. Need to be acquired on indexReader acquisition or release (semaphore)
*/
@@ -58,13 +58,13 @@
boolean trace = log.isTraceEnabled();
int length = directoryProviders.length;
IndexReader[] readers = new IndexReader[length];
- if ( trace ) log.trace( "Opening IndexReader for directoryProviders: " + length );
+ if ( trace ) log.trace( "Opening IndexReader for directoryProviders: {}", length );
for (int index = 0; index < length; index++) {
DirectoryProvider directoryProvider = directoryProviders[index];
IndexReader reader;
Lock directoryProviderLock = perDirectoryProviderManipulationLocks.get( directoryProvider );
- if ( trace ) log.trace( "Opening IndexReader from " + directoryProvider.getDirectory().toString() );
+ if ( trace ) log.trace( "Opening IndexReader from {}", directoryProvider.getDirectory() );
directoryProviderLock.lock(); //needed for same problem as the double-checked locking
try {
reader = activeSearchIndexReaders.get( directoryProvider );
@@ -74,7 +74,7 @@
}
if ( reader == null ) {
if ( trace )
- log.trace( "No shared IndexReader, opening a new one: " + directoryProvider.getDirectory().toString() );
+ log.trace( "No shared IndexReader, opening a new one: {}", directoryProvider.getDirectory() );
reader = replaceActiveReader( null, directoryProviderLock, directoryProvider, readers );
}
else {
@@ -86,14 +86,16 @@
throw new SearchException( "Unable to read current status of Lucene IndexReader", e );
}
if ( !isCurrent ) {
- if ( trace )
- log.trace( "Out of date shared IndexReader found, opening a new one: " + directoryProvider.getDirectory().toString() );
+ if ( trace ) {
+ log.trace( "Out of date shared IndexReader found, opening a new one: {}",
+ directoryProvider.getDirectory() );
+ }
IndexReader outOfDateReader = reader;
reader = replaceActiveReader( outOfDateReader, directoryProviderLock, directoryProvider, readers );
}
else {
if ( trace )
- log.trace( "Valid shared IndexReader: " + directoryProvider.getDirectory().toString() );
+ log.trace( "Valid shared IndexReader: {}" + directoryProvider.getDirectory() );
directoryProviderLock.lock();
try {
//read the latest active one, the current one could be out of date and closed already
@@ -105,7 +107,7 @@
//TODO if readerData is null????
readerData.semaphore++;
searchIndexReaderSemaphores.put( reader, readerData ); //not necessary
- if ( trace ) log.trace( "Semaphore increased: " + readerData.semaphore + " for " + reader );
+ if ( trace ) log.trace( "Semaphore increased: {} for {}", readerData.semaphore, reader );
}
finally {
semaphoreIndexReaderLock.unlock();
@@ -145,7 +147,7 @@
semaphoreIndexReaderLock.lock();
try {
searchIndexReaderSemaphores.put( reader, new ReaderData( 1, directoryProvider ) );
- if ( trace ) log.trace( "Semaphore: 1 for " + reader );
+ if ( trace ) log.trace( "Semaphore: 1 for {}", reader );
if ( outOfDateReader != null ) {
ReaderData readerData = searchIndexReaderSemaphores.get( outOfDateReader );
if ( readerData == null ) {
@@ -183,7 +185,7 @@
directoryProviderLock.unlock();
}
if ( closeOutOfDateReader ) {
- if ( trace ) log.trace( "Closing out of date IndexReader " + outOfDateReader );
+ if ( trace ) log.trace( "Closing out of date IndexReader {}", outOfDateReader );
try {
outOfDateReader.close();
}
@@ -192,7 +194,7 @@
}
}
if ( closeOldReader ) {
- if ( trace ) log.trace( "Closing old IndexReader " + oldReader );
+ if ( trace ) log.trace( "Closing old IndexReader {}", oldReader );
try {
oldReader.close();
}
@@ -215,7 +217,7 @@
catch (IllegalAccessException e) {
throw new SearchException( "Incompatible version of Lucene: MultiReader.subReaders not accessible", e );
}
- if ( trace ) log.trace( "Closing MultiReader: " + reader );
+ if ( trace ) log.trace( "Closing MultiReader: {}", reader );
}
else {
throw new AssertionFailure( "Everything should be wrapped in a MultiReader" );
@@ -233,7 +235,7 @@
}
if ( readerData == null ) {
- log.error( "Trying to close a Lucene IndexReader not present: " + subReader.directory().toString() );
+ log.error( "Trying to close a Lucene IndexReader not present: {}", subReader.directory() );
//TODO should we try to close?
continue;
}
@@ -245,19 +247,19 @@
try {
boolean isActive;
isActive = activeSearchIndexReaders.get( readerData.provider ) == subReader;
- if ( trace ) log.trace( "Indexreader not active: " + subReader );
+ if ( trace ) log.trace( "Indexreader not active: {}", subReader );
semaphoreIndexReaderLock.lock();
try {
readerData = searchIndexReaderSemaphores.get( subReader );
if ( readerData == null ) {
- log.error( "Trying to close a Lucene IndexReader not present: " + subReader.directory().toString() );
+ log.error( "Trying to close a Lucene IndexReader not present: {}" + subReader.directory() );
//TODO should we try to close?
continue;
}
readerData.semaphore--;
- if ( trace ) log.trace( "Semaphore decreased to: " + readerData.semaphore + " for " + subReader );
+ if ( trace ) log.trace( "Semaphore decreased to: {} for {}", readerData.semaphore, subReader );
if ( readerData.semaphore < 0 )
- log.error( "Semaphore negative: " + subReader.directory().toString() );
+ log.error( "Semaphore negative: {}", subReader.directory() );
if ( ( !isActive ) && readerData.semaphore == 0 ) {
searchIndexReaderSemaphores.remove( subReader );
closeReader = true;
@@ -275,7 +277,7 @@
}
if ( closeReader ) {
- if ( trace ) log.trace( "Closing IndexReader: " + subReader );
+ if ( trace ) log.trace( "Closing IndexReader: {}", subReader );
try {
subReader.close();
}
Modified: search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -7,12 +7,12 @@
import org.hibernate.search.SearchException;
import org.hibernate.annotations.common.util.StringHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.FSDirectory;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* @author Emmanuel Bernard
@@ -20,7 +20,7 @@
*/
public class DirectoryProviderHelper {
- private static final Log log = LogFactory.getLog( DirectoryProviderHelper.class );
+ private static final Logger log = LoggerFactory.getLogger( DirectoryProviderHelper.class );
private static final String ROOTINDEX_PROP_NAME = "sourceBase";
private static final String RELATIVEINDEX_PROP_NAME = "source";
@@ -38,8 +38,11 @@
File sourceDirectory;
if ( log.isTraceEnabled() ) {
log.trace(
- "Guess source directory from " + ROOTINDEX_PROP_NAME + " " + ( root != null ? root : "<null>" )
- + " and " + RELATIVEINDEX_PROP_NAME + " " + (relative != null ? relative : "<null>")
+ "Guess source directory from {} {} and {} {}", new Object[] {
+ ROOTINDEX_PROP_NAME,
+ ( root != null ? root : "<null>" ),
+ RELATIVEINDEX_PROP_NAME,
+ (relative != null ? relative : "<null>") }
);
}
if ( relative == null ) relative = directoryProviderName;
@@ -70,7 +73,7 @@
public static FSDirectory createFSIndex(File indexDir) throws IOException {
FSDirectory fsDirectory = FSDirectory.getDirectory( indexDir );
if ( ! IndexReader.indexExists( fsDirectory ) ) {
- log.debug( "Initialize index: '" + indexDir.getAbsolutePath() + "'" );
+ log.debug( "Initialize index: '{}'", indexDir.getAbsolutePath() );
IndexWriter iw = new IndexWriter( fsDirectory, new StandardAnalyzer(), true );
iw.close();
}
@@ -136,7 +139,7 @@
} catch (NumberFormatException nfe) {
throw new SearchException( "Unable to initialize index: " + directoryProviderName +"; refresh period is not numeric.", nfe );
}
- log.debug( "Refresh period " + period + " seconds" );
+ log.debug( "Refresh period: {} seconds", period );
return period * 1000; //per second
}
Modified: search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -11,11 +11,11 @@
import java.io.IOException;
import org.apache.lucene.store.FSDirectory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.search.SearchException;
import org.hibernate.search.util.FileHelper;
import org.hibernate.search.engine.SearchFactoryImplementor;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* File based DirectoryProvider that takes care of index copy
@@ -31,7 +31,7 @@
//TODO rename copy?
public class FSMasterDirectoryProvider implements DirectoryProvider<FSDirectory> {
- private static Log log = LogFactory.getLog( FSMasterDirectoryProvider.class );
+ private final Logger log = LoggerFactory.getLogger( FSMasterDirectoryProvider.class );
private FSDirectory directory;
private int current;
@@ -50,9 +50,9 @@
this.directoryProviderName = directoryProviderName;
//source guessing
sourceDir = DirectoryProviderHelper.getSourceDirectory( directoryProviderName, properties, true );
- log.debug( "Source directory: " + sourceDir.getPath() );
+ log.debug( "Source directory: {}", sourceDir.getPath() );
indexDir = DirectoryProviderHelper.getVerifiedIndexDir( directoryProviderName, properties, true );
- log.debug( "Index directory: " + indexDir.getPath() );
+ log.debug( "Index directory: {}", indexDir.getPath() );
try {
indexName = indexDir.getCanonicalPath();
directory = DirectoryProviderHelper.createFSIndex( indexDir );
@@ -74,7 +74,7 @@
current = 1;
}
else {
- log.debug( "Source directory for '" + indexName + "' will be initialized");
+ log.debug( "Source directory for '{}' will be initialized", indexName);
current = 1;
}
String currentString = Integer.valueOf( current ).toString();
@@ -84,7 +84,7 @@
new File( sourceDir, "current2" ).delete();
//TODO small hole, no file can be found here
new File( sourceDir, "current" + currentString ).createNewFile();
- log.debug( "Current directory: " + current );
+ log.debug( "Current directory: {}", current );
}
catch (IOException e) {
throw new SearchException( "Unable to initialize index: " + directoryProviderName, e );
@@ -132,7 +132,7 @@
executor.execute( copyTask );
}
else {
- log.info( "Skipping directory synchronization, previous work still in progress: " + indexName );
+ log.info( "Skipping directory synchronization, previous work still in progress: {}", indexName );
}
}
}
@@ -167,7 +167,7 @@
File destinationFile = new File(destination, Integer.valueOf(index).toString() );
//TODO make smart a parameter
try {
- log.trace( "Copying " + source + " into " + destinationFile );
+ log.trace( "Copying {} into {}", source, destinationFile );
FileHelper.synchronize( source, destinationFile, true );
current = index;
}
@@ -178,7 +178,7 @@
return;
}
if ( ! new File( destination, "current" + oldIndex ).delete() ) {
- log.warn( "Unable to remove previous marker file from source of " + indexName );
+ log.warn( "Unable to remove previous marker file from source of {}", indexName );
}
try {
new File( destination, "current" + index ).createNewFile();
@@ -191,7 +191,7 @@
directoryProviderLock.unlock();
inProgress = false;
}
- log.trace( "Copy for " + indexName + " took " + (System.currentTimeMillis() - start) + " ms" );
+ log.trace( "Copy for {} took {} ms", indexName, (System.currentTimeMillis() - start) );
}
}
Modified: search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -10,12 +10,12 @@
import java.io.IOException;
import org.apache.lucene.store.FSDirectory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.search.SearchException;
import org.hibernate.search.util.FileHelper;
import org.hibernate.search.engine.SearchFactoryImplementor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* File based directory provider that takes care of getting a version of the index
@@ -31,7 +31,7 @@
*/
public class FSSlaveDirectoryProvider implements DirectoryProvider<FSDirectory> {
- private static Log log = LogFactory.getLog( FSSlaveDirectoryProvider.class );
+ private final Logger log = LoggerFactory.getLogger( FSSlaveDirectoryProvider.class );
private FSDirectory directory1;
private FSDirectory directory2;
@@ -53,9 +53,9 @@
if ( ! new File( sourceIndexDir, "current1" ).exists() && ! new File( sourceIndexDir, "current2" ).exists() ) {
throw new IllegalStateException( "No current marker in source directory" );
}
- log.debug( "Source directory: " + sourceIndexDir.getPath() );
+ log.debug( "Source directory: {}", sourceIndexDir.getPath() );
indexDir = DirectoryProviderHelper.getVerifiedIndexDir( directoryProviderName, properties, true );
- log.debug( "Index directory: " + indexDir.getPath() );
+ log.debug( "Index directory: {}", indexDir.getPath() );
try {
indexName = indexDir.getCanonicalPath();
}
@@ -105,7 +105,7 @@
throw new SearchException( "Unable to create the directory marker file: " + indexName );
}
}
- log.debug( "Current directory: " + current);
+ log.debug( "Current directory: {}", current);
}
catch (IOException e) {
throw new SearchException( "Unable to initialize index: " + directoryProviderName, e );
@@ -162,7 +162,7 @@
executor.execute( copyTask );
}
else {
- log.trace( "Skipping directory synchronization, previous work still in progress: " + indexName);
+ log.trace( "Skipping directory synchronization, previous work still in progress: {}", indexName);
}
}
}
@@ -199,7 +199,7 @@
File destinationFile = new File( destination, Integer.valueOf( index ).toString() );
//TODO make smart a parameter
try {
- log.trace( "Copying " + sourceFile + " into " + destinationFile );
+ log.trace( "Copying {} into {}", sourceFile, destinationFile );
FileHelper.synchronize( sourceFile, destinationFile, true );
current = index;
}
@@ -222,7 +222,7 @@
finally {
inProgress = false;
}
- log.trace( "Copy for " + indexName + " took " + (System.currentTimeMillis() - start) + " ms" );
+ log.trace( "Copy for {} took {} ms", indexName, (System.currentTimeMillis() - start) );
}
}
Modified: search/trunk/src/java/org/hibernate/search/store/optimization/IncrementalOptimizerStrategy.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/store/optimization/IncrementalOptimizerStrategy.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/java/org/hibernate/search/store/optimization/IncrementalOptimizerStrategy.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -10,8 +10,8 @@
import org.hibernate.search.SearchException;
import org.hibernate.annotations.common.util.StringHelper;
import org.apache.lucene.index.IndexWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Optimization strategy triggered after a certain amount of operations
@@ -24,7 +24,7 @@
private long operations = 0;
private long transactions = 0;
private DirectoryProvider directoryProvider;
- private Log log = LogFactory.getLog( IncrementalOptimizerStrategy.class );
+ private final Logger log = LoggerFactory.getLogger( IncrementalOptimizerStrategy.class );
public void initialize(DirectoryProvider directoryProvider, Properties indexProperties, SearchFactoryImplementor searchFactoryImplementor) {
this.directoryProvider = directoryProvider;
@@ -56,11 +56,8 @@
public void optimize(Workspace workspace) {
if ( needOptimization() ) {
- if ( log.isDebugEnabled() ) {
- log.debug( "Optimize "
- + directoryProvider.getDirectory().toString()
- +" after " + operations + " operations and " + transactions + " transactions");
- }
+ log.debug( "Optimize {} after {} operations and {} transactions",
+ new Object[] { directoryProvider.getDirectory(), operations, transactions });
IndexWriter writer = workspace.getIndexWriter( directoryProvider );
try {
writer.optimize();
Modified: search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -5,7 +5,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
@@ -22,8 +21,6 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
import org.hibernate.annotations.Type;
import org.hibernate.search.annotations.ContainedIn;
import org.hibernate.search.annotations.DocumentId;
@@ -40,8 +37,6 @@
@Indexed
public class Contact implements Serializable {
- private static Log logger = LogFactory.getLog(Contact.class);
-
private static final long serialVersionUID = 1L;
@Id @GeneratedValue(strategy=GenerationType.AUTO)
Modified: search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -4,8 +4,6 @@
import java.util.List;
import java.util.Calendar;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.analysis.StopAnalyzer;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Query;
@@ -14,7 +12,6 @@
import org.hibernate.Transaction;
import org.hibernate.search.FullTextSession;
import org.hibernate.search.Search;
-import org.hibernate.search.Version;
import org.hibernate.search.FullTextQuery;
import org.hibernate.search.test.SearchTestCase;
@@ -25,11 +22,6 @@
public class LuceneQuerySortTest extends SearchTestCase {
/**
- * Class logger.
- */
- private static Log log = LogFactory.getLog( Version.class );
-
- /**
* Test that we can change the default sort order of the lucene search result.
*
* @throws Exception in case the test fails.
Modified: search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.java 2008-05-17 12:52:14 UTC (rev 14673)
+++ search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.java 2008-05-17 12:54:06 UTC (rev 14674)
@@ -1,7 +1,5 @@
package org.hibernate.search.test.query;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.TermPositionVector;
import org.apache.lucene.index.TermVectorOffsetInfo;
@@ -17,8 +15,7 @@
* @author John Griffin
*/
public class TermVectorTest extends SearchTestCase {
- private static Log log = LogFactory.getLog(TermVectorTest.class);
-
+
public void testPositionOffsets() throws Exception {
FullTextSession s = Search.createFullTextSession(openSession());
createIndex(s);
16 years, 7 months
Hibernate SVN: r14673 - in validator/trunk: src/java/org/hibernate/validator and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-17 08:52:14 -0400 (Sat, 17 May 2008)
New Revision: 14673
Modified:
validator/trunk/ivy.xml
validator/trunk/pom.xml
validator/trunk/src/java/org/hibernate/validator/ClassValidator.java
validator/trunk/src/java/org/hibernate/validator/Version.java
validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java
Log:
HV-57 move to slf4j
Modified: validator/trunk/ivy.xml
===================================================================
--- validator/trunk/ivy.xml 2008-05-17 12:50:57 UTC (rev 14672)
+++ validator/trunk/ivy.xml 2008-05-17 12:52:14 UTC (rev 14673)
@@ -9,17 +9,16 @@
<conf name="test" visibility="private" description="Dependencies needed for testing purposes"/>
</configurations>
<publications>
- <artifact name="hibernate-validator" conf="core"/>
+ <artifact name="hibernate-validator" conf="default"/>
</publications>
<dependencies>
<!-- compile time dependencies -->
<dependency name="ejb3-persistence" rev="1.0.2.GA" conf="default->default"/>
<dependency name="commons-annotations" rev="latest" conf="default->default"/>
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.0.CR1" conf="default->default"/>
- <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="default->default"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="default->default"/>
<!-- transitive dependencies -->
- <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="test->default"/>
<dependency org="antlr" name="antlr" rev="2.7.6" conf="test->default"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1" conf="test->default"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1" conf="test->default"/>
Modified: validator/trunk/pom.xml
===================================================================
--- validator/trunk/pom.xml 2008-05-17 12:50:57 UTC (rev 14672)
+++ validator/trunk/pom.xml 2008-05-17 12:52:14 UTC (rev 14673)
@@ -30,9 +30,9 @@
<version>3.1.0.CR1</version>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
</dependency>
<dependency>
Modified: validator/trunk/src/java/org/hibernate/validator/ClassValidator.java
===================================================================
--- validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 2008-05-17 12:50:57 UTC (rev 14672)
+++ validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 2008-05-17 12:52:14 UTC (rev 14673)
@@ -23,8 +23,6 @@
import java.util.Set;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.Hibernate;
import org.hibernate.MappingException;
@@ -40,6 +38,8 @@
import org.hibernate.annotations.common.reflection.java.JavaReflectionManager;
import org.hibernate.util.IdentitySet;
import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggregator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -50,7 +50,7 @@
*/
public class ClassValidator<T> implements Serializable {
//TODO Define magic number
- private static Log log = LogFactory.getLog( ClassValidator.class );
+ private static final Logger log = LoggerFactory.getLogger( ClassValidator.class );
private static final InvalidValue[] EMPTY_INVALID_VALUE_ARRAY = new InvalidValue[]{};
private static final String DEFAULT_VALIDATOR_MESSAGE = "org.hibernate.validator.resources.DefaultValidatorMessages";
private static final String VALIDATOR_MESSAGE = "ValidatorMessages";
@@ -164,7 +164,7 @@
);
}
catch (MissingResourceException e) {
- log.trace( "ResourceBundle " + VALIDATOR_MESSAGE + " not found in thread context classloader" );
+ log.trace( "ResourceBundle {} not found in thread context classloader", VALIDATOR_MESSAGE );
//then use the Validator Framework classloader
try {
rb = ResourceBundle.getBundle(
@@ -175,7 +175,8 @@
}
catch (MissingResourceException ee) {
log.debug(
- "ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to " + DEFAULT_VALIDATOR_MESSAGE
+ "ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to {}",
+ DEFAULT_VALIDATOR_MESSAGE
);
//the user did not override the default ValidatorMessages
rb = null;
@@ -312,7 +313,7 @@
validatorPresent = validatorPresent || agrValidPresent;
}
if ( validatorPresent && !member.isTypeResolved() ) {
- log.warn( "Original type of property " + member + " is unbound and has been approximated." );
+ log.warn( "Original type of property {} is unbound and has been approximated.", member );
}
}
Modified: validator/trunk/src/java/org/hibernate/validator/Version.java
===================================================================
--- validator/trunk/src/java/org/hibernate/validator/Version.java 2008-05-17 12:50:57 UTC (rev 14672)
+++ validator/trunk/src/java/org/hibernate/validator/Version.java 2008-05-17 12:52:14 UTC (rev 14673)
@@ -1,8 +1,8 @@
//$Id: $
package org.hibernate.validator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Hibernate Vaildator version
@@ -11,10 +11,10 @@
*/
public class Version {
public static final String VERSION = "3.0.0.GA";
- private static Log log = LogFactory.getLog( Version.class );
+ private static Logger log = LoggerFactory.getLogger( Version.class );
static {
- log.info( "Hibernate Validator " + VERSION );
+ log.info( "Hibernate Validator {}", VERSION );
}
public static void touch() {
Modified: validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java
===================================================================
--- validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java 2008-05-17 12:50:57 UTC (rev 14672)
+++ validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolator.java 2008-05-17 12:52:14 UTC (rev 14673)
@@ -12,11 +12,11 @@
import java.util.ResourceBundle;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.util.StringHelper;
import org.hibernate.validator.MessageInterpolator;
import org.hibernate.validator.Validator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Resource bundle based interpolator
@@ -25,7 +25,7 @@
* @author Emmanuel Bernard
*/
public class DefaultMessageInterpolator implements MessageInterpolator, Serializable {
- private static Log log = LogFactory.getLog( DefaultMessageInterpolator.class );
+ private static final Logger log = LoggerFactory.getLogger( DefaultMessageInterpolator.class );
private Map<String, Object> annotationParameters = new HashMap<String, Object>();
private transient ResourceBundle messageBundle;
private transient ResourceBundle defaultMessageBundle;
@@ -52,11 +52,11 @@
}
catch (IllegalAccessException e) {
//really should not happen, but we degrade nicely
- log.warn( "Unable to access " + StringHelper.qualify( clazz.toString(), method.getName() ) );
+ log.warn( "Unable to access {}", StringHelper.qualify( clazz.toString(), method.getName() ) );
}
catch (InvocationTargetException e) {
//really should not happen, but we degrade nicely
- log.warn( "Unable to access " + StringHelper.qualify( clazz.toString(), method.getName() ) );
+ log.warn( "Unable to access {}", StringHelper.qualify( clazz.toString(), method.getName() ) );
}
}
annotationMessage = (String) annotationParameters.get( "message" );
16 years, 7 months
Hibernate SVN: r14672 - in entitymanager/trunk: src/java/org/hibernate/ejb and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-17 08:50:57 -0400 (Sat, 17 May 2008)
New Revision: 14672
Modified:
entitymanager/trunk/ivy.xml
entitymanager/trunk/pom.xml
entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImpl.java
entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java
entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java
entitymanager/trunk/src/java/org/hibernate/ejb/Version.java
entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataSourceConnectionProvider.java
entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventListener.java
entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVisitor.java
entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVisitor.java
entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarVisitor.java
entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZippedJarVisitor.java
entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java
entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java
entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.java
Log:
EJB-359 move to slf4j
Modified: entitymanager/trunk/ivy.xml
===================================================================
--- entitymanager/trunk/ivy.xml 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/ivy.xml 2008-05-17 12:50:57 UTC (rev 14672)
@@ -9,7 +9,7 @@
<conf name="test" visibility="private" description="Dependencies needed for testing purposes"/>
</configurations>
<publications>
- <artifact name="entitymanager" conf="default"/>
+ <artifact name="hibernate-entitymanager" conf="default"/>
</publications>
<dependencies>
<!-- compile time dependencies -->
@@ -17,13 +17,13 @@
<dependency name="commons-annotations" rev="latest" conf="default->default"/>
<dependency name="annotations" rev="latest" conf="default->default"/>
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.0.CR1" conf="default->default"/>
- <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="default->default"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1" conf="default->default"/>
<dependency org="javax.transaction" name="jta" rev="1.1" conf="default->default"/>
<dependency org="javassist" name="javassist" rev="3.4.GA" conf="default->default"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="default->default"/>
+
<!-- transitive dependencies -->
- <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="test->default"/>
<dependency org="antlr" name="antlr" rev="2.7.6" conf="test->default"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1" conf="test->default"/>
Modified: entitymanager/trunk/pom.xml
===================================================================
--- entitymanager/trunk/pom.xml 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/pom.xml 2008-05-17 12:50:57 UTC (rev 14672)
@@ -42,10 +42,10 @@
<version>3.3.0.CR1</version>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImpl.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImpl.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImpl.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -27,8 +27,6 @@
import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
@@ -56,13 +54,15 @@
import org.hibernate.transaction.TransactionFactory;
import org.hibernate.util.JTAHelper;
import org.hibernate.util.CollectionHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author <a href="mailto:gavin@hibernate.org">Gavin King</a>
* @author Emmanuel Bernard
*/
public abstract class AbstractEntityManagerImpl implements HibernateEntityManagerImplementor, Serializable {
- private static Log log = LogFactory.getLog( AbstractEntityManagerImpl.class );
+ private static final Logger log = LoggerFactory.getLogger( AbstractEntityManagerImpl.class );
protected transient TransactionImpl tx = new TransactionImpl( this );
protected PersistenceContextType persistenceContextType;
@@ -408,7 +408,7 @@
boolean isTransactionActive = isTransactionInProgress();
if ( isTransactionActive && session.getFlushMode() == FlushMode.MANUAL ) {
- log.debug( "Transaction activated, move to FlushMode " + flushModeType );
+ log.debug( "Transaction activated, move to FlushMode {}", flushModeType );
setFlushMode( flushModeType );
}
else if ( ! isTransactionActive && session.getFlushMode() != FlushMode.MANUAL ) {
@@ -559,7 +559,7 @@
);
}
else {
- log.warn( "Cannot join transaction: do not override " + Environment.TRANSACTION_STRATEGY );
+ log.warn( "Cannot join transaction: do not override {}", Environment.TRANSACTION_STRATEGY );
}
}
catch (HibernateException he) {
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -35,8 +35,6 @@
import javax.persistence.spi.PersistenceUnitTransactionType;
import javax.sql.DataSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
@@ -81,6 +79,8 @@
import org.hibernate.util.XMLHelper;
import org.xml.sax.EntityResolver;
import org.xml.sax.SAXException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Allow a fine tuned configuration of an EJB 3.0 EntityManagerFactory
@@ -102,7 +102,7 @@
public class Ejb3Configuration implements Serializable, Referenceable {
private static final String IMPLEMENTATION_NAME = HibernatePersistence.class.getName();
private static final String META_INF_ORM_XML = "META-INF/orm.xml";
- private static Log log = LogFactory.getLog( Ejb3Configuration.class );
+ private final Logger log = LoggerFactory.getLogger( Ejb3Configuration.class );
private static EntityNotFoundDelegate ejb3EntityNotFoundDelegate = new Ejb3EntityNotFoundDelegate();
private static Configuration DEFAULT_CONFIGURATION = new AnnotationConfiguration();
private String persistenceUnitName;
@@ -155,7 +155,7 @@
* Especially the scanning of classes and additional jars is done already at this point.
*/
private Ejb3Configuration configure(PersistenceMetadata metadata, Map overrides) {
- log.debug( "Creating Factory: " + metadata.getName() );
+ log.debug( "Creating Factory: {}", metadata.getName() );
Map workingVars = new HashMap();
workingVars.put( HibernatePersistence.PERSISTENCE_UNIT_NAME, metadata.getName() );
@@ -206,7 +206,7 @@
*/
public Ejb3Configuration configure(String persistenceUnitName, Map integration) {
try {
- log.debug( "Look up for persistence unit: " + persistenceUnitName );
+ log.debug( "Look up for persistence unit: {}", persistenceUnitName );
integration = integration == null ?
CollectionHelper.EMPTY_MAP :
Collections.unmodifiableMap( integration );
@@ -218,14 +218,14 @@
}
while ( xmls.hasMoreElements() ) {
URL url = xmls.nextElement();
- log.trace( "Analysing persistence.xml: " + url );
+ log.trace( "Analysing persistence.xml: {}", url );
List<PersistenceMetadata> metadataFiles = PersistenceXmlLoader.deploy(
url,
integration,
cfg.getEntityResolver(),
PersistenceUnitTransactionType.RESOURCE_LOCAL );
for ( PersistenceMetadata metadata : metadataFiles ) {
- log.trace( metadata.toString() );
+ log.trace( "{}", metadata );
if ( metadata.getProvider() == null || IMPLEMENTATION_NAME.equalsIgnoreCase(
metadata.getProvider()
@@ -309,17 +309,17 @@
*/
public Ejb3Configuration configure(PersistenceUnitInfo info, Map integration) {
if ( log.isDebugEnabled() ) {
- log.debug( "Processing " + LogHelper.logPersistenceUnitInfo( info ) );
+ log.debug( "Processing {}", LogHelper.logPersistenceUnitInfo( info ) );
}
else {
- log.info( "Processing PersistenceUnitInfo [\n\tname: " + info.getPersistenceUnitName() + "\n\t...]" );
+ log.info( "Processing PersistenceUnitInfo [\n\tname: {}\n\t...]", info.getPersistenceUnitName() );
}
integration = integration != null ? Collections.unmodifiableMap( integration ) : CollectionHelper.EMPTY_MAP;
String provider = (String) integration.get( HibernatePersistence.PROVIDER );
if ( provider == null ) provider = info.getPersistenceProviderClassName();
if ( provider != null && ! provider.trim().startsWith( IMPLEMENTATION_NAME ) ) {
- log.info( "Required a different provider: " + provider );
+ log.info( "Required a different provider: {}", provider );
return null;
}
if ( info.getClassLoader() == null ) {
@@ -559,7 +559,7 @@
if ( "class".equalsIgnoreCase( element ) ) result[0] = true;
if ( "hbm".equalsIgnoreCase( element ) ) result[1] = true;
}
- log.debug( "Detect class: " + result[0] + "; detect hbm: " + result[1] );
+ log.debug( "Detect class: {}; detect hbm: {}", result[0], result[1] );
return result;
}
@@ -856,7 +856,7 @@
//some spec compliance checking
//TODO centralize that?
if ( ! "true".equalsIgnoreCase( cfg.getProperty( Environment.AUTOCOMMIT ) ) ) {
- log.warn( Environment.AUTOCOMMIT + " = false break the EJB3 specification" );
+ log.warn( "{} = false break the EJB3 specification", Environment.AUTOCOMMIT );
}
discardOnClose = preparedProperties.getProperty( HibernatePersistence.DISCARD_PC_ON_CLOSE )
.equals( "true" );
@@ -911,10 +911,10 @@
}
if ( log.isInfoEnabled() ) {
if ( Boolean.TRUE.equals( useMetaInf ) ) {
- log.info( getExceptionHeader() + META_INF_ORM_XML + " found");
+ log.info( "{} {} found", getExceptionHeader(), META_INF_ORM_XML);
}
else if (Boolean.FALSE.equals( useMetaInf ) ) {
- log.info( getExceptionHeader() + "no " + META_INF_ORM_XML + " found");
+ log.info( "{} No {} found", getExceptionHeader(), META_INF_ORM_XML);
}
}
}
@@ -994,12 +994,13 @@
}
if ( hasTxStrategy ) {
log.warn(
- "Overriding " + Environment.TRANSACTION_STRATEGY + " is dangerous, this might break the EJB3 specification implementation"
+ "Overriding {} is dangerous, this might break the EJB3 specification implementation",
+ Environment.TRANSACTION_STRATEGY
);
}
if ( preparedProperties.getProperty( Environment.FLUSH_BEFORE_COMPLETION ).equals( "true" ) ) {
preparedProperties.setProperty( Environment.FLUSH_BEFORE_COMPLETION, "false" );
- log.warn( "Defining " + Environment.FLUSH_BEFORE_COMPLETION + "=true ignored in HEM" );
+ log.warn( "Defining {}=true ignored in HEM", Environment.FLUSH_BEFORE_COMPLETION );
}
return preparedProperties;
}
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -7,8 +7,6 @@
import javax.persistence.spi.PersistenceUnitTransactionType;
import javax.transaction.Synchronization;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
@@ -16,13 +14,15 @@
import org.hibernate.annotations.common.util.ReflectHelper;
import org.hibernate.cfg.Environment;
import org.hibernate.engine.SessionImplementor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Gavin King
*/
public class EntityManagerImpl extends AbstractEntityManagerImpl {
- private static Log log = LogFactory.getLog( EntityManagerImpl.class );
+ private static final Logger log = LoggerFactory.getLogger( EntityManagerImpl.class );
protected Session session;
protected SessionFactory sessionFactory;
protected boolean open;
@@ -110,9 +110,8 @@
session.close();
}
else {
- log.warn( "Entity Manager closed by someone else ("
- + Environment.AUTO_CLOSE_SESSION
- + " must not be used)");
+ log.warn( "Entity Manager closed by someone else ({} must not be used)",
+ Environment.AUTO_CLOSE_SESSION);
}
}
//TODO session == null should not happen
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/Version.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/Version.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/Version.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -1,18 +1,19 @@
//$Id: $
package org.hibernate.ejb;
-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 Version {
public static final String VERSION = "3.3.2.GA";
- private static Log log = LogFactory.getLog( Version.class );
+ private static final Logger log = LoggerFactory.getLogger( Version.class );
static {
- log.info( "Hibernate EntityManager " + VERSION );
+ log.info( "Hibernate EntityManager {}", VERSION );
}
public static void touch() {
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataSourceConnectionProvider.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataSourceConnectionProvider.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataSourceConnectionProvider.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -6,11 +6,11 @@
import java.sql.SQLException;
import javax.sql.DataSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
import org.hibernate.connection.DatasourceConnectionProvider;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* A connection provider that uses an injected <tt>DataSource</tt>.
@@ -20,11 +20,10 @@
* @see org.hibernate.connection.ConnectionProvider
*/
public class InjectedDataSourceConnectionProvider extends DatasourceConnectionProvider {
- //TODO make datasource connection provider properties protected in 3.3
private String user;
private String pass;
- private static final Log log = LogFactory.getLog( InjectedDataSourceConnectionProvider.class );
+ private final Logger log = LoggerFactory.getLogger( InjectedDataSourceConnectionProvider.class );
public void setDataSource(DataSource ds) {
super.setDataSource( ds );
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventListener.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventListener.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventListener.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -16,7 +16,7 @@
*/
public class EJB3PersistEventListener extends DefaultPersistEventListener implements CallbackHandlerConsumer {
static {
- EJB3CascadeStyle.PERSIST_EJB3.hasOrphanDelete(); //triggers class loading
+ EJB3CascadeStyle.PERSIST_EJB3.hasOrphanDelete(); //triggers class loading to override persist with PERSIST_EJB3
}
private EntityCallbackHandler callbackHandler;
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVisitor.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVisitor.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVisitor.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -12,8 +12,8 @@
import javassist.bytecode.AnnotationsAttribute;
import javassist.bytecode.ClassFile;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Parse a JAR of any form (zip file, exploded directory, ...)
@@ -25,7 +25,7 @@
*/
//TODO shortcut when filters are null or empty
public abstract class AbstractJarVisitor implements JarVisitor {
- private static Log log = LogFactory.getLog( AbstractJarVisitor.class );
+ private final Logger log = LoggerFactory.getLogger( AbstractJarVisitor.class );
protected String unqualifiedJarName;
protected URL jarUrl;
protected boolean done = false;
@@ -113,7 +113,7 @@
fileName = fileName.substring( 0, fileName.length() - 4 );
}
unqualifiedJarName = fileName;
- log.debug( "Searching mapped entities in jar/par: " + jarUrl );
+ log.debug( "Searching mapped entities in jar/par: {}", jarUrl );
}
/**
@@ -159,7 +159,7 @@
}
else if ( entryName.endsWith( ".class" ) ) {
String name = entryName.substring( 0, entryNameLength - ".class".length() ).replace( '/', '.' );
- log.debug( "Filtering: " + name );
+ log.debug( "Filtering: {}", name );
executeJavaElementFilter( name, classFilters, is, secondIs );
}
else {
@@ -177,7 +177,7 @@
secondIs.close();
}
is.close();
- log.debug( "File Filter matched for " + name );
+ log.debug( "File Filter matched for {}", name );
Entry entry = new Entry( name, localIs );
int index = this.filters.indexOf( filter );
this.entries[index].add( entry );
@@ -210,7 +210,7 @@
localIs = null;
secondIs.close();
}
- log.debug( "Java element filter matched for " + name );
+ log.debug( "Java element filter matched for {}", name );
Entry entry = new Entry( name, localIs );
int index = this.filters.indexOf( filter );
this.entries[index].add( entry );
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVisitor.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVisitor.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVisitor.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -5,23 +5,21 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
-import java.net.URL;
import java.net.URISyntaxException;
-import java.util.zip.ZipEntry;
+import java.net.URL;
import java.util.Enumeration;
-import java.util.jar.JarInputStream;
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.LoggerFactory;
+import org.slf4j.Logger;
+
/**
* @author Emmanuel Bernard
*/
public class ExplodedJarVisitor extends AbstractJarVisitor {
- private static Log log = LogFactory.getLog( ExplodedJarVisitor.class );
+ private final Logger log = LoggerFactory.getLogger( ExplodedJarVisitor.class );
private String entry;
public ExplodedJarVisitor(URL url, Filter[] filters, String entry) {
@@ -51,11 +49,11 @@
}
if ( !jarFile.exists() ) {
- log.warn( "Exploded jar does not exists (ignored): " + jarUrl );
+ log.warn( "Exploded jar does not exists (ignored): {}", jarUrl );
return;
}
if ( !jarFile.isDirectory() ) {
- log.warn( "Exploded jar file not a directory (ignored): " + jarUrl );
+ log.warn( "Exploded jar file not a directory (ignored): {}", jarUrl );
return;
}
File rootFile;
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarVisitor.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarVisitor.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarVisitor.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -13,8 +13,8 @@
import java.util.jar.JarInputStream;
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;
/**
* Work on a JAR that can be accessed through a File
@@ -22,7 +22,7 @@
* @author Emmanuel Bernard
*/
public class FileZippedJarVisitor extends AbstractJarVisitor {
- private static Log log = LogFactory.getLog( FileZippedJarVisitor.class );
+ private final Logger log = LoggerFactory.getLogger( FileZippedJarVisitor.class );
private String entry;
public FileZippedJarVisitor(String fileName, Filter[] filters) {
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZippedJarVisitor.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZippedJarVisitor.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZippedJarVisitor.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -3,16 +3,15 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.BufferedInputStream;
import java.net.URL;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
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;
+
/**
* Work on a JAR that can only be accessed through a inputstream
* This is less efficient than the {@link FileZippedJarVisitor}
@@ -20,7 +19,7 @@
* @author Emmanuel Bernard
*/
public class InputStreamZippedJarVisitor extends AbstractJarVisitor {
- private static Log log = LogFactory.getLog( InputStreamZippedJarVisitor.class );
+ private final Logger log = LoggerFactory.getLogger( InputStreamZippedJarVisitor.class );
private String entry;
public InputStreamZippedJarVisitor(URL url, Filter[] filters, String entry) {
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFactory.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFactory.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -8,15 +8,15 @@
import java.net.URISyntaxException;
import java.net.URL;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class JarVisitorFactory {
- private static Log log = LogFactory.getLog( JarVisitorFactory.class );
+ private static final Logger log = LoggerFactory.getLogger( JarVisitorFactory.class );
/**
* Get the JAR URL of the JAR containing the given entry
@@ -70,7 +70,7 @@
"Unable to determine JAR Url from " + url + ". Cause: " + e.getMessage()
);
}
- log.trace("JAR URL from URL Entry: " + url + " >> " + jarUrl);
+ log.trace("JAR URL from URL Entry: {} >> {}", url, jarUrl);
return jarUrl;
}
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -13,8 +13,6 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.cfg.EJB3DTDEntityResolver;
import org.hibernate.ejb.HibernatePersistence;
import org.hibernate.ejb.util.ConfigurationHelper;
@@ -27,6 +25,8 @@
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXParseException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Persistence.xml handler
@@ -35,7 +35,7 @@
* @author Emmanuel Bernard
*/
public final class PersistenceXmlLoader {
- private static Log log = LogFactory.getLog( PersistenceXmlLoader.class );
+ private static final Logger log = LoggerFactory.getLogger( PersistenceXmlLoader.class );
private PersistenceXmlLoader() {
}
@@ -153,7 +153,7 @@
PersistenceMetadata metadata = new PersistenceMetadata();
String puName = top.getAttribute( "name" );
if ( StringHelper.isNotEmpty( puName ) ) {
- log.trace( "Persistent Unit name from persistence.xml: " + puName );
+ log.trace( "Persistent Unit name from persistence.xml: {}", puName );
metadata.setName( puName );
}
NodeList children = top.getChildNodes();
@@ -243,17 +243,17 @@
if ( resolver instanceof EJB3DTDEntityResolver ) {
if ( ( (EJB3DTDEntityResolver) resolver ).isResolved() == false ) return;
}
- log.error( "Error parsing XML: " + file + '(' + error.getLineNumber() + ") " + error.getMessage() );
+ log.error( "Error parsing XML: {}({}) {}", new Object[] { file, error.getLineNumber(), error.getMessage() } );
errors.add( error );
}
public void fatalError(SAXParseException error) {
- log.error( "Error parsing XML: " + file + '(' + error.getLineNumber() + ") " + error.getMessage() );
+ log.error( "Error parsing XML: {}({}) {}", new Object[] { file, error.getLineNumber(), error.getMessage() } );
errors.add( error );
}
public void warning(SAXParseException warn) {
- log.warn( "Warning parsing XML: " + file + '(' + warn.getLineNumber() + ") " + warn.getMessage() );
+ log.warn( "Warning parsing XML: {}({}) {}", new Object[] { file, warn.getLineNumber(), warn.getMessage() } );
}
}
Modified: entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -10,18 +10,18 @@
import javax.naming.event.NamingExceptionEvent;
import javax.naming.event.NamingListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.ejb.Ejb3Configuration;
import org.hibernate.ejb.HibernatePersistence;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class NamingHelper {
- private NamingHelper() {};
+ private NamingHelper() {}
- private static Log log = LogFactory.getLog( NamingHelper.class );
+ private static final Logger log = LoggerFactory.getLogger( NamingHelper.class );
/** bind the configuration to the JNDI */
public static void bind(Ejb3Configuration cfg) {
@@ -30,12 +30,12 @@
log.debug( "No JNDI name configured for binding Ejb3Configuration" );
}
else {
- log.info( "Ejb3Configuration name: " + name );
+ log.info( "Ejb3Configuration name: {}", name );
try {
Context ctx = org.hibernate.util.NamingHelper.getInitialContext( cfg.getProperties() );
org.hibernate.util.NamingHelper.bind( ctx, name, cfg );
- log.info( "Bound Ejb3Configuration to JNDI name: " + name );
+ log.info( "Bound Ejb3Configuration to JNDI name: {}", name );
( (EventContext) ctx ).addNamingListener( name, EventContext.OBJECT_SCOPE, LISTENER );
}
catch (InvalidNameException ine) {
@@ -52,21 +52,21 @@
private static final NamingListener LISTENER = new NamespaceChangeListener() {
public void objectAdded(NamingEvent evt) {
- log.debug( "An Ejb3Configuration was successfully bound to name: " + evt.getNewBinding().getName() );
+ log.debug( "An Ejb3Configuration was successfully bound to name: {}", evt.getNewBinding().getName() );
}
public void objectRemoved(NamingEvent evt) {
String name = evt.getOldBinding().getName();
- log.info( "An Ejb3Configuration was unbound from name: " + name );
+ log.info( "An Ejb3Configuration was unbound from name: {}", name );
}
public void objectRenamed(NamingEvent evt) {
String name = evt.getOldBinding().getName();
- log.info( "An Ejb3Configuration was renamed from name: " + name );
+ log.info( "An Ejb3Configuration was renamed from name: {}", name );
}
public void namingExceptionThrown(NamingExceptionEvent evt) {
- log.warn( "Naming exception occurred accessing Ejb3Configuration: " + evt.getException() );
+ log.warn( "Naming exception occurred accessing Ejb3Configuration", evt.getException() );
}
};
Modified: entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.java
===================================================================
--- entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.java 2008-05-17 12:49:38 UTC (rev 14671)
+++ entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.java 2008-05-17 12:50:57 UTC (rev 14672)
@@ -7,8 +7,8 @@
import org.hibernate.event.EventSource;
import org.hibernate.HibernateException;
import org.hibernate.type.CollectionType;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* Because of CascadingAction constructor visibility
@@ -17,16 +17,14 @@
* @author Emmanuel Bernard
*/
public abstract class EJB3CascadingAction extends CascadingAction {
- private static Log log = LogFactory.getLog( CascadingAction.class );
+ private static Logger log = LoggerFactory.getLogger( CascadingAction.class );
/**
* @see org.hibernate.Session#persist(Object)
*/
public static final CascadingAction PERSIST_SKIPLAZY = new CascadingAction() {
public void cascade(EventSource session, Object child, String entityName, Object anything, boolean isCascadeDeleteEnabled)
throws HibernateException {
- if ( log.isTraceEnabled() ) {
- log.trace( "cascading to persist: " + entityName );
- }
+ log.trace( "cascading to persist: {}", entityName );
session.persist( entityName, child, (Map) anything );
}
public Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection) {
16 years, 7 months
Hibernate SVN: r14671 - in annotations/trunk: src/java/org/hibernate/cfg and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-17 08:49:38 -0400 (Sat, 17 May 2008)
New Revision: 14671
Modified:
annotations/trunk/ivy.xml
annotations/trunk/pom.xml
annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java
annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java
annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java
annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java
annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java
annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappingSecondPass.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java
annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XMLContext.java
annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration.java
annotations/trunk/src/java/org/hibernate/type/EnumType.java
annotations/trunk/src/test/org/hibernate/test/annotations/reflection/LogListener.java
annotations/trunk/src/test/org/hibernate/test/annotations/reflection/OtherLogListener.java
Log:
ANN-741 move to slf4j
Modified: annotations/trunk/ivy.xml
===================================================================
--- annotations/trunk/ivy.xml 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/ivy.xml 2008-05-17 12:49:38 UTC (rev 14671)
@@ -16,11 +16,11 @@
<dependency name="ejb3-persistence" rev="1.0.2.GA" conf="default->default"/>
<dependency name="commons-annotations" rev="latest" conf="default->default"/>
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.0.CR1" conf="default->default"/>
- <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="default->default"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1" conf="default->default"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="default->default"/>
+
<!-- transitive dependencies -->
- <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="test->default"/>
<dependency org="antlr" name="antlr" rev="2.7.6" conf="test->default"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1" conf="test->default"/>
Modified: annotations/trunk/pom.xml
===================================================================
--- annotations/trunk/pom.xml 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/pom.xml 2008-05-17 12:49:38 UTC (rev 14671)
@@ -38,10 +38,10 @@
<version>3.3.0.CR1</version>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
Modified: annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -49,8 +49,6 @@
import javax.persistence.Transient;
import javax.persistence.Version;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
@@ -135,6 +133,8 @@
import org.hibernate.persister.entity.UnionSubclassEntityPersister;
import org.hibernate.type.TypeFactory;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* JSR 175 annotation binder
@@ -165,7 +165,7 @@
private AnnotationBinder() {
}
- private static final Log log = LogFactory.getLog( AnnotationBinder.class );
+ private static final Logger log = LoggerFactory.getLogger( AnnotationBinder.class );
public static void bindDefaults(ExtendedMappings mappings) {
Map defaults = mappings.getReflectionManager().getDefaults();
@@ -219,14 +219,14 @@
pckg = mappings.getReflectionManager().packageForName( packageName );
}
catch (ClassNotFoundException cnf) {
- log.warn( "Package not found or wo package-info.java: " + packageName );
+ log.warn( "Package not found or wo package-info.java: {}", packageName );
return;
}
if ( pckg.isAnnotationPresent( SequenceGenerator.class ) ) {
SequenceGenerator ann = pckg.getAnnotation( SequenceGenerator.class );
IdGenerator idGen = buildIdGenerator( ann, mappings );
mappings.addGenerator( idGen );
- log.debug( "Add sequence generator with name: " + idGen.getName() );
+ log.debug( "Add sequence generator with name: {}", idGen.getName() );
}
if ( pckg.isAnnotationPresent( TableGenerator.class ) ) {
TableGenerator ann = pckg.getAnnotation( TableGenerator.class );
@@ -351,7 +351,7 @@
idGen.addParam( MultipleHiLoPerTableGenerator.PK_VALUE_NAME, tabGen.pkColumnValue() );
}
idGen.addParam( TableHiLoGenerator.MAX_LO, String.valueOf( tabGen.allocationSize() - 1 ) );
- log.debug( "Add table generator with name: " + idGen.getName() );
+ log.debug( "Add table generator with name: {}", idGen.getName() );
}
else if ( ann instanceof SequenceGenerator ) {
SequenceGenerator seqGen = (SequenceGenerator) ann;
@@ -368,7 +368,7 @@
);
}
idGen.addParam( SequenceHiLoGenerator.MAX_LO, String.valueOf( seqGen.allocationSize() - 1 ) );
- log.debug( "Add sequence generator with name: " + idGen.getName() );
+ log.debug( "Add sequence generator with name: {}", idGen.getName() );
}
else if ( ann instanceof GenericGenerator ) {
GenericGenerator genGen = (GenericGenerator) ann;
@@ -378,7 +378,7 @@
for (Parameter parameter : params) {
idGen.addParam( parameter.name(), parameter.value() );
}
- log.debug( "Add generic generator with name: " + idGen.getName() );
+ log.debug( "Add generic generator with name: {}", idGen.getName() );
}
else {
throw new AssertionFailure( "Unknown Generator annotation: " + ann );
@@ -403,7 +403,7 @@
if ( AnnotatedClassType.NONE.equals( classType )
&& clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) {
log.warn( "Class annotated @org.hibernate.annotations.Entity but not javax.persistence.Entity "
- + "(most likely a user error): " + clazzToProcess.getName() );
+ + "(most likely a user error): {}", clazzToProcess.getName() );
}
return;
}
@@ -415,7 +415,7 @@
);
}
XAnnotatedElement annotatedClass = clazzToProcess;
- if ( log.isInfoEnabled() ) log.info( "Binding entity from annotated class: " + clazzToProcess.getName() );
+ log.info( "Binding entity from annotated class: {}", clazzToProcess.getName() );
InheritanceState superEntityState =
InheritanceState.getSuperEntityInheritanceState(
clazzToProcess, inheritanceStatePerClass, mappings.getReflectionManager()
@@ -507,8 +507,8 @@
}
if ( discAnn != null && inheritanceState.hasParents ) {
log.warn(
- "Discriminator column has to be defined in the root entity, it will be ignored in subclass: "
- + clazzToProcess.getName()
+ "Discriminator column has to be defined in the root entity, it will be ignored in subclass: {}",
+ clazzToProcess.getName()
);
}
discrimValue = annotatedClass.isAnnotationPresent( DiscriminatorValue.class ) ?
@@ -655,7 +655,7 @@
}
if ( onDeleteAnn != null && !onDeleteAppropriate ) {
log.warn(
- "Inapropriate use of @OnDelete on entity, annotation ignored: " + propertyHolder.getEntityName()
+ "Inapropriate use of @OnDelete on entity, annotation ignored: {}", propertyHolder.getEntityName()
);
}
@@ -944,7 +944,7 @@
params.put( param.name(), TypeFactory.heuristicType( param.type() ) );
}
FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params );
- if ( log.isInfoEnabled() ) log.info( "Binding filter definition: " + def.getFilterName() );
+ log.info( "Binding filter definition: {}", def.getFilterName() );
mappings.addFilterDefinition( def );
}
@@ -966,7 +966,7 @@
for (Parameter param : defAnn.parameters()) {
params.setProperty( param.name(), param.value() );
}
- if ( log.isInfoEnabled() ) log.info( "Binding type definition: " + defAnn.name() );
+ log.info( "Binding type definition: {}", defAnn.name() );
mappings.addTypeDef( defAnn.name(), defAnn.typeClass().getName(), params );
}
@@ -986,7 +986,7 @@
discriminatorColumn.linkWithValue( discrim );
discrim.setTypeName( discriminatorColumn.getDiscriminatorTypeName() );
rootClass.setPolymorphic( true );
- log.debug( "Setting discriminator for entity " + rootClass.getEntityName() );
+ log.debug( "Setting discriminator for entity {}", rootClass.getEntityName() );
}
}
@@ -1019,7 +1019,7 @@
}
}
- log.debug( "Processing " + propertyHolder.getEntityName() + " " + accessType + " annotation" );
+ log.debug( "Processing {} {} annotation", propertyHolder.getEntityName(), accessType );
List<XProperty> properties = annotatedClass.getDeclaredProperties( accessType );
//order so that property are used in the same order when binding native query
Collections.sort( properties, new Comparator<XProperty>() {
@@ -1130,11 +1130,9 @@
*/
Ejb3Column[] columns = null;
Ejb3JoinColumn[] joinColumns = null;
- if ( log.isDebugEnabled() ) {
- log.debug(
- "Processing annotations of " + propertyHolder.getEntityName() + "." + inferredData.getPropertyName()
- );
- }
+ log.debug(
+ "Processing annotations of {}.{}", propertyHolder.getEntityName(), inferredData.getPropertyName()
+ );
if ( property.isAnnotationPresent( Parent.class ) ) {
if ( propertyHolder.isComponent() ) {
@@ -1256,7 +1254,7 @@
"@IdClass class should not have @Id nor @EmbeddedId properties"
);
}
- log.debug( inferredData.getPropertyName() + " is an id" );
+ log.debug( "{} is an id", inferredData.getPropertyName() );
//clone classGenerator and override with local values
HashMap<String, IdGenerator> localGenerators = (HashMap<String, IdGenerator>) classGenerators.clone();
localGenerators.putAll( buildLocalGenerators( property, mappings ) );
@@ -1292,13 +1290,9 @@
false,
isIdentifierMapper, mappings
);
- if ( log.isDebugEnabled() ) {
- log.debug(
- "Bind " + ( isComponent ?
- "@EmbeddedId" :
- "@Id" ) + " on " + inferredData.getPropertyName()
- );
- }
+ log.debug(
+ "Bind {} on {}", ( isComponent ? "@EmbeddedId" : "@Id" ), inferredData.getPropertyName()
+ );
}
else if ( property.isAnnotationPresent( Version.class ) ) {
if ( isIdentifierMapper ) {
@@ -1318,7 +1312,7 @@
+ propertyHolder.getEntityName()
);
}
- log.debug( inferredData.getPropertyName() + " is a version property" );
+ log.debug( "{} is a version property", inferredData.getPropertyName() );
RootClass rootClass = (RootClass) propertyHolder.getPersistentClass();
PropertyBinder propBinder = new PropertyBinder();
propBinder.setName( inferredData.getPropertyName() );
@@ -1338,9 +1332,8 @@
simpleValue.setNullValue( "undefined" );
rootClass.setOptimisticLockMode( Versioning.OPTIMISTIC_LOCK_VERSION );
log.debug(
- "Version name: " + rootClass.getVersion().getName() + ", unsavedValue: " + ( (SimpleValue) rootClass
- .getVersion()
- .getValue() ).getNullValue()
+ "Version name: {}, unsavedValue: {}", rootClass.getVersion().getName(),
+ ( (SimpleValue) rootClass.getVersion().getValue() ).getNullValue()
);
}
else if ( property.isAnnotationPresent( ManyToOne.class ) ) {
@@ -1812,7 +1805,7 @@
}
comp.setNodeName( inferredData.getPropertyName() );
String subpath = StringHelper.qualify( propertyHolder.getPath(), inferredData.getPropertyName() );
- log.debug( "Binding component with path: " + subpath );
+ log.debug( "Binding component with path: {}", subpath );
PropertyHolder subHolder = PropertyHolderBuilder.buildPropertyHolder(
comp, subpath,
inferredData, propertyHolder, mappings
@@ -2066,7 +2059,7 @@
) {
//column.getTable() => persistentClass.getTable()
final String propertyName = inferredData.getPropertyName();
- log.debug( "Fetching " + propertyName + " with " + fetchMode );
+ log.debug( "Fetching {} with {}", propertyName, fetchMode );
boolean mapToPK = true;
if ( !trueOneToOne ) {
//try to find a hidden true one to one (FK == PK columns)
@@ -2313,8 +2306,8 @@
final boolean mixingStrategy = state.type != null && !state.type.equals( superclassState.type );
if ( nonDefault && mixingStrategy ) {
log.warn(
- "Mixing inheritance strategy in a entity hierarchy is not allowed, ignoring sub strategy in: " + clazz
- .getName()
+ "Mixing inheritance strategy in a entity hierarchy is not allowed, ignoring sub strategy in: {}",
+ clazz.getName()
);
}
state.type = superclassState.type;
Modified: annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -6,6 +6,7 @@
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
@@ -20,13 +21,9 @@
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeSet;
-import java.net.URL;
-
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
@@ -34,21 +31,17 @@
import org.dom4j.io.SAXReader;
import org.hibernate.AnnotationException;
import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
import org.hibernate.MappingException;
import org.hibernate.SessionFactory;
-import org.hibernate.Interceptor;
import org.hibernate.annotations.AnyMetaDef;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.annotations.common.reflection.XClass;
import org.hibernate.cfg.annotations.Version;
import org.hibernate.cfg.annotations.reflection.EJB3ReflectionManager;
import org.hibernate.cfg.search.SearchConfiguration;
-import org.hibernate.event.PostDeleteEventListener;
-import org.hibernate.event.PostInsertEventListener;
-import org.hibernate.event.PostUpdateEventListener;
import org.hibernate.event.PreInsertEventListener;
import org.hibernate.event.PreUpdateEventListener;
-import org.hibernate.event.EventListeners;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Join;
import org.hibernate.mapping.PersistentClass;
@@ -59,6 +52,8 @@
import org.hibernate.util.StringHelper;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Similar to the {@link Configuration} object but handles EJB3 and Hibernate
@@ -67,7 +62,7 @@
* @author Emmanuel Bernard
*/
public class AnnotationConfiguration extends Configuration {
- private static Log log = LogFactory.getLog( AnnotationConfiguration.class );
+ private Logger log = LoggerFactory.getLogger( AnnotationConfiguration.class );
static {
Version.touch(); //touch version
@@ -167,7 +162,7 @@
* @return the configuration object
*/
public AnnotationConfiguration addPackage(String packageName) throws MappingException {
- log.info( "Mapping package " + packageName );
+ log.info( "Mapping package {}", packageName );
try {
AnnotationBinder.bindPackage( packageName, createExtendedMappings() );
return this;
@@ -537,7 +532,7 @@
annotatedClassEntities.clear();
}
else {
- log.warn( "Unknown artifact: " + artifact );
+ log.warn( "Unknown artifact: {}", artifact );
}
}
@@ -613,24 +608,24 @@
Attribute pckg = subelement.attribute( "package" );
Attribute clazz = subelement.attribute( "class" );
if ( rsrc != null ) {
- log.debug( name + "<-" + rsrc );
+ log.debug( "{} <- {}", name, rsrc );
addResource( rsrc.getValue() );
}
else if ( jar != null ) {
- log.debug( name + "<-" + jar );
+ log.debug( "{} <- {}", name, jar );
addJar( new File( jar.getValue() ) );
}
else if ( file != null ) {
- log.debug( name + "<-" + file );
+ log.debug( "{} <- {}", name, file );
addFile( file.getValue() );
}
else if ( pckg != null ) {
- log.debug( name + "<-" + pckg );
+ log.debug( "{} <- {}", name, pckg );
addPackage( pckg.getValue() );
}
else if ( clazz != null ) {
- log.debug( name + "<-" + clazz );
- Class loadedClass = null;
+ log.debug( "{} <- {}", name, clazz );
+ Class loadedClass;
try {
loadedClass = ReflectHelper.classForName( clazz.getValue() );
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -12,8 +12,6 @@
import java.util.Set;
import java.util.StringTokenizer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.MappingException;
@@ -42,6 +40,8 @@
import org.hibernate.mapping.Value;
import org.hibernate.type.TypeFactory;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
@@ -49,7 +49,7 @@
public class BinderHelper {
public static final String ANNOTATION_STRING_DEFAULT = "";
- private static Log log = LogFactory.getLog( BinderHelper.class );
+ private static Logger log = LoggerFactory.getLogger( BinderHelper.class );
private BinderHelper() {
}
@@ -550,7 +550,7 @@
private static void bindAnyMetaDef(AnyMetaDef defAnn, ExtendedMappings mappings) {
if ( isDefault( defAnn.name() ) ) return; //don't map not named definitions
- if ( log.isInfoEnabled() ) log.info( "Binding Any Meta definition: " + defAnn.name() );
+ log.info( "Binding Any Meta definition: {}", defAnn.name() );
mappings.addAnyMetaDef( defAnn );
}
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -3,11 +3,11 @@
import java.io.InputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.util.DTDEntityResolver;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
@@ -15,7 +15,7 @@
public class EJB3DTDEntityResolver extends DTDEntityResolver {
public static final EntityResolver INSTANCE = new EJB3DTDEntityResolver();
- private static final Log log = LogFactory.getLog( EJB3DTDEntityResolver.class );
+ private final Logger log = LoggerFactory.getLogger( EJB3DTDEntityResolver.class );
boolean resolved = false;
@@ -34,10 +34,10 @@
String path = "org/hibernate/ejb/" + "orm_1_0.xsd";
InputStream dtdStream = resolveInHibernateNamespace( path );
if ( dtdStream == null ) {
- log.debug( "unable to locate [" + systemId + "] on classpath" );
+ log.debug( "unable to locate [{}] on classpath", systemId );
}
else {
- log.debug( "located [" + systemId + "] in classpath" );
+ log.debug( "located [{}] in classpath", systemId );
InputSource source = new InputSource( dtdStream );
source.setPublicId( publicId );
source.setSystemId( systemId );
@@ -52,10 +52,10 @@
String path = "org/hibernate/ejb/" + "persistence_1_0.xsd";
InputStream dtdStream = resolveInHibernateNamespace( path );
if ( dtdStream == null ) {
- log.debug( "unable to locate [" + systemId + "] on classpath" );
+ log.debug( "unable to locate [{}] on classpath", systemId );
}
else {
- log.debug( "located [" + systemId + "] in classpath" );
+ log.debug( "located [{}] in classpath", systemId );
InputSource source = new InputSource( dtdStream );
source.setPublicId( publicId );
source.setSystemId( systemId );
Modified: annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -3,8 +3,6 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.annotations.Index;
@@ -15,6 +13,8 @@
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.Table;
import org.hibernate.util.StringHelper;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* Wrap state of an EJB3 @Column annotation
@@ -23,7 +23,7 @@
* @author Emmanuel Bernard
*/
public class Ejb3Column {
- private static final Log log = LogFactory.getLog( Ejb3Column.class );
+ private static final Logger log = LoggerFactory.getLogger( Ejb3Column.class );
private Column mappingColumn;
private boolean insertable = true;
private boolean updatable = true;
@@ -150,7 +150,7 @@
public void bind() {
if ( StringHelper.isNotEmpty( formulaString ) ) {
- log.debug( "binding formula " + formulaString );
+ log.debug( "binding formula {}", formulaString );
formula = new Formula();
formula.setFormula( formulaString );
}
@@ -158,7 +158,7 @@
initMappingColumn(
logicalColumnName, propertyName, length, precision, scale, nullable, sqlType, unique, true
);
- log.debug( "Binding column " + mappingColumn.getName() + " unique " + unique );
+ log.debug( "Binding column {}. Unique {}", mappingColumn.getName(), unique );
}
}
@@ -336,7 +336,7 @@
throw new AnnotationException( "AttributeOverride.column() should override all columns for now" );
}
actualCols = overriddenCols.length == 0 ? null : overriddenCols;
- log.debug( "Column(s) overridden for property " + inferredData.getPropertyName() );
+ log.debug( "Column(s) overridden for property {}", inferredData.getPropertyName() );
}
if ( actualCols == null ) {
columns = buildImplicitColumn( inferredData, secondaryTables, propertyHolder, nullability, mappings );
Modified: annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -10,8 +10,6 @@
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.MappingException;
import org.hibernate.annotations.AnyMetaDef;
@@ -24,6 +22,8 @@
import org.hibernate.mapping.Join;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Table;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* Allow annotation related mappings
@@ -34,7 +34,7 @@
*/
public class ExtendedMappings extends Mappings {
- private static final Log log = LogFactory.getLog( ExtendedMappings.class );
+ private final Logger log = LoggerFactory.getLogger( ExtendedMappings.class );
private final Map<String, IdGenerator> namedGenerators;
private final Map<String, Map<String, Join>> joins;
@@ -102,13 +102,13 @@
public void addGenerator(IdGenerator generator) throws MappingException {
if ( !defaultNamedGenerators.contains( generator.getName() ) ) {
Object old = namedGenerators.put( generator.getName(), generator );
- if ( old != null ) log.warn( "duplicate generator name: " + generator.getName() );
+ if ( old != null ) log.warn( "duplicate generator name: {}", generator.getName() );
}
}
public void addJoins(PersistentClass persistentClass, Map<String, Join> joins) throws MappingException {
Object old = this.joins.put( persistentClass.getEntityName(), joins );
- if ( old != null ) log.warn( "duplicate joins for class: " + persistentClass.getEntityName() );
+ if ( old != null ) log.warn( "duplicate joins for class: {}", persistentClass.getEntityName() );
}
public AnnotatedClassType addClassType(XClass clazz) {
@@ -169,7 +169,7 @@
public void addGeneratorTable(String name, Properties params) {
Object old = generatorTables.put( name, params );
- if ( old != null ) log.warn( "duplicate generator table: " + name );
+ if ( old != null ) log.warn( "duplicate generator table: {}", name );
}
public Properties getGeneratorTableProperties(String name, Map<String, Properties> localGeneratorTables) {
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -16,8 +16,6 @@
import javax.persistence.MapKey;
import javax.persistence.OneToMany;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.FetchMode;
@@ -81,6 +79,8 @@
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.Table;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Collection binder
@@ -90,7 +90,7 @@
*/
public abstract class CollectionBinder {
- private static final Log log = LogFactory.getLog( CollectionBinder.class );
+ private Logger log = LoggerFactory.getLogger( CollectionBinder.class );
protected Collection collection;
protected String propertyName;
@@ -307,7 +307,7 @@
public void bind() {
this.collection = createCollection( propertyHolder.getPersistentClass() );
- log.debug( "Collection role: " + StringHelper.qualify( propertyHolder.getPath(), propertyName ) );
+ log.debug( "Collection role: {}", StringHelper.qualify( propertyHolder.getPath(), propertyName ) );
collection.setRole( StringHelper.qualify( propertyHolder.getPath(), propertyName ) );
collection.setNodeName( propertyName );
@@ -617,11 +617,8 @@
XClass collectionType,
boolean cascadeDeleteEnabled, boolean ignoreNotFound, String hqlOrderBy, ExtendedMappings extendedMappings
) {
- if ( log.isDebugEnabled() ) {
- log.debug(
- "Binding a OneToMany: " + propertyHolder.getEntityName() + "." + propertyName + " through a foreign key"
- );
- }
+
+ log.debug("Binding a OneToMany: {}.{} through a foreign key", propertyHolder.getEntityName(), propertyName);
org.hibernate.mapping.OneToMany oneToMany = new org.hibernate.mapping.OneToMany( collection.getOwner() );
collection.setElement( oneToMany );
oneToMany.setReferencedEntityName( collectionType.getName() );
@@ -1049,16 +1046,16 @@
if ( log.isDebugEnabled() ) {
String path = collValue.getOwnerEntityName() + "." + joinColumns[0].getPropertyName();
if ( isCollectionOfEntities && unique ) {
- log.debug( "Binding a OneToMany: " + path + " through an association table" );
+ log.debug( "Binding a OneToMany: {} through an association table", path );
}
else if ( isCollectionOfEntities ) {
- log.debug( "Binding as ManyToMany: " + path );
+ log.debug( "Binding as ManyToMany: {}", path );
}
else if ( anyAnn != null ) {
- log.debug( "Binding a ManyToAny: " + path );
+ log.debug( "Binding a ManyToAny: {}", path );
}
else {
- log.debug( "Binding a collection of element: " + path );
+ log.debug( "Binding a collection of element: {}", path );
}
}
//check for user error
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -14,8 +14,6 @@
import javax.persistence.SecondaryTables;
import javax.persistence.UniqueConstraint;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.EntityMode;
@@ -61,6 +59,8 @@
import org.hibernate.mapping.Value;
import org.hibernate.util.ReflectHelper;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Stateful holder and processor for binding Entity information
@@ -72,7 +72,7 @@
private XClass annotatedClass;
private PersistentClass persistentClass;
private ExtendedMappings mappings;
- private static Log log = LogFactory.getLog( EntityBinder.class );
+ private Logger log = LoggerFactory.getLogger( EntityBinder.class );
private String discriminatorValue = "";
private boolean isPropertyAnnotated = false;
private boolean dynamicInsert;
@@ -192,12 +192,12 @@
}
else {
if ( explicitHibernateEntityAnnotation ) {
- log.warn( "@org.hibernate.annotations.Entity used on a non root entity: ignored for "
- + annotatedClass.getName() );
+ log.warn( "@org.hibernate.annotations.Entity used on a non root entity: ignored for {}",
+ annotatedClass.getName() );
}
if ( annotatedClass.isAnnotationPresent( Immutable.class ) ) {
- log.warn( "@Immutable used on a non root entity: ignored for "
- + annotatedClass.getName() );
+ log.warn( "@Immutable used on a non root entity: ignored for {}",
+ annotatedClass.getName() );
}
}
persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
@@ -289,10 +289,10 @@
}
else {
if ( filters.size() > 0 ) {
- log.warn( "@Filter not allowed on subclasses (ignored): " + persistentClass.getEntityName() );
+ log.warn( "@Filter not allowed on subclasses (ignored): {}", persistentClass.getEntityName() );
}
}
- log.debug( "Import with entity name=" + name );
+ log.debug( "Import with entity name {}", name );
try {
mappings.addImport( persistentClass.getEntityName(), name );
String entityName = persistentClass.getEntityName();
@@ -419,9 +419,7 @@
);
if ( persistentClass instanceof TableOwner ) {
- if ( log.isInfoEnabled() ) {
- log.info( "Bind entity " + persistentClass.getEntityName() + " on table " + table.getName() );
- }
+ log.info( "Bind entity {} on table {}", persistentClass.getEntityName(), table.getName() );
( (TableOwner) persistentClass ).setTable( table );
}
else {
@@ -630,12 +628,9 @@
else if ( joinTable != null ) {
joinColumns = joinTable.joinColumns();
}
- if ( log.isInfoEnabled() ) {
- log.info(
- "Adding secondary table to entity " + persistentClass.getEntityName() + " -> " + join.getTable()
- .getName()
- );
- }
+ log.info(
+ "Adding secondary table to entity {} -> {}", persistentClass.getEntityName(), join.getTable().getName()
+ );
org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join );
if ( matchingTable != null ) {
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -2,8 +2,6 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.MappingException;
import org.hibernate.annotations.OrderBy;
@@ -24,6 +22,8 @@
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.SimpleValue;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Bind a list
@@ -32,7 +32,7 @@
* @author Emmanuel Bernard
*/
public class ListBinder extends CollectionBinder {
- private static Log log = LogFactory.getLog( ListBinder.class );
+ private Logger log = LoggerFactory.getLogger( ListBinder.class );
public ListBinder() {
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -4,8 +4,6 @@
import javax.persistence.EmbeddedId;
import javax.persistence.Id;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;
@@ -21,12 +19,14 @@
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.Value;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class PropertyBinder {
- private static Log log = LogFactory.getLog( PropertyBinder.class );
+ private Logger log = LoggerFactory.getLogger( PropertyBinder.class );
private String name;
private String returnedClassName;
private boolean lazy;
@@ -103,9 +103,7 @@
public Property bind() {
validateBind();
- if ( log.isDebugEnabled() ) {
- log.debug( "binding property " + name + " with lazy=" + lazy );
- }
+ log.debug( "binding property {} with lazy={}", name, lazy );
String containerClassName = holder == null ?
null :
holder.getClassName();
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -10,8 +10,6 @@
import javax.persistence.SqlResultSetMapping;
import javax.persistence.SqlResultSetMappings;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.CacheMode;
@@ -26,6 +24,8 @@
import org.hibernate.engine.NamedSQLQueryDefinition;
import org.hibernate.engine.query.sql.NativeSQLQueryReturn;
import org.hibernate.engine.query.sql.NativeSQLQueryRootReturn;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Query binder
@@ -33,7 +33,7 @@
* @author Emmanuel Bernard
*/
public abstract class QueryBinder {
- private static Log log = LogFactory.getLog( QueryBinder.class );
+ private static final Logger log = LoggerFactory.getLogger( QueryBinder.class );
public static void bindQuery(NamedQuery queryAnn, ExtendedMappings mappings, boolean isDefault) {
if ( queryAnn == null ) return;
@@ -61,7 +61,7 @@
else {
mappings.addQuery( queryAnn.name(), query );
}
- if ( log.isInfoEnabled() ) log.info( "Binding Named query: " + queryAnn.name() + " => " + queryAnn.query() );
+ log.info( "Binding Named query: {} => {}", queryAnn.name(), queryAnn.query() );
}
@@ -123,9 +123,7 @@
else {
mappings.addSQLQuery( queryAnn.name(), query );
}
- if ( log.isInfoEnabled() ) {
- log.info( "Binding named native query: " + queryAnn.name() + " => " + queryAnn.query() );
- }
+ log.info( "Binding named native query: {} => {}", queryAnn.name(), queryAnn.query() );
}
public static void bindNativeQuery(org.hibernate.annotations.NamedNativeQuery queryAnn, ExtendedMappings mappings) {
@@ -179,9 +177,7 @@
throw new NotYetImplementedException( "Pure native scalar queries are not yet supported" );
}
mappings.addSQLQuery( queryAnn.name(), query );
- if ( log.isInfoEnabled() ) {
- log.info( "Binding named native query: " + queryAnn.name() + " => " + queryAnn.query() );
- }
+ log.info( "Binding named native query: {} => {}", queryAnn.name(), queryAnn.query() );
}
public static void bindQueries(NamedQueries queriesAnn, ExtendedMappings mappings, boolean isDefault) {
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappingSecondPass.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappingSecondPass.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappingSecondPass.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -13,8 +13,6 @@
import javax.persistence.FieldResult;
import javax.persistence.SqlResultSetMapping;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.MappingException;
import org.hibernate.cfg.BinderHelper;
@@ -30,12 +28,14 @@
import org.hibernate.mapping.Value;
import org.hibernate.util.CollectionHelper;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class ResultsetMappingSecondPass implements QuerySecondPass {
- private static Log log = LogFactory.getLog( ResultsetMappingSecondPass.class );
+ private Logger log = LoggerFactory.getLogger( ResultsetMappingSecondPass.class );
private SqlResultSetMapping ann;
private ExtendedMappings mappings;
private boolean isDefault;
@@ -50,7 +50,7 @@
//TODO add parameters checkings
if ( ann == null ) return;
ResultSetMappingDefinition definition = new ResultSetMappingDefinition( ann.name() );
- if ( log.isInfoEnabled() ) log.info( "Binding resultset mapping: " + definition.getName() );
+ log.info( "Binding resultset mapping: {}", definition.getName() );
int entityAliasIndex = 0;
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -1,11 +1,11 @@
package org.hibernate.cfg.annotations;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.annotations.OrderBy;
import org.hibernate.cfg.Environment;
import org.hibernate.mapping.Collection;
import org.hibernate.mapping.PersistentClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Bind a set.
@@ -13,7 +13,7 @@
* @author Matthew Inger
*/
public class SetBinder extends CollectionBinder {
- private static Log log = LogFactory.getLog( SetBinder.class );
+ private final Logger log = LoggerFactory.getLogger( SetBinder.class );
public SetBinder() {
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -10,8 +10,6 @@
import javax.persistence.Lob;
import javax.persistence.Temporal;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.annotations.Parameter;
@@ -32,12 +30,14 @@
import org.hibernate.type.SerializableToBlobType;
import org.hibernate.type.StringClobType;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Emmanuel Bernard
*/
public class SimpleValueBinder {
- private static Log log = LogFactory.getLog( SimpleValueBinder.class );
+ private Logger log = LoggerFactory.getLogger( SimpleValueBinder.class );
private String propertyName;
private String returnedClassName;
private Ejb3Column[] columns;
@@ -217,7 +217,7 @@
public SimpleValue make() {
validate();
- log.debug( "building SimpleValue for " + propertyName );
+ log.debug( "building SimpleValue for {}", propertyName );
if ( table == null ) {
table = columns[0].getTable();
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -6,8 +6,6 @@
import java.util.List;
import javax.persistence.UniqueConstraint;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.annotations.Index;
@@ -26,6 +24,8 @@
import org.hibernate.mapping.Table;
import org.hibernate.mapping.ToOne;
import org.hibernate.mapping.Value;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Table related operations
@@ -34,7 +34,7 @@
*/
public class TableBinder {
//TODO move it to a getter/setter strategy
- private static Log log = LogFactory.getLog( TableBinder.class );
+ private static Logger log = LoggerFactory.getLogger( TableBinder.class );
private String schema;
private String catalog;
private String name;
@@ -181,11 +181,7 @@
* Get the columns of the mapped-by property
* copy them and link the copy to the actual value
*/
- if ( log.isDebugEnabled() ) {
- log.debug(
- "Retrieving property " + associatedClass.getEntityName() + "." + mappedByProperty
- );
- }
+ log.debug("Retrieving property {}.{}", associatedClass.getEntityName(), mappedByProperty);
final Property property = associatedClass.getRecursiveProperty( columns[0].getMappedBy() );
Iterator mappedByColumns;
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -1,18 +1,18 @@
//$Id: $
package org.hibernate.cfg.annotations;
-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 Version {
public static final String VERSION = "3.3.1.GA";
- private static Log log = LogFactory.getLog( Version.class );
+ private static Logger log = LoggerFactory.getLogger( Version.class );
static {
- log.info( "Hibernate Annotations " + VERSION );
+ log.info( "Hibernate Annotations {}", VERSION );
}
public static void touch() {
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -80,8 +80,6 @@
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.dom4j.Attribute;
import org.dom4j.Element;
import org.hibernate.AnnotationException;
@@ -95,6 +93,8 @@
import org.hibernate.annotations.common.reflection.ReflectionUtil;
import org.hibernate.util.ReflectHelper;
import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Encapsulates the overriding of Java annotations from an EJB 3.0 descriptor.
@@ -104,7 +104,7 @@
* @author Emmanuel Bernard
*/
public class EJB3OverridenAnnotationReader implements AnnotationReader {
- private static Log log = LogFactory.getLog( EJB3OverridenAnnotationReader.class );
+ private Logger log = LoggerFactory.getLogger( EJB3OverridenAnnotationReader.class );
private static final Map<Class, String> annotationToXml;
private static final String SCHEMA_VALIDATION = "Activate schema validation for more informations";
private static final Filter FILTER = new Filter() {
@@ -391,8 +391,9 @@
for (Element subelement : (List<Element>) element.elements()) {
String propertyName = subelement.attributeValue( "name" );
if ( !properties.contains( propertyName ) ) {
- log.warn( "Property " + StringHelper.qualify( className, propertyName ) + " not found in class"
- + " but described in <mapping-file/> (possible typo error)" );
+ log.warn( "Property {} not found in class"
+ + " but described in <mapping-file/> (possible typo error)",
+ StringHelper.qualify( className, propertyName ) );
}
}
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XMLContext.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XMLContext.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XMLContext.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -6,17 +6,17 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.dom4j.Document;
import org.dom4j.Element;
import org.hibernate.util.StringHelper;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* @author Emmanuel Bernard
*/
public class XMLContext {
- private static Log log = LogFactory.getLog( XMLContext.class );
+ private Logger log = LoggerFactory.getLogger( XMLContext.class );
private Default globalDefaults;
private Map<String, Element> classOverriding = new HashMap<String, Element>();
private Map<String, Default> defaultsOverriding = new HashMap<String, Default>();
@@ -102,7 +102,7 @@
if ( access != null ) localDefault.setAccess( access );
defaultsOverriding.put( className, localDefault );
- log.debug( "Adding XML overriding information for " + className );
+ log.debug( "Adding XML overriding information for {}", className );
addEntityListenerClasses( element, packageName, addedClasses );
}
}
@@ -118,8 +118,8 @@
//maybe switch it to warn?
if ( "entity-listener".equals( classOverriding.get( listenerClassName ).getName() ) ) {
log.info(
- "entity-listener duplication, first event definition will be used: "
- + listenerClassName
+ "entity-listener duplication, first event definition will be used: {}",
+ listenerClassName
);
continue;
}
@@ -131,7 +131,7 @@
classOverriding.put( listenerClassName, listener );
}
}
- log.debug( "Adding XML overriding information for listener: " + listeners );
+ log.debug( "Adding XML overriding information for listener: {}", listeners );
addedClasses.addAll( localAddedClasses );
return localAddedClasses;
}
Modified: annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -10,8 +10,8 @@
import org.hibernate.event.PostUpdateEventListener;
import org.hibernate.event.PostDeleteEventListener;
import org.hibernate.event.EventListeners;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* Helper methods initializing Hibernate Search event listeners
@@ -19,7 +19,7 @@
* @author Emmanuel Bernard
*/
public class SearchConfiguration {
- private static Log log = LogFactory.getLog( SearchConfiguration.class );
+ private static final Logger log = LoggerFactory.getLogger( SearchConfiguration.class );
public static void enableHibernateSearch(EventListeners eventListeners, Properties properties) {
//add search events if the jar is available
Modified: annotations/trunk/src/java/org/hibernate/type/EnumType.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/type/EnumType.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/java/org/hibernate/type/EnumType.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -13,14 +13,14 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
+import org.hibernate.annotations.common.util.StringHelper;
import org.hibernate.usertype.EnhancedUserType;
import org.hibernate.usertype.ParameterizedType;
import org.hibernate.util.ReflectHelper;
-import org.hibernate.util.StringHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Enum type mapper
@@ -30,12 +30,22 @@
*/
//TODO implements readobject/writeobject to recalculate the enumclasses
public class EnumType implements EnhancedUserType, ParameterizedType, Serializable {
- private static Log log = LogFactory.getLog( EnumType.class );
- private static final boolean IS_TRACE_ENABLED;
+ /**
+ * This is the old scheme where logging of parameter bindings and value extractions
+ * was controlled by the trace level enablement on the 'org.hibernate.type' package...
+ * <p/>
+ * Originally was cached such because of performance of looking up the logger each time
+ * 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 = LoggerFactory.getLogger( StringHelper.qualifier( Type.class.getName() ) ).isTraceEnabled();
+ private transient Logger log;
- static {
- //cache this, because it was a significant performance cost
- IS_TRACE_ENABLED = LogFactory.getLog( StringHelper.qualifier( Type.class.getName() ) ).isTraceEnabled();
+ private Logger log() {
+ if ( log == null ) {
+ log = LoggerFactory.getLogger( getClass() );
+ }
+ return log;
}
public static final String ENUM = "enumClass";
@@ -74,8 +84,8 @@
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
Object object = rs.getObject( names[0] );
if ( rs.wasNull() ) {
- if ( IS_TRACE_ENABLED ) {
- log.debug( "Returning null as column " + names[0] );
+ if ( IS_VALUE_TRACING_ENABLED ) {
+ log().debug( "Returning null as column {}", names[0] );
}
return null;
}
@@ -86,15 +96,15 @@
if ( ordinal < 0 || ordinal >= values.length ) {
throw new IllegalArgumentException( "Unknown ordinal value for enum " + enumClass + ": " + ordinal );
}
- if ( IS_TRACE_ENABLED ) {
- log.debug( "Returning '" + ordinal + "' as column " + names[0] );
+ if ( IS_VALUE_TRACING_ENABLED ) {
+ log().debug( "Returning '{}' as column {}", ordinal, names[0] );
}
return values[ordinal];
}
else {
String name = (String) object;
- if ( IS_TRACE_ENABLED ) {
- log.debug( "Returning '" + name + "' as column " + names[0] );
+ if ( IS_VALUE_TRACING_ENABLED ) {
+ log().debug( "Returning '{}' as column {}", name, names[0] );
}
try {
return Enum.valueOf( enumClass, name );
@@ -108,22 +118,22 @@
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
//if (!guessed) guessType( st, index );
if ( value == null ) {
- if ( IS_TRACE_ENABLED ) log.debug( "Binding null to parameter: " + index );
+ if ( IS_VALUE_TRACING_ENABLED ) log().debug( "Binding null to parameter: {}", index );
st.setNull( index, sqlType );
}
else {
boolean isOrdinal = isOrdinal( sqlType );
if ( isOrdinal ) {
int ordinal = ( (Enum) value ).ordinal();
- if ( IS_TRACE_ENABLED ) {
- log.debug( "Binding '" + ordinal + "' to parameter: " + index );
+ if ( IS_VALUE_TRACING_ENABLED ) {
+ log().debug( "Binding '{}' to parameter: {}", ordinal, index );
}
st.setObject( index, Integer.valueOf( ordinal ), sqlType );
}
else {
String enumString = ( (Enum) value ).name();
- if ( IS_TRACE_ENABLED ) {
- log.debug( "Binding '" + enumString + "' to parameter: " + index );
+ if ( IS_VALUE_TRACING_ENABLED ) {
+ log().debug( "Binding '{}' to parameter: {}", enumString, index );
}
st.setObject( index, enumString, sqlType );
}
Modified: annotations/trunk/src/test/org/hibernate/test/annotations/reflection/LogListener.java
===================================================================
--- annotations/trunk/src/test/org/hibernate/test/annotations/reflection/LogListener.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/test/org/hibernate/test/annotations/reflection/LogListener.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -4,23 +4,24 @@
import javax.persistence.PrePersist;
import javax.persistence.PostPersist;
-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 LogListener {
- Log log = LogFactory.getLog( LogListener.class );
+ private final Logger log = LoggerFactory.getLogger( LogListener.class );
@PrePersist
@PostPersist
public void log(Object entity) {
- log.debug( "Logging entity " + entity.getClass().getName() + " with hashCode: " + entity.hashCode() );
+ log.debug( "Logging entity {} with hashCode: {}", entity.getClass().getName(), entity.hashCode() );
}
public void noLog(Object entity) {
- log.debug( "NoLogging entity " + entity.getClass().getName() + " with hashCode: " + entity.hashCode() );
+ log.debug( "NoLogging entity {} with hashCode: {}", entity.getClass().getName(), entity.hashCode() );
}
}
Modified: annotations/trunk/src/test/org/hibernate/test/annotations/reflection/OtherLogListener.java
===================================================================
--- annotations/trunk/src/test/org/hibernate/test/annotations/reflection/OtherLogListener.java 2008-05-17 12:47:32 UTC (rev 14670)
+++ annotations/trunk/src/test/org/hibernate/test/annotations/reflection/OtherLogListener.java 2008-05-17 12:49:38 UTC (rev 14671)
@@ -4,23 +4,24 @@
import javax.persistence.PrePersist;
import javax.persistence.PostPersist;
-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 OtherLogListener {
- Log log = LogFactory.getLog( OtherLogListener.class );
+ private final Logger log = LoggerFactory.getLogger( OtherLogListener.class );
@PrePersist
@PostPersist
public void log(Object entity) {
- log.debug( "Logging entity " + entity.getClass().getName() + " with hashCode: " + entity.hashCode() );
+ log.debug( "Logging entity {} with hashCode: {}", entity.getClass().getName(), entity.hashCode() );
}
public void noLog(Object entity) {
- log.debug( "NoLogging entity " + entity.getClass().getName() + " with hashCode: " + entity.hashCode() );
+ log.debug( "NoLogging entity {} with hashCode: {}", entity.getClass().getName(), entity.hashCode() );
}
}
16 years, 7 months
Hibernate SVN: r14670 - in commons-annotations/trunk: src/java/org/hibernate/annotations/common and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-17 08:47:32 -0400 (Sat, 17 May 2008)
New Revision: 14670
Modified:
commons-annotations/trunk/ivy.xml
commons-annotations/trunk/pom.xml
commons-annotations/trunk/src/java/org/hibernate/annotations/common/AssertionFailure.java
Log:
HCANN-1 move to slf4j
Modified: commons-annotations/trunk/ivy.xml
===================================================================
--- commons-annotations/trunk/ivy.xml 2008-05-16 16:27:59 UTC (rev 14669)
+++ commons-annotations/trunk/ivy.xml 2008-05-17 12:47:32 UTC (rev 14670)
@@ -13,11 +13,8 @@
</publications>
<dependencies>
<!-- compile time dependencies -->
- <dependency org="commons-logging" name="commons-logging" rev="1.0.4" conf="default->default"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="default->default"/>
- <!-- transitive dependencies -->
- <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="test->default"/> <!-- soon to be a dep -->
-
<!-- test deps -->
<dependency name="ejb3-persistence" rev="1.0.2.GA" conf="test->default"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.4.2" conf="test->default"/>
Modified: commons-annotations/trunk/pom.xml
===================================================================
--- commons-annotations/trunk/pom.xml 2008-05-16 16:27:59 UTC (rev 14669)
+++ commons-annotations/trunk/pom.xml 2008-05-17 12:47:32 UTC (rev 14670)
@@ -20,9 +20,9 @@
</scm>
<dependencies>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: commons-annotations/trunk/src/java/org/hibernate/annotations/common/AssertionFailure.java
===================================================================
--- commons-annotations/trunk/src/java/org/hibernate/annotations/common/AssertionFailure.java 2008-05-16 16:27:59 UTC (rev 14669)
+++ commons-annotations/trunk/src/java/org/hibernate/annotations/common/AssertionFailure.java 2008-05-17 12:47:32 UTC (rev 14670)
@@ -1,9 +1,10 @@
//$Id: $
package org.hibernate.annotations.common;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
/**
* Indicates failure of an assertion: a possible bug in Hibernate.
*
@@ -13,7 +14,7 @@
//TODO Copy from Hibernate Core, do some mutualization here?
public class AssertionFailure extends RuntimeException {
- 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)";
16 years, 7 months