Declaring Hibernate event listeners in a JPA environment

前端 未结 4 1952
陌清茗
陌清茗 2021-02-09 04:24

Hy guys,

I am working on a project developed in Java EE 5 environment. I want to know how I can declare a Hibernate event listener so that I can be informed when CRUD op

4条回答
  •  孤独总比滥情好
    2021-02-09 05:15

    It seems like you can specific the usual hibnerate.cfg.xml as a property hibernate.ejb.cfgfile.

    You may also define all your hibernate configuration in the usual Hibernate way: within a hibernate.xfg.xml file. You must tell the JPA implementation to use this configuration file through the hibernate.ejb.cfgfile property.

    See this post or this one.

    
     
        java:/DefaultDS
        
           
        
     
    
    

    Note that I never use that personally.

提交回复
热议问题