About transaction

api-jdo

setOptimistic(optimistic)

Optimistic transactions do not hold data store locks until commit time.(Method of javax.jdo.Transaction)

 
api-jdo

getDataStoreConnection()

If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction.(Method of javax.jdo.PersistenceManager)

 
manual

DELETE Queries in JPA/JPQL

Explains how to apply server side bulk delete using a JPA/JPQL query.... objects from the EntityManager  within an active transaction, either explicitly by calling the  remove method or ... queries can only be executed within an active transaction and the changes are visible to other users (which use other ... exception Thrown by the persistence provider when a transaction is required but is not active. See JavaDoc Reference Page... ...

 
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): ... when modifying my already persisted entities within a transaction. I cannot replicate it however because it happens infrequently. The ... happens when a query is run after modifying entities in a transaction. By default, modifications of entities during transaction are ...

 
forum_thread

UserException - Object User#2 belongs to another EntityManager

Hi! Scenario's steps: 1. User goes to his profile, a JSF page. 2. @RequestScoped CDI bean UserDataB loads the current user of the session at each request, by using @Stateless bean UserC#findUserById(Long id) 3. JSF page's @RequestScoped CDI bean AnotherB loads trades of that user, by using @Stateless bean TradesC#findTradeByClient(User u). ### UserC and TradesC have their own @PersistenceContext EntityManager with the same unitName. ... I guess this should be a problem if, in the same transaction, an entity is passed into more EntityManagers, but here are 2 ...

 
issue

InternalException

I'm getting a new InternalException (see below). No repeatable example as yet but will work on that and let you know as soon as we have one. If there's anything in the exception which could help us narrow down the problem please let me know. ... javax.persistence.RollbackException Failed to commit transaction: (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:279) at ... the following actions in a loop: Open a new transaction Load an object from the database Update ...

 
manual

UPDATE SET Queries in JPA/JPQL

Explains how to apply server side bulk update using a JPA/JPQL query.... the relevant entity object fields within an active transaction. Applying changes to the database by calling the ... queries can only be executed within an active transaction and the changes are visible to other users (which use other ... exception Thrown by the persistence provider when a transaction is required but is not active. See JavaDoc Reference Page... ...

 
forum_thread

Failed to write the value of field using reflection (error 363) on LAZY fetch

Hi There I am using ObjectDB 2.6.3. I get the following Exception when I try to read my entities with a query where I have set to use LAZY initalization. It fails when it tries to set a 1:n member (e.g. a Modell has several Artikels) . When I remove the LAZY hint on the query execution it works. Any hints why this can happen? The Mapping of class Modell and its member: ... that when my query-method "getEntities()" ends the transaction get closed and no longer a "connection" to load the detaild objects can be made? If so how can I keep the transaction open when I am using a spring context ...

 
forum_thread

Problem on JPA Merge Entity.

Hello, I have a problem with the EntityManager.merge() function. I set a property value of an entity (statement) with an other entity (newSingleConstraint). newSingleValue is already persisted. I do this myself (no use of cascade because sometimes the newSingleValue is already in database).   The statement update don't throw exception. And when i try to reload statement the value i have set before is a null value. I check with the Explorer, the statement has a null value on the property and the newSingleValue is present.... problem - is it an ObjectDB merge issue or Spring / JPA transaction management issue? Maybe it is a missing @Transactional ... merge issue. If i make other operation under the same transaction, the other operation works fine. I haven't no Exception ...

 
forum_thread

Possible issue with String fields

Hi I'm brand new to objectdb and I'm trying to create an objectdb from a sample db via jdbc. The code all works and for a few thousand records but when I increase the number of records I get the following " ... javax.persistence.RollbackException Failed to commit transaction: String index out of range: 5 (error 613) at ... When you increase the number of records in a transaction ObjectDB has to use temporary files. Even after a fix, it would be ... file (to improve efficiency), e.g. by dividing a large transaction to smaller transactions, using only enhanced classes, and ...