1 Reply Latest reply on Mar 29, 2006 5:29 AM by Nigel White

    Confihuring Hibernate from within JBoss

    Nigel White Newbie

      I need to add some Hibernate settings to my JBoss EJB3 deployment.

      The jars are currently scanned at deployment time, annotations are detected, and the entities deployed all great.

      But I want to set an org.hibernate.Interceptor in hibernate, so I need to get into that process.

      How can I do this?

      I've tried looking at Hibernate's Entity Manager documentation, and found an Ejb3Configuration class, but that doesn't do the scanning for annotations. I looked at Hibernate's PersistenceXmlLoader - also doesn't do the EJB3 scaning bit.

      I don't think I can use any of these. Jboss seems to need to do its own thing. How can I access JBoss's EJB3 deployment process, and add hibernate settings to it - particularly Interceptors?

        • 1. Re: Confihuring Hibernate from within JBoss
          Nigel White Newbie

          I found the answer:

           <property name="hibernate.ejb.interceptor" value="com.fcl.util.ReferenceInterceptor"/>
           <property name="hibernate.ejb.event.post-commit-insert" value="com.fcl.util.HibernateEventListener"/>
           <property name="hibernate.ejb.event.post-commit-update" value="com.fcl.util.HibernateEventListener"/>
           <property name="hibernate.ejb.event.post-commit-delete" value="com.fcl.util.HibernateEventListener"/>