Can a WorkManager be looked up in JNDI and used directly?
Issue
- Can a bean create the WorkManager as follows:
//get MBean Server MBeanServer server = MBeanServerLocator.locateJBoss(); //get WorkManager ObjectName objectName = new ObjectName("jboss.jca:service=WorkManager"); JBossWorkManagerMBean jwm = (JBossWorkManagerMBean) MBeanServerInvocationHandler.newProxyInstance(server,objectName,JBossWorkManagerMBean.class,false); WorkManager wm = jwm.getInstance(); //schedule Work for Execution wm.scheduleWork(new SomeWork());
- What the
default-workmanagerdoes inJBoss EAP? - Is the
JCAwork manager related to theresource-adaptersubsystem and if yes then how ? - We have some code to use org.jboss.resource.work.JBossWorkManagerMBean in EAP 5, when upgrade to EAP 6 where we can find those class? Or what kind of coding we should change when migrate to 6.4?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.