[webbeans-commits] Webbeans SVN: r1896 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/event/broken and 4 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Mar 9 18:59:51 EDT 2009


Author: dallen6
Date: 2009-03-09 18:59:50 -0400 (Mon, 09 Mar 2009)
New Revision: 1896

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java
Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Added some more tests for events and finished mapping tests for section 7

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -4,7 +4,26 @@
 
 class BullTerrier
 {
-   public void observesBadEvent(@Observes @Role("Admin") @Tame MultiBindingType someEvent)
+   private static boolean multiBindingEventObserved = false;
+   private static boolean singleBindingEventObserved = false;
+   
+   public void observesEvent(@Observes @Role("Admin") @Tame MultiBindingType someEvent)
    {
+      multiBindingEventObserved = true;
    }
+   
+   public void observesMoreEvent(@Observes @Tame MultiBindingType someEvent)
+   {
+      singleBindingEventObserved = true;
+   }
+
+   public static boolean isMultiBindingEventObserved()
+   {
+      return multiBindingEventObserved;
+   }
+
+   public static boolean isSingleBindingEventObserved()
+   {
+      return singleBindingEventObserved;
+   }
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -237,6 +237,13 @@
       assert false;
    }
 
+   @Test(groups = { "events" })
+   @SpecAssertions( { @SpecAssertion(section = "7.7", id = "a") })
+   public void testManagerResolveObserversSignature() throws Exception
+   {
+      assert getCurrentManager().getClass().getDeclaredMethod("resolveObservers", Object.class, Annotation[].class) != null;
+   }
+
    @Test(groups = { "events", "stub" })
    @SpecAssertions( { @SpecAssertion(section = "7.4", id = "a") })
    public void testObserverNotificationCallsResolveObservers()
@@ -288,20 +295,33 @@
    }
 
    @Test(groups = { "events" })
-   @SpecAssertion(section = "7.5.2", id = "g")
+   @SpecAssertions( { 
+      @SpecAssertion(section = "7.5.2", id = "g"), 
+      @SpecAssertion(section = "7.7.1", id = "a"), 
+      @SpecAssertion(section = "7.7.2", id = "a") 
+   })
    public void testObserverMethodMayHaveMultipleBindingTypes()
    {
-      Set<Bean<Object>> beans = getCurrentManager().resolveByType(Object.class);
-      assert beans != null;
       // If we can resolve the observer with the two binding types,
       // then it worked
       Set<Observer<MultiBindingType>> resolvedObservers = getCurrentManager().resolveObservers(new MultiBindingType(), new RoleBinding("Admin"), new TameAnnotationLiteral());
-      assert resolvedObservers.size() == 1;
-
+      assert resolvedObservers.size() == 2;
    }
 
+//   @Test(groups = { "events", "broken" })
+//   @SpecAssertions( { @SpecAssertion(section = "7.7.1", id = "b") } )
+//   public void testEqualsUsedToCompareBindingTypes()
+//   {
+//      RoleBinding roleBinding = new RoleBinding("Admin");
+//      getCurrentManager().resolveObservers(new MultiBindingType(), roleBinding, new TameAnnotationLiteral());
+//      assert false;
+//   }
+
    @Test(groups = { "stub", "events", "webbeansxml" })
-   @SpecAssertions( { @SpecAssertion(section = "7.5.3", id = "a"), @SpecAssertion(section = "7.5.3", id = "b") } )
+   @SpecAssertions( { 
+      @SpecAssertion(section = "7.5.3", id = "a"), 
+      @SpecAssertion(section = "7.5.3", id = "b") 
+   } )
    public void testXMLDefinedObserverMethodIgnoresBindingAnnotations()
    {
       assert false;
@@ -565,7 +585,7 @@
    }
 
    @Test(groups = { "events" })
