Friday, 30 September 2011

Inside IBM WCM : Part2 - How to stop a background WCM library delete

There are occasions when you wish to stop a background Library Deletion process.

First thing to realise is that a WCM Library delete using the WCM Libraries portlet triggers an EJB which does the job. The EJB will lock the library (icon will be greyed out) prior to the start of the process.

In order to stop the deletion process you will need to find the EJB's, remove them, unlock the library and then restart the server.

Firstly, find the EJB id's using the findEJBTimers script. You need the java server name for this:

For UNIX/Linux:

findEJBTimers.sh WebSphere_Portal -all

(For windows use the "bat" equivalent)

This script will return a list of timer numbers. Make a note of these numbers

Next run the script passing the timer number in as a parameter:

cancelEJBTimers.sh WebSphere_Portal -timer xxxx

Repeat for all timers previously listed

Next, you MUST unlock the libraries otherwise the EJB timers will simply restart again when the server restarts. To unlock the libraries, you must use a WCM connect URL:

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.

1 comment:

  1. There's no need to note them down:

    for i in `./findEJBTimers.sh WebSphere_Portal -all|grep "EJB Timer" | awk ' { print $4 } ' ` ; do ./cancelEJBTimers.sh WebSphere_Portal -timer $i ; done

    ;-)

    ReplyDelete