ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Subscriber throw exception when system time changed

Post new topic  Reply to topic
 Subscriber throw exception when system time changed « View previous topic :: View next topic » 
Author Message
leland
PostPosted: Thu Feb 12, 2009 6:08 pm    Post subject: Subscriber throw exception when system time changed Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 13

Hi

I am writing .net application using XMS, there is a durable subscriber in the application, everything works fine until I change the system's time(WinXP SP2), the mq connection receives an exception as below:

IBM.XMS.IllegalStateException: CWSMQ0006E
IBM.XMS.WMQ.WmqMessageConsumer.GetAMessage(Int64 timeOut)
IBM.XMS.WMQ.WmqMessageConsumer.ReceiveAsync(Int64 timeout)
IBM.XMS.WMQ.WmqAsynchronous.Run()
Linked Exception : CompCode: 2, Reason: 2009"

I have noticed that there is no message receiving at that time, and the exception is not throw every time I change the system's time, but it occurs if I keep changing the time many times.

Can any one help me?

Thanks
Back to top
View user's profile Send private message
gunter
PostPosted: Fri Feb 13, 2009 1:08 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

Hi,

its not a good idea to change the system time if time critical programs are running. Timeouts are calculated by differences between timestamps.
Changing the time my result in negativ values, these are very big values if unsigned. Use a time server instead.

Gunter
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
leland
PostPosted: Sun Feb 15, 2009 6:12 pm    Post subject: Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 13

gunter wrote:
Hi,

its not a good idea to change the system time if time critical programs are running. Timeouts are calculated by differences between timestamps.
Changing the time my result in negativ values, these are very big values if unsigned. Use a time server instead.

Gunter


Thanks 4 your reply.

Since the subscriber is in client-side, it is nothing I can do to limit the time change operation(actually the time is required to chagne in some scenarios), and this exception makes my application kind of unstablable.

I have tried to re-establish mq connection when exception throws, it works at the first time, but after I change the subscriber to durable subscriber, another exception throws(The durable subscriber can be registed when the application starts, but can not be registed again when excption throws).

IBM.XMS.XMSException:Message="CWSMQ0006E:WmqSubscriptionEngine.OpenDurableSubscription (#3) CompCode: 2, Reason: 3156。

Source="IBM.XMS.WMQ"
ErrorCode="CWSMQ0006"
StackTrace:
IBM.XMS.WMQ.WmqSubscriptionEngine.OpenDurableSubscription(WmqSession s, WmqTopic t, String selector, Boolean noLocal, Boolean sharedQueue, String qName, String subName)
IBM.XMS.WMQ.WmqMessageConsumer.PubSubInitialise(String subName)
IBM.XMS.WMQ.WmqMessageConsumer..ctor(IDestination destination, String selector, Boolean noLocal, Boolean durable, WmqSession session, String subName)
IBM.XMS.WMQ.WmqSession.CreateDurableSubscriber(IDestination dest, String subscription, String selector, Boolean noLocal)

Here is my pseudocode.
public void OnMQException()
{
TryCloseSubscriber();
TryCloseSession();
TryCloseConnection();

bool connected = Connect(); // I have set the client id in connection facotry.
if (connected)
{
CreateSession();
CreateDurableSubscriber(); // The exception throws here.
}
}

Any idea about that? Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Subscriber throw exception when system time changed
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.