사용자 도구

사이트 도구


java:hibernate:interceptor

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:hibernate:interceptor [2018/01/04 08:08]
kwon37xi
java:hibernate:interceptor [2022/05/16 16:37] (현재)
kwon37xi
줄 3: 줄 3:
   * http://docs.jboss.org/hibernate/orm/4.2/manual/en-US/html/ch14.html   * http://docs.jboss.org/hibernate/orm/4.2/manual/en-US/html/ch14.html
   * http://docs.jboss.org/hibernate/core/4.2/javadocs/org/hibernate/Interceptor.html : EmptyInterceptor를 상속해서 필요한 것만 구현할 것   * http://docs.jboss.org/hibernate/core/4.2/javadocs/org/hibernate/Interceptor.html : EmptyInterceptor를 상속해서 필요한 것만 구현할 것
 +  * [[https://www.boraji.com/hibernate-5-interceptor-example|Hibernate 5 - Interceptor example | BORAJI.COM]]
 +
  
 (아마도 Hibernate 3.3부터 추가된) onPrepareStatement 를 통해 쿼리를 변경하는것이 가능하다. (아마도 Hibernate 3.3부터 추가된) onPrepareStatement 를 통해 쿼리를 변경하는것이 가능하다.
줄 14: 줄 16:
   * http://kurtstam.blogspot.kr/2008/10/hibernate-interceptors-events-and-jpa.html   * http://kurtstam.blogspot.kr/2008/10/hibernate-interceptors-events-and-jpa.html
  
-JPA에서는 ''hibernate.ejb.interceptor'' 프라퍼티에 Interceptor의 FQCN을 지정해주면된다.+JPA에서는 ''<del>hibernate.ejb.interceptor</del>'' ''hibernate.session_factory.interceptor'', ''hibernate.session_factory.session_scoped_interceptor''프라퍼티에 Interceptor의 FQCN을 지정해주면된다.
  
  
   * [[http://www.baeldung.com/hibernate-interceptor|Hibernate Interceptors | Baeldung]]   * [[http://www.baeldung.com/hibernate-interceptor|Hibernate Interceptors | Baeldung]]
 +  * [[http://egloos.zum.com/kwon37xi/v/4860051|JDBC SQL 구문에 클라이언트 정보 남기기]]
 +
 +===== hibernate.session_factory.interceptor =====
 +  * ''hibernate.session_factory.interceptor'' 는 모든 세션에 대해 하나의 interceptor 객체로 적용된다.
 +  * 따라서 각 세션에 특화된 공유 정보를 가지면 안된다.
 +
 +===== hibernate.session_factory.session_scoped_interceptor =====
 +  * ''hibernate.session_factory.session_scoped_interceptor'' : 세션별로 새로운 interceptor 객체를 생성한다.
 +
java/hibernate/interceptor.1515022730.txt.gz · 마지막으로 수정됨: 2018/01/04 08:08 저자 kwon37xi