Use of Binary System and Second Level and Query Cache in Hibernate by R4R Team

Binary Streams

When we use the Oracle DataBase it has limits the size of byte arrays that can be passed to and/or from its JDBC driver. If we want to use large instances of binary or serializable type, then we should enable hibernate.jdbc.use_streams_for_binary. This is a system-level setting only.

Second-level and query cache

The properties prefixed by hibernate.cache allow to use a process or cluster scoped second-level cache system with Hibernate.

Query Language Substitution

Below as code given we can define new Hibernate query tokens using hibernate.query.substitutions. This would cause the tokens true and false to be translated to integer literals in the generated SQL. This would allow you to rename the SQL LOWER function.

For example:

hibernate.query.substitutions true=1, false=0

hibernate.query.substitutions toLowercase=LOWER

Hibernate statistics

Any time in Hibernate If enable hibernate.generate_statistics, Hibernate exposes a number of metrics that are useful when tuning a running system via SessionFactory.getStatistics(). Hibernate can even be configured to expose these statistics via JMX. Read the Javadoc of the interfaces in org.hibernate.stats for more information.
Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!