-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
executeBatch #15
Comments
Could you show me the actual batch code? |
Sorry i can't show you the exact code. I can just explain it. We use this class: We use it for the parent table, again we use this batchUpdate method for the 2 child tables. So we use 3 batchUpdate methods in a row in our writer class. |
Even if you can't use your exact tables, can you give the example in code with fictitious table names, or preferably a working example I can run. |
i'm a bit busy now, but i will see what can do. |
Hi, Network view Database view Thanks, I have use your unit test ("MonProxyTest.java") and your embedded database, it was very usefull!! |
Did you make changes to the code? If so, if you issue a pull request I will look at it for inclusion into jamon. Thanks, |
Done |
Hello @stevensouza
First, thank you for JAMon
As you may know the JDBC proxy misses queries sent by the executeBatch method.
I have been able to catch them by enabling the monitor on this method, in the "JDBCMonProxy" class, in the "isExecuteQueryMethod" :
<< private boolean isExecuteQueryMethod(String methodName) {
return "executeQuery".equals(methodName) || "executeUpdate".equals(methodName) || "execute".equals(methodName) || "executeBatch".equals(methodName);
} >>
(my application uses PreperedStatement in this case)
It catches the 3 queries but the figures aren't good:
JAMonExecuteBatch.xlsx
I get:
Hits Avg total
9470 0,293664203 2781
9470 0,293980993 2784
9470 0,755649419 7156
while i should have:
Hits
9470 (Parent Table)
94700 (Child Table)
37880 (Child Table)
It seems they share the same figures while they shoudn't.
Is it possible to "simply" resolve it in JAMon or is it a deep JDBC problem (i'm afraid it is) ?
The text was updated successfully, but these errors were encountered: