Ok, so I was just speaking with Tim off line and apparently there is
more to this than I previously understood.
So, I was assuming that the lack of errors meant that things were
working correctly. Moreover, I noticed that if I attempted to make
changes outside of the scope of the transaction (or if I didn't include
the declarative transaction) then I would see exceptions from the
EntityManager indicating that a transaction was not active. So, I
wrongly assumed that using the declarative transaction, seeing no
errors, and seeing the data was persisted in the database indicated that
everything was fine.
However, IIUC, there is also the matter of the DataSource being enlisted
in the transaction. Apparently, without the recent changes the
DataSource itself was not enlisted in the transaction. And so, while
the transaction covered the interaction with the Entity Manager it did
not extend to the DataSource. (Please correct me if I'm stating this
wrong Tim). If I had actually attempted to rollback the transaction the
DataSource would not have been updated.
Hence, even though I thought AriesTrader was working correctly with
declarative transactions it apparently still had some issues which I
would have discovered if I attempted to rollback one of the transactions.
Joe
Joe Bohn wrote:
Hi Alasdair,
Thanks. I'm sorry if my note sounded a little terse and you thought I
was complaining about the jndi issue (or even the transaction issue for
that matter). That was not what I intended to convey.
My note was more driven by confusion related to transaction support. I
just confirmed (at least as far as I understand how to do) that
AriesTrader transaction support was working prior to the recent changes.
However, I've heard comments that it should not have been working. And
so I was trying to get a better understanding of why it was working
before and if the recent changes (which now require adding the geronimo
jta spec to the Xbootclasspath) were really necessary.
The jndi change was really just mentioned because you can't get far
enough in AriesTrader to see transaction working unless you also revert
the jndi change locally which will let you get far enough to see it
working with the former transaction code.
Joe
Alasdair Nottingham wrote:
Joe,
I'm going to look at why the JNDI failure is occurring this evening.
Alasdair
On 4 March 2010 17:50, Joe Bohn <[email protected]> wrote:
.... but not anymore with the recent changes in jndi and transaction.
I understand that the transaction changes were necessitated by the
belief
that they were necessary. However, I can confirm that declarative
transactions were working in AriesTrader before the recent changes.
So I'm
a bit confused if these changes were really necessary.
If you want to see this running for yourself you must do the following:
1) Revert the jndi changes that are causing the lookup to fail for
TradeServicesManager ( rev. 918571 and 917809)
2) Revert the Transaction Manager changes that are causing the
transaction.manager bundle to fail to start (rev. 918977).
Once you revert those 3 changes locally you can get AriesTrader working
again.
--
Joe
--
Joe