protected void createConnection ( ConnectionContext context ) throws JMSException { if ( context == null ) { throw new IllegalStateException ( "The context is null" ) ; } ConnectionFactory factory = getConnectionFactory ( ) ; Connection conn = factory . createConnection ( ) ; context . setConnection ( conn ) ; }
Creates a connection using this object s connection factory and stores that connection in the given context object .