4 Replies Latest reply on Apr 5, 2007 8:39 PM by tonylmai

    Where did my messages (sent by a SessionBean) go?

      Hello,

      I have a problem in my client application in receiving messages published by a SessionBean (EJB3). I am using JBoss Messaging with JBoss 4.0.5GA.

      My client had no problem looking up the name, created a destination and then a MessageConsumer for the destination (queue).

      None of the messages published by my SessionBean would end up in my client's application. My SessionBean had no problem looking up the name of the queue, created a destination, then created a MessageProducer for the channel, and sent the messages each time.

      Yet no one's home.

      To be sure it was not my client, I'd created another test app (MessageProducer) to publish messages to this queue. These messages did arrive in my client's application without any problem.

      So I figured it have something to do with my SessionBean. Perhaps it was publishing to the wrong channel. The thing is, the same name was used and no exception was thrown when the lookup were performed or when the destination was created. No other queue were declared in the *-destination-service.xml. JBoss log showed the queue was created with the correct name.

      Any idea on how I would go about debugging this kind of problem?

      Thanks
      -tony

        • 1. Re: Where did my messages (sent by a SessionBean) go?
          clebert.suconic

          You could enable tracing on org.jboss.jms and org.jboss.messaging at log4j and look at what happens after your method invocation.

          • 2. Re: Where did my messages (sent by a SessionBean) go?

            Here is the trace. I don't see confirmation that a message had been sent.

            2007-04-05 14:52:34,375 DEBUG [org.jboss.jms.message.MessageIdGeneratorFactory] checked out MessageIdGenerator for 0, reference count is 5
            2007-04-05 14:52:34,375 DEBUG [org.jboss.jms.server.endpoint.ServerConnectionEndpoint] ConnectionEndpoint[45] creating non transacted session, AUTO_ACKNOWLEDGE, non XA
            2007-04-05 14:52:34,375 DEBUG [org.jboss.jms.server.endpoint.ServerConnectionEndpoint] created and registered SessionEndpoint[46]
            2007-04-05 14:52:34,375 DEBUG [org.jboss.jms.server.endpoint.ServerConnectionEndpoint] created SessionDelegate[16030232, ID=46]
            2007-04-05 14:52:34,484 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1fecaeb, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@f631d8{ url=null ,addedOrder=0}
            2007-04-05 14:53:28,859 DEBUG [org.jboss.jms.server.security.SecurityMetadataStore] No SecurityMetadadata was available for td-private, using default security config
            2007-04-05 14:53:28,859 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] accepted: Socket[addr=/192.168.1.101,port=3875,localport=2705]
            2007-04-05 14:53:28,875 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] SecondaryServerSocketThread: transferred socket: 5c4o12t-xx5l00-f05qv1bb-1-f05qv1z6-7
            2007-04-05 14:53:28,875 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] found socket: Socket[addr=/192.168.1.101,port=3875,localport=2705]
            2007-04-05 14:53:29,046 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1fecaeb, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1d82219{ url=null ,addedOrder=0}


            That was the end of the log. Hope it makes sense to you. Thanks for your help.


            • 3. Re: Where did my messages (sent by a SessionBean) go?

              Here is a log for a successful sent and received.

              2007-04-05 15:02:27,734 DEBUG [org.jboss.jms.server.security.SecurityMetadataStore] No SecurityMetadadata was available for td-private, using default security config

              2007-04-05 15:02:27,734 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ClientSocketWrapper[Socket[addr=/192.168.1.101,port=3875,localport=2705].178de07] closing

              2007-04-05 15:02:27,734 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] accepted: Socket[addr=/192.168.1.101,port=3903,localport=2705]

              2007-04-05 15:02:27,734 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] SecondaryServerSocketThread: transferred socket: 5c4o12t-xx5l00-f05qv1bb-1-f05qv1z6-7

              2007-04-05 15:02:27,734 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] found socket: Socket[addr=/192.168.1.101,port=3903,localport=2705]


              As you can see, there was confirmation that the client indeed had received the message.

              This message was sent by the remote test app. The previous log was for the SessionBean resided within the server sending the message to an external client.

              Thanks

              • 4. Re: Where did my messages (sent by a SessionBean) go?

                There was a transient field in my message class that was changed for testing and we forgot to put it back to transient status. Hence the message object was not serializable.

                It would have been nice if JBoss Messaging would display an message or throw an exception instead of silently swallowed the error and not route the message to its destination.