Internal Website Search

1-50 of 200 results

JPA Persistence Unit

is optional when using ObjectDB, but required by JPA. persistence . xml Persistence units are defined in a persistence . xml file, which has to be located in the META-INF directory in the classpath. One persistence . xml file can include definitions for one or more persistence units. The portable way

How to define Default Entity Listeners without persistence.xml and orm.xml

when my objects are persisted , without using XML , and without defining listeners for each classe ... I am using JPA programaticaly..ie without xml file, and i would like to define Default Entity ... . persistence .provider", "com.objectdb.jpa.Provider"); config.put("javax. persistence .jdbc.url", "objectdb

PersistenceException UserException: Failed to validate persistence.xml

\build\web\WEB-INF\classes\META-INF\ persistence . xml : at com.objectdb.o._PersistenceException.b ... .UserException: Failed to validate xml file C:\!heatboxes-web\build\web\WEB-INF\classes\META-INF\ persistence ... .java:200) ... 88 more I tried with and without this persistence . xml My Persistence Unit com

Externalising persistence.xml properties in Glassfish?

Hi,   I've run into a little bit of a wall with regards to persistence . xml and externalising ... on JNDI lookups). I am using Glassfish. Basically, what I am trying to get at: E.g. persistence . xml ... the persistance . xml and that way you can externalize the persistance unit name and you can easily

Specify location of persistence.xml

Is it possible to tell objectdb explicitly where the persistence . xml is located? The background ... also a persistence . xml I exceed the number of persistable classes, as I have one subproject for each persistence technology and somhow the jpa persistence . xml is read in also resulting in more than 10

Storing JPA Entity Objects

the ObjectDB configuration or in a JPA portable way, by specifying the cascade- persist XML element in the XML ... persistence . xml ). Batch Store Storing a large number of entity objects requires special consideration ... New entity objects can be stored in the database either explicitly by invoking the persist method

a second mapping-file is ignored in persistence.xml by enhancer

Hello Support-Team, we have a problem with the enhancer. In the persistence . xml are two mapping-files: META-INF/orm. xml META-INF/ormreq. xml We start the enhancer and the entities of orm. xml will be enhanced by following output: enhancer: [java] [ObjectDB 2.6.0_02 Enhancer] [java] 3 persistable

Jboss 6 persistence.xml startup error

out feasibility, but I keep getting stuck on setting up the persistence . xml on JBoss 6 AS. Here is my setup ... -data-source element in the persistence . xml that I managed to find. Also, when setting up a jboss ... (anything that is acceptable) and later, if necessary, edit the  persistence . xml file manually, following

JPA Configuration without persistance.xml

on a persistance . xml file being in a particular place. When using Hibernate, I was able ... Philip Clapham When using ObjectDB the persistence . xml is file optional . Just annotate the classes ... / persistence -unit#Managed_ Persistable _Classes And wasn't sure.   I appreciate the quick reply! Phil obiphil Philip Clapham

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

Step 6: Set the Spring XML

