private Session getSession ( ) { if ( ! sessionOption . isPresent ( ) ) { try { sessionOption = Optional . of ( getConnection ( ) . createSession ( transacted , acknowledgeMode ) ) ; } catch ( JMSException e ) { throw new JmsException ( "Unable to get JMS session" , e ) ; } } return sessionOption . get ( ) ; }
Get the current session or create one from the JMS connection .