protected void createSession ( ConnectionContext context ) throws JMSException { if ( context == null ) { throw new IllegalStateException ( "The context is null" ) ; } Connection conn = context . getConnection ( ) ; if ( conn == null ) { throw new IllegalStateException ( "The context had a null connection" ) ; } Session session = conn . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; context . setSession ( session ) ; }
Creates a default session using the context s connection . This implementation creates a non - transacted auto - acknowledged session . Subclasses are free to override this behavior .