I'm looking for an entity detection in OpenJPA. That I don't need to declare all entities in the persistence.xml.
Edit: I'm sorry, I forgot to say that I develop a java se app.
Read the Persistent Class List section in the user manual.
Unlike many ORM products, OpenJPA does not need to know about all of your persistent classes at startup. OpenJPA discovers new persistent classes automatically as they are loaded into the JVM; in fact you can introduce new persistent classes into running applications under OpenJPA.