Great answer... This helped me to understant the diference between using the
servicemix file and a SA package.


I´m using eclipse to develop the project, but i´m not familiar with maven,
just with ant. But i have instaled maven and give a few tries.

My problem is how to create the JBI projects in eclipse...

Maybe can you help me, which maven commands I need to run, to build this
project? (I want to create a right package structure, without using ant
again)


Thanks in advance!








Jean-Baptiste Onofré wrote:
> 
> Hi,
> 
> I recommand to avoid the usage of the lightweight container and prefer 
> the pure JBI form.
> 
> In your case, you need to define two SUs:
> 1/ a mail poller SU
> 2/ a file sender (writer)
> 
> Concerning the mail poller, you can define the following xbean.xml:
> 
> <beans xmlns:my="http://www.example.org/myService";
>         xmlns:mail="http://servicemix.apache.org/mail/1.0";>
> <mail:poller service="my:MailService" endpoint="MailPoller"
>       targetService="my:MailService"
>       targetEndpoint="MailFileWriter"
>       period="10000"
>       connection="imap://[email protected]:143/INBOX?password=xxxx"
>       deleteProcessedMessages="false"
>       processOnlyUnseenMessages="true"/>
> </beans>
> 
> Create a maven project with this xbean as resources.
> 
> On the file endpoint side, you can define the following xbean.xml:
> 
> <beans xmlns:my="http://www.example.org/myService";
>         xmlns:file="http://servicemix.apache.org/file/1.0";>
> <file:sender service="my:MailService" endpoint="MailFileWriter"
>       directory="file:/tmp/mailFiles"/>
> </beans>
> 
> After that you can assemble both SU (the mail poller and file sender) 
> into a SA and create the SA zip file.
> 
> Once done, you can deploy the SA zip file by copying it into the 
> hotdeploy directory (if you use SMX3).
> 
> Regards
> JB
> 
> FuinhaAzul wrote:
>> Hi there.
>> 
>> I´m trying to create a servicemix application that takes a email and put
>> the
>> content on a file. But i´m not understand how.  I did the file-binding
>> sample, but I´m not suceded to adapt this sample to use email.
>> This is waht I did:
>> 
>> servicemix.xml:
>> 
>> 
>> <beans xmlns:sm="http://servicemix.apache.org/config/1.0";
>>           xmlns:foo="http://servicemix.org/demo/"; 
>>           xmlns:mail="http://servicemix.apache.org/mail/1.0";>
>> 
>>   <bean id="jndi"
>> class="org.apache.xbean.spring.jndi.SpringInitialContextFactory" 
>>         factory-method="makeInitialContext" singleton="true" />
>> 
>>      <!-- the JBI container -->
>>      <sm:container id="jbi" useMBeanServer="true" createMBeanServer="true">
>> 
>>              <sm:activationSpecs>
>> 
>>                      <!-- Write files to the outbox directory -->
>>                      <sm:activationSpec componentName="fileSender"
>>                              service="foo:fileSender">
>>                              <sm:component>
>>                                      <bean 
>> class="org.apache.servicemix.components.file.FileWriter">
>>                                              <property name="directory" 
>> value="outbox" />
>> 
>>                                      </bean>
>>                              </sm:component>
>>                      </sm:activationSpec>
>> 
>>                      <sm:activationSpec componentName="emailPoller"
>>                              service="emailPoller" 
>> destinationService="foo:fileSender">
>>                              <sm:component>
>>                                      <bean 
>> class="org.apache.servicemix.components.email.MimeMailPoller">
>>                                              <property name="hostName" 
>> value="xxxxx" />
>>                                              <property name="password" 
>> value="xxxx" />
>>                                              <property name="userName" 
>> value="xxx" />
>>                                              <property name="debug" 
>> value="true" />
>>                                              
>>                                      </bean>
>>                              </sm:component>
>>                      </sm:activationSpec>
>>                      
>>              </sm:activationSpecs>
>>      </sm:container>
>> 
>> </beans>
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Please-ServiceMix-sample-Email-Poller--%3E-FileWritter-tp24717894p24719835.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to