1

I will be using managed EWS for Java to create a thread that performs tasks on our Exchange server as reactions to creation, modification and deletion of elements in certain folders for certain users.

I have a few questions regarding EWS:

  1. StreamingSubscriptionConnection can only be kept open for a maximum of 30 minutes. What is the correct solution to practically keep it open permanently? Close and reconnect every 29 minutes?

  2. After calling connection.open(), the thread that called it continues and would end. Currently I use an infinite Thread.Sleep() after connection.open() to keep the thread alive. What is the correct solution to keep the main thread alive?

  3. What happens if a thread having an open connection crashes? Will the connection on the exchange server stay open for the remaining timeout time? Is it safe to assume that a new connection created right after a crash will receive all subscribed events (or will it go to the old connection only?)? On the Exchange Server, how do I see how many EWS subscription connections are active?

  4. Is a new thread created every time a CreationDelegates is used? As in is it automatically multi-threaded?

It's an Exchange 2013 server.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
ASA
  • 1,911
  • 3
  • 20
  • 37

0 Answers0