OpenJPA maven plugin configuration

2011-06-29 Thread Jim Talbut
Hi, Whenever the openjpa-maven-plugin (v1.2 or v1.1) runs it initialises logback (which is a dependency of my project, it's not explicitly mentioned by the plugin configuration), which finds the logback.xml file, but not the logback-test.xml file. The logback.xml file has configuration that

Re: Audit log with OpenJPA

2011-07-12 Thread Jim Talbut
On 07/07/2011 12:05, Bengt Rodehav wrote: I'm using OpenJPA for persistence and would like to audit log any changes made to my entities. I serialize the objects to JSON (with Gson) and store them in a separate table in the database. Since the audit log needs to have the correct id's, the audit

Re: Audit log with OpenJPA

2011-07-12 Thread Jim Talbut
On 12/07/2011 09:33, Bengt Rodehav wrote: Why do you think that your approach is not supported by JPA? From other posts on this list I've seen that you are allowed to add/enrich your entity in the PreUpdate/PreCreate callbacks. That's all you are doing right. Then JPA persists your enriched

Re: Audit log with OpenJPA

2011-07-13 Thread Jim Talbut
On 13/07/2011 21:14, Pinaki Poddar wrote: Yes. Any audit facility needs to have a snapshot of the entity when it entered a persistence context, so at @PreUpdate or at any other time points, it can figure out what has essentially been changed about that entity in a transaction. Now either one can

OpenJPA Audit

2012-06-22 Thread Jim Talbut
Just want to say thanks. Some time ago I was involved in a discussion here about doing audit using lifecycle listeners. There are a whole bunch of problems with this approach and, although my implementation worked, it was not specified that it would work. Yesterday I needed to add an audit

Re: OpenJPA Audit

2012-06-23 Thread Jim Talbut
On 23/06/2012 10:17, Bengt Rodehav wrote: What is your runtime platform? Also, does anyone know whether any progress is made regarding class loading within OSGI? Many people prefer OpenJPA over Eclipse and Hibernate because it works better in OSGi than those projects. However, the OSGi support

Audit(?) related memory leak/hog

2012-08-06 Thread Jim Talbut
Hi, I have an OSGi app that uses OpenJPA 2.2.0 and makes use of the audit functionality. Some of the entities that get recorded contain BLOB fields (documents). I'm getting occasional massive uses of memory (~900MB on a machine that typically sits at ~150MB) closely followed by hangs and

Re: Audit(?) related memory leak/hog

2012-08-08 Thread Jim Talbut
problems. Can you post a heapdump to a FTP somewhere for analysis? Thanks, Rick On Mon, Aug 6, 2012 at 2:56 PM, Jim Talbut jtal...@spudsoft.co.uk wrote: Hi, I have an OSGi app that uses OpenJPA 2.2.0 and makes use of the audit functionality. Some of the entities that get recorded contain BLOB fields

Re: audit?

2012-09-12 Thread Jim Talbut
On 12/09/2012 02:37, Pinaki Poddar wrote: OpenJPA audit allows the user to choose how the audit records are treated. It does not make any decision to store the audited record to be stored in the same database. But that is entirely possible because the audit record carries the states of the

Re: audit?

2012-09-19 Thread Jim Talbut
On 12/09/2012 17:30, Pinaki Poddar wrote: It looks like Pinaki fixed this problem in trunk yesterday. Possibly -- added a rather weak test to verify memory growth. The original reporter should verify. I'll get on to this as soon as I can. Unfortunately I've just had a load of high priority

How to add children to disconnected entity?

2012-09-25 Thread Jim Talbut
Hi, I have a pair of entities: Assessment AssessmentResults, with a One-to-Many relationship (an assessment can have many results). The Assessment is modified whilst disconnected (outside of a transaction). Is there any way to have AssessmentResults added whilst the Assessment is

Re: How to add children to disconnected entity?

2012-09-26 Thread Jim Talbut
On 26/09/2012 10:19, Henno Vermeulen wrote: Hi, I verified this situation by making an extra unit test in our system. We always work with detached entities as well. The test works fine for me. One explanation for this behavior is that the @OneToMany field does not use fetch = FetchType.EAGER

Re: How to add children to disconnected entity?

2012-09-26 Thread Jim Talbut
On 26/09/2012 10:57, Jim Talbut wrote: On 26/09/2012 10:19, Henno Vermeulen wrote: Hi, I verified this situation by making an extra unit test in our system. We always work with detached entities as well. The test works fine for me. One explanation for this behavior is that the @OneToMany

Re: How to add children to disconnected entity?

2012-09-27 Thread Jim Talbut
to use cascade merge only on one relation, i.e. from it's owner to the entity. This will prevent the bugs that you can silently get a duplicate or merge an older version. -Oorspronkelijk bericht- Van: Jim Talbut [mailto:jtal...@spudsoft.co.uk] Verzonden: woensdag 26 september 2012 23:05 Aan

Callback before items are persisted

2013-12-06 Thread Jim Talbut
Hi, I want to modify a couple of persisted columns in an entity based on data in other columns (basically caching some stuff from related entities). I was under the impression that a lifecycle listener on PrePersist would make this easy - but that is called from within the call to persist,

Re: Callback before items are persisted

2013-12-06 Thread Jim Talbut
Hi Tobias, The problem is that my entity doesn't have values set before persist is called, the values are all set after persist. But there isn't a callback that is called before the entity is actually written to the database (when the transaction ends) which seems like a gap. I would have

Left fetch join = distinct

2014-04-29 Thread Jim Talbut
Hi, This is from the definition of a named query: query = SELECT o from AssessmentImpl o + left join fetch o.assessmentResults + where + o.assessmentKey.dateCreated :outstandingLimit

Service returns object, but nothing is received unless toString is called!

2015-07-04 Thread Jim Talbut
Hi, I have this class: @Transactional @Component public class ProjectTransactionsImpl implements ProjectTransactions { @SuppressWarnings(constantname) private static final Logger logger = LoggerFactory.getLogger(ProjectTransactionsImpl.class); @Autowired private