Adding a check for supporting transactions to the context managers.

@ErikRose r?