4 Replies Latest reply on May 30, 2006 11:45 AM by Jay Glass

    Tips on MailListeners...

    Jay Glass Novice

      Hi All,

      So, trying to get a MailListener going, without breaking the existing JMSMailListener, thus there would be the JMSMailListener and MyMailListener in the chain.

      I copied JMSMailListener and JMSMailListenerMBean, renaming both to:
      MyMailListener and MyMailListenerMBean

      In JBoss-Service.xml, added(as well the JMSMailListener still exists)...

      <!--
       My JMS Mail Lisetner is used to asynchronously process mails, however the bodies are not stored via JMS as JBossMQ, the present
       JBosss messaging solution, doesn't do this efficiently. This is used for normal mail processing.
       -->
       <mbean code="org.jboss.mail.maillistener.MyMailListener"
       name="jboss.mail:type=MailServices,name=MyMailListener">
       <constructor>
       <arg type="java.lang.String" value="java:/ConnectionFactory"/>
       <arg type="java.lang.String" value="java:/ConnectionFactory"/>
       </constructor>
      
       <depends>jboss.mq:service=DestinationManager</depends>
       <!-- <depends>jboss.management.local:j2eeType=JCAManagedConnectionFactory,name=JmsXA</depends>-->
       <depends>jboss.mq.destination:name=localMail,service=Queue</depends>
       <depends>jboss.mq.destination:name=remoteMail,service=Queue</depends>
       <depends optional-attribute-name="DomainGroup">jboss.mail:type=MailServices,name=DomainGroup,group=Local</depends>
      
       <!-- queue or topic -->
       <attribute name="DestinationType">queue</attribute>
      
       <!-- posts which are OnServer meaning they are for our domain and presumably a "local" user
       and won't go through an additional SMTP server should be sent here -->
       <attribute name="OnServerPostDestination">localMail</attribute>
      
       <!-- posts which are OffServer meaning they will go through an additional SMTP server before
       finally being received should go here -->
       <attribute name="OffServerPostDestination">remoteMail</attribute>
      
       <!-- Specifies the retry policy for failed local mail recipients. You can
      ...
      ...
       </mbean>


      and
      <mbean code="org.jboss.mail.MailListenerChainService"
       name="jboss.mail:type=MailServices,name=MailListenerChain" xmbean-dd="META-INF/chain-xmbean.xml">
       <depends>jboss.mail:type=MailServices,name=MailListener</depends>
       <attribute name="Listeners">
       <listeners>
       <!-- Uncomment to allow replies to go to Nukes
       <value>jboss.mail:type=MailServices,name=NukesPosterJMSListener</value>
       -->
       <listener>jboss.mail:type=MailServices,name=MailListener</listener>
       <listener>jboss.mail:type=MailServices,name=MyMailListener</listener>
       </listeners>
       </attribute>
       </mbean>


      and
      <!--
       Mail Listener responsible for delivering mails to local mailboxes.
       -->
       <mbean code="org.jboss.mail.mailhandler.localmailbox.LocalDelivery"
       name="jboss.mail:type=MailServices,name=LocalDelivery">
       <depends optional-attribute-name="MailboxManager"
       proxy-type="attribute">jboss.mail:type=MailServices,name=MailboxManager</depends>
       <depends optional-attribute-name="Router" proxy-type="org.jboss.mail.MailListener">jboss.mail:type=MailServices,name=MailListener</depends>
       <depends optional-attribute-name="Router" proxy-type="org.jboss.mail.MailListener">jboss.mail:type=MailServices,name=MyMailListener</depends>
       </mbean>
      
       <!--
       Mail Listener chain for mails to be delivered locally.
       Any listeners that are specific to locally delivered mail should be
       added here. E.g. SPAM filtering.
       -->
       <mbean code="org.jboss.mail.MailListenerChainService"
       name="jboss.mail:type=MailServices,name=LocalDeliveryChain" xmbean-dd="META-INF/chain-xmbean.xml">
       <depends>jboss.mail:type=MailServices,name=LocalDelivery</depends>
       <attribute name="Listeners">
       <listeners>
       <listener>jboss.mail:type=MailServices,name=LocalDelivery</listener>
       </listeners>
       </attribute>
       </mbean>


      The Application server loads the new MyMailListener fine, but when it begins to process a mail, after the original MailListener, it is erroring... did I miss something? Do I need a completely different queue, as the message no longer exists, but this doesnt seem correct in that the way you guys described the process, the first mail listener, returns the sent mail, for processing by the next (my)mail listener.

      I know, Andrew, you were going to write up an Wiki on the subject, but havnt seen one or heard mention of em.

      I searched forums, and as far as I can tell/find, I have done the correct first steps...So I thought I would start this thread, as others, might happen upon it, in their own attempts in making maillisteners...



        • 1. Re: Tips on MailListeners...
          Jay Glass Novice

          ooops, heres the erred out...

          12:07:35,593 INFO [STDOUT] **********JAY DEBUG - JMSMailListener:putMessageOnQueue:MailData:MailBod
          y:
          12:07:35,593 INFO [STDOUT] Body:
          12:07:37,890 INFO [STDOUT] test 69a
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:Send:ElseQueue
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:sendMessageQueue
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:prepareMail
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:prepareMail:ELSE MAIL NOT IN
          STANCE OF RETRY WRAPPER
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:prepareNewMail
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:determineDestinationsInMail
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:getDestinationForMailAddress
          
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:getDestinationForMailAddress
          : if(domainGroupMBean.isInGroup(domain))
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:getDestinationForMailAddress
          :onServerlocalMail
          12:07:37,937 INFO [STDOUT] **********JAY DEBUG - MyMailListener:sendMessageQueue:if prepared
          Mail.getSendOnServer()
          12:07:37,968 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue
          12:07:38,000 INFO [MyMailListener] PUT MESSAGE ON QUEUE:org.jboss.mail.message.Mail@1afbbe3
          12:07:38,000 INFO [STDOUT] **********JAY DEBUG - MyMailListener:
          12:07:38,031 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:Main Try
          12:07:38,031 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailAddress:
          12:07:38,031 INFO [STDOUT] From: jasong@192.168.69.251
          12:07:38,031 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailAddress[]:
          12:07:38,031 INFO [STDOUT] To: jasong@192.168.69.251
          12:07:38,031 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailHeaders:
          12:07:38,031 INFO [STDOUT] Headers:
          12:07:38,031 INFO [STDOUT] Return-Path: <jasong@192.168.69.251>
          Received: from happy2kas (happy-2kas 192.168.69.251) by happy-2kas/JBossMail 1.0M4 (192.168.69.251)
           with SMTP id 11489296545316.292053863502815; Mon, 29 May 2006 12:07:34 -0700 (GMT-07:00)
          Message-ID: <000b01c68353$24872a40$fb45a8c0@happy2kas>
          From: "jason glass" <jasong@192.168.69.251>
          To: "jason glass" <jasong@192.168.69.251>
          Subject: test 69a
          Date: Mon, 29 May 2006 12:07:34 -0700
          MIME-Version: 1.0
          Content-Type: text/plain;
           charset="iso-8859-1"
          Content-Transfer-Encoding: 7bit
          X-Priority: 3
          X-MSMail-Priority: Normal
          X-Mailer: Microsoft Outlook Express 6.00.2800.1506
          X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
          12:07:38,093 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailBody:
          12:07:38,093 INFO [STDOUT] Body:
          12:07:40,859 INFO [STDOUT] test 69a
          12:07:40,937 ERROR [LocalDelivery] Could not deliver local mail
          javax.management.RuntimeMBeanException
           at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatch
          er.java:162)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:149)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
           at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:20
          1)
           at $Proxy105.getStoreItem(Unknown Source)
           at org.jboss.mail.message.StoredMailBody.getItem(StoredMailBody.java:105)
           at org.jboss.mail.message.StoredMailBody.getSize(StoredMailBody.java:172)
           at org.jboss.mail.mailbox.MessageData.<init>(MessageData.java:119)
           at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.org$jboss$mail$mailhandler$localmai
          lbox$LocalDelivery$deliver$aop(LocalDelivery.java:101)
           at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.access$1(LocalDelivery.java)
           at org.jboss.mail.mailhandler.localmailbox.LocalDelivery$deliver_7597238674321613949.invokeN
          ext(LocalDelivery$deliver_7597238674321613949.java)
           at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
           at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
           at org.jboss.mail.mailhandler.localmailbox.LocalDelivery$deliver_7597238674321613949.invokeN
          ext(LocalDelivery$deliver_7597238674321613949.java)
           at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.deliver(LocalDelivery.java)
           at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.send(LocalDelivery.java:43)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
           at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:20
          1)
           at $Proxy57.send(Unknown Source)
           at org.jboss.mail.MailListenerChainService.processMail(MailListenerChainService.java:166)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
          ptor.java:127)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
           at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:20
          1)
           at $Proxy104.processMail(Unknown Source)
           at org.jboss.mail.delivery.DeliveryMDB.onMessage(DeliveryMDB.java:72)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
           at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j
          ava:475)
           at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
          nterceptor.java:149)
           at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc
          eptor.java:101)
           at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
          
           at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
           at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
           at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
           at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
           at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
           at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
          java:122)
           at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
           at org.jboss.ejb.Container.invoke(Container.java:873)
           at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
           at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI
          nvoker.java:1379)
           at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
           at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904
          )
           at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
           at org.jboss.mq.SpySession.run(SpySession.java:333)
           at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: javax.persistence.NoResultException: No entity found for query
           at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:47)
           at org.jboss.mail.store.AbstractStore.org$jboss$mail$store$AbstractStore$loadMetaData$aop(Ab
          stractStore.java:181)
           at org.jboss.mail.store.AbstractStore$loadMetaData_N999927503220138265.invokeNext(AbstractSt
          ore$loadMetaData_N999927503220138265.java)
           at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:196)
           at org.jboss.mail.store.AbstractStore$loadMetaData_N999927503220138265.invokeNext(AbstractSt
          ore$loadMetaData_N999927503220138265.java)
           at org.jboss.mail.store.AbstractStore.loadMetaData(AbstractStore.java)
           at org.jboss.mail.store.AbstractStore.org$jboss$mail$store$AbstractStore$getStoreItem$aop(Ab
          stractStore.java:87)
           at org.jboss.mail.store.AbstractStore$getStoreItem_N5079312968078757045.invokeNext(AbstractS
          tore$getStoreItem_N5079312968078757045.java)
           at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:196)
           at org.jboss.mail.store.AbstractStore$getStoreItem_N5079312968078757045.invokeNext(AbstractS
          tore$getStoreItem_N5079312968078757045.java)
           at org.jboss.mail.store.AbstractStore.getStoreItem(AbstractStore.java)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
           ... 70 more
          12:07:41,343 ERROR [LocalDelivery] Unable to deliver message to local user: jasong@192.168.69.251.
          Unknown user.
          12:07:41,343 INFO [STDOUT] **********JAY DEBUG - MyMailListener:Send:ElseQueue
          12:07:41,343 INFO [STDOUT] **********JAY DEBUG - MyMailListener:sendMessageQueue
          12:07:41,343 INFO [STDOUT] **********JAY DEBUG - MyMailListener:prepareMail
          12:07:41,343 INFO [STDOUT] **********JAY DEBUG - MyMailListener:prepareMail:IF mail instance
          of MailRetryWrapper)
          12:07:41,343 INFO [STDOUT] **********JAY DEBUG - MyMailListener:prepareResentMail
          12:07:41,375 INFO [STDOUT] **********JAY DEBUG - MyMailListener:sendMessageQueue:if prepared
          Mail.getSendOnServer()
          12:07:41,375 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue
          12:07:41,375 INFO [MyMailListener] PUT MESSAGE ON QUEUE:org.jboss.mail.message.MailRetryWrap
          per@26d8e6
          12:07:41,375 INFO [STDOUT] **********JAY DEBUG - MyMailListener:
          12:07:41,375 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:Main Try
          12:07:41,375 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailAddress:
          12:07:41,406 INFO [STDOUT] From: jasong@192.168.69.251
          12:07:41,406 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailAddress[]:
          12:07:41,406 INFO [STDOUT] To: jasong@192.168.69.251
          12:07:41,406 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailHeaders:
          12:07:41,421 INFO [STDOUT] Headers:
          12:07:41,421 INFO [STDOUT] Return-Path: <jasong@192.168.69.251>
          Received: from happy2kas (happy-2kas 192.168.69.251) by happy-2kas/JBossMail 1.0M4 (192.168.69.251)
           with SMTP id 11489296545316.292053863502815; Mon, 29 May 2006 12:07:34 -0700 (GMT-07:00)
          Message-ID: <000b01c68353$24872a40$fb45a8c0@happy2kas>
          From: "jason glass" <jasong@192.168.69.251>
          To: "jason glass" <jasong@192.168.69.251>
          Subject: test 69a
          Date: Mon, 29 May 2006 12:07:34 -0700
          MIME-Version: 1.0
          Content-Type: text/plain;
           charset="iso-8859-1"
          Content-Transfer-Encoding: 7bit
          X-Priority: 3
          X-MSMail-Priority: Normal
          X-Mailer: Microsoft Outlook Express 6.00.2800.1506
          X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
          12:07:41,468 INFO [ConnectionHandler] ConnectionHandler finished
          12:07:41,484 INFO [STDOUT] **********JAY DEBUG - MyMailListener:putMessageOnQueue:MailData:M
          ailBody:
          12:07:41,484 INFO [STDOUT] Body:
          12:07:43,421 INFO [STDOUT] test 69a
          12:08:12,421 INFO [Server] Got request
          12:08:12,421 INFO [Server] waiting for request
          12:08:12,531 INFO [ConnectionHandler] connected: /192.168.69.251 to: /192.168.69.251 until: 1148929
          812421
          12:08:12,562 WARN [CmdUSER] pop username set to jasong
          12:08:16,000 INFO [ConnectionHandler] ConnectionHandler finished
          12:08:57,703 INFO [Server] Got request
          12:08:57,703 INFO [Server] waiting for request
          12:08:57,718 INFO [ConnectionHandler] connected: /192.168.69.251 to: /192.168.69.251 until: 1148929
          857703
          12:08:57,718 WARN [CmdUSER] pop username set to jasong
          12:08:58,671 INFO [ConnectionHandler] ConnectionHandler finished


          • 2. Re: Tips on MailListeners...
            Jay Glass Novice

            Ooops, Tip Number One always ensure, that the code your buidling with, matches the code your server is running...I.e. dont take 1.0m5 source code, and try to run it on a 1.0m4 server(and dbase)...

            Can someone please, remove/delete (Andrew) the errored output, as it didnt really pertain.

            The steps outlined above, do work 100% My second mail listener is running and fully functional.

            But on a similar note(and I have seen it in 1.0m4 also) why is it, that sometimes a local user is found, and sometimes they are not. I.e. a mail is sent to the mail server addressed to user@localhost, on the first delivery attempt, you get the following...though, the wrapped email retry, eventually succeeds. I have tried this sending from user A to user B, and vice versa

            15:01:44,890 INFO [LocalDelivery] ----------LocalDeliverySending:send-MailBox isnt Null
            15:01:44,906 ERROR [LocalDelivery] ----------LocalDeliverySending:send-Could not deliver local mail
            java.lang.NullPointerException
             at org.jboss.mail.store.StoreItemImpl.getSize(StoreItemImpl.java:126)
             at org.jboss.mail.message.StoredMailBody.getSize(StoredMailBody.java:172)
             at org.jboss.mail.mailbox.MessageData.<init>(MessageData.java:171)
             at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.org$jboss$mail$mailhandler$localmai
            lbox$LocalDelivery$deliver$aop(LocalDelivery.java:152)
             at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.access$1(LocalDelivery.java)
             at org.jboss.mail.mailhandler.localmailbox.LocalDelivery$deliver_7597238674321613949.invokeN
            ext(LocalDelivery$deliver_7597238674321613949.java)
             at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
             at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
             at org.jboss.mail.mailhandler.localmailbox.LocalDelivery$deliver_7597238674321613949.invokeN
            ext(LocalDelivery$deliver_7597238674321613949.java)
             at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.deliver(LocalDelivery.java)
             at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.send(LocalDelivery.java:72)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:20
            1)
             at $Proxy96.send(Unknown Source)
             at org.jboss.mail.MailListenerChainService.processMail(MailListenerChainService.java:189)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
            ptor.java:142)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
             at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:20
            1)
             at $Proxy152.processMail(Unknown Source)
             at org.jboss.mail.delivery.DeliveryMDB.onMessage(DeliveryMDB.java:108)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
             at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j
            ava:495)
             at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
            nterceptor.java:158)
             at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc
            eptor.java:116)
             at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
            
             at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
             at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
             at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
             at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
             at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
             at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
            java:136)
             at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
             at org.jboss.ejb.Container.invoke(Container.java:927)
             at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
             at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI
            nvoker.java:1287)
             at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
             at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:902
            )
             at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
             at org.jboss.mq.SpySession.run(SpySession.java:323)
             at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
             at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
             at java.lang.Thread.run(Thread.java:595)
            15:01:44,906 INFO [STDOUT] **********JAY DEBUG - MyMailListener:PreparedMail:getRetrySeconds
            
            15:01:45,171 ERROR [LocalDelivery] ----------LocalDeliverySending:send-Unable to deliver message to
            local user: jasong@192.168.69.251. Unknown user.


            Next Part in series (of ops) Adding our Own Message Queue...

            • 3. Re: Tips on MailListeners...
              Andrew Oliver Master

              The problem you identified in your last post matches:

              http://jira.jboss.com/jira/browse/JBMAIL-229

              This has actually been fixed in HEAD but not applied to the M5 branch. Mike Barker fixed this with fixes to JMSMailListener by switching back to the proper JMS connection object (the transaction aware one that doesn't fire off before the blob is written). The unknown user error is a lie.

              -Andy

              • 4. Re: Tips on MailListeners...
                Jay Glass Novice

                oh, cool, thanks Andrew...

                I have my MailListener, partially functioning with it's own mail queue...last time I ran it, I think the Local Delivery EJB was having issues, when finished (working), I will outline the steps here