Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] id table not using specified non transactional connection

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:
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="Gestemps-PU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/gestemps</jta-data-source>
<non-jta-data-source>jdbc/gestempsNonJta</non-jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.connection-pool.sequence" value="true"/>
<property name="eclipselink.logging.level" value="INFO" />
<property name="eclipselink.logging.level.sql" value="FINE" />
<property name="eclipselink.logging.parameters" value="true" />
</properties>
</persistence-unit>
</persistence>

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

Back to the top