@Override
	public void initialize(WriteSession session) throws ApplicationInitializationException {
		LOGGER.info("Initializing application: {}",session);
		ResourceSnapshot person = session.find(ResourceSnapshot.class,this.personResourceName,PersonHandler.class);
		LOGGER.info("Root resource.......: "+person);
		LOGGER.info("Root basic container: "+session.find(ResourceSnapshot.class,this.personContainerName,PersonContainerHandler.class));

		ContainerSnapshot relativesContainer = person.createAttachedResource(ContainerSnapshot.class, PersonHandler.RELATIVES_ID, this.relativeContainerResourceName, RelativeContainerHandler.class);
		LOGGER.info("Attached resource...: "+relativesContainer);
		try {
			session.saveChanges();
		} catch (WriteSessionException e) {
			throw new ApplicationInitializationException("Could not initialize application",e);
		}
		this.executorService.
		scheduleAtFixedRate(
			new DynamicResourceUpdater(this.dynamicResourceHandler,this.dynamicResourceName),
			1,
			15,TimeUnit.SECONDS);
		this.executorService.
			schedule(
				new DynamicResourceResolver(this.dynamicResourceHandler,this.dynamicResourceName),
				3,TimeUnit.SECONDS);
		LOGGER.info("Initialization completed.");
	}
@Override
	public void initialize(WriteSession session) throws ApplicationInitializationException {
		LOGGER.info("Initializing application: {}",session);
		ResourceSnapshot person = session.find(ResourceSnapshot.class,this.personResourceName,PersonHandler.class);
		LOGGER.info("Root resource.......: "+person);
		LOGGER.info("Root basic container: "+session.find(ResourceSnapshot.class,this.personContainerName,PersonContainerHandler.class));

		ContainerSnapshot relativesContainer = person.createAttachedResource(ContainerSnapshot.class, PersonHandler.RELATIVES_ID, this.relativeContainerResourceName, RelativeContainerHandler.class);
		LOGGER.info("Attached resource...: "+relativesContainer);
		try {
			session.saveChanges();
		} catch (WriteSessionException e) {
			throw new ApplicationInitializationException("Could not initialize application",e);
		}
		this.executorService.
		scheduleAtFixedRate(
			new DynamicResourceUpdater(this.dynamicResourceHandler,this.dynamicResourceName),
			1,
			15,TimeUnit.SECONDS);
		this.executorService.
			schedule(
				new DynamicResourceResolver(this.dynamicResourceHandler,this.dynamicResourceName),
				3,TimeUnit.SECONDS);
		LOGGER.info("Initialization completed.");
	}
@ Override public void initialize ( WriteSession session ) throws ApplicationInitializationException { LOGGER . info ( "Initializing application: {}" , session ) ; ResourceSnapshot person = session . find ( ResourceSnapshot . class , this . personResourceName , PersonHandler . class ) ; LOGGER . info ( "Root resource.......: " + person ) ; LOGGER . info ( "Root basic container: " + session . find ( ResourceSnapshot . class , this . personContainerName , PersonContainerHandler . class ) ) ; ContainerSnapshot relativesContainer = person . createAttachedResource ( ContainerSnapshot . class , PersonHandler . RELATIVES_ID , this . relativeContainerResourceName , RelativeContainerHandler . class ) ; LOGGER . info ( "Attached resource...: " + relativesContainer ) ; try { session . saveChanges ( ) ; } catch ( WriteSessionException e ) { throw new ApplicationInitializationException ( "Could not initialize application" , e ) ; } this . executorService . scheduleAtFixedRate ( new DynamicResourceUpdater ( this . dynamicResourceHandler , this . dynamicResourceName ) , 1 , 15 , TimeUnit . SECONDS ) ; this . executorService . schedule ( new DynamicResourceResolver ( this . dynamicResourceHandler , this . dynamicResourceName ) , 3 , TimeUnit . SECONDS ) ; LOGGER . info ( "Initialization completed." ) ; }
{@inheritDoc}
{