protected static String requireActiveTransaction ( ) { return Optional . ofNullable ( ACTIVE_TX_ID . get ( ) ) . orElseThrow ( ( ) -> new RelationalProviderException ( RelationalProviderI18n . threadNotAssociatedWithTransaction , Thread . currentThread ( ) . getName ( ) ) ) ; }
Requires that an active transaction exists for the current calling thread .