| Author | Message | 
		
		  | tleichen | 
			  
				|  Posted: Thu Feb 07, 2008 8:48 am    Post subject: JMS and MQI |   |  | 
		
		  | Yatiri
 
 
 Joined: 11 Apr 2005Posts: 663
 Location: Center of the USA
 
 | 
			  
				| I'm not a JMS programmer, but I am well versed in the MQI.  Basically, I regard JMS as just another higher level API.  Whenever you make a higher level API, you normally lose some capabilities from the lower one, often by design. 
 Here's my question. I'm trying to understand how and which MQI functions and capabilities map into JMS messaging.  In particular, syncpointing.  That is to say, is there a mechanism within JMS to do an MQCMIT, and/or is it possible to do messaging out of syncpoint (i.e., MQGMO_NO_SYNCPOINT)?
  _________________
 IBM Certified MQSeries Specialist
 IBM Certified MQSeries Developer
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Thu Feb 07, 2008 8:57 am    Post subject: Re: JMS and MQI |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| tleichen wrote: |  
	| I'm not a JMS programmer |  
 Neither am I. Bear this in mind as you read on.
 
 
 
   
	| tleichen wrote: |  
	| That is to say, is there a mechanism within JMS to do an MQCMIT, and/or is it possible to do messaging out of syncpoint (i.e., MQGMO_NO_SYNCPOINT)?  |  
 The equivalent construct, as I understand it, is the MQSession.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Thu Feb 07, 2008 9:04 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| Correct ! Give Vitor a brownie point. 
 The Session controls the boundaries of the transaction.
 you need to create a session specifying transacted.
 Typically conn.createSession(true, Session.AUTO_ACKNOWLEDGE);
 
 The transaction is started. Each session.commit() or session.rollback() will now set a new transactional border.
 
 Enjoy
  _________________
 MQ & Broker admin
 
 Last edited by fjb_saper on Thu Feb 07, 2008 2:43 pm; edited 1 time in total
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Thu Feb 07, 2008 9:12 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| fjb_saper wrote: |  
	| Correct ! Give Vitor a brownie point. |  
 I answered a Java question correctly!!!!
       
 No point buying a lottery ticket then; must have used up all my luck...
  _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | tleichen | 
			  
				|  Posted: Thu Feb 07, 2008 9:18 am    Post subject: |   |  | 
		
		  | Yatiri
 
 
 Joined: 11 Apr 2005Posts: 663
 Location: Center of the USA
 
 | 
			  
				| I see. What about the option of doing things outside of syncpoint.  I agree this is not always advisable, but I'm just wondering if the capability exists at that level.  _________________
 IBM Certified MQSeries Specialist
 IBM Certified MQSeries Developer
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Thu Feb 07, 2008 9:19 am    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				| 
   
	| tleichen wrote: |  
	| I see. What about the option of doing things outside of syncpoint.  I agree this is not always advisable, but I'm just wondering if the capability exists at that level.  |  
 Yes, make the session Not Transacted. (no auto_acknowledge)
 _________________
 I am *not* the model of the modern major general.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Thu Feb 07, 2008 2:42 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| jefflowrey wrote: |  
	| 
   
	| tleichen wrote: |  
	| I see. What about the option of doing things outside of syncpoint.  I agree this is not always advisable, but I'm just wondering if the capability exists at that level.  |  
 Yes, make the session Not Transacted. (false,Session.AUTO_ACKNOWLEDGE)
 |  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Thu Feb 07, 2008 3:37 pm    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				|  _________________
 I am *not* the model of the modern major general.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | jsware | 
			  
				|  Posted: Fri Feb 08, 2008 12:36 am    Post subject: |   |  | 
		
		  |  Chevalier
 
 
 Joined: 17 May 2001Posts: 455
 
 
 | 
			  
				| 
  There's something that's lost when going to JMS then - you can't have transacted and non-transacted messaging through a single session.  You need to create two sessions? (Two connects to the qmgr) and then open the destinations twice (to opens on the queue)... 
	| fjb_saper wrote: |  
	| 
   
	| tleichen wrote: |  
	| Yes, make the session Not Transacted. (false,Session.AUTO_ACKNOWLEDGE) |  |  
 Or am I missing something (not being a JMS programmer).
 _________________
 Regards
 John
 The pain of low quaility far outlasts the joy of low price.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Fri Feb 08, 2008 4:23 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| scottj2512 wrote: |  
	| 
  There's something that's lost when going to JMS then - you can't have transacted and non-transacted messaging through a single session.  You need to create two sessions? (Two connects to the qmgr) and then open the destinations twice (to opens on the queue)... 
	| fjb_saper wrote: |  
	| 
   
	| tleichen wrote: |  
	| Yes, make the session Not Transacted. (false,Session.AUTO_ACKNOWLEDGE) |  |  
 Or am I missing something (not being a JMS programmer).
 |  Yes you need 2 different sessions. One for transacted messages and one for non transacted messages. You cannot/should not change the behavior of the session once it has been instantiated.
 
 However and if you have no problems with single threading your messages through both sessions, you could create both sessions from the same connection...(much faster)... But keep in mind that access through the connection will be synchronized somewhere...
 
 Enjoy
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |