-
Website
http://www.dobesland.com -
Original page
http://www.dobesland.com/2009/02/03/running-work-seperate-thread-transaction-glassfish/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
spangen
1 comment · 1 points
-
Janette Toral
1 comment · 11 points
-
Targe
1 comment · 1 points
-
dobes_vandermeer
17 comments · 3 points
-
sujitkale
1 comment · 1 points
-
-
Popular Threads
Do you have a full example (including imports) of the code snippet?
Thanks
Lee
In eclipse I just type "WorkManagerFactory" and press CTRL+SPACE. The
WorkManager implementation is here:
import com.sun.enterprise.connectors.work.CommonWorkManager;
You can just use new CommonWorkManager("thread-pool-name-here") to construct
it; this is basically what the WorkManagerFactory does except it allows you
to set a different implementation of WorkManager if desired.
The "Work" interface is here:
import javax.resource.spi.work.Work;
Note that these won't be available unless you have appserv-rt.jar in your
classpath.
Hope that helps!
Is this Workmanager API compatible to JSR-237?
I am missing some methods like waitForAll() in WorkManager?
Is there any implementation simillar to Weblogic or Websphere work manager for glass fish?
This is a glassfish-specific API that is not a standard, and is not
available in other containers as far as I know.
Hope that helps (or not!).
I don't know if WorkManager has a waitForAll() method, you'll just have to
go take a look at the source code and see what is there for use.
If you just want to run some jobs in a bunch of threads you can use the
standard Thread and ThreadPool APIs as well, WorkManager doesn't do anything
special except manage a list of "Work" objects and run them for you when the
thread is available.
how to perform above things in it.
i have the work manager api. but there is no WorkManagerFactory kind of concept in it.
how to associate a threadpool to this workmanager.