Hi,
I converted an MBean to an HASingleton. The result was that injection via annotation
stopped working (ex: @EJB and @PersistenceContext).
Is this a "feature" or misconfiguration on my part?
Here is some code. Before, DataProvider used to implement MBeanRegistration.
// The interface
| public interface DataProviderMBean extends HASingletonMBean {
| public void startSingleton();
| public void stopSingleton();
| }
|
| // The implementation
| public class DataProvider extends HASingletonSupport implements DataProviderMBean
| {
| @PersistenceContext(unitName = "client")
| protected EntityManager em;
|
| @EJB SystemSettings sys;
|
|
| public void startSingleton()
| {
| System.out.println(em);
| System.out.println(sys);
| }
|
| public void stopSingleton()
| {
| }
| }
from jboss-service.xml:
----------------------
<mbean code="project.DataProvider"
name="project:service=dataprovider">
| <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
| </mbean>
Has anyone encountered this before. It seems illogical to me and is quite frustrating.
cheers!
-- doktora
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035544#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...