tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Laws <simonsl...@googlemail.com>
Subject Re: JMS ordered delivery
Date Tue, 04 Aug 2009 09:14:04 GMT
So to move this on a little bit further here's a scenario we could use
(apologies if the intents don't make sense here)...

<component name="Component1">
    <implementation.java class="Component1Impl"
requires="managedTransaction.global"/>
    <reference name="reference1" requires="propogatesTransaction">
        <binding.jms>
             <destination name="DestQueue"/>
             <response>
                   <destination name="RespQueue"/>
             </response>
            <headers JMSDeliveryMode="PERSISTENT"/>
        </binding.jms>
    </reference>
</component>

<component name="Component2">
    <implementation.java class="Component2Impl"
requires="managedTransaction.global">
        <operation name="operationA" requires="???"/>
        <operation name="operationB" requires="???"/>
    </implementation.java>
    <service name="Service2" requires="propogatesTransaction">
        <binding.jms>
               <destination name="DestQueue" create="always"/>
               <response>
                   <destination name="RespQueue" create="always"/>
               </response>
        </binding.jms>
    </reference>
</component>

class Component1Impl implements Component2 {
  @Reference
  protected Component2 reference1;

  public void doABeforeB (){
     reference1.operationA();
     reference2.operationB();
  }

  public void doBBeforeA (){
     reference1.operationB();
     reference2.operationA();
  }
}

Now I know very little about the SCA transaction specifications to
I'll have to read up but I'd like some help in understanding the
details of what you are saying in the original post in the context of
a scenario like the one stated here. From the original post

> So I think a given reference might need to have several active MessageProducers, because
different operations might have different
> reliability levels or different transactional behavior.  So for example a sequence of
outbound requests to operations that all require
> reliable, transactional delivery would use one MessageProducer, while another sequence
of outbound requests to operations that all
> require reliable but non-transactional delivery would use another MessageProducer, and
so on.

How are different operations called through the same reference
configured with different reliability levels?
How are different operations called through the same reference
configured with different transactional behaviour?

In the Component1 implementation I can see that, assuming non-REQUEST
scope, multiple threads of control can be active in the
implementation. If we wanted to maintain the same session for the
binding then we would have to do it on a thread by thread basis.

Regards

Simon

Mime
View raw message