[dna-issues] [JBoss JIRA] Resolved: (DNA-461) new item in source doesn't appear in federated source projection

Randall Hauch (JIRA) jira-events at lists.jboss.org
Wed Jun 17 11:36:56 EDT 2009


     [ https://jira.jboss.org/jira/browse/DNA-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Randall Hauch resolved DNA-461.
-------------------------------

    Fix Version/s: 0.6
       Resolution: Rejected


BTW, the reason the "/Cars" node needed to be created first was because you're not importing any content into the "Cars" repository.  This import process created the "/Cars" node and everything below it.

I'm marking this defect as 'Rejected', since it was resolved by proper configuration.

> new item in source doesn't appear in federated source projection 
> -----------------------------------------------------------------
>
>                 Key: DNA-461
>                 URL: https://jira.jboss.org/jira/browse/DNA-461
>             Project: DNA
>          Issue Type: Bug
>          Components: Connectors, Examples, Federation
>    Affects Versions: 0.5
>         Environment: Mac OS 10.5.7 with JVM 1.6 and maven 2.1
>            Reporter: Luiz Fernando Teston
>             Fix For: 0.6
>
>
> 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()));
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the dna-issues mailing list