Internal Website Search
1-50 of 200 resultsStep 3: Add a Context Listener Class of the new source file with the following code: package guest; import javax. persistence .*; import javax ... .Enhancer.enhance("guest.*"); EntityManagerFactory emf = Persistence .createEntityManagerFactory ... it as an application scope attribute in the servlet context - when the web application starts | |
Step 3: Add a Context Listener Class code: package guest; import javax. persistence .*; import javax.servlet.*; @WebListener public class ... .*"); EntityManagerFactory emf = Persistence .createEntityManagerFactory("$objectdb/db/guest.odb"); e ... the servlet context - when the web application starts ( contextInitialized ). Retrieves | |
Working with JPA Entity Objects. The Persistence Context The persistence context is the collection of all the managed objects of an EntityManager . If an entity object that has to be retrieved already exists in the persistence context ... entity object within the same EntityManager . Every EntityManager manages its own persistence context | |
How to Use a SF with extended Persistence Context? Hey, I have a problem to use SF with an Extended Persistence Context Regarding to Transactions. The need for an extended persistence Context emerges for the need to create queries in advance ... : The GuestDao is a SF with an extended persistence context . the GuestServlet holds reference to a SL called | |
Shared (L2) Entity Cache Every EntityManager owns a persistence context , which is a collection of all the entity objects that it manages. The persistence context serves as a first level cache. An attempt to retrieve ... the persistence context , rather than a newly instantiated entity object. The scope of the persistence | |
Retrieving JPA Entity Objects of the database. The persistence context serves as a cache of retrieved entity objects. If a requested entity object is not found in the persistence context a new object is constructed and filled ... is then added to the persistence context as a managed entity object and returned to the application | |
JPA Persistence Unit A JPA Persistence Unit is a logical grouping of user defined persistable classes (entity classes, embeddable classes and mapped superclasses) with related settings. Defining a persistence unit is optional when using ObjectDB, but required by JPA. persistence .xml Persistence units are defined in | |
JPA Persistable Types The term persistable types refers to data types that can be used for storing data in the database. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes ... can be stored in the database directly. Other persistable types can be embedded in entity classes as fields | |
What is the Java Persistence API (JPA)? The Java Persistence API (JPA) is a standard API for accessing databases from within Java ... JDBC. Using plain old Java objects (POJO) to represent persistent data can significantly simplify ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA | |
Database Explorer of bookmarked entity objects. The [Schema] window shows the user defined persistable types (entity and embeddable classes) in the database and their persistent fields and indexes. The [Query] window enables ... a single object, every column represents a persistent field, and the content of a cell is the value | |
Entity Management Settings the reference type for holding non dirty entities in the persistence context of the EntityManager ... entities are always held by strong references in the persistence context (until commit or flush ... " ) specifies whether the Enhancer Agent should be loaded to enhance persistable types on the fly | |
Detached Entity Objects operations clear the entire EntityManager 's persistence context and detach all managed entity objects ... , which clears an EntityManager 's persistence context . Rolling back a transaction - either by invocation ... ). Retrieval by navigation from detached objects is not supported, so only persistent fields | |
Database Schema Evolution Modifications to entity classes that do not change their persistent field definitions ... and non persistent fields. However, additions, deletions and modifications to the persistent fields ... type to any numeric type. In this context numeric types are: byte , short , char , int , long | |
DELETE Queries in JPA/JPQL that a cached entity object in its persistence context has been removed from the database by | |
UPDATE SET Queries in JPA/JPQL that a cached entity object in its persistence context has been modified by an UPDATE query | |
javax.persistence.EntityManager JPA Interface EntityManager Interface used to interact with the persistence context . An EntityManager instance is associated with a persistence context . A persistence context is a set of entity ... . Within the persistence context , the entity instances and their lifecycle are managed. The EntityManager API is used | |
javax.persistence.PersistenceContext Expresses a dependency on a container-managed EntityManager and its associated persistence context ... whether the persistence context is always automatically synchronized with the current transaction or whether the persistence context must be explicitly joined to the current transaction by means | |
javax.persistence.Query - if there is no transaction or the persistence context has not been joined to the transaction QueryTimeoutException ... other than NONE has been set and there is no transaction or the persistence context has not been joined ... and there is no transaction or the persistence context has not been joined to the transaction | |
javax.persistence.TypedQuery for a criteria query TransactionRequiredException - if there is no transaction or the persistence context has not ... and there is no transaction or the persistence context has not been joined to the transaction ... other than NONE has been set and there is no transaction or the persistence context has not been joined | |
javax.persistence.FlushModeType for the persistence context is AUTO (the default) and a flush mode setting has not been specified for the Query or ... of all entities in the persistence context which could potentially affect the result of the query ... , the effect of updates made to entities in the persistence context upon queries is unspecified | |
javax.persistence.SynchronizationType.SynchronizationType Specifies whether the persistence context is always automatically synchronized with the current transaction or whether the persistence context must be explicitly joined to the current ... SYNCHRONIZED Persistence context is automatically synchronized with the current transaction Since: JPA | |
javax.persistence.PersistenceContextType.PersistenceContextType Specifies whether a transaction-scoped or extended persistence context is to be used in PersistenceContext . If not specified, a transaction-scoped persistence context is used. Since: JPA 1.0 Enum Constants EXTENDED Extended persistence context Since: JPA 1.0 TRANSACTION | |
objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active' with extended Persistence Context ? [EDIT: 2006-09-29 New improved version of test mini web app with test ... () and has an entity manager with an extended persistence context . The basic idea (which used ... .java:51) The @Stateless builder with the extended persistence context entity manager is: @Stateful | |
JPA Criteria API Queries the context of string based JPQL queries. Criteria Query Expressions JPA query clauses are composed ... to the criteria query sections in pages that describe expressions in general, including in the context of string based JPQL queries. | |
javax.persistence.StoredProcedureQuery: TransactionRequiredException - if there is no transaction or the persistence context has not ... - if a lock mode other than NONE has been set and there is no transaction or the persistence context ... - if the query is found not to be a Java Persistence query language SELECT query or a Criteria API | |
javax.persistence.PersistenceContext.type JPA Annotation Attribute in javax. persistence .PersistenceContext PersistenceContextType type default PersistenceContextType.TRANSACTION (Optional) Specifies whether a transaction-scoped persistence context or an extended persistence context is to be used. Since: JPA 1.0 | |
javax.persistence.PersistenceContext.synchronization JPA Annotation Attribute in javax. persistence .PersistenceContext SynchronizationType synchronization default SynchronizationType.SYNCHRONIZED (Optional) Specifies whether the persistence context is always automatically synchronized with the current transaction or whether the persistence context | |
javax.persistence.EntityExistsException context has been joined to it, will be marked for rollback. See Also: javax. persistence .EntityManager ... .Exception ∟ java.lang.RuntimeException ∟ javax. persistence .PersistenceException ∟ javax. persistence .EntityExistsException Thrown by the persistence provider when EntityManager | |
javax.persistence.NamedQuery must be executed in a transaction and the persistence context joined to the transaction. Since: JPA 2.0 ... , named query in the Java Persistence query language. Query names are scoped to the persistence unit ... of the definition of a named query in the Java Persistence query language: @NamedQuery( name | |
javax.persistence.EntityNotFoundException. The current transaction, if one is active and the persistence context has been joined ... .lang.Exception ∟ java.lang.RuntimeException ∟ javax. persistence .PersistenceException ∟ javax. persistence .EntityNotFoundException Thrown by the persistence provider when an entity | |
javax.persistence.PersistenceUnit Expresses a dependency on an EntityManagerFactory and its associated persistence unit. Since: JPA 1.0 ... factory is to be accessed in the environment referencing context ; not needed when dependency injection is used. Since: JPA 1.0 String unitName default "" (Optional) The name of the persistence unit as | |
javax.persistence.MapKeyJoinColumn key constraint when table generation is in effect. If this element is not specified, the persistence ... (Optional) Whether the column is included in SQL INSERT statements generated by the persistence ... key. The table in which it is found depends upon the context . If the join is for a map key | |
javax.persistence.PersistenceException , and QueryTimeoutException will cause the current transaction, if one is active and the persistence context ... .Exception ∟ java.lang.RuntimeException ∟ javax. persistence .PersistenceException Thrown by the persistence provider when a problem occurs. All instances of PersistenceException | |
javax.persistence.JoinColumn, the persistence provider's default foreign key strategy will apply. Since: JPA 2.1 boolean insertable default true (Optional) Whether the column is included in SQL INSERT statements generated by the persistence ... . The table in which it is found depends upon the context . If the join is for a OneToOne or ManyToOne | |
javax.persistence.NamedQuery.lockMode JPA Annotation Attribute in javax. persistence .NamedQuery LockModeType lockMode default NONE (Optional) The lock mode type to use in query execution. If a lockMode other than LockModeType.NONE is specified, the query must be executed in a transaction and the persistence context joined to the transaction. Since: JPA 2.0 | |
javax.persistence.SynchronizationType.SYNCHRONIZED JPA Enum Constant in javax. persistence .SynchronizationType SYNCHRONIZED Persistence context is automatically synchronized with the current transaction Since: JPA 2.1 | |
javax.persistence.SynchronizationType.UNSYNCHRONIZED JPA Enum Constant in javax. persistence .SynchronizationType UNSYNCHRONIZED Persistence context must be explicitly joined to the current transaction Since: JPA 2.1 | |
javax.persistence.MapKeyColumn statements generated by the persistence provider. Since: JPA 2.0 int length default 255 (Optional) The column ... "" (Optional) The name of the map key column. The table in which it is found depends upon the context ... updatable default true (Optional) Whether the column is included in SQL UPDATE statements generated by the persistence provider. Since: JPA 2.0 | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter ... the [Provider and Database] step just click Finish to generate a default persistence .xml file with a default persistence unit (that will be configured later). If the Finish button is disabled | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking ... entity class. In the [Provider and Database] step click Finish to generate a default persistence .xml file with a default persistence unit (that will be configured later). If the Finish button is disabled | |
Step 2: Entity Class and Persistence Unit.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private | |
Step 2: Entity Class and Persistence Unit java.io.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id | |
[ODB1] Chapter 9 - ObjectDB Explorer is open. The "Class" window shows all the persistent classes in the database. You can select a class from the list of classes at the top of this window and see all its persistent fields ... represents a persistent field, and the content of a cell is the value of a single field in a single | |
[ODB1] Chapter 3 - Persistent Classes Persistent Classes are user defined classes whose instances can be stored in a database using JDO. Instances of these classes that represent objects in the database are called persistent objects or persistent instances . Objects that do not represent anything in the database (including instances | |
[ODB1] Chapter 6 - Persistent Objects Objects Persistent In JDO applications, every object in memory is either a persistent object, i.e ... object, regardless of its type. Instances of persistent classes can become persistent later, as ... transient object. Then it becomes persistent by an explicit call to the makePersistent( ... ) method | |
Step 2: Define a JPA Entity Class code: package guest; import java.io.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id | |
Step 2: Define a JPA Entity Class.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private | |
[ODB1] Chapter 5 - JDO Connections, the call to getClass() should be replaced by some other expression (e.g. MyClass.class ) in a static context (i ... on any PersistenceManager instance, in any context , to return its associate Transaction object ... is obtained by the PersistenceManager . On every attempt to modify a persistent object, within an active | |
[ODB1] Chapter 8 - ObjectDB Server with the stop and restart commands. However, in this context , you must use the same port number ... the Windows Tray. Right click the icon and use the context popup menu to manage the server (stop | |
[ODB1] Chapter 4 - JDO Metadata more persistent classes. All the persistent classes, and only them, have to be declared in a metadata ... at runtime, ObjectDB determines whether or not each class is persistent . It searches for JDO metadata ... is found, the class is persistent , and if not, the class is transient. Metadata for class a.b.X ( a.b |