1 |
/* using the workmanager api (as in JSR237 etc.) |
/* using the workmanager api (as in JSR237 etc.) |
2 |
* |
* |
3 |
* in websphere the workmanager API is available very easy on glassfish .... not so simple |
* in websphere the workmanager API is available very easy, but on glassfish .... not so simple |
4 |
* |
* |
5 |
* this code is inspired by how Spring implented their TaskExecutor for GFv3, google : org.springframework.jca.work.glassfish.GlassFishWorkManagerTaskExecutor |
* this code is inspired by how Spring implented their TaskExecutor for GFv3, google : org.springframework.jca.work.glassfish.GlassFishWorkManagerTaskExecutor |
6 |
* |
* |
60 |
final String threadPoolName = "thread-pool-1"; |
final String threadPoolName = "thread-pool-1"; |
61 |
|
|
62 |
try { |
try { |
63 |
mgr = new CommonWorkManager(threadPoolName, rt, null); |
mgr = new CommonWorkManager(threadPoolName, rt, null, null); |
64 |
|
|
65 |
} catch (Exception e) { |
} catch (Exception e) { |
66 |
logger.log(Level.SEVERE, "error", e); |
logger.log(Level.SEVERE, "error", e); |