Singleton EJB is being started twice

Solution Verified - Updated -

Issue

We meet the below Signleton class issue during the initialization and guess it's due to the multithread of EAP 6.0.0. We have a singleton class with @Startup ananotation, and it will print the JVM parameters in log, which should only occur once, but now we have two with different threads displaying the same message.

Environment

  • JBoss Enterprise Application Platform (EAP) 6

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