Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] TableGenerator and concurrency

On Fri, May 31, 2013 at 1:15 PM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:
On Fri, May 31, 2013 at 1:05 PM, Andrei Ilitchev <andrei.ilitchev@xxxxxxxxxx> wrote:
By default TableGenerator uses the same connection that's used by insert.

OK, so the same connection, fine, but...the same transaction too?  It doesn't do a new BEGIN TRANSACTION before it does its UPDATE and SELECT work?

I partially withdraw the question :-) as it turns out that Informix does not support nested transactions, so there's no way to, well, nest transactions.  :-)

I don't remember offhand if JDBC dictates that there is one transaction per connection, but that would certainly answer the question.

More troublingly, it means that this reference (http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg04973.html) is simply wrong.  That is, the table generator sequencing activities do not happen in an "autonomous transaction" after all.

So suppose, then, I decide to use this:

<property name="eclipselink.jdbc.sequence-connection-pool" value="true"/>

You then said: "For that to work in JTA case specify nonJtaDatasource (it will be used by sequencing connections)".  I didn't parse that.

Do you mean that in my persistence.xml I should define a <non-jta-data-source> element as well as my (existing) <jta-data-source> element and that somehow EclipseLink will use this?  How does it know?  How does the rest of the application know to use my <jta-data-source> and not the <non-jta-data-source>?  Sorry to be dense here.

Best,
Laird
 
--
http://about.me/lairdnelson

Back to the top