public void register(String appName, String appDescriptor, String webappDescriptor, String extendedDescriptor)
throws Exception
{
WebApplicationDescriptor wad = new WebApplicationDescriptor(new FileReader(webappDescriptor), "/" + appName);
MutableWebApplication webapp = wad.createWebApplication();
PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(appDescriptor), appName);
MutablePortletApplication app = pad.createPortletApplication(true);
app.setWebApplicationDefinition(webapp);
ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(extendedDescriptor), app);
extMetaData.load();
registry.registerPortletApplication(app);
}