Fast Object Database for Java - with JPA/JDO support

About PersistenceContext

1-10 of 40 resultsRefresh
100

javax.persistence.PersistenceContexts

javax.persistence Annotation PersistenceContexts Target: Classes Declares one or more PersistenceContext annotations. It is used to express a dependency on container-managed entity manager persistence contexts. Since: JPA 1.0 See Also: PersistenceContext PersistenceContext[] value (Required) One or
95

PersistenceContexts.value

Annotation Element javax.persistence.PersistenceContexts PersistenceContext[] value (Required) One or more PersistenceContext annotations. Since: JPA 1.0
91

PersistenceContext.unitName

Annotation Element javax.persistence.PersistenceContext String unitName (Optional) The name of the persistence unit as defined in the persistence.xml file. If the unitName element is specified, the persistence unit for the entity manager that is accessible in JNDI must have the same name. Default value: "" Since: JPA 1.0
91

PersistenceContext.type

Annotation Element javax.persistence.PersistenceContext PersistenceContextType type (Optional) Specifies whether a transaction-scoped persistence context or an extended persistence context is to be used. Default value: javax.persistence.PersistenceContextType.TRANSACTION Since: JPA 1.0
91

PersistenceContext.properties

Annotation Element javax.persistence.PersistenceContext PersistenceProperty[] properties (Optional) Properties for the container or persistence provider. Vendor specific properties may be included in this set of properties. Properties that are not recognized by a vendor are ignored. Default value: {} Since: JPA 1.0
91

PersistenceContext.name

Annotation Element javax.persistence.PersistenceContext String name (Optional) The name by which the entity manager is to be accessed in the environment referencing context; not needed when dependency injection is used. Default value: "" Since: JPA 1.0
91

javax.persistence.PersistenceContext

javax.persistence Annotation PersistenceContext Target: Classes and fields (including property get methods) Expresses a dependency on a container-managed EntityManager and its associated persistence context. Since: JPA 1.0 String name (Optional) The name by which the entity manager
56

Step 3: Define an EJB Session Bean

javax.persistence.PersistenceContext; import javax.persistence.TypedQuery; @Stateless public class GuestDao { // Injected database connection: @PersistenceContext private EntityManager ... with the @PersistenceContext annotation). Handles transactions automatically using JTA - no need
56

Step 3: Define a Spring DAO Component

; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax ... connection: @PersistenceContext private EntityManager em; // Stores a new guest ... field (because it is annotated with the @PersistenceContext annotation). Handles transactions
56

Step 3: Define an EJB Session Bean

.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.TypedQuery ... : @PersistenceContext private EntityManager em; // Stores a new guest: public void persist(Guest guest ... (because it is annotated with the @PersistenceContext annotation). Handles transactions automatically

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support