updated listener

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@174150 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-11-14 16:00:22 +00:00
parent 70b7ec36fa
commit 26ca78b976
3 changed files with 12 additions and 4 deletions

View File

@ -15,14 +15,15 @@ import javax.servlet.ServletContextListener;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebListener;
//import org.gcube.datatransfer.resolver.caches.LoadingCatalogueApplicationProfilesCache;
import org.gcube.datatransfer.resolver.caches.LoadingGeonetworkInstanceCache;
import org.gcube.datatransfer.resolver.caches.LoadingGisViewerApplicationURLCache;
import org.gcube.datatransfer.resolver.caches.LoadingVREsScopeCache;
import org.gcube.datatransfer.resolver.gis.property.ApplicationProfilePropertyReader;
import org.gcube.datatransfer.resolver.gis.property.PropertyFileNotFoundException;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.configuration.container.ContainerConfiguration;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.context.container.ContainerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -67,8 +68,15 @@ public class UriResolverStartupListener implements ServletContextListener {
try {
rootContextScope = loadScopeFromEnvironment();
ApplicationContext ctx = ContextProvider.get();
ContainerContext container = ctx.container();
logger.info("Is ContainerContext null? "+(container==null));
ContainerConfiguration contConfiguration = container.configuration();
logger.info("Is ContainerConfiguration null? "+(contConfiguration==null));
String rootScope = ctx.container().configuration().infrastructure();
logger.info("The ContextProvider returned the infrastructure name: "+rootScope);
logger.info("Is infrastructure null? "+(rootScope==null));
logger.info("The ContextProvider read the infrastructure name: "+rootScope);
}
catch (Exception e) {
//

View File

@ -150,7 +150,7 @@ public class CatalogueResolver {
}.start();*/
return Response.ok(linkURL).build();
return Response.ok(linkURL).header("Location", linkURL).build();
}
/**

View File

@ -210,7 +210,7 @@ public class TestResolvers {
*
* @throws Exception the exception
*/
@Test
//@Test
public void testCatalogueResolverCreatePublicItemURL() throws Exception{
String entityName = "sarda-sarda";