Results 1 to 2 of 2

Thread: How to create use case for Bundle Crash

  1. #1
    Join Date
    Nov 2008
    Location
    London,UK
    Posts
    299

    Default How to create use case for Bundle Crash

    Hi ,

    How do i create a usecase for bundle crash.My use case is as follows

    We are testing Spring Dm in a clustered environment with TerraCotta. We have a distributed locked object - ReentrantReadWriteLock which is shared by more than one Dm server.

    We tried simple case where one DM server was locking the object and other Dm server was waiting on it. When the first Dm server released the lock ,execution continued as desired.

    So we put a guideline saying the lock should be released by every bundle in its stop of the activator.

    Now we are trying to simulate failure usecase where one of the bundle holds a lock and gets undeployed . IS it possible taht this can happen , that is the bundle gets into a unstable state .

    We just want to simulate this failure case where lock doesnt get released on bundle undeployment/refresh . Could this happen ?

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    As part of a bundle being undeployed it will be stopped. This means that the OSGi container will drive its activator's stop method.

    If you want to test the case where something really horrible happens and the OSGi container fails to drive the activator's stop method (which having looked at the code in Equinox is very unlikely to happen) you'll probably have to resort to using a custom bundle that doesn't bother releasing the lock in its activator.
    Andy Wilkinson
    SpringSource

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •