On Nov 26, 2007, at 12:08 PM, Jacek Laskowski wrote:

On Nov 26, 2007 6:31 PM, David Jencks <[EMAIL PROTECTED]> wrote:
My experience is that to get openjpa sequences to work you NEED a non
transactional non-jta-datasource specified in your persistence.xml

Do you happen to know why it is this way? I remember I had to specify
two data sources just to get it to work. Is it a Geronimo "feature"?

I don't know why this is required. I've only investigated on derby. With only one datasource, when openjpa needs a sequence value, it:

- suspends the current jta transaction
- starts a new jta tx
- gets the sequence value
- commits the jta tx
- resumes the original jta tx.

If I remember correctly the problem I saw was that either inside the new jta tx or after resuming the original one the derby connection had lost track of which schema it was working in and couldn't find any tables. Faced with limited time and the prospect of debugging the interaction of 3 systems I tried the non-jta-datasource solution and stopped when it worked :-)

thanks
david jencks


Jacek

--
Jacek Laskowski
http://www.JacekLaskowski.pl

Reply via email to