Hello,

I would very much appreciate some assistance.

I am trying to create a"service" - effectively a singleton that is loaded on 
start-up. 

This worked in JBoss 4x. I am now trying to port the code to jboss-5.0.0.CR2...

My code is as follows:


  | public interface ProcessManager {
  | 
  |     public void create() throws Exception;
  |     public int getID();
  |     
  | 
  | }
  | 

And:


  | @Service (objectName="121:service=processManager")
  | @Management(ProcessManager.class)
  | @TransactionAttribute( TransactionAttributeType.NOT_SUPPORTED )
  | public class ProcessManagerMBean implements ProcessManager {
  |     
  |     @Override
  |     public void create() throws Exception {
  |             System.out.println("Process create");   
  |     }
  | 
  |     @Override
  |     public int getID() {
  |             return 2;
  |     }
  |     
  |     
  | }
  | 


However, when this is deployed, JBoss complains:


  | Problem registering @Management interface for @Service class
  | 


  | 13:34:06,137 INFO  [EJBContainer] STARTED EJB: 
za.co.oneTwoOne.services.ProcessManagerMBean ejbName: ProcessManagerMBean
  | 13:34:06,155 INFO  [JBossASKernel] installing bean: 
121:service=processManager
  | 13:34:06,155 INFO  [JBossASKernel]   with dependencies:
  | 13:34:06,155 INFO  [JBossASKernel]   and demands:
  | 13:34:06,155 INFO  [JBossASKernel]  jboss.ejb:service=EJBTimerService
  | 13:34:06,155 INFO  [JBossASKernel]   and supplies:
  | 13:34:06,155 INFO  [JBossASKernel]  jndi:121/ProcessManagerMBean/local
  | 13:34:06,155 INFO  [JBossASKernel]  
Class:za.co.oneTwoOne.services.ProcessManager
  | 13:34:06,155 INFO  [JBossASKernel]  jndi:121/ProcessManagerMBean/remote
  | 13:34:06,155 INFO  [JBossASKernel]  
jndi:121/ProcessManagerMBean/local-za.co.oneTwoOne.services.ProcessManager
  | 13:34:06,155 INFO  [JBossASKernel] Installing 
bean(121:service=processManager) into kernel
  | 13:34:06,163 ERROR [STDERR] java.lang.RuntimeException: Problem registering 
@Management interface for @Service class 
za.co.oneTwoOne.services.ProcessManagerMBean
  | 13:34:06,163 ERROR [STDERR]         at 
org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:629)
  | 13:34:06,163 ERROR [STDERR]         at 
org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:228)
  | 13:34:06,163 ERROR [STDERR]         at 
org.jboss.ejb3.EJBContainer.start(EJBContainer.java:858)
  | 13:34:06,163 ERROR [STDERR]         at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 13:34:06,163 ERROR [STDERR]         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 13:34:06,163 ERROR [STDERR]         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 13:34:06,163 ERROR [STDERR]         at 
java.lang.reflect.Method.invoke(Method.java:597)
  | 13:34:06,163 ERROR [STDERR]         at 
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(Ref
  | 

What am I doing wrong?

Also, why does it demand an "EJBTimerService"?

Thank you very much for your time.

Renen.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192458#4192458

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192458
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to