WebLogic 9.1, in a bid to make things easier, have made things that much harder when deploying startup and shutdown classes.
When you log in to the web based admin console, click the "Startup and Shutdown classes" link. You should see:
Select 'Startup Class' and click next. Enter the name of your startup class (org.jboss.cache.example.j2eeservices.JBossCacheManager)
Then click next and target the class to your cluster or individual servers.
Here is where things get a bit roundabout. Click on 'Startup and Shutdown Classes' again, so you see a list of configured classes. Click on the hyperlinked configuration you just created above and you should see a details page, which you should add the argument the class takes ("start") and check the box that says the class should be loaded before any applications are deployed.
Click ok to save this.
Repeat steps 1 and 2 for the shutdown class. If you are using the sample code provided, the shutdown class is the same as the startup class.
Once you have done this, go to the list of configured classes again, click on your newly configured shutdown class to get the details page - as you did in step 3 above. This time, enter "stop" as an argument.
When you finally look at the list of startup and shutdown classes, you should see something like:
Don't forget to "Activate Configuration Changes" otherwise WebLogic won't pick these up!!