ObjectDB Database 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

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 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

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

persistence.xml classes not respected by ObjectDB

Hi! I have the following persistence . xml . The problem is that ObjectDB loads all the classes in P1 (+ their embeddable classes). P2 is created properly, but P1 gets all entity classes (from P2 also). How can this be avoided, so that both P1 and P2 get just the classes that were specified to each

setting activation code in persistence.xml or env file or system properties

Wondering if it's possible to add the activation code either: - in persistence . xml - or in a .env file - or system properties dmoshal David Moshal These options are not supported. However, you can embed the configuration file with the activation code as a resource, e.g. by replacing the objectdb

Storing JPA Entity Objects

the ObjectDB configuration or in a JPA portable way, by specifying the cascade- persist XML element ... /orm. xml , or in another location that is specified explicitly in the persistence unit definition (in persistence . xml ). Batch Store Storing a large number of entity objects requires special

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

explicitly in the persistence unit definition (in persistence . xml ). Default listeners are applied by default ... is invoked: @PrePersist - before a new entity is persisted (added to the EntityManager ... 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

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

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

persistent classes and XML metadata. Setting this field is not mandatory because you can browse and edit ... 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

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

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 =  

InterfaceRef jakarta.persistence.spi.PersistenceUnitInfo

. This value corresponds to the exclude-unlisted-classes element in the persistence . xml file. Return ... element in the persistence . xml file. A URL will either be a file: URL referring to a jar file or referring ... the persistence provider. The data source corresponds to the jta-data-source element in the persistence . xml

ClassRef jakarta.persistence.PersistenceConfiguration

elements of the persistence . xml file. This API may not be used to configure a container-managed ... JPA Class PersistenceConfiguration java.lang.Object ∟  jakarta. persistence .PersistenceConfiguration Represents a configuration of a persistence unit, allowing programmatic creation

InterfaceRef jakarta.persistence.EntityManagerFactory

, then they must belong to the same persistence unit. A persistence unit may be defined by a persistence . xml file ... unit is defined in persistence . xml , an entity manager factory may be created by calling Persistence ... with the persistence unit, and to create new instances of EntityManager . A persistence unit defines

InterfaceRef jakarta.persistence.spi.PersistenceProvider

may be used to override the values of the corresponding elements in the {@code persistence . xml } file or specify values for properties not specified in the {@code persistence . xml } (and may be null ... JPA Interface PersistenceProvider Interface implemented by the persistence provider. It is invoked

AnnotationRef jakarta.persistence.Converter

, the persistence provider must automatically apply the converter to every mapped attribute of the specified target type belonging to any entity in the persistence unit, except for attributes for which conversion is overridden by means of the Convert annotation (or XML equivalent). The Convert

AnnotationRef jakarta.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

InterfaceRef jakarta.persistence.SchemaManager

belonging to a certain persistence unit. Properties are inherited from the EntityManagerFactory , that is, they may be specified via persistence . xml or (String, Map) . See Also: EntityManagerFactory ... objects mapped by entities belonging to the persistence unit. If a DDL operation fails, the behavior

AnnotationRef jakarta.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

AnnotationAttrRef jakarta.persistence.PersistenceUnit.unitName

JPA Annotation Attribute in jakarta. 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

EnumRef jakarta.persistence.SharedCacheMode

JPA Enum SharedCacheMode java.lang.Object ∟  java.lang.Enum ∟  jakarta. 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

AnnotationAttrRef jakarta.persistence.PersistenceContext.unitName

JPA Annotation Attribute in jakarta. 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

AnnotationRef jakarta.persistence.MappedSuperclass

it. A mapped superclass is not a persistent type, and is not mapped to a database table. The persistent ... annotations or corresponding XML elements. Example: Concrete class as a mapped superclass {@snippet

AnnotationRef jakarta.persistence.Cacheable

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

AnnotationRef jakarta.persistence.Convert

. It is not necessary to use the Basic annotation (or corresponding XML element) to specify the converted

InterfaceRef jakarta.persistence.EntityGraph

the name of a named EntityGraph (an entity graph defined by means of the NamedEntityGraph annotation, XML

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

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

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      

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

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