You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Lou Parisi <Lo...@photomask.com> on 2009/04/28 17:34:21 UTC

New User Design Question

I have been working with ServiceMix for about two weeks.  It looks promising
for our application so thanks for all the work.  I am putting together a
presentation for a project proposal and have a few design/architecture
questions.  If you have some opinion, I would appreciate any feedback.

I have developed a component to send ActiveMQ Blob Messages using the
servicemix-bean base component.  The component receives a message from FTP
File Poller and then creates a AMQ BlobMessage and sends using AMQ
connectionFactory configured in bean.  On the receiving side I am using
standard JMS consumer and custom marshaler to write the file to the local
file system.  I have a few questions around this topic.

1. When developing components using servicemix-bean is there a distinction
between binding component and service engine?  

2. My component would typically be considered a binding component (I
think?).  Is this accurate even though it is developed as bean component? 
Site documents servicemix-bean as a service engine component.

3. When would someone decide to create a full-fledged binding component
(such as hello world BC in tutorial) instead of using service-mix bean
-- 
View this message in context: http://www.nabble.com/New-User-Design-Question-tp23279581p23279581.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: New User Design Question

Posted by Lou Parisi <Lo...@photomask.com>.
Hi, Thanks for your reply.  I have given a summary of my component.

>From the outside, the BlobSender component works very similar to the
servicemix jms:provider component except that it sends ActiveMQ BlobMessages
because I have very large files.  See
http://activemq.apache.org/blob-messages.html

For this component I configure the connectionFactory and destination queue
as properties of the bean in xbean.xml.

A message comes from the FTP Poller to my BlobSender component.
The bean implements the MessageExchangeListener interface.  In the
onMessageExchange method I read the filepath and ftpserver from the message
properties.  I am using a custom file marshaler of the FTP poller so I do
not attach the actual file.

With the configured bean properties and message properties I create an
ActiveMQ BlobMessage and send it.  After this I set the exchange status as
done.

On the receiving side I just use the standard jms:consumer with a custom
JmsConsumerMarshaler.


Jean-Baptiste Onofré wrote:
> 
> 
> Could we have some example of your binding component ?
> 
> 

-- 
View this message in context: http://www.nabble.com/New-User-Design-Question-tp23279581p23287444.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: New User Design Question

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lou,

> 1. When developing components using servicemix-bean is there a distinction
> between binding component and service engine?  
I think that you talk on developing service unit. I guess that you have 
coded a service unit (defining a servicemix-bean endpoint). Your service 
unit uses servicemix-bean component and you have defined the 
configuration using a xbean.xml. Correct ?
If you have defined a service unit, it extends the component behavior 
(as it's a kind of specialization of the component). The endpoint 
behavior depends of the component and your configuration in the 
xbean.xml. servicemix-bean component works only in provider mode. As 
servicemix-bean is a service engine, it acts as provider (consumer 
doesn't make sense for a service engine).

> 2. My component would typically be considered a binding component (I
> think?).  Is this accurate even though it is developed as bean component? 
> Site documents servicemix-bean as a service engine component.
The purpose of a binding component is to communicate for external system 
(FTP, mail, JMS, etc). I don't see why you need to create your own 
component. You can define a "chain" of component/endpoint and route 
using JBI (target service and endpoint).

Could we have some example of your binding component ?

Regards
JB
-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086