[hibernate-dev] AS7 use of the "hibernate.ejb.resource_scanner" property to override the default org.hibernate.ejb.packaging.Scanner...

Emmanuel Bernard emmanuel at hibernate.org
Mon Mar 28 10:23:53 EDT 2011


On 28 mars 2011, at 16:23, Emmanuel Bernard wrote:

> 
> On 28 mars 2011, at 15:35, Scott Marlow wrote:
> 
>> On 03/28/2011 09:04 AM, Emmanuel Bernard wrote:
>>> 
>>> On 27 mars 2011, at 19:36, Scott Marlow wrote:
>>> 
>>>> We just discussed Hibernate 4.0 annotation scanning the other day and I
>>>> wanted to add to the conversation (which was about using
>>>> https://github.com/jbossas/jandex).
>>>> 
>>>> As a workaround for https://issues.jboss.org/browse/JBAS-9141, I'll
>>>> request a merge of the following change.  This is about AS7 setting the
>>>> "hibernate.ejb.resource_scanner" property to
>>>> org.jboss.as.jpa.hibernate.HibernateAnnotationScanner (which implements
>>>> the org.hibernate.ejb.packaging.Scanner interface).
>>>> 
>>>> If we move away from supporting the current Scanner interface in
>>>> Hibernate 4.0, we should discuss the impact on the AS7 scanner
>>>> implementation.
>>> 
>>> Why do you want to get rid of this interface, it captures exactly what HEM needs. Has it changed in 4?
>> 
>> I haven't heard anyone making a case to get rid of the Scanner interface.  My suggestion is to consider optimizing the interface to not require classloading of the entities.
> 
> Ah sorry I misunderstood you partially.
> What's the issue with a Scanner implementation loading classes? In a sense, HEM calling getName() is a non optimized code path that should be fixed eventually.

BTW Scanner is definitely an SPI we should move it to a spi package in 4.



More information about the hibernate-dev mailing list