8 Replies Latest reply on Sep 11, 2008 11:37 AM by Stefan Lecho

    Email Client for Jboss ESB

    neha2911 Newbie

      I am working with jboss-soa-p.4.2.0 which consist of JBoss ESB 4.2.1 GA . I want to use lotus notus as email client.I want to develop a service that gets invoked as soon as some specific email comes to my Lotus Notes mail id.

      How should i go about this senario?

      If not Lotus Notes what all are supported and how can i integrate any email client ?

        • 1. Re: Email Client for Jboss ESB
          Tom Fennelly Master

          Could you create a scheduled listener that uses POP3/IMAP to access the mail server? The docs contain info on scheduled listeners.

          • 2. Re: Email Client for Jboss ESB
            neha2911 Newbie

            Please can you just tell me the link as i have found document on JCA Listener but not for schedule listener.

            Using the example that is given in JCA Message inflow i have made the changes in jbossesb file but when iam executing the sample i get following error

            2008-08-26 12:41:14,988 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/quickstart_helloworld_mail_Request_esb] stopped
            2008-08-26 12:41:15,081 INFO [org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer] create esb service, Quickstart_helloworld_mail.esb
            2008-08-26 12:41:15,097 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/quickstart_helloworld_mail_Request_esb] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2008-08-26 12:41:15,097 INFO [org.jboss.resource.deployment.RARDeployment] Required license terms exist, view META-INF/ra.xml in .../tmp/deploy/tmp15160Quickstart_helloworld_mail.esb-contents/mail-ra.rar
            2008-08-26 12:41:15,222 INFO [org.quartz.core.QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
            2008-08-26 12:41:46,222 ERROR [org.jboss.resource.adapter.mail.inflow.MailActivation] Failed to execute folder check, spec=MailActivationSpec(mailServer=172.25.9.2, storeProtocol=imap, mailFolder=mail\282154.nsf, pollingInterval=30000, messageSelector=null, userName=282154, maxMessages=1, debug=false, starttls=false)
            2008-08-26 12:42:17,190 ERROR [org.jboss.resource.adapter.mail.inflow.MailActivation] Failed to execute folder check, spec=MailActivationSpec(mailServer=172.25.9.2, storeProtocol=imap, mailFolder=mail\282154.nsf, pollingInterval=30000, messageSelector=null, userName=282154, maxMessages=1, debug=false, starttls=false)


            My jboss esb file is

            <services>
             <service category="MailServiceESB" name="MailListener"
             description="Hello World Mail Service">
             <listeners>
             <jca-gateway name="Mail-JCA-Gateway"
             adapter="Quickstart_helloworld_mail.esb#mail-ra.rar"
             endpointClass="org.jboss.soa.esb.samples.quickstart.helloworld_mail.MailEndpoint"
             is-gateway="true" transacted="false">
             <activation-config>
             <property name="mailServer" value="172.25.33.97"/>
             <property name="storeProtocol" value="imap"/>
             <property name="mailFolder" value="/var/mail"/>
             <property name="userName" value="rajesh"/>
             <property name="password" value="rajesh12"/>
             <property name="pollingInterval" value="30000"/>
             </activation-config>
             </jca-gateway>
             <jms-listener name="JMS-ESBListener"
             busidref="quickstartEsbChannel"
             maxThreads="1"
             />
             </listeners>
             <actions>
             <action name="action1"
             class="org.jboss.soa.esb.samples.quickstart.helloworld_mail.MyMailListenerAction"
             process="displayMessage"
             />
             <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
             <property name="printfull" value="true"/>
             </action>
             </actions>
             </service>
             </services>
            
            What should i do?


            • 3. Re: Email Client for Jboss ESB
              Tom Fennelly Master

               

              "Neha29" wrote:
              Please can you just tell me the link as i have found document on JCA Listener but not for schedule listener.


              Programmers Guide. Search for "Scheduling of Services".

              Your use of JCA reminded me of the example done by Kevin: Using Mail Inflow with JBossESB. Have you seen/tried this?

              • 4. Re: Email Client for Jboss ESB
                neha2911 Newbie

                 


                Your use of JCA reminded me of the example done by Kevin: Using Mail Inflow with JBossESB. Have you seen/tried this?



                I have used the same sample and i am getting the error .Plese refer to the previous post to see the error.I have a SMTP server aa the mail server..

                What should i do to remove the error ?

                • 5. Re: Email Client for Jboss ESB
                  Tom Cunningham Master

                  Can you post the error?

                  • 6. Re: Email Client for Jboss ESB
                    neha2911 Newbie

                    The error is :

                    2008-08-26 12:41:15,222 INFO [org.quartz.core.QuartzScheduler] Scheduler DefaultQuartzScheduler_$_N
                    ON_CLUSTERED started.
                    2008-08-26 12:41:46,222 ERROR [org.jboss.resource.adapter.mail.inflow.MailActivation] Failed to exec
                    ute folder check, spec=MailActivationSpec(mailServer=172.25.9.2, storeProtocol=imap, mailFolder=mail
                    \282154.nsf, pollingInterval=30000, messageSelector=null, userName=282154, maxMessages=1, debug=fals
                    e, starttls=false)
                    2008-08-26 12:42:17,190 ERROR [org.jboss.resource.adapter.mail.inflow.MailActivation] Failed to exec
                    ute folder check, spec=MailActivationSpec(mailServer=172.25.9.2, storeProtocol=imap, mailFolder=mail
                    \282154.nsf, pollingInterval=30000, messageSelector=null, userName=282154, maxMessages=1, debug=fals
                    e, starttls=false)


                    Please find the jbossesb configuration in the earlier post.

                    • 7. Re: Email Client for Jboss ESB
                      neha2911 Newbie

                      Now i am using a pop3 server but i am still getting the same error.
                      It is unable to perform folder check .All my mails are received in my inbox. Is there any special wat to define the folder name in jbosesb.xml? Or is there any other problem?

                      Error is :

                      2008-08-26 12:41:14,988 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/quickstar
                      t_helloworld_mail_Request_esb] stopped
                      2008-08-26 12:41:15,081 INFO [org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer] create esb serv
                      ice, Quickstart_helloworld_mail.esb
                      2008-08-26 12:41:15,097 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/quickstar
                      t_helloworld_mail_Request_esb] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                      2008-08-26 12:41:15,097 INFO [org.jboss.resource.deployment.RARDeployment] Required license terms e
                      xist, view META-INF/ra.xml in .../tmp/deploy/tmp15160Quickstart_helloworld_mail.esb-contents/mail-ra
                      .rar
                      2008-08-26 12:41:15,222 INFO [org.quartz.core.QuartzScheduler] Scheduler DefaultQuartzScheduler_$_N
                      ON_CLUSTERED started.
                      2008-08-26 12:41:46,222
                       ERROR [org.jboss.resource.adapter.mail.inflow.MailActivation] Failed to execute folder check, spec=MailActivationSpec(mailServer=192.168.120.210, storeProtocol=pop, mailFolder=Inbox, pollingInterval=30000, messageSelector=null, userName=neha.pandey@robotics, maxMessages=1, debug=false, starttls=false)
                      2008-08-26 12:42:17,190
                       ERROR [org.jboss.resource.adapter.mail.inflow.MailActivation] Failed to execute folder check, spec=MailActivationSpec(mailServer=192.168.120.210, storeProtocol=pop, mailFolder=Inbox, pollingInterval=30000, messageSelector=null, userName=neha.pandey@robotics, maxMessages=1, debug=false, starttls=false)
                      


                      My jboss-esb is :

                      
                      <services>
                       <service category="MailServiceESB" name="MailListener"
                       description="Hello World Mail Service">
                       <listeners>
                       <jca-gateway name="Mail-JCA-Gateway"
                       adapter="Quickstart_helloworld_mail.esb#mail-ra.rar"
                       endpointClass="org.jboss.soa.esb.samples.quickstart.helloworld_mail.MailEndpoint"
                       is-gateway="true" transacted="false">
                       <activation-config>
                       <property name="mailServer" value="192.168.120.210"/>
                       <property name="storeProtocol" value="pop"/>
                       <property name="mailFolder" value="*"/>
                       <property name="userName" value="neha.pandey@lntrobotics"/>
                       <property name="password" value="Newuser123"/>
                       <property name="pollingInterval" value="30000"/>
                       </activation-config>
                       </jca-gateway>
                       <jms-listener name="JMS-ESBListener"
                       busidref="quickstartEsbChannel"
                       maxThreads="1"
                       />
                       </listeners>
                       <actions>
                       <action name="action1"
                       class="org.jboss.soa.esb.samples.quickstart.helloworld_mail.MyMailListenerAction"
                       process="displayMessage"
                       />
                       <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
                       <property name="printfull" value="true"/>
                       </action>
                       </actions>
                       </service>
                       </services>
                      
                      



                      What should be done?