I'm trying to capture the moment when a vSphere client session ends so I can perform some cleanup on my services, but my sessionEnded method is still not being called when I log out of vSphere.
I found the related thread that suggests looking at the vsphere views sample for an example.
I implemented the ClientSessionEndListener interface on one of my service beans, added method sessionEnded, and passed in the UserSessionService to the same bean in bundle-context.xml. However, sessionEnded is still not getting called.
What might I be missing?
Ok, I figured things out and got the ClientSessionEndListener to work. In addition to implementing the listener in your local Java class, I learned I had to update the related bundle-context-osgi.xml config file to export the service. Here is the related bit from the xml file:
<osgi:service id="VmDataProvider" ref="VmDataProviderImpl">