In the following example, the application creates a session object by calling pubsubsession.p persistently.
Creating the session object specifies the connection parameters to the SonicMQ Broker. This allows an application to set different session-level attributes before starting the JMS session. The connection to the SonicMQ Broker and the JMS session does not occur until the application calls the
beginSessionprocedure .