Introduction Dealing with time zones is always challenging. As a rule of thumb, it’s much easier if all date/time values are stored in the UTC format, and, if necessary, dealing with time zone conversations in the UI only. This article is going to demonstrate how you can accomplish this task with JDBC and the awesome … Continue reading How to store date, time, and timestamps in UTC time zone with JDBC and Hibernate →
4 Older Entries »
Introduction As I already mentioned, you should never use the TABLE identifier generator since it does not scale properly. In this post, I’ll show you why you should not rely on the AUTO GenerationType strategy if you’re Hibernate application uses MySQL. Prior to Hibernate 5 On Hibernate 4, if you had the following entity mapping: … Continue reading Why should not use the AUTO JPA GenerationType with MySQL and Hibernate →
Introduction As previously explained, the TABLE identifier generator does not scale, so you should avoid id. However, some enterprise applications might need to run on both MySQL (which does not support database sequences), as well as Oracle, PostgreSQL and SQL Server 2012. This is article is going to explain how easily you can achieve this … Continue reading How to replace the TABLE identifier generator with either SEQUENCE or IDENTITY in a portable way →
Introduction I read a very interesting article by Krešimir Nesek regarding MySQL result set streaming when it comes to reducing memory usage. Mark Paluch, from Spring Data, asked if we could turn the MySQL result set streaming by default whenever we are using Query#stream or Query#scroll. That being said, the HHH-11260 issue was created, and … Continue reading How does MySQL result set streaming perform vs fetching the whole JDBC ResultSet at once →
Introduction This article is part of a series of posts related to calling various relational database systems stored procedures and database functions from Hibernate. The reason for writing this down is because there are many peculiarities related to the underlying JDBC driver support and not every JPA or Hibernate feature is supported on every relational … Continue reading How to call MySQL stored procedures and functions with JPA and Hibernate →
Recent Tips and News on Java, Java EE 6, GlassFish & more :
• Using Java Persistence API for Java SE 7
Desktop applications in NetBeans 7 (Oracle Learning
“I believe that one should benchmark before making any technology decisions.” An interview with Pieter van Zyl creator of the OO7J benchmark. In August last year, I published an interesting resource in ODBMS.ORG, the dissertation of Pieter van Zyl, from the University of Pretoria:“Performance investigation into selected object persistence stores”. The dissertation presented the OO7J [...]
Not so long ago, in a galaxy not very far away... a middle-aged
programmer battled to free memory from the dark side of the
hibernate query cache. He was successful, or so it seemed.
For the query cache memory problems had risen from the ashes --
stronger and more bloated than ever...
What's With All This Garbage?
We hit a case at work (again), where the java server process came to a grinding halt. It wasn't dead, it just wasn't making much forward progress either. A quick look at the heap stats showed we were nearly at capacity and that garbage collection was eating all CPU time, thus not allowing any real work to happen. Looks like it is time to whip out the ol' memory profiler. This time I went with Eclipse's Memory Analysis Tool . …
Red Hat increases its service levels. Linux Foundation appoints Ted Ts’o CTO. Sun delivers VirtualBox update. Novell cancels BrainShare. BBC enables iPlayer for Linux. And more.
Note: This is the last 451 CAOS Links post of 2008. We’ll be back with a bumper holiday special on January 2. Happy holidays!
Red Hat Increases Service Levels and Reduces Costs for Customers with Extended Update Support Red Hat
You Mean, Memory Is Not Infinite? We're working hard getting
MySQL Enterprise Monitor 2.0, featuring Query
Analyzer, ready for release. As part of that, we started
really ramping up the number of MySQL servers reporting in query
data to see how we could scale. Not surprising (to me, anyway),
the first efforts did not go so well. My old friend
OutOfMemoryError reared its ugly head once again.
Query Cache -- It's More Than Just Results! We're big (ab)users of hibernate query caching, and more importantly to us the natural id optimized query cache. Firing up the profiler, I was not shocked to see that the second level (let's call it L2) and query caches were hogging the majority of memory. But, something didn't smell right...
What I was seeing was tons of …
4 Older Entries »