[hibernate/hibernate-search] 8732e3: HSEARCH-1115 Changed use of ReflectHelper to speci...
by GitHub
Branch: refs/heads/4.1
Home: https://github.com/hibernate/hibernate-search
Commit: 8732e33394da8e69aa1a38a13c8464a6645094b4
https://github.com/hibernate/hibernate-search/commit/8732e33394da8e69aa1a...
Author: Randall Hauch <rhauch(a)gmail.com>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/ConfigContext.java
Log Message:
-----------
HSEARCH-1115 Changed use of ReflectHelper to specify classloader
Two uses of ReflectHelper.classForName(String) were changed to use the
classForName(String,Class) form instead. In the latter method, if
the class cannot be found on the thread's context class loader then the
class will be loaded using the classloader of the class specified in
the second parameter.
In one of the cases (DocumentBuilderHelper), the DocumentBuilderHelper class
was passed, meaning that the same classloader used to load the Hibernate Search
classes will be used.
In the second case (ConfigContext), the second parameter is the class of
the SearchConfiguration implementation that was supplied to the ConfigContext.
This is better than the ConfigContext class, since the SearchConfiguration
implementation will be provided by the components using the SearchFactoryBuilder
to build a SearchFactory. This means that the components' classloader
will be used to load the Analyzer implementation class.
There are a few other uses of ReflectionHelper.classForName(String) in the Hibernate
Search codebase, but I don't think they require the same classloading logic.
When used in a Java SE environment, there is no net difference in classloading
behavior. However, in JBoss AS7 (or even OSGi) the different classloaders have
a significant effect. Specifically, when used in JBoss AS7, the modules might look
like this (where "-->" signifies 'depends on'):
org.foo (uses Hibernate Search, implements SearchConfiguration)
--> org.hibernate.search.engine
--> org.hibernate (specifically the hibernate-commons-annotations JAR)
--> org.apache.lucene
--> others
In this case, the result of the code before this change is that ConfigContext
would expect to find the Analyzer implementation using the 'org.hibernate'
module (where the ReflectHelper class exists), which does cannot see any of
the 'org.apache.lucene' Analyzer implementations nor any implementations
provided by 'org.foo'. After this change, ConfigContext uses 'org.foo' classloader
(since that's where the SearchConfiguration class exists), and thus can see
any Analyzer implementation provide in 'org.foo', 'org.hibernate.search.engine',
'org.apache.lucene', 'org.hibernate' (if there were any), or any of the other
modules.
All unit tests run by the build pass successfully with these changes.
Commit: 39811fabf75f4017c61584f48a74d104d3ad9d7e
https://github.com/hibernate/hibernate-search/commit/39811fabf75f4017c615...
Author: Emmanuel Bernard <emmanuel(a)hibernate.org>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/ObjectLoaderBuilder.java
Log Message:
-----------
HSEARCH-1115 Avoid reflection when we have the data and pass the right caller for modular environments
Since ReflectHelper is in Commons Annotations which depends on nothing, it's critical
to provider the right caller
Commit: e02143a8b87098647d0e3ff2a4586ea82d2d8f41
https://github.com/hibernate/hibernate-search/commit/e02143a8b87098647d0e...
Author: Emmanuel Bernard <emmanuel(a)hibernate.org>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-orm/src/main/java/org/hibernate/search/cfg/impl/SearchConfigurationFromHibernateCore.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
Log Message:
-----------
HSEARCH-1115 Make sure to load Hibernate / JPA exceptions with the "best" classloader
commons-annotations is not the correct classloader in a modular environment
Commit: 5e038733846c3376d662c805cd112b0e4df885a7
https://github.com/hibernate/hibernate-search/commit/5e038733846c3376d662...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/bridge/builtin/ClassBridge.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/ConfigContext.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
M hibernate-search-engine/src/main/java/org/hibernate/search/stat/impl/StatisticsImpl.java
M hibernate-search-engine/src/main/java/org/hibernate/search/util/impl/ClassLoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/batchindexing/impl/Helper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/jmx/IndexControl.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/ObjectLoaderBuilder.java
M hibernate-search-orm/src/test/java/org/hibernate/search/test/configuration/mutablefactory/MutableFactoryTest.java
Log Message:
-----------
HSEARCH-1115 Doing all class loading via ClassLoaderHelper. Also doing moving the classForName methods from commons annotations into ClassLoaderHelper.
Commit: da5dd62c3d479bf05b302eeda8f603773be6db57
https://github.com/hibernate/hibernate-search/commit/da5dd62c3d479bf05b30...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/jgroups/JGroupsChannelProvider.java
M hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/jgroups/JGroupsMasterMessageListener.java
M hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/lucene/LuceneBackendResources.java
M hibernate-search-engine/src/main/java/org/hibernate/search/exception/impl/LogErrorHandler.java
M hibernate-search-engine/src/main/java/org/hibernate/search/indexes/impl/SharingBufferReaderProvider.java
M hibernate-search-engine/src/main/java/org/hibernate/search/util/logging/impl/Log.java
M hibernate-search-orm/src/main/java/org/hibernate/search/batchindexing/impl/OptionallyWrapInJTATransaction.java
Log Message:
-----------
HSEARCH-1115 Fixing some typos in log method names
Commit: 83e3869a5cb47052aba830a8a2ff45f8eaf7a63d
https://github.com/hibernate/hibernate-search/commit/83e3869a5cb47052aba8...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/bridge/builtin/ClassBridge.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/ServiceManager.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/ConfigContext.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
M hibernate-search-engine/src/main/java/org/hibernate/search/indexes/serialization/impl/LuceneWorkHydrator.java
M hibernate-search-engine/src/main/java/org/hibernate/search/stat/impl/StatisticsImpl.java
M hibernate-search-engine/src/main/java/org/hibernate/search/util/impl/ClassLoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/batchindexing/impl/Helper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/jmx/IndexControl.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/ObjectLoaderBuilder.java
Log Message:
-----------
HSEARCH-1115 ClassLoaderHelper#classForName takes now the classloader as second parameter instead of the caller class
Re-added the explicit passing of the caller's classloader to ConfigContext and DocumentBuilderHelper
Commit: 5f234b04248e3d69b770dc0fbed70df64c4d8bd1
https://github.com/hibernate/hibernate-search/commit/5f234b04248e3d69b770...
Author: Sanne Grinovero <sanne(a)hibernate.org>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-orm/src/main/java/org/hibernate/search/cfg/impl/SearchConfigurationFromHibernateCore.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
Log Message:
-----------
HSEARCH-1115 Avoid holding on foreign classloader from LoaderHelper
Compare: https://github.com/hibernate/hibernate-search/compare/1acafa1...5f234b0
12 years, 6 months
[hibernate/hibernate-validator] 9aa4c9: Last update of translation files prior to 4.3.0.Fi...
by GitHub
Branch: refs/heads/master
Home: https://github.com/hibernate/hibernate-validator
Commit: 9aa4c90810e825a5a529aaf42f5d3599162fab16
https://github.com/hibernate/hibernate-validator/commit/9aa4c90810e825a5a...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M documentation/src/main/docbook/pot/modules/annotationprocessor.pot
M documentation/src/main/docbook/pot/modules/bootstrapping.pot
M documentation/src/main/docbook/pot/modules/customoptions.pot
M documentation/src/main/docbook/pot/modules/gettingstarted.pot
M documentation/src/main/docbook/pot/modules/usingvalidator.pot
M documentation/src/main/docbook/zh-CN/modules/annotationprocessor.po
M documentation/src/main/docbook/zh-CN/modules/bootstrapping.po
M documentation/src/main/docbook/zh-CN/modules/customoptions.po
M documentation/src/main/docbook/zh-CN/modules/gettingstarted.po
M documentation/src/main/docbook/zh-CN/modules/usingvalidator.po
Log Message:
-----------
Last update of translation files prior to 4.3.0.Final
12 years, 6 months
[hibernate/hibernate-search] 6a8ad9: HSEARCH-1115 Changed use of ReflectHelper to speci...
by GitHub
Branch: refs/heads/master
Home: https://github.com/hibernate/hibernate-search
Commit: 6a8ad9f7baaeca446547c738ee9cb942ede85987
https://github.com/hibernate/hibernate-search/commit/6a8ad9f7baaeca446547...
Author: Randall Hauch <rhauch(a)gmail.com>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/ConfigContext.java
Log Message:
-----------
HSEARCH-1115 Changed use of ReflectHelper to specify classloader
Two uses of ReflectHelper.classForName(String) were changed to use the
classForName(String,Class) form instead. In the latter method, if
the class cannot be found on the thread's context class loader then the
class will be loaded using the classloader of the class specified in
the second parameter.
In one of the cases (DocumentBuilderHelper), the DocumentBuilderHelper class
was passed, meaning that the same classloader used to load the Hibernate Search
classes will be used.
In the second case (ConfigContext), the second parameter is the class of
the SearchConfiguration implementation that was supplied to the ConfigContext.
This is better than the ConfigContext class, since the SearchConfiguration
implementation will be provided by the components using the SearchFactoryBuilder
to build a SearchFactory. This means that the components' classloader
will be used to load the Analyzer implementation class.
There are a few other uses of ReflectionHelper.classForName(String) in the Hibernate
Search codebase, but I don't think they require the same classloading logic.
When used in a Java SE environment, there is no net difference in classloading
behavior. However, in JBoss AS7 (or even OSGi) the different classloaders have
a significant effect. Specifically, when used in JBoss AS7, the modules might look
like this (where "-->" signifies 'depends on'):
org.foo (uses Hibernate Search, implements SearchConfiguration)
--> org.hibernate.search.engine
--> org.hibernate (specifically the hibernate-commons-annotations JAR)
--> org.apache.lucene
--> others
In this case, the result of the code before this change is that ConfigContext
would expect to find the Analyzer implementation using the 'org.hibernate'
module (where the ReflectHelper class exists), which does cannot see any of
the 'org.apache.lucene' Analyzer implementations nor any implementations
provided by 'org.foo'. After this change, ConfigContext uses 'org.foo' classloader
(since that's where the SearchConfiguration class exists), and thus can see
any Analyzer implementation provide in 'org.foo', 'org.hibernate.search.engine',
'org.apache.lucene', 'org.hibernate' (if there were any), or any of the other
modules.
All unit tests run by the build pass successfully with these changes.
Commit: 7e087e5a6aff4c42c796781ef7c6b96922b46fa1
https://github.com/hibernate/hibernate-search/commit/7e087e5a6aff4c42c796...
Author: Emmanuel Bernard <emmanuel(a)hibernate.org>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/ObjectLoaderBuilder.java
Log Message:
-----------
HSEARCH-1115 Avoid reflection when we have the data and pass the right caller for modular environments
Since ReflectHelper is in Commons Annotations which depends on nothing, it's critical
to provider the right caller
Commit: d2239d6a8cf98456564015d0fc25828c21847fe4
https://github.com/hibernate/hibernate-search/commit/d2239d6a8cf984565640...
Author: Emmanuel Bernard <emmanuel(a)hibernate.org>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-search-orm/src/main/java/org/hibernate/search/cfg/impl/SearchConfigurationFromHibernateCore.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
Log Message:
-----------
HSEARCH-1115 Make sure to load Hibernate / JPA exceptions with the "best" classloader
commons-annotations is not the correct classloader in a modular environment
Commit: e814cb0f648758dbff2c4898539bd0825e9bf85f
https://github.com/hibernate/hibernate-search/commit/e814cb0f648758dbff2c...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/bridge/builtin/ClassBridge.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/ConfigContext.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
M hibernate-search-engine/src/main/java/org/hibernate/search/stat/impl/StatisticsImpl.java
M hibernate-search-engine/src/main/java/org/hibernate/search/util/impl/ClassLoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/batchindexing/impl/Helper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/jmx/IndexControl.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/ObjectLoaderBuilder.java
M hibernate-search-orm/src/test/java/org/hibernate/search/test/configuration/mutablefactory/MutableFactoryTest.java
Log Message:
-----------
HSEARCH-1115 Doing all class loading via ClassLoaderHelper. Also doing moving the classForName methods from commons annotations into ClassLoaderHelper.
Commit: 9dd015c5d2a2c5d531f141a410964f53442de7f8
https://github.com/hibernate/hibernate-search/commit/9dd015c5d2a2c5d531f1...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/jgroups/JGroupsChannelProvider.java
M hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/jgroups/JGroupsMasterMessageListener.java
M hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/lucene/LuceneBackendResources.java
M hibernate-search-engine/src/main/java/org/hibernate/search/exception/impl/LogErrorHandler.java
M hibernate-search-engine/src/main/java/org/hibernate/search/indexes/impl/SharingBufferReaderProvider.java
M hibernate-search-engine/src/main/java/org/hibernate/search/util/logging/impl/Log.java
M hibernate-search-orm/src/main/java/org/hibernate/search/batchindexing/impl/OptionallyWrapInJTATransaction.java
Log Message:
-----------
HSEARCH-1115 Fixing some typos in log method names
Commit: df56e11f79492d3eeba36ac56280edcb2a66afac
https://github.com/hibernate/hibernate-search/commit/df56e11f79492d3eeba3...
Author: Hardy Ferentschik <hibernate(a)ferentschik.de>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-search-engine/src/main/java/org/hibernate/search/bridge/builtin/ClassBridge.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/ServiceManager.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M hibernate-search-engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/ConfigContext.java
M hibernate-search-engine/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
M hibernate-search-engine/src/main/java/org/hibernate/search/indexes/serialization/impl/LuceneWorkHydrator.java
M hibernate-search-engine/src/main/java/org/hibernate/search/stat/impl/StatisticsImpl.java
M hibernate-search-engine/src/main/java/org/hibernate/search/util/impl/ClassLoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/batchindexing/impl/Helper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/jmx/IndexControl.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/ObjectLoaderBuilder.java
Log Message:
-----------
HSEARCH-1115 ClassLoaderHelper#classForName takes now the classloader as second parameter instead of the caller class
Re-added the explicit passing of the caller's classloader to ConfigContext and DocumentBuilderHelper
Commit: 79b647c80a2569ab2af04f72a3413bf0e840046e
https://github.com/hibernate/hibernate-search/commit/79b647c80a2569ab2af0...
Author: Sanne Grinovero <sanne(a)hibernate.org>
Date: 2012-05-09 (Wed, 09 May 2012)
Changed paths:
M hibernate-search-orm/src/main/java/org/hibernate/search/cfg/impl/SearchConfigurationFromHibernateCore.java
M hibernate-search-orm/src/main/java/org/hibernate/search/query/hibernate/impl/LoaderHelper.java
Log Message:
-----------
HSEARCH-1115 Avoid holding on foreign classloader from LoaderHelper
Compare: https://github.com/hibernate/hibernate-search/compare/5acd517...79b647c
12 years, 6 months
[hibernate/hibernate-orm] 4eb057: HHH-7224: Added metamodel support for Orderable an...
by GitHub
Branch: refs/heads/metamodel
Home: https://github.com/hibernate/hibernate-orm
Commit: 4eb057f4de92a46f0d58b8f27bdf77eef26cf99c
https://github.com/hibernate/hibernate-orm/commit/4eb057f4de92a46f0d58b8f...
Author: John Verhaeg <john.verhaeg(a)gmail.com>
Date: 2012-05-08 (Tue, 08 May 2012)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/internal/Binder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/SetAttributeSourceImpl.java
M hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/AbstractPluralAttributeBinding.java
M hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/AttributeBindingContainer.java
M hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/CompositeAttributeBinding.java
M hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/EntityBinding.java
M hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/SetBinding.java
Log Message:
-----------
HHH-7224: Added metamodel support for Orderable and Sortable sources
12 years, 6 months