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

Solution Verified - Updated -

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-workmanager does in JBoss EAP ?
  • Is the JCA work manager related to the resource-adapter subsystem 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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.