Can a WorkManager be looked up in JNDI and used directly?

Solution Verified - Updated -

Issue

  • Can the WorkManager be directly used in the application?
  • Is there something similar to WebLogic CommonJ Framework or WebLogic Work Manager API in JBoss EAP ?
  • 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-workmanager does in JBoss EAP ?
  • Is the JCA work manager related to the resource-adapter subsystem and if yes then how ?

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content