Transparent self-optimization in existing CORBA applications