About Data Source

forum_thread

Multi-thread access to single EM's entities

If my entity classes have synchronized getters and setters, is it reliable for multiple threads to access a single EM's managed entities, as long as only the thread that created the EM interacts directly with it?  I've tested this and it seems to work... but I know better than to depend on the observable behavior of multithreaded code. When I run this example and examine the database, the entity contains the value set by the second thread, as expected.   ... application: a client that parses and stores data from the ancient text-based game TradeWars 2002. ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

UserException: Invalid configuration in 'internal' - Check permissions

Hi all,   I have a master/slave code so that each slave reads a subset of points of the same database. ObjectDB entities do not allow serialization and so I have sent, to each slave, the file path. With such information I have tried to create an entityManager, in each slave, as follows: EntityManagerFatory entityManagerFactory = Persistence.createEntityManagerFactory(filePath); EntityManager = entityManagerFactory.createEntityManager(); However I get the following error ... at com.jscilib.jppf.math.data.stats.bin.ComputePCA.main ( ComputePCA. java :129 ) at ... Persistence. java :54 ) at com.jscilib.jppf.data.db.odb.ObjectDBBulkDataset. <init> ( ObjectDBBulkDataset. ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) ... 15:38 I created a data model to test many-to-many relationship with a link table as following ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
api-jdo

getSource()

The source object of the Event.(Method of javax.jdo.listener.InstanceLifecycleEvent)

 
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: ... same as the first; it only calls the retrieve method, no data is added. The package name is 'com.objectdb.test2'. The ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Need help to analyse very high memory usage by objectdb (PRU, SEV, VAL[])

Hello, we have a useCase in which we consume too much memory and run into a "GC overhead limit exceeded" exception. Nearly 90% of the memory are taken by com.objectdb.o.PRU (49%) com.objectdb.o.SEV (29%) and com.objectdb.oVAL [] (9%). When debugging, we did not get the reason for the high memory consumption yet. Can you give us any any hints, which leads to the generation of these objects? We assume that we (erroneously) refer to too many entities in the memory. ... large insert / update transactions, with large amount of data pending to be written to the database on commit.   ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

@ElementCollection of type enum

Hi! I have in an entity called User with the following field: @ElementCollection(fetch = FetchType.EAGER) private Set<UserPermission> permissions; package x.x.x.x public enum UserPermission { BASIC, COACH, ADMIN } Use case: there are users which contain the first 2 permissions (BASIC and COACH, so the first 2 entries). ... for example, BASIC231 between BASIC and COACH values, data in ObjectDB will be altered in a way that the users that previously had ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

ObjectDB CRUD Examples

Any place where I can find Netbeans examples for the basic create, read, update, delete methods using the EntityManager? i.e. public void create(Foo foo) {} public Foo read(Integer id) {} public List<Foo> read() {} public void update(Foo foo) {} public void delete(Foo foo) {} ... a query. After closing the EntityManager , only data that was eagerly fetched will be available. ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Calendar in Criteria Querys

Hi, i am having troubles creating criteria querys for Calendar objects. As far as I can see CriteriaBuilder has no methods for checking if one Calendar is bevor or after another. Javas Calendar Class got such methods, but i dont know how to use those in my query. ... java.sql.Timestamp - representing both data and time. If possible, you should use these types instead of ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
issue

NoResultException: No matching results for a unique query

I am very often getting a "com.objectdb.o._NoResultException: No matching results for a unique query" when modifying my already persisted entities within a transaction. I cannot replicate it however because it happens infrequently. The weird thing is that the entity nevertheless gets comitted perfectly right and all data is correctly written so I have no clue what's going on!?? Here's the stacktrace (copy+paste from debug output): ... entity nevertheless gets comitted perfectly right and all data is correctly written so I have no clue what's going on!?? ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...