Name: sample.javaee7.sleepybatchlet
Owner: WASdev
Description: A simple sample batchlet for use with the Batch Programming Model in Java EE 7, as specified by JSR 352. #JavaEE7
Created: 2015-11-11 08:09:27.0
Updated: 2016-01-15 16:03:42.0
Pushed: 2016-10-10 13:54:26.0
Size: 347
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
SleepyBatchlet is a simple sample batchlet for use with the Batch Programming Model in Java EE 7, as specified by JSR 352.
The batchlet itself is rather uninteresting. All it does is sleep in 1 second increments for a default time of 15 seconds. The sleep time is configurable via batch property sleep.time.seconds. The batchlet prints a message to System.out each second, so you can easily verify that it's running.
The sample can be built using Apache Maven. In the directory where you cloned the repository issue the following command to build the source.
n install
Then, in the sleepybatchlet-webapp directory issue the following command to run it on a Liberty server.
n liberty:run-server
The WebSphere Development Tools (WDT) for Eclipse can be used to control the server (start/stop/dump/etc.), it also supports incremental publishing with minimal restarts, working with a debugger to step through your applications, etc.
WDT also provides:
Installing WDT on Eclipse is as simple as a drag-and-drop, but the process is explained on wasdev.net.
To import the source code into Eclipse/WDT:
Add batch-1.0 to your server.xml.
Install the sample app to your server by copying sample.javaee7.sleepybatchlet.war that was made from running mvn install
Start the server.
Run the sample by hitting the following URL using your servers hostname and port
http://hostname:port/sample.javaee7.sleepybatchlet/
Note: In WebSphere Application Server traditional the support for JSR 352 is limited to an in-memory (non-persistent) job repository.