Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-459

new item in source doesn't appear in federated source projection

XMLWordPrintable

    • Compatibility/Configuration

      I'm not sure if it is a bug or an error in my configuration or environment. I just follow the examples without getting the CNDs and also without importing the example data. When I create some new item using the graph api this item is created in a correct way on the repository source that I'm using (example: cars) but it doesn't appears on the projection on federated source (example: vehicles/cars). I created this test case that should be used on doc/examples/repository project. I also did this same test using the JAAS configuration.

      package org.jboss.example.dna.repository;

      import static org.hamcrest.core.Is.is;
      import static org.hamcrest.core.IsNull.notNullValue;
      import static org.junit.Assert.assertThat;

      import java.net.URL;

      import org.jboss.dna.graph.Graph;
      import org.jboss.dna.jcr.JcrConfiguration;
      import org.jboss.dna.jcr.JcrEngine;
      import org.junit.Test;

      public class FederationOnDifferentSourcesTest {

      @Test
      public void shouldHaveProjectionInsideFederatedSource()
      throws Exception

      { JcrConfiguration configuration = new JcrConfiguration(); URL configUrl = Thread.currentThread().getContextClassLoader() .getResource("configRepository.xml"); assertThat(configUrl, is(notNullValue())); configuration.loadFrom(configUrl); JcrEngine engine = configuration.build(); engine.start(); Graph vehiclesGraph = engine.getGraph("Vehicles"); assertThat(vehiclesGraph.getNodeAt("/Cars"), is(notNullValue())); }

      @Test
      public void shouldCreateItemOnSourceRepositoryAndShowTheSameItemOnFederatedSource()
      throws Exception

      { JcrConfiguration configuration = new JcrConfiguration(); URL configUrl = Thread.currentThread().getContextClassLoader() .getResource("configRepository.xml"); assertThat(configUrl, is(notNullValue())); configuration.loadFrom(configUrl); JcrEngine engine = configuration.build(); engine.start(); Graph carsGraph = engine.getGraph("Cars"); carsGraph.create("/Honda"); assertThat(carsGraph.getNodeAt("/Honda"), is(notNullValue())); Graph vehiclesGraph = engine.getGraph("Vehicles"); assertThat(vehiclesGraph.getNodeAt("/Cars/Honda"), is(notNullValue())); }

      }

              Unassigned Unassigned
              feuteston_jira Luiz Fernando Teston (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: