Question

i want to execute script when my bundle is update, uninstall, or new.

I use actualy destroy-method and init-method but i don't now if my bundle has just "stop" or "remove".

 <bean id="plugin" class="com.toto.OrderPlugin" destroy-method="remove" init-method="install">

for Sample, why i want to catch event When my bundle is update :

  1. i want to know old version and new version and execute script in condition if my bundle is uninstall :
  2. i want to drop datable if my bundle is new
  3. i want to create datable

What is the right way to do this type of process? Can you give me an example?

Thank

Was it helpful?

Solution

Well in that case I'd go for a std. Activator. Skip using the blueprint xml and use a Bundle-Activator instead, this way you have full control about your bundle start behaviour.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top