return null;
}
if (ref == null || ref.length == 0)
return null;
// assumes the application context is available as a service
IApplicationContext result = (IApplicationContext) context.getService(ref[0]);
if (result != null) {
context.ungetService(ref[0]);
return result;
}
return null;