About point

manual

Defining a JPA Entity Class

Shows how to define a JPA entity class in order to store objects in the database. To be able to store Point objects in the database using JPA we need to define an entity class ... are marked as having the ability to be serialized. The Point Entity Class The following Point class, which represents points in the plane, is marked as an entity ...

 
issue

Threaded Test - Failed to commit transaction: Unexpected internal exception

Hi I'm trying to create a simple producer-consumer queue scenario but am getting the followin exception: ... i<_num ; i ++ ) { Point p = new Point ( i, i + 1 ) ; put ( p ...

 
forum_thread

Using the wrong class to access a database

Hello, just starting to test ObjectDB and ran into a problem. I've created a small program to test the Point database described in the Getting Started section: ... I've created a small program to test the Point database described in the Getting Started section: package ... 1" ) ; System. out . println ( "Point.class: " + Point. class ) ;   EntityManagerFactory emf = ...

 
manual

CRUD Database Operations with JPA

Shows how to use Java/JPA to store, retrieve, update & delete.... Objects The following code fragment stores 1,000 Point objects in the database: em. getTransaction ... ; i < 1000 ; i ++ ) { Point p = new Point ( i, i ) ; em. persist ...

 
forum_thread

EntityManagerFactory Fails To Swtich Over To Slave When Master Is Unavailable

I have a simple task to validate the sample code will switch over to the slave database when the master is unavailable. I simulate the master unavailable by stopping the master server; which generates the following exception below. What am I doing wrong? It appears the connection manager fails to try the second URL in the list: objectdb://10.9.2.15:9998//10.9.2.15:9999/test.odb;user=admin;password=password Thank you in advance. ... ; i < 1000 ; i ++ ) { Point p = new Point ( i, i ) ; em. persist ( p ) ; ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in NetBeans.... (that was generated with the project) in order to store Point objects in the database and then retrieve them from the database. ... ( ) ;   // Store 1000 Point objects in the database: em. getTransaction ( ) ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in Eclipse.... a main class to the project with code that will store Point objects in the database and then retrieve them from the database: ... ( ) ;   // Store 1000 Point objects in the database: em. getTransaction ( ) ...

 
forum_thread

How to do multithreading with embedded ObjectDB

Hi, I've tried to implement a counter with ObjectDB, but the following code doesn't work as expected: ... emf. createEntityManager ( ) ; Point p = new Point ( 0 , 0 ) ; em. getTransaction ( ...

 
forum_thread

Cascading persistence through an inverse field

Hi! I was playing with cascading persistence with @ManyToMany and inverse @ManyToMany fields, and I noticed that I can only get cascading persistence in one direction. If the "owner" of the relationship is persistent, then objects that are added to the relationship are automatically made persistent. However, I can not get this to work the other way around. I would also like the relationship owner to be persisted if a persisted object is added on the owner side. I have included a minimal example: ... ( I make the assumption points can belong to multiple point collections). I removed transaction-related code to keep it simple. ... , MERGE } ) private Set<Point> points = new HashSet<> ( ) ;   ...

 
forum_thread

Annotations not supported in -source1.3 (use -source 5 or higher ..)

objectdb-2.2.5_03 Netbeans IDE6.9.1 java version "1.6.0_24": as user running Netbeans java version "1.5.0_28": as su running maven mvn Maven version: 2.0.8 Firstly, I followed the instructions to build the points example from Maven, but on opening it in Netbeans 6.9.1 I got an error in Points.java and other files: Annotations not supported in -source1.3 (use -source 5 or higher ..) Generics not supported in -source1.3 (use -source 5 or higher ..) #1 2011-05-31 00:17 objectdb-2.2.5_03 Netbeans IDE6.9.1 java version "1.6.0_24": as user running Netbeans jav ...