Вопрос

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?

Это было полезно?

Решение

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?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top