-   @SpecAssertion(section = "7.6", id = "n")
+   @SpecAssertions( { @SpecAssertion(section = "7.6", id = "n") } )
    public void testImplicitEventBeanMatchesAPITypeOfInectionPoint() throws Exception
    {
       new RunInDependentContext()
@@ -584,7 +604,7 @@
    }
 
    @Test(groups = { "events" })
-   @SpecAssertion(section = "7.6", id = "n")
+   @SpecAssertions( { @SpecAssertion(section = "7.6", id = "n") } )
    public void testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint() throws Exception
    {
       new RunInDependentContext()
@@ -662,7 +682,7 @@
    }
 
    @Test(groups = { "events" })
-   @SpecAssertion(section = "7.6", id = "r")
+   @SpecAssertions( { @SpecAssertion(section = "7.6", id = "a"), @SpecAssertion(section = "7.6", id = "r") } )
    public void testImplicitEventBeanProvidedByContainer() throws Exception
    {
       new RunInDependentContext()
@@ -747,6 +767,54 @@
       getCurrentManager().resolveObservers(eventToFire);
    }
 
+   
+   @Test(groups = { "events" })
+   @SpecAssertions( { 
+      @SpecAssertion(section = "7.7.2", id = "b"), 
+      @SpecAssertion(section = "7.7.2", id = "c")
+   } )
+   public void testObserverMethodNotifiedWhenBindingsMatch()
+   {
+      getCurrentManager().fireEvent(new MultiBindingType(), new RoleBinding("Admin"), new TameAnnotationLiteral());
+      assert BullTerrier.isMultiBindingEventObserved();
+      assert BullTerrier.isSingleBindingEventObserved();
+   }
+
+   @Test(groups = { "events", "stub" })
+   @SpecAssertions( { @SpecAssertion(section = "7.8", id = "a") })
+   public void testEventTypeMappedToJmsTopic()
+   {
+      assert false;
+   }
+
+   @Test(groups = { "events", "stub" })
+   @SpecAssertions( { @SpecAssertion(section = "7.8", id = "b") })
+   public void testMultipleEventTypesMappedToSameJmsTopic()
+   {
+      assert false;
+   }
+
+   @Test(groups = { "events", "stub" })
+   @SpecAssertions( { @SpecAssertion(section = "7.8", id = "d") })
+   public void testSerializedEventAndBindingsSentToJmsTopic()
+   {
+      assert false;
+   }
+
+   @Test(groups = { "events", "stub" })
+   @SpecAssertions( { @SpecAssertion(section = "7.8", id = "e") })
+   public void testObserversNotifiedOfEventFromJmsTopic()
+   {
+      assert false;
+   }
+
+   @Test(groups = { "events", "stub" })
+   @SpecAssertions( { @SpecAssertion(section = "7.8", id = "f") })
+   public void testEventsDistributedToProcessesWithSameTypeAndJmsTopic()
+   {
+      assert false;
+   }
+
    /**
     * By default, Java implementation reuse is assumed. In this case, the
     * producer, disposal and observer methods of the first bean are not

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -0,0 +1,52 @@
+package org.jboss.jsr299.tck.tests.event;
+
+public class MagicString
+{
+   private static boolean equalsUsed = false;
+   private final String   value;
+
+   public MagicString(String value)
+   {
+      this.value = value;
+   }
+
+   public int compareTo(String anotherString)
+   {
+      return value.compareTo(anotherString);
+   }
+
+   public int compareToIgnoreCase(String str)
+   {
+      return value.compareToIgnoreCase(str);
+   }
+
+   public boolean equals(Object anObject)
+   {
+      return value.equals(anObject);
+   }
+
+   public int hashCode()
+   {
+      return value.hashCode();
+   }
+
+   public boolean isEmpty()
+   {
+      return value.isEmpty();
+   }
+
+   public int length()
+   {
+      return value.length();
+   }
+
+   public boolean matches(String regex)
+   {
+      return value.matches(regex);
+   }
+
+   public static boolean isEqualsUsed()
+   {
+      return equalsUsed;
+   }
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.event.broken.jms1;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ * Tests that observers of mapped event types to JMS are asynchronous observers;
+ * otherwise, an exception is thrown.
+ * 
+ * @author David Allen
+ *
+ */
+ at Artifact
+ at ExpectedDeploymentException(DefinitionException.class)
+public class MappedEventObserversAsynchronousTest
+{
+   @Test(groups = { "events", "stub" })
+   @SpecAssertion(section = "7.8", id = "c")
+   public void testObserverOfMappedTypeMustBeAsynchronous() throws Exception
+   {
+      assert false;
+   }
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -17,29 +17,38 @@
 
 package org.jboss.jsr299.tck.tests.event.register.fires1;
 
+import java.lang.annotation.Annotation;
 import java.util.Set;
 
+import javax.event.Event;
 import javax.event.Observer;
 
 import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
 import org.jboss.jsr299.tck.AbstractDeclarativeTest;
 import org.jboss.jsr299.tck.impl.packaging.Artifact;
 import org.jboss.jsr299.tck.impl.packaging.jsr299.BeansXml;
 import org.testng.annotations.Test;
 
 /**
- * Tests proper functioning of the implicit event bean injected
- * when @Fires is used on an Event<T> type.
+ * Tests proper functioning of the implicit event bean injected when @Fires is
+ * used on an Event<T> type.
  * 
  * @author David Allen
- *
  */
 @Artifact
 @BeansXml("beans.xml")
 public class ImplicitEventBeanTest extends AbstractDeclarativeTest
 {
    @Test(groups = { "events", "broken" })
-   @SpecAssertion(section = "7.6", id = "i")
+   @SpecAssertions( { 
+      @SpecAssertion(section = "7.6", id = "b"), 
+      @SpecAssertion(section = "7.6", id = "c"), 
+      @SpecAssertion(section = "7.6", id = "d"), 
+      @SpecAssertion(section = "7.6", id = "i"), 
+      @SpecAssertion(section = "7.6", id = "t"), 
+      @SpecAssertion(section = "7.6", id = "v") 
+   })
    public void testFiresAnnotationOnEventTypes() throws Exception
    {
       new RunInDependentContext()
@@ -54,7 +63,7 @@
             Set<Observer<String>> observers = getCurrentManager().resolveObservers("String type event");
             assert observers.size() == 1;
          }
-         
+
       }.run();
       new RunInDependentContext()
       {
@@ -70,7 +79,7 @@
             assert birdCage.getSomeMess() != null;
             assert birdKeeper.isNewMessDetected();
          }
-         
+
       }.run();
       new RunInDependentContext()
       {
@@ -84,7 +93,7 @@
             assert bird.getSomeMess() != null;
             assert birdKeeper.isNewMessDetected();
          }
