[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] id table not using specified non transactional connection
|
Any way to do this without having to write specific case? Maybe some detailed logging from eclipselink?
I would test it:
start user JTA transaction;
obtain nonJta connection;
set its autoCommit to false;
write something
commit // if it's JTA-managed connection this probably will throw
exception
rollback User jta transaction
see if the written object is found in the db
On 3/18/2017 2:03 PM, Yannick Majoros
wrote:
I have this configuration in
Payara for this connection:
<jdbc-connection-pool
non-transactional-connections="true"
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
name="gestempsNonJtaPool"
res-type="javax.sql.DataSource">
<property name="Password"
value="[edited]"></property>
<property name="ServerName"
value="db"></property>
<property
name="DatabaseName" value="gestemps"></property>
<property name="User"
value="gestemps"></property>
</jdbc-connection-pool>
<jdbc-resource
pool-name="gestempsNonJtaPool"
jndi-name="jdbc/gestempsNonJta"></jdbc-resource>
Does it look good to you, or should I
check anything else?
I don't believe that you need
<property name="eclipselink.connection-pool.sequence" value="true"/>
but
if I remember correctly it should not make any difference.
It's imperative that
jdbc/gestempsNonJta
is really a non-jta
managed data source.
Thanks,
Andrei
On 3/17/2017 3:19 AM, Yannick Majoros wrote:
Hello,
I tried to configure a
non-transactional connection pool for id table on
mysql.
While I checked the docs, I
think they are sometimes confusing: I'm not always
sure on which properties to specify. I've seen
examples in camel case, others with hyphens; some
with sequence-specific connection pools and some
with a simple boolean which in my understanding would enable my table-generated
ids to use the non-jta connection.
So, here are my current
settings:
But
I still get the dreaded "Lock wait
timeout exceeded".
So, here are my questions:
1) Is this setup right to get a
non-transactional connection for my id's (JPA,
@TableGenerator, mysql)?
2) Did I make any mistake in the
property names? Should I use other properties?
Here
is the error (probably when there is another
long-running transactions):
Exception
[EclipseLink-4002] (Eclipse Persistence Services
- 2.6.2.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Error Code: 1205
Call: UPDATE seq SET VALUE = VALUE + ? WHERE NAME = ?
bind => [50, ID]
Query: DataModifyQuery(name="ID" sql="UPDATE seq SET VALUE = VALUE + ? WHERE NAME = ?")
Thanks,
Yannick Majoros
--
Yannick Majoros
rue Haute 19
5140 Ligny
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
--
Yannick Majoros
rue Haute 19
5140 Ligny
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
--
Yannick Majoros
rue Haute 19
5140 Ligny