About Persistence Context

forum_thread

Dependency from enhanced classes to the objectDB library

Hello, we have a Question to the dependency from enhanced classes (required for license) to the objectDB library.... domains. Each domain is split into business layer and persistence layer (others are not relevant here). Per domain and per layer, we ... the entity classes, so it will be found using the thread context class loader (which is also used to load the classes). To ...

 
issue

stress test -> com.objectdb.o.InternalException: null

I am running a stress test with 2 users, each making a request to the JSON API (which uses as storage ObjectDB) each 50 milliseconds. An API call might have between 1-4 db calls, but they are relatively light, and the db has just a few MB at the moment. After a few minutes I got this exception. If I decrease the load, it doesn't happen. If I increase it, I get it very often. Any solution/fix? A sample project is very hard, if not impossible, to create, because it uses all the system. ... ) for servlet [ rest_29133222 ] in context with path [ ] threw exception [ Error processing ... : 536 ) at org. apache . openejb . persistence . JtaEntityManager . find ( JtaEntityManager. java ...

 
manual

JPA Lifecycle Events

Explains how to use JPA lifecycle events (client side triggers) with callback methods and listener classes.... with empty implementations: @Entity javax.persistence.Entity JPA annotation Specifies that the class is an ... Interface used to interact with the persistence context. See JavaDoc Reference Page... or Query ...

 
forum_thread

Internal exception when updating date filed (TemporalType.DATE)

Hello! ObjectDB version 2.5.3_02. I get internal exception when commiting update Date field (javax.persistence.TemporalType.DATE). ... internal exception when commiting update Date field (javax.persistence.TemporalType.DATE). [ObjectDB 2.5.3_02] javax.persistence.RollbackException Failed to commit transaction: (error 613) at ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Many clients access same database

Hi, I have a program to manage clients of my tennis club. But we have several different computer programs open that access the database. How can I implement this topology so that there is one Persistence context for all the client programs on the different computers. For example: When I change the name of a client on 1 computer, that change has to be discovered by the other client programs as well. How is this possible? ... How can I implement this topology so that there is one Persistence context for all the client programs on the different computers. For ...

 
forum_thread

EntityManager refresh problem

Dear Support, in the following code you can see a EntityManager.refresh() example. The example throws an assertion error with the following statement: Assert.assertEquals("entity 1", simpleEntity1.getFieldA()); In my opinion there should be no assertion error. I have tested the example with several objectdb versions (2.5.4, 2.5.6_06 and 2.5.7). Do you have an explanation for the assertion error? ... java. io . File ;   import javax. persistence . EntityManager ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Left join fetch behaviour doesn't retrieve children?

Hello support, I'm a little bit confused about a left join fetch behaviour. In this test case, i try to fetch my 3 children using a left join fetch. But my collection is null after closing the em. It was expected to be fetched before closing the em, no ? In fact, that is the objective of the fetch purpose (i guess ?). ... java. util . Set ;   import javax. persistence . CascadeType ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

EntityManager JPA or JDO impl and different behavior

Hi, I have an issue with the EntityManager. My persistance XML looks like: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> ... = "1.0" encoding = "UTF-8" ?> <persistence version = "2.0" xmlns = "http://java.sun.com/xml/ns/persistence" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Weird behaviour with enhanced classes and embedded entities

Hi, I've found some weird behaviour in my project (www.tinymediamanager.org): Sometimes some entries of my ArrayLists with embedded entities are missing. I've hunted the problem down to an enhanced/proxied list in my entity which contains embedded entities and some .add(obj) are simply failing. Here is a small sscce which reproduces the issue: ... concurrent . TimeUnit ;   import javax. persistence . CascadeType ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

Removing of an entity removes also another entity type

Hello, we have following case: ToleranceDefinition and ResolverMapping are entities and have not any relations each other. Before start transaction the ToleranceDefinition entities exist already in the database. ... may not be aware that a cached entity object in its persistence context has been modified by an UPDATE query. Therefore, it is a good practice ...