Wildfly - 为什么调试和普通模式之间的应用程序存在差异

时间:2014-04-18 04:08:29

标签: java java-ee jpa jboss7.x wildfly

我不明白什么是错的。

当我在调试模式中的wildfly 8.0.0 Final上运行我的war应用程序时,一切正常。但是当我将wildfly切换到普通模式时,它不会考虑一些注释和错误。

特别是我无法在正常模式下开始使用@Transactional注释。

E.g。这样的代码:

@Named
@ViewScoped
@Transactional
public class CmpNoteCrud extends BaseCrud<ComNote> {

    @Override
    public String remove(ComNote inst) {
        this.inst = inst;
        inst = entityManager.find(ComNote.class, inst.getId());
        return super.remove(inst);
    }
}

在调试模式下工作正常,但在正常模式下会抛出一个错误:

06:05:55,011 ERROR [stderr] (default task-5) javax.persistence.TransactionRequiredException: JBAS011469: Transaction is required to perform this operation (either use a transaction or extended persistence context)

我错过了任何配置吗?

0 个答案:

没有答案