TransactionManagerFactoryBean tmfb = new TransactionManagerFactoryBean();
tmfb.afterPropertiesSet();
TransactionContextManagerFactoryBean tcmfb = new TransactionContextManagerFactoryBean();
tcmfb.setTransactionManager((ExtendedTransactionManager) tmfb.getObject());
tcmfb.afterPropertiesSet();
WorkManagerFactoryBean wmfb = new WorkManagerFactoryBean();
wmfb.setTransactionContextManager((TransactionContextManager) tcmfb.getObject());
wmfb.setThreadPoolSize(poolSize);
wmfb.afterPropertiesSet();
GeronimoWorkManager wm = wmfb.getWorkManager();
return wm;
}