| Author | 
		  Message
		 | 
		
		  | kayoumt | 
		  
		    
			  
				 Posted: Sun Jun 14, 2009 12:15 pm    Post subject: C# XMS - WmqSession.SetupPubSub: CompCode: 2, Reason: 2085 | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Sep 2007 Posts: 81
  
  | 
		  
		    
			  
				Hi,
 
 
I have some trouble making XMS C# work for features that I already made working in C++.
 
 
I did all WMQ pub/sub connection setups and all seems to be working very well ; except creating a topic :
 
 
IDestination my_destination = my_session.CreateTopic("MY/TOPIC");
 
 
I got the error below. I tried many things for troubleshooting it but did not find out what it is about.
 
 
IBM.XMS.XMSException: CWSMQ0006E: An exception was received during the call to the method WmqSession.SetupPubSub: CompCode: 2, Reason: 2085. During execution of the specified method an exception was thrown by another component. See the linked exception for more information.
 
   at IBM.XMS.WMQ.WmqSession.ThrowExceptionReceived(Object[] messageParams, Exception caughtException, String probeId)
 
   at IBM.XMS.WMQ.WmqSession.SetUpPubSub(Boolean startCleanup)
 
   at IBM.XMS.WMQ.WmqSession.CreateTopic(String topicName)
 
   at CADS6.LibDrvMOM.CADS6LibDrvMOMConn.Connect() in C:\DEV\client-csharp\CADS6\CADS6LibDrvMOMXMS\src\CADS6LibDrvMOMConn.cs:line 224
 
 
Linked Exception : CompCode: 2, Reason: 2085 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Sun Jun 14, 2009 6:38 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				?? You did not specify how you created the session. Did you specifically create a topic connection and a topic session?   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kayoumt | 
		  
		    
			  
				 Posted: Sun Jun 14, 2009 6:49 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Sep 2007 Posts: 81
  
  | 
		  
		    
			  
				I solved also that issue.
 
 
Instead of calling ISession.CreateTopic ; I called XMSFactoryFactory.CreateTopic.
 
 
Why it works with the second and not with the first ??? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kayoumt | 
		  
		    
			  
				 Posted: Mon Jun 15, 2009 7:05 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Sep 2007 Posts: 81
  
  | 
		  
		    
			  
				There's definitely something wrong in my pub/sub setup. I do no longer have the exception when I create a topic ; but, I have it when I create a Consumer on the topic destination.
 
 
Question :
 
 
What "WmqSession.SetupPubSub" is supposed to do ? What kind of information that method is expecting to find ? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kayoumt | 
		  
		    
			  
				 Posted: Wed Jun 17, 2009 7:15 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Sep 2007 Posts: 81
  
  | 
		  
		    
			  
				Questions :
 
 
I created a C# ISession object in a sample XMS/WMQ application. I got the same 2085 error when I tried to call ISession.CreateTopic. Now ; I suspect that the private member ISession.ReplyQ set to null could be the cause of my problem.
 
 
1) Is it possible to specify the value of that ISession.ReplyQ member ?
 
 
2) Is it possible to specify a default reply queue for Queue Manager or XMS session ?
 
 
Thanks in advance for any help. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shashikanth_in | 
		  
		    
			  
				 Posted: Sat Jun 20, 2009 5:32 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 26 Feb 2009 Posts: 123
  
  | 
		  
		    
			  
				| You will need some queues to be created for Pub/Sub to work. There is a MQSC script that gets shipped with MQ which will do this setup job for you. I think the mqsc script name is "MQJMS_PSQ.mqsc". Just run that script with MQSC and it will setup the required queues for you. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kayoumt | 
		  
		    
			  
				 Posted: Sat Jun 20, 2009 9:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Sep 2007 Posts: 81
  
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	I think the mqsc script name is "MQJMS_PSQ.mqsc". Just run that script with MQSC and it will setup the required queues for you.
 
 | 
   
 
 
 
Thanks a lot ! I'll try it.
 
 
   
	| Quote: | 
   
  
	I have some trouble making XMS C# work for features that I already made working in C++. 
 
 | 
   
 
 
 
If "MQJMS_PSQ.mqsc" makes my aplication work, it will mean that XMS/C# does some serious checkings that XMS/C++ does not do.
 
 
I'll give you news in next hours. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kayoumt | 
		  
		    
			  
				 Posted: Sat Jun 20, 2009 11:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Sep 2007 Posts: 81
  
  | 
		  
		    
			  
				Thanks shashikanth_in,
 
 
Yes ! It works after running MQJMS_PSQ.mqsc. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shashikanth_in | 
		  
		    
			  
				 Posted: Sun Jun 21, 2009 3:07 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 26 Feb 2009 Posts: 123
  
  | 
		  
		    
			  
				| No, both XMS C/C++ and XMS /C# check for these queues for doing pubsub. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |