Hi all,

We currently have a problem when using OSGi bundles
(implementation.osgi) for SCA components instead of pure Java
(implementation.java ).

Again here is my "formidable" example using 3 Services Alpha, Beta and
Gamma.
Alpha.doSomething() calls Beta.getRef() which creates a reference to
Gamma and returns it to Alpha.
Alpha then executes Gamme.doSomethingElse().
Gamma is marked wirh @Conversational and it's implementation with
@Scope("CONVERSATION")


If Alpha.doSomething() is executed twice (one after the other) the
sample works well (without any error). ConversationIDs are created and
reused. However, the OSGi implementation uses the same ConversationID in
both calls of Alpha.doSomething(). In the pure Java implementation the
ConversationIDs are different. Also, the Constructor for Gamma is not
called in Beta.getRef() in the OSGi implementation.


If I mark Alpha.doSomething() with @OneWay and Alpha.doSomething() is
executed twice (now in "parallel" because of @OneWay) the sample still
works for the pure Java implementation, but not for the OSGi
implementation.

The difference is, that in the OSGi implementation Beta.getRef(), which
creates the ServiceReference to Gamma, the constructor of Gamma is NOT
called. Thus, only one instance of Gamma exists and so only one
ConversationId exists and is used two times (once for each call of
Alpha.doSomething(). This leads to internal eerrors in
Gamme.doSomethingElse().

In the pure Java implementation the Constructor of Gamma is called
twice, resulting in two instances and two seperate ConversationIDs.

Is there something special we have to configure for OSGi services ? Do
they support "Conversations" or do we have to implement conversation
logic seperately ?

Help is most welcome.

Bye,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to