[webbeans-commits] Webbeans SVN: r3529 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Aug 16 13:06:32 EDT 2009
Author: dallen6
Date: 2009-08-16 13:06:31 -0400 (Sun, 16 Aug 2009)
New Revision: 3529
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionSynchronizedRunnable.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java
Log:
Fixed bug in RI for transactional observers and re-enabled a few of the tests.
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionSynchronizedRunnable.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionSynchronizedRunnable.java 2009-08-16 16:17:19 UTC (rev 3528)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionSynchronizedRunnable.java 2009-08-16 17:06:31 UTC (rev 3529)
@@ -50,15 +50,17 @@
}
/*
- * (non-Javadoc)
- *
- * @see javax.transaction.Synchronization#afterCompletion(int)
- */
+ * (non-Javadoc)
+ * @see javax.transaction.Synchronization#afterCompletion(int)
+ */
public void afterCompletion(int status)
{
- if ((desiredStatus == Status.SUCCESS && status == STATUS_COMMITTED) || (desiredStatus == Status.FAILURE && status != STATUS_COMMITTED) || (desiredStatus == Status.ALL))
+ if (!before)
{
- task.run();
+ if ((desiredStatus == Status.SUCCESS && status == STATUS_COMMITTED) || (desiredStatus == Status.FAILURE && status != STATUS_COMMITTED) || (desiredStatus == Status.ALL))
+ {
+ task.run();
+ }
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java 2009-08-16 16:17:19 UTC (rev 3528)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java 2009-08-16 17:06:31 UTC (rev 3529)
@@ -32,6 +32,10 @@
jsr299Manager.fireEvent(event);
userTransaction.commit();
}
+ catch (EJBException ejbException)
+ {
+ throw ejbException;
+ }
catch (Exception e)
{
throw new EJBException("Transaction failure", e);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java 2009-08-16 16:17:19 UTC (rev 3528)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java 2009-08-16 17:06:31 UTC (rev 3529)
@@ -85,7 +85,7 @@
// assert dog.isCorrectContext();
}
- @Test(groups = { "events", "integration", "broken" })
+ @Test(groups = { "events", "integration" })
@SpecAssertion(section = "10.4.5", id = "c")
public void testAfterTransactionCompletionObserver() throws InterruptedException
{
@@ -98,7 +98,7 @@
assert dog.isCorrectTransactionState();
}
- @Test(groups = { "events", "integration", "broken" })
+ @Test(groups = { "events", "integration" })
@SpecAssertion(section = "10.4.5", id = "d")
public void testAfterTransactionSuccessObserver() throws InterruptedException
{
@@ -123,7 +123,7 @@
assert dog.isCorrectTransactionState();
}
- @Test(groups = { "events", "integration", "broken" })
+ @Test(groups = { "events", "integration" })
@SpecAssertions( {
@SpecAssertion(section = "10.4.5", id = "b"),
@SpecAssertion(section = "10.4.5", id = "e") })
More information about the weld-commits
mailing list