This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create session object from ConnectionFactory

 
Kiran Yadav
Ranch Hand
Posts: 35
Eclipse IDE Firefox Browser Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In to create session object from ConnectionFactory for JMS implementation we have method called createSession() with two parameters.

In documentation the following details is given :

public Session createSession(boolean transacted,
int acknowledgeMode)
throws JMSExceptionCreates a Session object.

Parameters:
transacted - indicates whether the session is transacted
acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.


So kindly help me in understanding regarding these two method parameters - boolean transacted and int acknowledgeMode.
 
Kiran Yadav
Ranch Hand
Posts: 35
Eclipse IDE Firefox Browser Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For first parameter i.e. boolean transacted , my understanding is ,

The first parameter of the method specifies whether the session is transactional.
This means that the requests for messages to be sent won’t be
realized until either the session’s commit method is called or the session is closed.
(If the session isn’t transactional, messages will be sent as soon as the send method
is invoked.)


Is my understanding ok.

Will you please help me in understanding second parameter i.e. int acknowledgeMode
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic