About persistence

forum_thread

ODB 2 JDO enhancement

If I label a class @PersistenceCapable do I still need to explicitly enhance? Do I need a package.jdo file? This question relates to experiences with ODB 1, in which one has to: a) create a package.jdo, and b) run the Enhancer In my experience, using this with Tomcat, and running the enhancer in the contextListener class, there would often be errors relating to 'class not persistent capable'. So, in ODB 2 is there a way to mark a class as @PersistentCapable, and then let ODB take care of enhancement automatically? #1 2010-11-09 20:03 If I label a class @PersistenceCapable do I still need to explicitly enhance? Do I need a package.jdo fil ...

 
issue

Read only hint for query

Second thing after @FetchGroup I've found is read-only hint for EM. You can specify this hint to EM when executing query meaning that returned data will never be edited or persisted. My understanding of this is that each entity returned from query is in detached state as default state. query.setHint("odb.read-only", "true"); This could be useful in situation when you are sure, that you won't modify those entities - like listing entities, paging, logging, reporting. Feature Request Version: Priority: Normal Status: Active Replies: 0 Type:  Feature Request ...

 
tutorial

Getting Started with JPA

Getting started tutorial for step by step quick start with using Java Persistence API (JPA). This tutorial demonstrates how to create and run a simple JPA application. The demonstrated application uses JPA to store and retrieve simple  Point entity objects, where each  Point has two persistent fields -  x and  y ...

 
forum_thread

best practice for DB recovery

Hi, I'm trying to come up with the best approach for supporting some kind of hot standby for my master DB. ... able to stand up read only replications and add them to my persistence unit but being able to read and not write is a condition that ...

 
api-jpa

close()

Close an application-managed entity manager.(Method of javax.persistence.EntityManager)

 
tutorial

Getting Started with JPA and NetBeans

Getting started tutorial for quick start with using Java Persistence API (JPA) in NetBeans. This is the NetBeans version of the  Quick Start with JPA tutorial. It demonstrates how to create and run a simple JPA application in NetBeans. The demonstrated application uses JPA to store and retrieve simple  Point entity objects, where each  ...

 
api-jdo

Persistent.types

Types of the member.(Annotation Element of javax.jdo.annotations.Persistent)

 
forum_thread

How to configure where the ODB is stored?

Hi, The documentation is lacking in this respect. How do I configure where the ObjectDB database file is stored. I need to know where it is so I can inspect it with 'database explorer'. The docs say to set it to "$objectdb/db/points.odb" and that this defaults to "the installation directory of ObjectDB". BUT... I DIDN'T INSTALL OBJECTDB - my maven build downloaded it and embeded it. So, where is this file stored??? Also, the contents of the DB don't seem to be persisted between AppServer restarts.  #1 2012-05-26 20:45 Hi, The documentation is lacking in this respect. How do I configure where the ObjectDB database file is ...

 
api-jdo

Constants.PMF_ATTRIBUTE_NAME

The name of the persistence manager factory element's "name" attribute.(Static Field of javax.jdo.Constants)

 
api-jdo

getNontransactionalWrite()

If true, allows persistent instances to be written without a transaction active.(Method of javax.jdo.Transaction)