Hi, I know your post was a long time ago. I was asking myself the same Question today, and I could not find a simple example of this..so it took me a rather long time to come up with a solution..I thought it could not hurt to post it here...
| //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()); | Note that there is a difference between scheduleWork() (call returns immediately) doWork(call returns when work is finished) and startWork() (call returns when work is started). Btw. If there is anything wrong with this solution, I would appreciate it if someone could tell me. TIA :) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932768#3932768 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932768 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user