Thank you for your help again!

I am still confused about my first question.

I am looking at the servicemix.xml (The loanBrokerJmsBinding Component).  I
see the defaultDestinationName's value is "demo.org.servicemix.source".

How does the loanBrokerJmsBinding Component stated in the servicemix.xml
know where to put the out message?  Should there be another property that
has the value of 
"demo.org.servicemix.output" in the servicemix.xml?

Also, when I build the Loan Broker Example, I see two components being
install: servicemix-lwcontainer-3.0-incubating-installer.zip and
servicemix-shared-3.0-incubating-installer.zip.  What are these components
for?

Thanks


gnodet wrote:
> 
> On 10/10/06, dadade <[EMAIL PROTECTED]> wrote:
>>
>> Thank you for providing detail explanation.  It really helps me
>> understand.
>> Thanks!
>>
>> Another question, in the LoanBroker class after processing loan quote, it
>> invokes send(ag.request).  How does it know it is going to put the out
>> the
>> message in the ActiveMQQueue ("demo.org.servicemix.output") from the
>> server
>> side?  If it is not define in the server side, what if there are multiple
>> applications being deployed, how does it know which output queue the out
>> message should go to?
> 
> At this point, the LoanBroker just create the out message of the request
> and send it back.  The NMR will route it to the consumer component
> (the loanBrokerJmsBinding component).  The JMS destination used
> for answers has been provided using the JMSReplyTo destination
> property by the client (look at JMSClient.java)
> 
>>
>> I am trying to create a InOnly Message Exchange example that use the same
>> loan broker pattern.
>>
>> 1.  I have the Client-to-JmsServiceComponent interaction.
>> 2. JmsServiceComponent-to-Controller interaction.
>> 3. Controller to DataManagementComponent interaction.
>>
>> The Controller is like the Loan Broker (provider of the
>> JmsServiceComponent
>> and consumer of the DataManagementComponent).  DataManagementComponent is
>> the provider.  I implemented the DataManagementComponent by extending the
>> TransformComponentSupport and implementing the transform method.  My
>> question is, am I extending the right class and implement the right
>> method?
>> Also, where do I call the done(exchange) for the DataManagementComponent?
> 
> The TransformComponentSupport will handle the status of the exchange for
> you,
> so you just have to fill the output message. TransformComponentSupport
> should
> be implemented by components that just act as a provider, receive an
> exchange
> and fill the output.  If you need to create and send exchanges (acting as
> a
> consumer), you should use its parent class: ComponentSUpport.
> 
>>
>> Another question is for the JMSClient, since this is an InOnly Message
>> Exchange, do I still need to use
>> MultiplexingRequestor.newInstance(factory,
>> inQueue, outQueue)?  Because I don't think I will have an outQueue.
> 
> No.  This example uses Lingo as a client, but you can use another way
> (plain jms, spring, etc ...) if you prefer.
> 
>>
>> Thanks for your help in advance!!!
>>
>>
>> gnodet wrote:
>> >
>> > On 10/6/06, dadade <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I am trying to understand how ServiceMix works with JMS and
>> >> WS-Notification/Web Service.
>> >> The questions I am asking might be stupid, but just trying to
>> understand.
>> >>
>> >> Looking at the loan broker example:
>> >>
>> >> The LOANBROKER_NS is the namespace, does this has to be a accessable
>> URI?
>> >>
>> >> The line :
>> >>  super(new QName(Constants.LOANBROKER_NS,
>> Constants.LOANBROKER_SERVICE),
>> >> "input");
>> >>
>> >> Is "input" the endpoint? Where is input begin defined?  Is it a
>> reserved
>> >> keyword?
>> >
>> > "input" is indeed the endpoint name, but in the configuration, only the
>> > service
>> > name is specified for routing.
>> >
>> > <sm:activationSpec componentName="loanBrokerJmsBinding"
>> >                                    destinationService="lb:loan-broker">
>> >
>> > so the endpoint name is not used in this case
>> >
>> >>
>> >> I am looking at the Interaction between JmsServiceComponet to
>> LoanBroker.
>> >> So after
>> >> loan broker process the input request, it is send out to Credit Agency
>> by
>> >> invoking send(inout).  How is send(inout) invoke the transform method
>> in
>> >> the
>> >> CreditAgency class?
>> >
>> > Lightweight components implements the MessageExchangeListener.
>> > All jbi exchanges sent to a component go to the onMessageExchange
>> > method.  The loanbroker sends an InOut exchange asynchronously
>> > to the specified service using
>> > new QName(Constants.LOANBROKER_NS, Constants.CREDITAGENCY_SERVICE)
>> > The JBI NMR will send the exchange to the matching service name:
>> >
>> > <sm:activationSpec componentName="creditAgency"
>> >                                    service="lb:credit-agency">
>> >
>> > which is the loanbroker.CreditAgency component.
>> > This component extends TransformComponentSupport and thus will receive
>> > the request in its transform method.
>> >
>> >>
>> >> Then if I look at the CreditAgency class, the transform method takes
>> >> MessageExchange exchange, NormalizedMessage in, and NormalizedMessge
>> out
>> >> as
>> >> arguments.  Which argument in the transform method does the Inout
>> inout
>> >> refers to?
>> >
>> > InOut, InOnly, RobustInOnly and InOptionalOut are all interfaces
>> > deriving from MessageExchange.  So the inout exchange sent by the
>> > loanbroker is received in the "exchange" parameter.  The "msg" message
>> > created by the loanbroker (which is the "in" message of the InOut
>> > exchange)
>> > is mapped to the "in" parameter of the transform method.  The "out"
>> > parameter is created by the TransformComponentSupport.
>> >
>> >>
>> >> Why doesn't the CreditAgency class need to extends ComponentSupport
>> but
>> >> just
>> >> the TransformComponentSupport?
>> >
>> > TransformComponentSupport  extends ComponentSupport and provides
>> > additional
>> > methods to ease the writing of simple components that mainly support a
>> > request / response pattern.  The loan broker is more complicated, so it
>> > can
>> > not benefit from the implementation of TransformComponentSupport.
>> >
>> > The main difference is that the CreditAgency only acts as a provider
>> > (it receives a jbi exchange, process it and send it back), whereas
>> > the loanbroker acts as both a provider and a consumer (it creates
>> > exchange and send them to other components).
>> >
>> >>
>> >> Why doesn't the CreditAgency class need the onMessageExchange method?
>> >
>> > Because it is implemented by the TransformComponentSupport
>> >
>> >
>> http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/components/util/package-frame.html
>> >
>> http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/xref/org/apache/servicemix/components/util/TransformComponentSupport.html
>> >
>> > As can see, TransformComponentSupport implements the onMessageExchange
>> > and derived classes just need to implement the transform method.
>> >
>> >>
>> >> Thanks
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/JMS-Implementation-tf2392384.html#a6670308
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/JMS-Implementation-tf2392384.html#a6729245
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JMS-Implementation-tf2392384.html#a6761154
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to