How to use @Service and @Management annotations in JBoss EAP 6?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Issue
- How to use
org.jboss.ejb3.annotation.Serviceandorg.jboss.ejb3.Managementannotations 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
@Serviceand@Managementannotations. -
The purpose of
@Serviceannotation 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
@Serviceannotation, use the EJB3.1 spec@Singletonbean. 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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
