* @throws Exception
*/
private GadgetApplication getApplication()
{
WebAppController webController = getApplicationComponent(WebAppController.class);
GadgetApplication application = webController.getApplication("eXoGadgets/" + gadgetId);
if (application == null)
{
GadgetRegistryService gadgetService = getApplicationComponent(GadgetRegistryService.class);
Gadget model;
try