Spring not able to retrieve Sybase database metadata
Recently, when trying to execute a Sybase stored procedure using SimpleJdbcCall, I found that the Spring framework could not read the database metadata. SimpleJdbcCall uses the metadata to intelligently figure out the parameters and their types and just makes stored procedure invocation painless.
After going through Spring’s source code, I found that Spring uses the database product name to determine how the metadata should be loaded. Turns out that the commonDatabaseName method in the JdbcUtils that is used to get the product name does a string comparison against “sql server” and our Sybase server is named “SQL Server”.
I submitted a patch to do this comparison with out taking considering the case. Hopefully this gets considered in the 3.0 release.
http://springstoredprocedureexample.blogspot.com/
Nice. However – don’t you see that Spring-JDBC creates a db load, by generating a metadata SQL call for each call you make? this is done in doExecute (as it calles checkCompiled) – inAddition, checkCompiledMethod changes the state of the “isCompiled” field – so what happens if several threads are trying for example to perform select foo(5) and select foo(6) ?
How did you overcome this issue?