I am using JPA programaticaly..ie without xml file, and i would like to define Default Entity Listeners.
How to do ?
Here my init code:
Properties config = new Properties(); config.put("javax.persistence.provider", "com.objectdb.jpa.Provider"); config.put("javax.persistence.jdbc.url", "objectdb://localhost/my.odb"); config.put("javax.persistence.jdbc.user", "admin"); config.put("javax.persistence.jdbc.password", "admin"); EntityManagerFactory factory = Persistence.createEntityManagerFactory("$objectdb/db/points.odb", config); EntityManager em = factory.createEntityManager(); for (Class< ? > x : annotatedClasses) { em.getMetamodel() .managedType(x); }
Thanks for any help