[weld-issues] [JBoss JIRA] Commented: (CDITCK-215) ProcessSessionBeanTest testProcessSessionBeanEvent count

2011-06-13 Thread Gurkan Erdogdu (JIRA)

[ 
https://issues.jboss.org/browse/CDITCK-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12608160#comment-12608160
 ] 

Gurkan Erdogdu commented on CDITCK-215:
---

Pete, thanks for the answer. 

Why public interface ProcessSessionBeanX extends ProcessManagedBeanObject 
instead of public interface ProcessSessionBeanX extends ProcessManagedBeanX

Thks.

 ProcessSessionBeanTest testProcessSessionBeanEvent count
 

 Key: CDITCK-215
 URL: https://issues.jboss.org/browse/CDITCK-215
 Project: CDI TCK
  Issue Type: Bug
  Security Level: Public(Everyone can see) 
Affects Versions: 1.0.4.Final
Reporter: David Blevins
Assignee: Pete Muir

 [Side note maybe there should be versions for 1.0.4.SP1 and  1.0.4.SP2]
 Test: 
 org.jboss.jsr299.tck.tests.extensions.processBean.ProcessSessionBeanTest.testProcessSessionBeanEvent
 Not sure if this is an issue or not, so filling this as a bug and not a 
 challenge.  The test essentially has two observer methods and is asserting 
 that only one of them are called.
   public void observeElephantSessionBean(@Observes 
 ProcessSessionBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessSessionBean = event;
   }
   public void observeElephantBean(@Observes ProcessBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessBeanCount++;
   }
 Specifically the test asserts that observeElephantSessionBean is called and 
 that observeElephantBean is not called.
 Currently we call both because ProcessSessionBean is assignable to 
 ProcessBean and the generics are the same.
 Is there a part of the spec that mandates only the most specific observer 
 method is called?
 The only thing I can find is in 10.4 which says pretty clearly:
   There may be arbitrarily many observer methods with the same event 
 parameter type and qualifiers.
   A bean (or extension) may declare multiple observer methods.
 Well I guess it's not that clear as it says essentially this may happen 
 rather than this may happen...and when it does the behavior is...[all are 
 invoked || only the most specific is invoked]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues


[weld-issues] [JBoss JIRA] Commented: (CDITCK-215) ProcessSessionBeanTest testProcessSessionBeanEvent count

2011-06-12 Thread Gurkan Erdogdu (JIRA)

[ 
https://issues.jboss.org/browse/CDITCK-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12608138#comment-12608138
 ] 

Gurkan Erdogdu commented on CDITCK-215:
---

Pete, What I was saying is that

- Event Type  : ProcessSessionBean
- Observed Event Type : ProcessBean
- Event Type Argument : Elephant from ProcessSessionBeanElephant
- Observed Event Type Argument : Elephant from ProcessBeanElephant

Then ProcessBean.isAssignableFrom(ProcessSessionBean) and 
Elephant.isAssignableFrom(Elephant).

Why are you getting Object as an observer type parameter? Observer is 
ProcessBeanElephant, then observer' event type parameter is Elephant.

 ProcessSessionBeanTest testProcessSessionBeanEvent count
 

 Key: CDITCK-215
 URL: https://issues.jboss.org/browse/CDITCK-215
 Project: CDI TCK
  Issue Type: Bug
  Security Level: Public(Everyone can see) 
