createSession

 

public Session createSession(boolean transacted, int acknowledgeMode) 
              throws JMSException;

Creates a Session object.

Parameters

  • transacted - true indicates that the session is transacted.

  • acknowledgeMode - indicates whether the consumer or the client acknowledges any messages it receives. Possible values are:

    • Session.AUTO_ACKNOWLEDGE

    • Session.CLIENT_ACKNOWLEDGE

    • Session.DUPS_OK_ACKNOWLEDGE

    See the JMS specification for details of these values. acknowledgeMode is ignored if the session is transacted.

Returns

  • a newly created session.

Exceptions

  • JMSException - if the Connection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.


uj27520_