I hava two jdbi dao like these:
public interface dao1 {
@Query("insert into table1 ...")
findByid(myBean1);
}
public interface dao2 {
@Query("insert into table2 ...)
save(myBean2;
}
}
i want to execute save of two dao in one transaction like:
dao1.save();
dao2.save();
With spring i have used @transactional annotation. What can i do with dropwizard and jdbi ?
You can use @Transaction in JDBI. I have blogged about it here. http://manikandan-k.github.io/2015/05/10/Transactions_in_jdbi.html