Search code examples
jdbchbaseapache-phoenix

how to use phoenix transaction with jdbc client


I am using phoenix with transactions, as from phoenix.apache.org/transactions.html, I need to set phoenix.transactions.enabled=true from my client-side.

But how to set that in a java jdbc client?


Solution

  • I got it.

    Properties info = new Properties();
    info.setProperty("phoenix.transactions.enabled", Boolean.TRUE.toString());    
    con = DriverManager.getConnection(url, info);