of the Spring dispatcher servlet to the web. xml configuration file and to configure that servlet using another xml configuration file. Open the web. xml file (under Web Pages WEB-INF) in a text editor (by right clicking and selecting Edit or by double click and then moving to the XML tab in the editor window

Step 6: Set the Spring XML

of the Spring dispatcher servlet to the  web. xml configuration file and to configure that servlet using another xml configuration file. Open the  web. xml file (under src/main/webapp/WEB-INF) in a text ... of the  web. xml file with the following new content: spring org.springframework.web.servlet

JPA Lifecycle Events

that is specified explicitly in the persistence unit definition (in persistence . xml ). Default ... is invoked: @PrePersist - before a new entity is persisted (added to the EntityManager ... listeners can only be specified in a mapping XML file because there is no equivalent annotation

ObjectDB Object Database Features

database files (the ObjectDB Doctor ). Standard Persistence APIs ObjectDB is the only Object-Oriented Database with built in support for  JPA 2 . Java Persistence API (JPA) Most features of JPA 2 ... using XML and annotations. Zero administration. Documentation Compressive, up to date, searchable

Obtaining a JPA Database Connection

to get an EntityManager instance. JPA requires the definition of a persistence unit in an XML file in order ... persistence unit in an XML file or you can simply provide the file path of the ObjectDB database instead: EntityManagerFactory emf = Persistence . createEntityManagerFactory (   "objectdb

Shared (L2) Entity Cache

in the ObjectDB configuration. Per persistence unit in the persistence . xml  file. Per entity ... 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

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

JPA Named Queries

. But since the scope of named queries is the entire persistence unit, names should be selected ... Country { ... } Note: Named queries can be defined in JPA XML mapping files instead of using the @NamedQuery annotation. ObjectDB supports JPA XML mapping files, including the definition of named

Setting and Tuning of JPA Queries

): For the entire persistence unit - using a persistence . xml  property:      ... supports the following query hints: "javax. persistence .query.timeout" - sets maximum query execution time ... . persistence .lock.timeout" - sets maximum waiting time for pessimistic locks, when pessimistic locking

Locking in JPA

;The hint can be set in several scopes: For the entire persistence unit - using a persistence . xml   ... occurs a LockTimeoutException is thrown immediately. The "javax. persistence .lock.timeout"  hint ... ; properties.put("javax. persistence .lock.timeout", 2000);   EntityManagerFactory emf =  

Step 2: Entity Class and Persistence Unit

the [Provider and Database] step just click Finish to generate a default persistence . xml file ... JPA persistence unit (with default settings) was generated in a persistence . xml file that was added to the project (under Configuration Files). Open the persistence . xml file in a text editor (by right

Step 2: Entity Class and Persistence Unit

entity class. In the [Provider and Database] step click Finish to generate a default persistence . xml ... JPA persistence unit (with default settings) was generated in a persistence . xml file that was added to the project (under Other Sources src/main/resources META-INF). Open the persistence . xml file in

Step 2: Entity Class and Persistence Unit

a META-INF/ persistence . xml file: Open the [New Folder] dialog box, e.g. by right clicking the project ... , select New File , enter persistence . xml as file name and click Finish . Verify that a new persistence . xml file was created as shown below: Finally, use copy and paste to copy the following content

Step 2: Entity Class and Persistence Unit

by setting a  META-INF/ persistence . xml file: Right click the src/main/resources node (in ... Explorer] window, select  New File , enter  persistence . xml as file name and click  Finish . Verify that a new persistence . xml file was created as shown below: Finally, use  copy

[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

javax.persistence.Converter

. If the autoApply element is specified as true , the persistence provider must automatically apply the converter to all mapped attributes of the specified target type for all entities in the persistence unit except for attributes for which conversion is overridden by means of the Convert annotation (or XML

javax.persistence.PersistenceContext

of the persistence unit as defined in the persistence . xml file. If the unitName element is specified ... Expresses a dependency on a container-managed EntityManager and its associated persistence context ... for the container or persistence provider. Vendor specific properties may be included in this set

javax.persistence.PersistenceUnit

is used. Since: JPA 1.0 String unitName default "" (Optional) The name of the persistence unit as defined in the persistence . xml file. If specified, the persistence unit for the entity manager ... Expresses a dependency on an EntityManagerFactory and its associated persistence unit. Since: JPA 1.0

javax.persistence.PersistenceUnit.unitName

JPA Annotation Attribute in javax. persistence .PersistenceUnit String unitName default "" (Optional) The name of the persistence unit as defined in the persistence . xml file. If specified, the persistence unit for the entity manager factory that is accessible in JNDI must have the same name. Since: JPA 1.0

javax.persistence.SharedCacheMode

JPA Enum SharedCacheMode java.lang.Object ∟  java.lang.Enum ∟  javax. persistence .SharedCacheMode Specifies how the provider must use a second-level cache for the persistence unit. Corresponds to the value of the persistence . xml shared-cache-mode element, and returned as the result

javax.persistence.PersistenceContext.unitName

JPA Annotation Attribute in javax. persistence .PersistenceContext String unitName default "" (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. Since: JPA 1.0

javax.persistence.Cacheable

JPA Annotation Cacheable Target: TYPE Implemented Interfaces: Annotation Specifies whether an entity should be cached if caching is enabled when the value of the persistence . xml caching element is ENABLE_SELECTIVE or DISABLE_SELECTIVE . The value of the Cacheable annotation is inherited by

Feature suggestion: auto-detection of entities via persistence.xml extension

many different modules, and frequently evolving/changing. JPA2 persistence . xml does not ... /html/configuration.html Example extension usage in persistence . xml : Q1: Would it be possible ... , which should work unless exclude-unlisted-classes=true  is specified in the persistence . xml

javax.persistence.Convert

JPA Annotation Convert Target: METHOD, FIELD, TYPE Implemented Interfaces: Annotation Specifies the conversion of a Basic field or property. It is not necessary to use the Basic annotation or corresponding XML element to specify the Basic type. The Convert annotation should not be used to specify

javax.persistence.MappedSuperclass

such subclasses by using the AttributeOverride and AssociationOverride annotations or corresponding XML

javax.persistence.EntityGraph

EntityGraph (an entity graph defined by means of the NamedEntityGraph annotation, XML descriptor

Step 1: Create a Maven Web Project

of the new created project is contained in a  pom. xml file that was created in the project main ... files from Maven repositories - open the  pom. xml file and in the pom. xml tab  use  ... .objectdb.com com.objectdb objectdb 2.8.1 org.eclipse. persistence javax. persistence 2.1.0 javax

[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 1: Create a Maven Web Project

the project. The configuration of the new created project is contained in a pom. xml file that was created ... and to automatically download the required JAR files from Maven repositories - open the pom. xml ... . persistence      javax. persistence      2.1.0      

[ODB1] Chapter 4 - JDO Metadata

A JDO metadata file is an XML file with a '.jdo' suffix, containing information about one or 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

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

[ODB1] Chapter 2 - A Quick Tour

. To become persistent , a class has to: be declared in a JDO metadata file in XML format. include ... .getPersistenceManager("hello.odb"); 14 pm.currentTransaction().begin(); 15 16 // Obtain a persistent list: 17 ... } 27 28 // Add a new string to the persistent list: 29 list.add("Hello World " + list.size()); 30 31

Step 2: Define a JPA Entity Class

indicates that a persistence unit definition in an XML file is missing. This is discussed in the ObjectDB ... .Serializable; import javax. persistence .*; @Entity public class Point implements Serializable { private

Step 7: Run the Spring Web App

; persistence . xml file - instead of RESOURCE_LOCAL you will have to specify  JTA . To enable on the fly

Spring MVC JPA Tutorial - NetBeans Project

the transaction type from RESOURCE_LOCAL to JTA in the persistence . xml file. If  a browser is not opened - open it at http://localhost:8080/Guestbook/.

Step 7: Run the Spring Web App

the persistence . xml file - instead of RESOURCE_LOCAL you will have to specify JTA . Since we are using ObjectDB

[ODB1] Chapter 8 - ObjectDB Server

file. ObjectDB is shipped with a default server configuration file named default. xml ... .Server -conf config. xml start If you name your configuration file server. xml , you do not need ... . xml file if the –conf parameter is not used. Also, if you do not use the –conf parameter and do not

javax.jdo.annotations.Persistent

JDO Annotation Persistent Target: ElementType.FIELD, ElementType.METHOD Implemented Interfaces: Annotation Annotation for defining the persistence of a member. This corresponds to the xml elements ... instances in which a member is not persistent but in the non-embedded instances the member is persistent

[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