java - Intercepting queries to a database -


So I'm trying to stop calls made in a database. I now have a Java program that listens for the information (calls made through various programs). I am trying to expand it to analyze queries made by one of these programs in the database, which uses Hibernate ORM

I am looking at the hibernate interceptor and it Looks very interesting. How can I integrate the interceptor in my program? I'm not sure how I can use it to join other programs to listen to the call. Or would the listener be a better choice?

Thank you, Harry

Interceptor in your program to integrate , You must follow these steps:

  1. Create a class that extends the EmptyInterceptor of Hibernate.

  2. Set it to the configuration, such as

    configuration cfg = new configuration () ;

    Cfg.setInterceptor (new your interceptor ());

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -