In my current project we an EIS that we are connecting to via a JCA-based RA. It is imperative that we maintain connection with this EIS in order to keep the data synchronised between the EIS and the client software that access the EIS by the RA.
My problem is the following. I have to know when the RA is undeployed, new RAs deployed, etc., so that I can inform the client software that its data (derived from the EIS) is suspect. I am currently plugged in to the RAR deployer's notification capability but I am getting multiple events when RAs get deployed or undeployed. I've set the filter on the "addNotificationListener" call to filter only the "create" and "destroy" message, but I still get several events. From where are these events coming, and can I limit the number to just one/create or delete occurrence?
On a related topic, to which service do I listen in order to pick up events from starts and stops that are performed via the jmx-console, i.e., after the RA has been deployed?
And finally, is this the best way to do this type of thing? Any other suggestions would be appreciated.