Right now there is no "suspend-transaction" operation, so you would
have to make sure the simple-method is not called by anything that
puts a transaction in place, and then manually manage the transaction
in the simple-method, which would mean that you can't use an list-
iterator for the result to iterate over because you'll have to query
for that list, commit the transaction for that, then loop over the
results doing a transaction for each.
On a side note, the call-service operation in a simple-method also has
a require-new-transaction attribute so you can call a sub-service in a
separate transaction without the service itself having require-new-
transaction=true.
On another side note for Vince: be careful about wanting to have
things succeed or fail independently. When you do that it usually
means you have to build something else to track and handle the error
cases, which can be a lot of extra work and if not done will require
error-prone manual work.
-David
On Jul 22, 2009, at 4:03 PM, BJ Freeman wrote:
so the use-transaction and begin-transaction and commit-transaction of
the mini language is not independent in each simple method, if just
used
in simple methods?
David E Jones sent the following on 7/22/2009 2:53 PM:
To clarify: the sub-method (sub-service really) would ONLY be in a
separate transaction if you use the require-new-transaction
attribute on
the service definition.
-David
On Jul 22, 2009, at 3:48 PM, BJ Freeman wrote:
another approach may be to call another simple method from the
iterate.
that method does the store and you can use use-transaction
this would make it per record.
Vince Clark sent the following on 7/22/2009 2:02 PM:
I am importing a large amount of customer and order data. I am
iterating thru the result set using the simple-method <iterate> tag
and if I hit one bad record the whole job fails. How can I trap and
log errors and continue?
Vince Clark
[email protected]
(303) 493-6723
--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.
--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.