FindEJBTimers command example
Overview
To use the findEJBTimers command to find all EJB timers on a server called server1:
findEJBTimers server1 -all
To find all EJB timers on server1, associated with the Increment bean in the DefaultApplication:
findEJBTimers server1 -app DefaultApplication.ear -mod Increment.jar -bean Increment
When EJB timers matching the filter criteria are found, the output appears similar to this:
EJB Timer: 25 Expiration: Mon Feb 09 13:36:47 CST 2004 Repeating EJB: DefaultApplication.ear Increment.jar Increment EJB Key: 8 Info: Increment Counter EJB Timer : 26 Expiration: Mon Feb 09 13:36:47 CST 2004 Single EJB: DefaultApplication.ear Increment.jar Increment EJB Key: 8 Info: Decrement Counter 2 EJB Timers foundIn this output:
EJB Timer Unique identifier of the timer. Expiration Next time the timer is expected to execute. Repeating
SingleWhether the EJB timer is single action or repeating. EJB Key toString() method output of the primary key for the Entity enterprise bean (not present for other EJB types). Info toString() method output of the object passed by the application when the EJB timer was created. Only the first 40 bytes of toString() output are displayed for the Primary Key and Timer Info. This information is only useful if the application overrides the toString() method for these objects.
Increment in the DefaultApplication does not implement the TimedObject interface, and so could not actually have associated EJB Timers. Increment is used merely for illustrative purposes in this example.
Stop a background WCM library delete
A WCM Library delete using the WCM Libraries portlet triggers an EJB that will lock the library (icon will be greyed out) prior to the start of the process.To stop the deletion process you will need to find the EJB's, remove them, unlock the library and then restart the server.
- Find the EJB id's using the findEJBTimers script. You need the java server name for this:
findEJBTimers.sh WebSphere_Portal -all
- Make a note of the list of timer numbers.
- Run the script passing the timer number in as a parameter:
cancelEJBTimers.sh WebSphere_Portal -timer xxxx
Repeat for all timers previously listed
Unlock the libraries. Otherwise the EJB timers will simply restart again when the server restarts.
http://host:port/wps/wcm/connect?MOD=UnlockLibrary&library=libraryname
With the library unlocked you can not restart the Portal.
The delete library task will now be terminated and the delete icon will display correctly.
Related tasks
Set a timer service for network deployment
Related
Example: Using the Timer Service 
Related information
EJB timer service settings