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.
Need sample code explaning Workmanager in Tomcat
4.7k Views Asked by Prabal Nandi At
2
There are 2 best solutions below
0
Talijanac
On
Old school way
Copy to tomcat\lib folder following jars:
- commonj-xxx.jar
- tomcat-commonj-xxx.jar
In context.xml of your app or tomcat create a new WorkManager instance:
<Resource name="wm/myWorkManager" type="commonj.work.WorkManager" auth="Container"
factory="de.myfoo.commonj.work.FooWorkManagerFactory"
maxThreads="10"
minThreads="5" />
Fetch this instance using JNDI. For example using web.xml:
<resource-ref>
<description>Work manager example</description>
<res-ref-name>wm/myWorkManager"</res-ref-name>
<res-type>commonj.work.WorkManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
Any other way should work.
Related Questions in MULTITHREADING
- new thread blocks main thread
- WPF MessageBox Cancel checkbox check
- How to avoid concurrent access to a resource?
- run oncomplete event in async
- Threading Segfault when reading members
- Function timeouts in C and thread
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Acumatica perfomance with threads
- Wait and Notify in Java threads for a given interval
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
- How to return blocking queue to the right object?
- background thread using Task.Run
- deletion and cleanup of worker thread in Qt crashes
- Pipeline-like operation using TChan
- implementing in app purchase on android
Related Questions in TOMCAT
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
- Image not loading in web page and says 404 error
- Maven Tomcat plugin - 404 WebServlet not found
- How to deploy a spring boot MVC application in traditional tomcat webapps folder?
- Tomcat Manager is not accessible in multi-domain configuration
- JSP return Jasper Exceptions on my friend's pc's when it works on mine
Related Questions in ASYNCHRONOUS
- Run a loop over a callback, node js
- run oncomplete event in async
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Node JS Async Response
- ajax async: true statement execution order
- Need help making this translation function work with an array input
- How to check in an (Android) async task if the activity it was called from was finished?
- Async vs Horizontal scaling
- Task await fails
- Having two sequential steps running within a windows service
- Would async/await provide benefit over Task for intertwined statements?
- What is the best way to make two web pages communicate between each other back and forth?
- Get result from async closure - Unexpected found nil while unwrapping an Optional value
- Nested asynchronous calls using AngularJS
- Telerik Report Viewer don't work with jquery async: false
Related Questions in WORKMANAGERS
- How to create independent thread using spring @Async
- how to access WorkManager attributes value in weblogic server from our application
- NPE from workmanager when try to get a class already loaded in the application
- Assign names to Weblogic's 10.3.5 specific Work Manager
- Weblogic Workmanagers and JAX-WS webservices
- Replacing Websphere's WorkManager in JBoss?
- asynchbeans WorkManager & CommonJ Scheduling integration
- Workmanager starts itself again when app is killed in flutter
- "AsynchBeans Service not initialized" error trying to lookup WebSphere 7 WorkManager
- Getting Spring scheduled tasks to run with the task executor thread
- setProgressAsync in ListenableWorker not sending update to LiveData
- How to get WorkRequest Id inside CoroutineWorker
- Flutter alarm manager not work when closed app
- How to pass json argument to a BGTaskScheduler
- How to run long task while flutter app is in background
Related Questions in COMMONJ
- OC4J (10.1.2) orion-web.xml
- How do I ignore stuck threads in a Weblogic Server
- "AsynchBeans Service not initialized" error trying to lookup WebSphere 7 WorkManager
- How to implement CommonJ Work Manager with WebSphere?
- How to use commonJ Timer Manager in MDB at Weblogic 10.3 environment
- Is there a way to integrate CommonJ WorkManager with Glassfish
- How to map commonj.work.WorkManager with weblogic 10.3 Work Manager
- Using a Commonj Work Manager to send Asynchronous HTTP calls
- Why is Weblogic work manager is rejecting work
- Custom Thread on Weblogic Server 11g
- Programmatically create WorkManager on WAS 6.1
- Thread keeps running even after application has been stopped in Websphere
- commonj workmanager in jboss threads not waiting to complete
- Common timeout across ExecutorChannel threads
- Websphere workmanager alternative
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
JSR-237 has been withdrawn, but it has been merged with JSR-236. http://jcp.org/en/jsr/detail?id=237 Reason: JSR 237 has been merged with JSR 236, providing a single, consistent specification for Java EE concurrency.