Question

My application is based on OSGi (Equinox). A OSGi service binds another service by defining a Component XML and bind / unbind methods in the appropriate class.

In the unbind method the value of a global String variable (same class like unbind method) should be retrivied.

Strangely the String attribute is null there, although the attribute was definitely set before. What's the reason for that? How can I get the value that I have set?

Was it helpful?

Solution

Likely causes are that you have a different instance or class than you think. Just set a breakpoint on writing and reading that variable or make a set/get method that prints it out with some debug info.

Did you actually debug this problem before asking?

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