Getting the view ID from a cache manager is not very straightforward. This is located in Transport interface but this is not directly accessible EmbeddedCacheManager. At first glance, the only possible way to do it is by getting a reference to a cache, then getting the RPCManager from it and the transport associated with it. That's of course assuming the cache is clustered, otherwise it won't work.
I'checking for other workarounds.