Deprecated API usage cleanup, part2

As @kabir pointed out, this is in fact in controller, i was mixing this up with jmx as most of changes in this PR are related to it.