Announcement Announcement Module
Collapse
No announcement yet.
How to create use case for Bundle Crash Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X