Affects Versions: 1.0.4.Final
Reporter: David Blevins
Assignee: Pete Muir

 [Side note maybe there should be versions for 1.0.4.SP1 and  1.0.4.SP2]
 Test: 
 org.jboss.jsr299.tck.tests.extensions.processBean.ProcessSessionBeanTest.testProcessSessionBeanEvent
 Not sure if this is an issue or not, so filling this as a bug and not a 
 challenge.  The test essentially has two observer methods and is asserting 
 that only one of them are called.
   public void observeElephantSessionBean(@Observes 
 ProcessSessionBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessSessionBean = event;
   }
   public void observeElephantBean(@Observes ProcessBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessBeanCount++;
   }
 Specifically the test asserts that observeElephantSessionBean is called and 
 that observeElephantBean is not called.
 Currently we call both because ProcessSessionBean is assignable to 
 ProcessBean and the generics are the same.
 Is there a part of the spec that mandates only the most specific observer 
 method is called?
 The only thing I can find is in 10.4 which says pretty clearly:
   There may be arbitrarily many observer methods with the same event 
 parameter type and qualifiers.
   A bean (or extension) may declare multiple observer methods.
 Well I guess it's not that clear as it says essentially this may happen 
 rather than this may happen...and when it does the behavior is...[all are 
 invoked || only the most specific is invoked]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues


[weld-issues] [JBoss JIRA] Commented: (CDITCK-215) ProcessSessionBeanTest testProcessSessionBeanEvent count

2011-06-12 Thread Pete Muir (JIRA)

[ 
https://issues.jboss.org/browse/CDITCK-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12608142#comment-12608142
 ] 

Pete Muir commented on CDITCK-215:
--

Gurkan, this is not how observer resolution works, . See 10.2.1. Essentially, 
the issue is that when the the event type is parameterized, you must consider 
only the observed type where the raw type is identical, so we can only consider 
ProcessBeanObject as the event type to match the parameterized types for. 
David gives an abstract example above.

Regarding the parameterized type of ProcessBean in the ProcessSessionBean type 
hierarchy, this is as described in 11.5.8.

 ProcessSessionBeanTest testProcessSessionBeanEvent count
 

 Key: CDITCK-215
 URL: https://issues.jboss.org/browse/CDITCK-215
 Project: CDI TCK
  Issue Type: Bug
  Security Level: Public(Everyone can see) 
Affects Versions: 1.0.4.Final
Reporter: David Blevins
Assignee: Pete Muir

 [Side note maybe there should be versions for 1.0.4.SP1 and  1.0.4.SP2]
 Test: 
 org.jboss.jsr299.tck.tests.extensions.processBean.ProcessSessionBeanTest.testProcessSessionBeanEvent
 Not sure if this is an issue or not, so filling this as a bug and not a 
 challenge.  The test essentially has two observer methods and is asserting 
 that only one of them are called.
   public void observeElephantSessionBean(@Observes 
 ProcessSessionBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessSessionBean = event;
   }
   public void observeElephantBean(@Observes ProcessBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessBeanCount++;
   }
 Specifically the test asserts that observeElephantSessionBean is called and 
 that observeElephantBean is not called.
 Currently we call both because ProcessSessionBean is assignable to 
 ProcessBean and the generics are the same.
 Is there a part of the spec that mandates only the most specific observer 
 method is called?
 The only thing I can find is in 10.4 which says pretty clearly:
   There may be arbitrarily many observer methods with the same event 
 parameter type and qualifiers.
   A bean (or extension) may declare multiple observer methods.
 Well I guess it's not that clear as it says essentially this may happen 
 rather than this may happen...and when it does the behavior is...[all are 
 invoked || only the most specific is invoked]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues


[weld-issues] [JBoss JIRA] Commented: (CDITCK-215) ProcessSessionBeanTest testProcessSessionBeanEvent count

2011-06-10 Thread David Blevins (JIRA)

[ 
https://issues.jboss.org/browse/CDITCK-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12607939#comment-12607939
 ] 

David Blevins commented on CDITCK-215:
--

Ok, I see what you're talking about.  This is cool.

{code}
public class Example {

{
// will compile
RedFoo red = new RedFoo();
ColorFoo color = red;

// will not compile
CircleFoo circle = new CircleFoo();
ShapeFoo shape = circle;
}

public static class Foo {}

public static class ColorX {}
public static class RedX extends ColorX {}

public static class ShapeX {}
public static class CircleX extends ShapeObject {}

}
{code}

 ProcessSessionBeanTest testProcessSessionBeanEvent count
 

 Key: CDITCK-215
 URL: https://issues.jboss.org/browse/CDITCK-215
 Project: CDI TCK
  Issue Type: Bug
  Security Level: Public(Everyone can see) 
