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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content