servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: new JBI componten: EMail-BC [Discussion thread]
Date Tue, 26 Feb 2008 23:17:32 GMT
On Tue, Feb 26, 2008 at 2:04 PM, lhe77 <lars.heinemann@compart.net> wrote:
>
>  Hi,
>
>  actually I am developing a JBI compliant binding component for polling and
>  sending emails.
>  I will start here a discussion to put together all ideas and requirements
>  for this BC. So any
>  suggestion is welcome.
>
>  State:
>  - The BC uses the JavaMail API to poll and send emails. (2 endpoints for
>  now)
>
>  ToDo:
>  - Sending mails via spring mail. (via another endpoint)
>  - integrate frameworks like Velocity for email template handling

I'd definitely look at the Spring Mail API for the task of sending
email messages. For polling a server for email messages, unfortunately
Spring doesn't offer anything. You might consider looking at the
Spring DefaultMessageListenerContainer (DMLC) architecture as an
example of connecting to a system and a polling for messages. Although
the DMLC is a JMS client, the same style of architecture would work
for connecting to a mail server and polling for messages.

For testing, I highly suggest looking at using EasyMock
(http://easymock.com/). EasyMock will allow you to mock any Java API
and makes testing a breeze where external systems are involved. I have
mocked JMS brokers, JDBC accessible data sources and much more using
EasyMock. By using EasyMock to mock the functionality of a mail
server, you won't need to develop unit level tests using an actual
mail server. This will be a huge time saver.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Mime
View raw message