How to use @Service and @Management annotations in JBoss EAP 6?

Solution Unverified - Updated -

Environment

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

Issue

  • How to use org.jboss.ejb3.annotation.Service and org.jboss.ejb3.Management annotations in JBoss EAP 6? Are this classes available in EAP 6?
  • If no, is there a replacement for them?

Resolution

  • JBoss EAP 6 no longer supports the @Service and @Management annotations.

  • The purpose of @Service annotation was to acheive Singleton like behavior. It was deprecated with the release of JBoss AS 6 and removed from JBoss EAP 6.

  • To achieve the singleton nature of the @Service annotation, use the EJB3.1 spec @Singleton bean. Refer community thread. Also refer to community thread here.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments