JPA module

This module aims to monitor JPA invocations.

Installation

To use this module and get execution time of queries creation (createNamedQuery, …) set as JPA provider org.apache.sirona.jpa.SironaPersistence.

If you have in your environment a single “real” JPA provider it should be found automatically but if that’s not the case of if you want to force the implementation set the property org.apache.sirona.jpa.provider to the real implementation you want. For instance:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
             xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                       http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="my-unit">
    ...
    <properties>
      <property name="org.apache.sirona.jpa.provider"
                value="org.apache.openjpa.persistence.PersistenceProviderImpl"/>
      ...
    </properties>
  </persistence-unit>
</persistence>

Note: it works for JTA transaction-type units too.