ObjectDB Database Search

1-50 of 200 results

Step 3: Add a Context Listener Class

closing the EntityManagerFactory . To register a ServletContextListener : Open the [New Listener ... Other... Web Listener and clicking Next . The Java package name should be guest. Enter GuestListener ... All to enable the Finish button. Click Finish to create the new listener class. Now replace the content

Step 3: Add a Context Listener Class

Other... Select Web Web Application Listener and click Next . Enter GuestListener as the class name ... to create the new listener class. Now replace the content of the new source file with the following ... the servlet context - when the web application starts ( contextInitialized ). Retrieves

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

JPA Lifecycle Events

for that operation. Listeners and External Callback Methods External callback methods are defined outside entity classes in a special listener class: public class MyListener { @PrePersist void ... (in a listener class) should always return void and take one argument that specifies the entity

Database Server

start The TPC/IP port on which the server listens for new connections is also specified in ... and use the context menu to manage the server (stop, restart and start), and to exit the server application.

Configure ObjectDB in spring context

is to configure entire ObjectDB (optionally objectdb.conf too) in springs context .xml file so that I'd ... creating persistance.xml file. My previous database.xml (which is included in application- context .xml

Puzzler: Not getting cascades on read from Spring context

. My best guess is that perhaps I have something misconfigured in my persistence.xml or my context . 

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 ... context is to make sure that a database entity object is represented by no more than one in-memory

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

Listeners . How to do ? Here my init code: Properties config = new Properties(); config.put("javax ... Mahmoud Defining default listeners is one of the few things that currently require XML metadata. You cannot define default listeners using annotations (at least in JPA 2.0). support Support

listening on a particular IP aside localhost

to listen in server mode to other connections from another machine where client is installed. I ... 8888 in configuration file but I wasn't able to add listening ip address such as 192.168.50.56 olyjosh Joshua Aroke ObjectDB will listen automatically to all requests to the server on which it is running

Entity listener - event instead of object

Hi, Currently I'm playing with entity listener to implement auditing with difference between ... to obtain an EntityManager from a listener class? You may use the JDO getPersistenceManager method ... and I'm already subscribed. The main problem for me was to get EM inside listener class. Hibernate uses

ObjectDB Object Database Features

callback methods and listener classes . JDO callback methods and listener classes. Primary Keys

Safe to monitor listening port by connect/disconnect?

I wish to monitor our instances of ObjectDB using an automated tool that simply connects and then disconnects from the ObjectDB listening port once per second (frequency is configurable).  Will this cause any issue with the normal operation of ObjectDB? CAPdev CAP Dev It should be fine.  support Support

JDO External Listeners

The following types can be used to implement external listener classes for JDO lifecycle events: Listener objects can be bound to one or more persistence capable classes by invoking the addInstanceLifecycleListner method either at the PersistenceManagerFactory level or the PersistenceManager level.

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

Glassfish 3.1.2.1 and ObjectDB 2.4.3

[http- listener -2] on host/port [0.0.0.0:8181] INFO: REST00001: Listening to REST requests at context ... Successfully INFO: WEB0169: Created HTTP listener [http- listener -1] on host/port [0.0.0.0:8080] INFO: WEB0169: Created HTTP listener [http- listener -2] on host/port [0.0.0.0:8181] INFO: WEB0169: Created HTTP

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

Server Configuration

on which the server is listening for new connections. Usually the default port 6136 should be specified

Database Replication and Clustering

these details to connect to the master server in order to listen to updates. The updates

Database Connection using JPA

 (could be a domain name or an IP address) and listening on the specified port  

JPA Annotations for Classes

JPA defines three types of persistable classes which are set by the following annotations: Chapter 2 of the ObjectDB manual explains these annotations in detail. Entity and mapped super classes can be further configured by annotations that specify cache preferences and lifecycle event listener

JPA Annotations for Callback Methods

The following annotations can mark methods as JPA callback methods: The Lifecycle Events section of the ObjectDB Manual explains how to use all these annotations on callback methods and with listener classes.

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

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

JPA Criteria API Queries

sections in pages that describe query structure in general, including in the context of string based JPQL ... pages that describe expressions in general, including in the context of string based JPQL queries.

Database Explorer

. The functionality of the Edit  Delete command depends on the context . Deleting a reference ... clicking one of its instances in the viewer window (Table or Tree) and using the [Set View] context menu command.

Database is erased after deploying a new web application version

That may be the problem. The servlet context is available in specific listener and servlet methods ... the web-app from Tomcat's manager? Should I set some kind of listener ? Yotam Yotam Boaz You can set a listener for creating and destroying the EntityManagerFactory: https://www.objectdb.com/tutorial

JBoss 7 startup fails

_ObjectDB_web]] (MSC service thread 1-3) Exception sending context destroyed event to listener instance ... -INF dir contains: context .xml persistence.xml com.objectdb.jpa.Provider java:/DefaultDS ... subsystem 13:49:26,858 INFO [org.jboss.as.remoting] (MSC service thread 1-2) Listening on /127.0.0.1:9999

Step 2: Define a JPA Entity Class

a context listener class that will manage a JPA's EntityManagerFactory representing the ObjectDB database.

Step 2: Define a JPA Entity Class

. But nevertheless, this class is a valid ObjectDB entity class, despite the warning. The next step is adding a context listener class that will manage a JPA's EntityManagerFactory representing the ObjectDB database.

DELETE Queries in JPA/JPQL

that a cached entity object in its persistence context has been removed from the database by

JPA Query API

ObjectDB. In the context of the queries above, if there are no Country  instances in the database

Query Parameters in JPA

appearing in the query string. The parameter type is inferred by the context . In the above example

Database Schema Evolution

type to any numeric type. In this context numeric types are: byte , short , char , int , long

UPDATE SET Queries in JPA/JPQL

that a cached entity object in its persistence context has been modified by an UPDATE query

Entity factory

entityManagerFactory = (...); entityManagerFactory.setEntityFactory(myFactory); The JPA listeners ... listener instances inside his application and add this listener via API call to ObjectDB (like ... the EntityManager in a JPA listener method by using JDO:     EntityManager em

Problem to use find method on an abstract Class: AbstractMethodError is thrown

.remoting] (MSC service thread 1-10) JBAS017100: Listening on /127.0.0.1:9999 08:17:22,672 INFO [org.jboss.as.remoting] (MSC service thread 1-11) JBAS017100: Listening on localhost/127.0.0.1:4447 08:17 ... :17:23,452 INFO [org.jboss.web] (MSC service thread 1-14) JBAS018210: Registering web context

InterfaceRef jakarta.persistence.EntityManager

with the persistence context . An instance of EntityManager must be obtained from an EntityManagerFactory ... (entityManager - { // do work in a persistence context ... }); } In the Jakarta EE environment ... with a distinct persistence context . A persistence context is a set of entity instances in which for any

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

InterfaceRef jakarta.persistence.PersistenceUnitUtil

and to an open persistence context . This method may, but is not required to, load the given entity by ... persistence context or cannot be loaded from the database Since: JPA 3.2 Object getIdentifier (Object ... true if the given entity belonging to the persistence unit and to an open persistence context

AnnotationRef jakarta.persistence.EntityListeners

the callback listener classes to be used for an entity or mapped superclass. This annotation may be applied to an entity class or mapped superclass. The specified entity listener classes may have callback ... Annotation Attributes Class [] value default null The callback listener classes Since: JPA 1.0

AnnotationRef jakarta.persistence.PersistenceContext

Expresses a dependency on a container-managed EntityManager and its associated persistence context ... which the entity manager is to be accessed in the environment referencing context ; not needed when dependency ... whether the persistence context is always automatically synchronized with the current transaction or

InterfaceRef jakarta.persistence.Query

- if there is no transaction or the persistence context has not been joined to the transaction QueryTimeoutException ... context has not been joined to the transaction PessimisticLockException - if pessimistic locking ... other than {@code NONE} has been set and there is no transaction or the persistence context has not

InterfaceRef jakarta.persistence.TypedQuery

for a criteria query TransactionRequiredException - if there is no transaction or the persistence context ... and there is no transaction or the persistence context has not been joined to the transaction ... context has not been joined to the transaction PessimisticLockException - if pessimistic locking fails

EnumRef jakarta.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 ... context is automatically synchronized with the current transaction Since: JPA 2.1 UNSYNCHRONIZED

EnumRef jakarta.persistence.PersistenceContextType

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

EnumRef jakarta.persistence.FlushModeType

for the persistence context is AUTO (the default) and a flush mode setting has not been specified ... to the state of all entities in the persistence context which could potentially affect the result ... . On the other hand, if COMMIT is set, the effect of updates made to entities in the persistence context on queries

AnnotationRef jakarta.persistence.PostLoad

JPA Annotation PostLoad Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

AnnotationAttrRef jakarta.persistence.EntityListeners.value

JPA Annotation Attribute in jakarta.persistence.EntityListeners Class [] value default null The callback listener classes Since: JPA 1.0

AnnotationRef jakarta.persistence.ExcludeDefaultListeners

JPA Annotation ExcludeDefaultListeners Target: TYPE Implemented Interfaces: Annotation Specifies that the invocation of default listeners is to be excluded for the entity class (or mapped superclass) and its subclasses. Since: JPA 1.0 The JPA Lifecycle Events article explains how to use