Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » NPE on concurrent entity manager access
NPE on concurrent entity manager access [message #385457] Wed, 11 February 2009 15:48 Go to next message
Johannes Stamminger is currently offline Johannes StammingerFriend
Messages: 17
Registered: July 2009
Junior Member
Hi,

I get a NPE

org.eclipse.persistence.internal.databaseaccess.Parameterize dSQLBatchWritingMechanism.executeBatchedStatements(Parameter izedSQLBatchWritingMechanism.java:147)

with accessing a single entity manager concurrently (update + select or
select + select). Obviously the "this.previousCall" in that line is null
(also seen in debugger). This is no "stable" behavior meaning that
sometimes no such exception occurs - but something else then goes wrong.

So my question: is it allowed to access the entity manager concurrently in
general? Use case here is that I wait for a entity being updated in the
database and both tasks (=threads), the one updating and the one reading
by way of a query use the same entity manager.

Best regards,
JOhannes
Re: NPE on concurrent entity manager access [message #385458 is a reply to message #385457] Wed, 11 February 2009 15:55 Go to previous message
Johannes Stamminger is currently offline Johannes StammingerFriend
Messages: 17
Registered: July 2009
Junior Member
I just rememberred I already got a note on this, found it again here:
http://www.eclipse.org/newsportal/article.php?id=581&gro up=eclipse.rt.eclipselink#581

So the question seems answered already - unfortnately for me with the
wrong answer :-(.

Though I would keep interested to know where this is defined/documented as
I did not find this in the api doc so far.

Best regards,
JOhannes
Previous Topic:Problems creating an XML Project from an XML Schema
Next Topic:SQL statement that createNamedQuery(...) method sent to the database?
Goto Forum:
  


Current Time: Mon Dec 22 23:39:04 GMT 2014

Powered by FUDForum. Page generated in 0.01810 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software