Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed typo.


Since
since5.3
 

Tapestry provides a built-in integration with the Java Persistence API (JPA) through the Tapestry-jpa module. This module supersedes the 3rd-party Tynamo JPA module.

...

Info

Note that the TapestryPersistenceUnitInfo instance passed to the PersistenceUnitConfigurer is either empty or my may contain the persistence unit metadata read from the persistence.xml file. What happens if you contribute a PersistenceUnitConfigurer for a persistence unit that has not been defined in the persistence.xml file? In this case Tapestry assumes that you want to configure the persistence unit programmatically and just creates a fresh TapestryPersistenceUnitInfo object and passes it to the PersistenceUnitConfigurer.

...

Several aspects of Tapestry-jpa can be customized in your application module (usually AppModule.java), just like other Tapestry configuration symbols.

SymbolDefaultDescription
JpaSymbols.PROVIDE_ENTITY_VALUE_ENCODERStrueWhether entity value encoders will be provided automatically. See Using Select with a List.
JpaSymbols.EARLY_START_UPtrueWhether JPA will be started up at application launch, rather than lazily.
JpaSymbols.ENTITY_SESSION_STATE_PERSISTENCE_STRATEGY_ENABLEDtrue

Whether the "entity" persistence strategy is used to store JPA entities as Session State Objects.

JpaSymbols.PERSISTENCE_DESCRIPTOR/META-INF/persistence.xmlThe location of the persistence configuration file, located on the classpath

Injecting the EntityManager

...