We need to make some more changes to the code. In the call to the opensession() method of the SessionFactory class we have to pass the name of the interceptor class. If there is another way of doing this please let me know.