• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

factory.openSession( new MyInterceptor() ): Sessionfactory not having api ,interceptor as parameter

 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with interceptors in Hibernate. I am using the hibernate version 4. In the tutorials (almost all found on the net), they are passing the interceptor as a parameter to openSession() method as below
factory.openSession( new MyInterceptor() );

As i go to the eclipse and type the code it is not having that api which takes Interceptor as parameter for openSessionMethod. It is not even having object as parameter. Could someone guide me.
 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The hibernate version I used was 4.1.2. I am not finding version 3 on hibernate website
 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to ask you "Is my question clear", because if not I would retype it again to make things clear..
 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its all in the manual. jboss hibernate 4.1 manual
 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not existing in the Session api, but it is existing Session facade api . The code is shown below
 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was actually referring to
This comes closer to your requirement to make them session scoped and not sessionfactory scoped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic