[hibernate-issues] [Hibernate-JIRA] Commented: (EJB-340) Regression : OnLoad() callback is never invoked on an Interceptor in an EJB3 environment

Jose CHILLAN (JIRA) noreply at atlassian.com
Thu Feb 28 06:51:33 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29615 ] 

Jose CHILLAN commented on EJB-340:
----------------------------------

It is very basic:

<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">

  <persistence-unit name="alpha" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <properties>
      <property name="hibernate.archive.autodetection" value="class" />
      <property name="hibernate.show_sql" value="true" />
      <property name="hibernate.format_sql" value="true" />
      <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
      <property name="hibernate.connection.url" value="jdbc:hsqldb:mem" />
      <property name="hibernate.connection.username" value="sa" />
      <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
      <property name="hibernate.hbm2ddl.auto" value="update" />
    </properties>
  </persistence-unit>
</persistence>


> Regression : OnLoad() callback is never invoked on an Interceptor in an EJB3 environment
> ----------------------------------------------------------------------------------------
>
>                 Key: EJB-340
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-340
>             Project: Hibernate Entity Manager
>          Issue Type: Bug
>    Affects Versions: 3.3.2.Beta3
>            Reporter: Jose CHILLAN
>   Original Estimate: 15 minutes
>  Remaining Estimate: 15 minutes
>
> The method onLoad() is not inovked on an EJB3 interceptor, whereas this works in a plain Hibernate environment.
> It seems that the default PreLoadEventListener that is registered by the EventListenerConfiguration
> doesn't take the interceptor into accound.
> A workaround is to modify the configuration to add the default plain Hibernate listener in the persistence.xml:
> <persistence ...>
>   <persistence-unit>
>   ...
>   <properties>
>       <property name="hibernate.ejb.event.pre-load" value="org.hibernate.secure.JACCPreLoadEventListener, org.hibernate.event.def.DefaultPreLoadEventListener" />
>   </properties>
>   </persistence-unit>
> </persistence>
> But this would be great to have this by default.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list