Discussions

EJB programming & troubleshooting: EJB 3.0 Transaction attribute for code segment

  1. Is it possible to set the transaction attribute for a segment of code inside a method using EJB 3.0 annotation for example method1(){ @TransactionAttribute(RequiresNew) {//Block 1 } @TransactionAttribute(required) {//Block 2 } } Thanks in advance . I have looked through the EJB 3.0 specification and could not able to find anything .

    Threaded Messages (1)

  2. reply[ Go to top ]

    I dont think so, you will have to refactor and write the logic in seperate methods and have the two methods called from your existing method..