Affects Versions: 1.0.4.Final
Reporter: David Blevins
Assignee: Pete Muir

 [Side note maybe there should be versions for 1.0.4.SP1 and  1.0.4.SP2]
 Test: 
 org.jboss.jsr299.tck.tests.extensions.processBean.ProcessSessionBeanTest.testProcessSessionBeanEvent
 Not sure if this is an issue or not, so filling this as a bug and not a 
 challenge.  The test essentially has two observer methods and is asserting 
 that only one of them are called.
   public void observeElephantSessionBean(@Observes 
 ProcessSessionBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessSessionBean = event;
   }
   public void observeElephantBean(@Observes ProcessBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessBeanCount++;
   }
 Specifically the test asserts that observeElephantSessionBean is called and 
 that observeElephantBean is not called.
 Currently we call both because ProcessSessionBean is assignable to 
 ProcessBean and the generics are the same.
 Is there a part of the spec that mandates only the most specific observer 
 method is called?
 The only thing I can find is in 10.4 which says pretty clearly:
   There may be arbitrarily many observer methods with the same event 
 parameter type and qualifiers.
   A bean (or extension) may declare multiple observer methods.
 Well I guess it's not that clear as it says essentially this may happen 
 rather than this may happen...and when it does the behavior is...[all are 
 invoked || only the most specific is invoked]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues


[weld-issues] [JBoss JIRA] Commented: (CDITCK-215) ProcessSessionBeanTest testProcessSessionBeanEvent count

2011-06-09 Thread Pete Muir (JIRA)

[ 
https://issues.jboss.org/browse/CDITCK-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12607427#comment-12607427
 ] 

Pete Muir commented on CDITCK-215:
--

The signature of ProcessSessionBean is

{code}
public interface ProcessSessionBeanX extends ProcessManagedBeanObject {
{code}

So I don't believe you would see a ProcessBeanElephant observer called, as 
10.2.1 tells us:

{quote}
the observed event type parameter is an actual type with identical raw type to 
the event type parameter, and, if the type is parameterized, the event type 
parameter is assignable to the observed event type parameter according to these 
rules
{quote}

and Object is not assignable to Elephant.

 ProcessSessionBeanTest testProcessSessionBeanEvent count
 

 Key: CDITCK-215
 URL: https://issues.jboss.org/browse/CDITCK-215
 Project: CDI TCK
  Issue Type: Bug
  Security Level: Public(Everyone can see) 
Affects Versions: 1.0.4.Final
Reporter: David Blevins

 [Side note maybe there should be versions for 1.0.4.SP1 and  1.0.4.SP2]
 Test: 
 org.jboss.jsr299.tck.tests.extensions.processBean.ProcessSessionBeanTest.testProcessSessionBeanEvent
 Not sure if this is an issue or not, so filling this as a bug and not a 
 challenge.  The test essentially has two observer methods and is asserting 
 that only one of them are called.
   public void observeElephantSessionBean(@Observes 
 ProcessSessionBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessSessionBean = event;
   }
   public void observeElephantBean(@Observes ProcessBeanElephant event)
   {
  ProcessBeanObserver.elephantProcessBeanCount++;
   }
 Specifically the test asserts that observeElephantSessionBean is called and 
 that observeElephantBean is not called.
 Currently we call both because ProcessSessionBean is assignable to 
 ProcessBean and the generics are the same.
 Is there a part of the spec that mandates only the most specific observer 
 method is called?
 The only thing I can find is in 10.4 which says pretty clearly:
   There may be arbitrarily many observer methods with the same event 
 parameter type and qualifiers.
   A bean (or extension) may declare multiple observer methods.
 Well I guess it's not that clear as it says essentially this may happen 
 rather than this may happen...and when it does the behavior is...[all are 
 invoked || only the most specific is invoked]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues