Expand my Community achievements bar.

BlazeDS and JMS Adapter

Avatar

Former Community Member
I am trying to have a client have multiple subscriptions to a
JMS topic in JBoss.

I can get a simple chat example set up and working properly,
but when I set up something more complex with a few selectors for
different subscriptions, the messages eventually stop receiving.

I get a lot of errors repeating in the JBoss logs, and
eventually client gets invalidated.



Is there a limit on the number of subscribers for the JMS
adapter?

Does polling-amf not work with jms? and if not what channel
should be used?

Are there special settings needed on the JBoss side for the
JMS adapter? (besides what is needed for simple chat example)

Is there any further documentation on this or examples?
(besides lcds/blaze basic settings definitions)



Attached to this post are the messages that are repeating in
the server logs.

Lots of "JMS consumer for JMS destination '<topic>' is
starting/stopping." Is this related to polling? or is some config
bad?

Lots of "socket write error", from tomcat. Is there any
special config for tomcat needed for polling-amf?

Lots of "java.lang.RuntimeException: MessageClient has been
invalidated.", this is the one that seems to stop receiving of any
further messages, what is the reason???



3 Replies

Avatar

Former Community Member
18:40:27,957 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is being removed from the JMS
adapter

18:40:27,957 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is stopping.

18:40:27,968 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:40:27,970 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is starting.

18:40:27,977 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is using async message receiver.

18:40:27,980 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is starting.

18:40:27,987 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is using async message receiver.

18:40:28,004 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:40:58,515 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:40:58,516 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is being removed from the JMS
adapter

18:40:58,516 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is stopping.

18:40:58,522 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is being removed from the JMS
adapter

18:40:58,523 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is stopping.

18:40:58,529 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:40:58,550 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:40:58,553 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is starting.

18:40:58,562 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is using async message receiver.

18:40:58,565 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is starting.

18:40:58,574 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is using async message receiver.

18:40:58,587 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:41:29,099 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:41:29,101 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is being removed from the JMS
adapter

18:41:29,104 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is stopping.

18:41:29,105 ERROR [FlexRemotingTarget]

ClientAbortException: java.net.SocketException: Software
caused connection abort: socket write error

at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)

at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)

at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)

at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)

at
org.apache.catalina.connector.Response.flushBuffer(Response.java:542)

at
org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:279)

at
flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:293)

at
flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:377)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)

at
flex.messaging.security.TomcatValve.invoke(TomcatValve.java:143)

at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)

at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)

at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

at java.lang.Thread.run(Thread.java:619)

Caused by: java.net.SocketException: Software caused
connection abort: socket write error

at java.net.SocketOutputStream.socketWrite0(Native Method)

at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)

at
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)

at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)

at org.apache.coyote.Response.doWrite(Response.java:560)

at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)

... 27 more

Avatar

Former Community Member
18:44:01,952 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:44:01,954 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is being removed from the JMS
adapter

18:44:01,954 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is stopping.

18:44:01,964 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is being removed from the JMS
adapter

18:44:01,964 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is stopping.

18:44:01,966 INFO [FlexRemotingTarget] Channel endpoint
my-polling-amf received request.

18:44:01,970 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is starting.

18:44:01,979 INFO [FlexRemotingTarget] JMS consumer for JMS
destination 'topic/ProjectTopic' is using async message receiver.

18:44:01,989 ERROR [FlexRemotingTarget] Unhandled error when
processing a message: java.lang.RuntimeException: MessageClient has
been invalidated.

incomingMessage: Flex Message
(flex.messaging.messages.CommandMessage)

operation = subscribe

selector = ListId = '4' AND Id IS NOT NULL

clientId = 432E741C-000E-D016-4E01-D6B0DDB53DFE

correlationId =

destination = ProjectTopic

messageId = 710EB21F-A81C-FB42-D55A-E98BDBDCC877

timestamp = 1210805041981

timeToLive = 0

body = {}

hdr(DSSelector) = ListId = '4' AND Id IS NOT NULL

hdr(DSRemoteCredentials) =

hdr(DSId) = 432E5312-F80A-899E-7E72-AA8A1C3EEA75

hdr(DSValidateEndpoint) = true

hdr(DSEndpoint) = my-polling-amf

errorReply: Flex Message
(flex.messaging.messages.ErrorMessage)

clientId = 432E741C-000E-D016-4E01-D6B0DDB53DFE

correlationId = 710EB21F-A81C-FB42-D55A-E98BDBDCC877

destination = ProjectTopic

messageId = 4352C333-7509-F381-EC76-1BE755628188

timestamp = 1210805041989

timeToLive = 0

body = null

code = Server.Processing

message = There was an unhandled failure on the server.
MessageClient has been invalidated.

details = null

rootCause = null

body = null

extendedData = null

stackTrace for: java.lang.RuntimeException: MessageClient
has been invalidated.


flex.messaging.MessageClient.checkValid(MessageClient.java:894)


flex.messaging.MessageClient.addSubscription(MessageClient.java:507)


flex.messaging.services.messaging.SubscriptionManager.addSubscriber(SubscriptionManager.java:498)


flex.messaging.services.MessageService.manageSubscriptions(MessageService.java:850)


flex.messaging.services.MessageService.serviceCommand(MessageService.java:282)


flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java:1527)


flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:855)


flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)


flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)


flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:49)


flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)


flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)


flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:274)


flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:377)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)


org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)


org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)


org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)


flex.messaging.security.TomcatValve.invoke(TomcatValve.java:143)


org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)


org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)


org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)


org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)


org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)


org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)


org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)


org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

java.lang.Thread.run(Thread.java:619)

Avatar

Level 1
You might want to check the ds console (
http://localhost:8400/ds-console/).
If you dig down in the MBeans tree, you will find your JMS Adapter
and its throttle manager.