These are events you&#39;re observing?<br><br><div class="gmail_quote">On Wed, Jan 4, 2012 at 23:27, Dave Oxley <span dir="ltr">&lt;<a href="mailto:dave@daveoxley.co.uk">dave@daveoxley.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
I&#39;ve been attempting to add persistence to the seam-cron module for<br>
which I need to use transaction events. Unfortunately I cannot get them<br>
to work. They always get called immediately rather than when the<br>
transaction is completed. So I turned to the seam-booking example<br>
(<a href="https://github.com/seam/examples/tree/master/booking" target="_blank">https://github.com/seam/examples/tree/master/booking</a>) which I saw was<br>
using transaction events and added some logging (attached), but this<br>
appears to have the same issue. The output from the log is:<br>
<br>
17:13:16,580 INFO<br>
[org.jboss.seam.examples.booking.booking.BookingAgent]<br>
(http--127.0.0.1-8080-1) confirm begin<br>
17:13:16,587 INFO<br>
[org.jboss.seam.examples.booking.booking.BookingHistory]<br>
(http--127.0.0.1-8080-1) Adding new booking to user&#39;s cached booking history<br>
17:13:16,588 INFO<br>
[org.jboss.seam.examples.booking.booking.BookingAgent]<br>
(http--127.0.0.1-8080-1) onBookingComplete begin<br>
17:13:16,589 INFO<br>
[org.jboss.seam.examples.booking.booking.BookingAgent]<br>
(http--127.0.0.1-8080-1) New booking at the W New York - Union Square<br>
confirmed for Shane Bryzak.<br>
17:13:16,599 INFO<br>
[org.jboss.seam.examples.booking.booking.BookingAgent]<br>
(http--127.0.0.1-8080-1) onBookingComplete end<br>
17:13:16,600 INFO<br>
[org.jboss.seam.examples.booking.booking.BookingAgent]<br>
(http--127.0.0.1-8080-1) confirm end<br>
<br>
But in theory the order of the logging should be:<br>
confirm begin<br>
confirm end<br>
onBookingComplete begin<br>
onBookingComplete end<br>
<br>
I did note that there was nothing specifying a transaction was required<br>
for the entirety of the confirm method so I also added<br>
@TransactionAttribute(TransactionAttributeType.REQUIRED) to the method<br>
(also in attached patch), but that had the same result.<br>
<br>
I&#39;ve been trying this in jboss-as-web-7.0.2.Final. I&#39;m probably doing<br>
something wrong but I don&#39;t know what. Does anyone have any ideas?<br>
<br>
Cheers,<br>
Dave.<br>
<br>_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jason Porter<br><a href="http://lightguard-jp.blogspot.com" target="_blank">http://lightguard-jp.blogspot.com</a><br><a href="http://twitter.com/lightguardjp" target="_blank">http://twitter.com/lightguardjp</a><br>

<br>Software Engineer<br>Open Source Advocate<br>Author of Seam Catch - Next Generation Java Exception Handling<br><br>PGP key id: 926CCFF5<br>PGP key available at: <a href="http://keyserver.net" target="_blank">keyserver.net</a>, <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>