-         
+
       }.run();
       new RunInDependentContext()
       {
@@ -97,7 +106,15 @@
             assert bird != null;
             assert birdKeeper.isNewMessDetected();
          }
-         
+
       }.run();
    }
+
+   @Test(groups = { "events" })
+   @SpecAssertions( { @SpecAssertion(section = "7.6", id = "e"), @SpecAssertion(section = "7.6", id = "f") })
+   public void testImplicitEventBeanFireSignature() throws Exception
+   {
+      // All implicit event beans directly use the Event interface
+      assert Event.class.getDeclaredMethod("fire", Object.class, Annotation[].class) != null;
+   }
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -1,12 +1,10 @@
 package org.jboss.jsr299.tck.tests.event.register.fires1;
 
 import javax.annotation.Named;
-import javax.context.RequestScoped;
 import javax.event.Event;
 import javax.event.Fires;
 import javax.inject.Produces;
 
- at RequestScoped
 @Named("StarFinch")
 public class StarFinch
 {

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -30,6 +30,8 @@
 import org.jboss.jsr299.tck.impl.packaging.Artifact;
 import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
 import org.jboss.jsr299.tck.impl.packaging.Packaging;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 /**
@@ -49,8 +51,9 @@
    private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>()
    {
    };
-   private PomeranianInterface dog;
+   private PomeranianInterface dog = null;
 
+   @BeforeMethod(alwaysRun = true, dependsOnMethods = "beforeMethod")
    public void setupTest()
    {
       dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -73,7 +76,6 @@
    @SpecAssertion(section = "7.5.6", id = "a")
    public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
    {
-      setupTest();
       dog.setCorrectContext(false);
       dog.setCorrectTransactionState(false);
       Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
@@ -85,55 +87,53 @@
    }
 
    @Test(groups = { "events", "integration" })
-   @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "c"), @SpecAssertion(section = "7.5.6", id = "f"), @SpecAssertion(section = "7.5.6", id = "i"), @SpecAssertion(section = "7.5.8", id = "f") })
-   public void testAfterTransactionCompletionObserver()
+   @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "c"), @SpecAssertion(section = "7.5.6", id = "f"), @SpecAssertion(section = "7.5.6", id = "i"), @SpecAssertion(section = "7.5.8", id = "d"), @SpecAssertion(section = "7.5.8", id = "f") })
+   public void testAfterTransactionCompletionObserver() throws InterruptedException
    {
-      setupTest();
       dog.setCorrectContext(false);
       dog.setCorrectTransactionState(false);
       assert !getCurrentManager().resolveObservers("event").isEmpty();
       Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
       dogAgent.sendInTransaction("event");
+      Thread.sleep(100);
       assert dog.isCorrectTransactionState();
    }
 
    @Test(groups = { "events", "integration", "broken" })
    @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "d"), @SpecAssertion(section = "7.5.6", id = "j") })
-   public void testAfterTransactionSuccessObserver()
+   public void testAfterTransactionSuccessObserver() throws InterruptedException
    {
-      setupTest();
       dog.setCorrectContext(false);
       dog.setCorrectTransactionState(false);
       Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
       dogAgent.sendInTransaction(new Integer(4));
+      Thread.sleep(100);
       assert dog.isCorrectTransactionState();
    }
 
    @Test(groups = { "events", "integration", "ri-broken" })
-   @SpecAssertions({
-      @SpecAssertion(section = "7.5.6", id = "e"),
-      @SpecAssertion(section = "7.5.6", id = "k") 
-   })
-   public void testAfterTransactionFailureObserver()
+   @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "e"), @SpecAssertion(section = "7.5.6", id = "k") })
+   public void testAfterTransactionFailureObserver() throws InterruptedException
    {
-      setupTest();
       dog.setCorrectContext(false);
       dog.setCorrectTransactionState(false);
       Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
       dogAgent.sendInTransaction(new Float(4.0));
+      Thread.sleep(100);
       assert dog.isCorrectTransactionState();
    }
 
    @Test(groups = { "events", "integration" })
-   @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "b"), @SpecAssertion(section = "7.5.6", id = "h") })
+   @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "b"), @SpecAssertion(section = "7.5.6", id = "h"), @SpecAssertion(section = "7.5.8", id = "e") })
    public void testBeforeTransactionCompletionObserver()
    {
-      setupTest();
       dog.setCorrectContext(false);
       dog.setCorrectTransactionState(false);
       Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
-      dogAgent.sendInTransaction(new Double(4.0));
+      dogAgent.sendInTransaction(new RuntimeException("test event"));
       assert dog.isCorrectTransactionState();
+      // TODO Fix the security contexts
+      // assert dog.isCorrectContext();
    }
 
    @Test(groups = { "stub", "events", "integration" })
@@ -145,13 +145,13 @@
 
    @Test(groups = { "events", "broken" })
    @SpecAssertion(section = "7.5.7", id = "c")
-   public void testAsynchronousObserverAlsoTransactional()
+   public void testAsynchronousObserverAlsoTransactional() throws InterruptedException
    {
-      setupTest();
       dog.setCorrectContext(false);
       dog.setCorrectTransactionState(false);
       Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
       dogAgent.sendInTransaction('a');
+      Thread.sleep(200);
       assert dog.isCorrectTransactionState();
    }
 

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -50,6 +50,7 @@
    {
       try
       {
+         log.finer("Observing string event with tx status: " + transaction.getStatus());
          if (transaction.getStatus() == STATUS_NO_TRANSACTION)
          {
             setCorrectTransactionState(true);
@@ -70,7 +71,7 @@
    {
       try
       {
-         log.warning("Observing integer event with tx status: " + transaction.getStatus());
+         log.finer("Observing integer event with tx status: " + transaction.getStatus());
          if (transaction.getStatus() == STATUS_NO_TRANSACTION)
          {
             setCorrectTransactionState(true);
@@ -91,6 +92,7 @@
    {
       try
       {
+         log.finer("Observing float event with tx status: " + transaction.getStatus());
          if (transaction.getStatus() == STATUS_NO_TRANSACTION)
          {
             setCorrectTransactionState(true);
@@ -106,6 +108,7 @@
    {
       try
       {
+         log.finer("Observing BigInteger event with tx status: " + transaction.getStatus());
          if (transaction.getStatus() == STATUS_NO_TRANSACTION)
          {
             setCorrectTransactionState(true);
@@ -115,7 +118,7 @@
          {
             setCorrectContext(true);
          }
-         log.warning("Principal caller is " + context.getCallerPrincipal().getName());
+         log.finer("Principal caller is " + context.getCallerPrincipal().getName());
       }
       catch (SystemException e)
       {
@@ -123,10 +126,11 @@
       }
    }
 
-   public void observeDoubleEvent(@Observes @BeforeTransactionCompletion Double event)
+   public void observeExceptionEvent(@Observes @BeforeTransactionCompletion RuntimeException event)
    {
       try
       {
+         log.finer("Observing exception event with tx status: " + transaction.getStatus());
          if (transaction.getStatus() == STATUS_NO_TRANSACTION)
          {
             setCorrectTransactionState(true);
@@ -136,7 +140,7 @@
          {
             setCorrectContext(true);
          }
-         log.warning("Principal caller is " + context.getCallerPrincipal().getName());
+         log.finer("Principal caller is " + context.getCallerPrincipal().getName());
       }
       catch (SystemException e)
       {
@@ -148,7 +152,7 @@
    {
       try
       {
-         log.warning("Observing character event with tx status: " + transaction.getStatus());
+         log.finer("Observing character event with tx status: " + transaction.getStatus());
          if (transaction.getStatus() == STATUS_NO_TRANSACTION)
          {
             setCorrectTransactionState(true);

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java	2009-03-09 22:59:50 UTC (rev 1896)
@@ -30,7 +30,7 @@
 
    public void observeBigIntegerEvent(BigInteger event);
    
-   public void observeDoubleEvent(Double event);
+   public void observeExceptionEvent(RuntimeException event);
    
    public void observeCharEvent(Character event);
 

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-03-09 18:58:18 UTC (rev 1895)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-03-09 22:59:50 UTC (rev 1896)
@@ -4265,8 +4265,9 @@
       <text>If none of the conditions of assertions e, f, or g are true, the container calls the observer immediately</text>
     </assertion>
     
-    <assertion id="i">
+    <assertion id="i" testable="false">
       <text>The container is not required to guarantee delivery of asynchronous events in the case of a server shutdown or failure</text>
+      <note>This is just a note about the lack of an assertion, and therefore is not testable.</note>
     </assertion>
     
     <assertion id="j">
@@ -4458,8 +4459,9 @@
       <text>The binding type for an Event binding may have annotation members</text>
     </assertion>
     
-    <assertion id="b">
+    <assertion id="b" testable="false">
       <text>The container uses equals() to compare event binding type member values</text>
+      <note>Since only primitive types are allowed, the call to equals() cannot be checked</note>
     </assertion>
   </section>
   




More information about the weld-commits mailing list