Write a ServiceLocator Implementation
Procedure 5.3. Writing Your Own ServiceLocator Implementation First, create an instance of JBoss NS using the Microcontainer. Next, add a lifecycle callback to perform the binding and unbinding of the bean references during deployment and undeployment. Mark the bean classes you wish to bind references for, using annotations. Now, you can locate the beans at run-time using the shorthand pointcut expression as shown earlier.