Tag Archives: sql

Efficient SQL Insert with MySQL and OpenJPA


Some applications need a high INSERT throughput. I got this issue and found an interesting way to enhance without effort this parameter using OpenJPA (can be adapted with other providers) and MySQL (not sure about other databases).

Continue reading

LogSql flag in OpenEJB and TomEE


Getting SQL queries is particularly important to identify potential bottlenecks and understand what is doing an application.

We often use external tools like jamon, slf4j-jdbc and so on to get this information.

There are two main drawbacks:

  • it often breaks a bit the configuration since you replace your driver by the library one and your jdbc url by another one (or at least your original one with some additional information)
  • You need another library (find it, learn it etc…)

That’s why in OpenEJB and TomEE we added a property LogSql which simply logs all queries, no need of hard configuration, that’s just a boolean.

Continue reading

Execute sql statements at application startup with OpenEJB and TomEE


Provisioning its database at application startup is common but how to do it with OpenEJB and TomEE?

Continue reading