We created a test to test the "SCA Java Annotations And APIs V1"
specification lines 290 to 293.

"There are times when a local request scoped service is called without
there being a remotable service earlier in the call stack, such as
when a local service is called from a non-SCA entity. In these cases,
a remote request is always considered to be present, but the lifetime
of the request is implementation dependent. For example, a timer event
could be treated as a remote request."

There are 3 components
 - JComponent (composite scope)
 - KComponent (stateless scope)
 - LComponent  (request scope)

When the composite runs, composite scope service JComponent kicks off
a timer by the @Init method.  The timer triggers JComponent every
second to invoke a method that calls an operation on the reference to
a stateless scope sevice KComponent. KComponent calls a request scope
service LComponent multiple times.

We found that there was only one instance of LComponent be used and
the state was also preserved. Although it was declared as a request
scope service, it worked like as a composite scope service. (See the
attached powerpoint.)

As the spec says, "... the lifetime of the request is implementation
dependent.". Is there a bug?

Thanks
Gilbert

Attachment: RequestWorkAsComposite.ppt
Description: MS-Powerpoint presentation

Reply via email to