|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
.NET XMS IllegalStateException |
« View previous topic :: View next topic » |
Author |
Message
|
TBarth |
Posted: Fri Aug 16, 2013 5:48 am Post subject: .NET XMS IllegalStateException |
|
|
Newbie
Joined: 16 Aug 2013 Posts: 6
|
I have an application which is using the .NET XMS API and am periodically receiving a IBM.XMS.IllegalStateException. My application runs 24/7 and periodically polls the queues to read/write messages. It seems like it is occuring roughly once or twice a day.
At the start of the application I create and cache the connection, session, destination, and message producer. I'm using unmanaged connection mode because we are using SSL.
Do you think I could be experiencing this exception because of caching these objects? Does the session have a timeout or something that I am missing that I should be creating a new one each time or periodically?
Here is the stack trace information:
IBM.XMS.IllegalStateException: XMSCC0020 XMSCC0020.explanation XMSCC0020.useraction
at IBM.XMS.Client.Impl.State.CheckNotClosed(String message)
at IBM.XMS.Client.Impl.XmsSessionImpl.CheckNotClosed()
at IBM.XMS.Client.Impl.XmsSessionImpl.get_MessageListener()
at IBM.XMS.Client.Impl.XmsMessageConsumerImpl.CheckSynchronousUsage(String method)
at IBM.XMS.Client.Impl.XmsMessageConsumerImpl.Receive(Int64 millis) |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 16, 2013 7:32 am Post subject: Re: .NET XMS IllegalStateException |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
TBarth wrote: |
I have an application which is using the .NET XMS API and am periodically receiving a IBM.XMS.IllegalStateException. My application runs 24/7 and periodically polls the queues to read/write messages. It seems like it is occuring roughly once or twice a day.
At the start of the application I create and cache the connection, session, destination, and message producer. I'm using unmanaged connection mode because we are using SSL.
Do you think I could be experiencing this exception because of caching these objects? Does the session have a timeout or something that I am missing that I should be creating a new one each time or periodically?
Here is the stack trace information:
IBM.XMS.IllegalStateException: XMSCC0020 XMSCC0020.explanation XMSCC0020.useraction
at IBM.XMS.Client.Impl.State.CheckNotClosed(String message)
at IBM.XMS.Client.Impl.XmsSessionImpl.CheckNotClosed()
at IBM.XMS.Client.Impl.XmsSessionImpl.get_MessageListener()
at IBM.XMS.Client.Impl.XmsMessageConsumerImpl.CheckSynchronousUsage(String method)
at IBM.XMS.Client.Impl.XmsMessageConsumerImpl.Receive(Int64 millis) |
I would expect the illegal state to be cause by a specific sequence of events, either in your program or program + environment.
You will get the illegal state exception on the session, whenever you try to perform an operation on a closed object (session/receiver/connection, etc...). The session might have been closed by your program, or by the environment (exception due to network interruption)
Do you have an ExceptionListener set on the connection? What are you doing in case of an Exception?
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
TBarth |
Posted: Fri Aug 16, 2013 9:45 am Post subject: Re: .NET XMS IllegalStateException |
|
|
Newbie
Joined: 16 Aug 2013 Posts: 6
|
fjb_saper wrote: |
I would expect the illegal state to be cause by a specific sequence of events, either in your program or program + environment.
You will get the illegal state exception on the session, whenever you try to perform an operation on a closed object (session/receiver/connection, etc...). The session might have been closed by your program, or by the environment (exception due to network interruption)
Do you have an ExceptionListener set on the connection? What are you doing in case of an Exception?
Have fun  |
My program isn't ever explictly closing any sessions or connections so it must be a network or environment hiccup. I didn't see any properties or methods on ISession that I would check to determine is it was closed.
I do have an exception listener that will write a log entry when an exception occurs, but it doesn't appear to be firing or doing anything.
When this exception occurs I will then re-create the connection, session, etc. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|