JBoss eap 6.4 How to get JCA workmanager? Is ironjacamar only way?
We are migrating from JBOSS 4.2.3 eap to JBOSS 6.4 eap and we facing issue in geting Default WorkManager of JBOSS while creating beans.
Please find below related details,
We are getting workmanager in our existing code as,
-
Get workmanager MBean
return (WorkManager) getInstanceFromMBean('org.jboss.resource.work.JBossWorkManagerMBean', 'jboss.jca:service=WorkManager');public Object getInstanceFromMBean(String mbeanClassName, String objectName)
throws ClassNotFoundException, MalformedObjectNameException, NamingException, NoSuchMethodException,
IllegalAccessException, InvocationTargetException {
Object mbeanProxy = getMBeanProxy(mbeanClassName, objectName);
Method getInstanceMethod = mbeanProxy.getClass().getMethod("getInstance", ArrayUtils.EMPTY_CLASS_ARRAY);
Object ret = getInstanceMethod.invoke(mbeanProxy, ArrayUtils.EMPTY_OBJECT_ARRAY);
return ret;
} -
This workmanager is used to create bean for JBossWorkManagerTaskExecutor
Spring configuration in jboss-bean.xml
I have queries for this,
1) We are not able to get workmanager using above code. We have tried by adding various jars but it didnt resolved this problem. Is there any way to get workmanager.
2) Right now we are trying to get workmanager through ironjacamar. Is this correct way to get workmanager?
3) Is there any other default work manager class that we should use to get this resolved?