0

我需要创建一个可以监听套接字的 java bean (Singleton)。我尝试从@PostConstruct 调用@Asynchronous 方法,但出现异常:

@Singleton
@Lock(LockType.READ)
@DependsOn("CalculationServerStorage")
public class TaskManager {

    @PostConstruct
    public void init() {
        select();
    }

    @Asynchronous
    public void select() {...}
}

例外:

Caused by: java.lang.VerifyError: class com.asu.dmsaas.calculationserver.ejb.__EJB31_Generated__TaskManager__Intf____Bean__ overrides final method getName.()Ljava/lang/String;
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
                ... 44 more

我该怎么做?

4

0 回答 0