mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Remove Subclassing/Dynamic Proxy support - beans must be enhanced
This commit is contained in:
@@ -4,19 +4,32 @@ import java.util.List;
|
||||
|
||||
import javax.persistence.EntityNotFoundException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.Transaction;
|
||||
import com.avaje.ebean.TxType;
|
||||
import com.avaje.ebean.annotation.Transactional;
|
||||
|
||||
public class DummyDao {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(DummyDao.class);
|
||||
|
||||
@Transactional(type = TxType.REQUIRES_NEW)
|
||||
public void doSomething() {
|
||||
|
||||
System.out.println("Hello World");
|
||||
logger.info(" --- in DummyDao.doSomething() with TxType.REQUIRES_NEW");
|
||||
Transaction txn = Ebean.currentTransaction();
|
||||
if (txn == null) {
|
||||
logger.error(" NO TRANSACTION ??");
|
||||
} else {
|
||||
logger.info(" --- txn - "+txn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Transactional
|
||||
// ebean transactional annotation, not spring transactional annotation
|
||||
public void addToObject(Long id, Double anotherNumber, List<Long> ids) throws EntityNotFoundException {
|
||||
// and more code
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user