2727import javax .annotation .PostConstruct ;
2828import javax .ejb .Local ;
2929import javax .inject .Inject ;
30+ import javax .naming .ConfigurationException ;
3031
3132import org .apache .cloudstack .acl .APIChecker ;
3233import org .apache .cloudstack .api .APICommand ;
4748import com .cloud .user .User ;
4849import com .cloud .utils .ReflectUtil ;
4950import com .cloud .utils .StringUtils ;
51+ import com .cloud .utils .component .ManagerBase ;
5052import com .cloud .utils .component .PluggableService ;
5153import com .google .gson .annotations .SerializedName ;
5254
5355@ Component
5456@ Local (value = ApiDiscoveryService .class )
55- public class ApiDiscoveryServiceImpl implements ApiDiscoveryService {
57+ public class ApiDiscoveryServiceImpl extends ManagerBase implements ApiDiscoveryService {
5658 private static final Logger s_logger = Logger .getLogger (ApiDiscoveryServiceImpl .class );
5759
5860 @ Inject protected List <APIChecker > _apiAccessCheckers = null ;
@@ -63,8 +65,9 @@ protected ApiDiscoveryServiceImpl() {
6365 super ();
6466 }
6567
66- @ PostConstruct
67- void init () {
68+ @ Override
69+ public boolean configure (String name , Map <String , Object > params )
70+ throws ConfigurationException {
6871 if (s_apiNameDiscoveryResponseMap == null ) {
6972 long startTime = System .nanoTime ();
7073 s_apiNameDiscoveryResponseMap = new HashMap <String , ApiDiscoveryResponse >();
@@ -78,6 +81,8 @@ void init() {
7881 long endTime = System .nanoTime ();
7982 s_logger .info ("Api Discovery Service: Annotation, docstrings, api relation graph processed in " + (endTime - startTime ) / 1000000.0 + " ms" );
8083 }
84+
85+ return true ;
8186 }
8287
8388 protected void cacheResponseMap (Set <Class <?>> cmdClasses ) {
0 commit comments