天道酬勤,学无止境

commonj

Need sample code explaning Workmanager in Tomcat

Question I want to know how to use WorkManager in Tomcat 7. I came across the open source library Foo-CommonJ but nowhere i found a sample code explaning the usage. The input parameter for FooWorkManager's constructor is an instance of commonj.work.work class, where as no one provides the commonj.work.work class (neither tomcat nor foo-commonj). Basically i need a sample code explaining usage of WorkManager (FooCommonj jar) in tomcat. And if Foo-Commonj doesn't support workmanager properly, then some alternative. Answer1 JSR-237 has been withdrawn, but it has been merged with JSR-236. http:/

2021-09-29 07:42:58    分类:技术分享    multithreading   tomcat   asynchronous   workmanagers   commonj

Custom Thread on Weblogic Server 11g

Question I need a custom threda on my weblogic server; I cannot use TimerEJB or Delayed MDB since I have to use a 3d library. I know that custom threads on application server are discouraged; here a related post (4 years old): Why is spawning threads in Java EE container discouraged? Is it still discouraged? Can I use ExecutorService or Quartz? Or I have to consider only commonj and worker manager? Answer1 On Weblogic 11g (EJB3.0) is dicouraged to create "own thread executor" (see also Java EE specification and multi threading) you should use: TimerService example: MyEjb { @Stateless public

2021-06-11 12:02:42    分类:技术分享    java   multithreading   weblogic11g   commonj