Lifecycle callback method of an EJB throws Exceptions but there is neither a log message nor a failure in EAP6

Solution Verified - Updated -

Issue

  • If a lifecyle method @PostConstuct throw an exception it is expected that the initialization fail and the bean/deployment is stopped but this is not the case sometimes
  • I add a test Exception to a lifecycle callback and it fail in one application but not in another, why?
  @PostConstruct
  private void postConstruct() {
    throw new RuntimeException("THIS IS A TEST");
  }
  • I see that the weld subsystem is activated but I don't enable CDI by adding a beans.xml to force the automatic dependency for classloading, what is wrong?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.