Examples of RepositoryConnectionFactory


Examples of org.jboss.dna.graph.connector.RepositoryConnectionFactory

            // Set up the source ...
            source = setUpSource();

            // Now set up the connection factory ...
            openConnections = new ArrayList<RepositoryConnection>();
            connectionFactory = new RepositoryConnectionFactory() {
                @SuppressWarnings( "synthetic-access" )
                public RepositoryConnection createConnection( String sourceName ) throws RepositorySourceException {
                    if (!source.getName().equals(sourceName)) return null;
                    RepositoryConnection connection = source.getConnection();
                    if (connection == null) {
View Full Code Here

Examples of org.jboss.dna.graph.connector.RepositoryConnectionFactory

        context = new ExecutionContext();
        pathFactory = context.getValueFactories().getPathFactory();
        source = new InMemoryRepositorySource();
        source.setName("store");
        // Use a connection factory so we can count the number of connections that were made
        RepositoryConnectionFactory connectionFactory = new RepositoryConnectionFactory() {
            public RepositoryConnection createConnection( String sourceName ) throws RepositorySourceException {
                if (source.getName().equals(sourceName)) {
                    ++numberOfConnections;
                    return source.getConnection();
                }
View Full Code Here

Examples of org.jboss.dna.graph.connectors.RepositoryConnectionFactory

        if (this.repository != null) {
            RepositoryContext repositoryContext = getRepositoryContext();
            if (repositoryContext != null) {
                // Find in JNDI the repository source registry and the environment ...
                ExecutionContext context = getExecutionContext();
                RepositoryConnectionFactory factory = getRepositoryContext().getRepositoryConnectionFactory();
                // Compute a new repository config and set it on the repository ...
                FederatedRepositoryConfig newConfig = getRepositoryConfiguration(context, factory);
                this.repository.setConfiguration(newConfig);
            }
        }
View Full Code Here

Examples of org.jboss.dna.graph.connectors.RepositoryConnectionFactory

     * @throws RepositorySourceException
     */
    protected synchronized FederatedRepository getRepository() throws RepositorySourceException {
        if (repository == null) {
            ExecutionContext context = getExecutionContext();
            RepositoryConnectionFactory connectionFactory = getRepositoryContext().getRepositoryConnectionFactory();
            // And create the configuration and the repository ...
            FederatedRepositoryConfig config = getRepositoryConfiguration(context, connectionFactory);
            repository = new FederatedRepository(context, connectionFactory, config);
        }
        return repository;
View Full Code Here

Examples of org.jboss.dna.graph.connectors.RepositoryConnectionFactory

        if (this.repository != null) {
            RepositoryContext repositoryContext = getRepositoryContext();
            if (repositoryContext != null) {
                // Find in JNDI the repository source registry and the environment ...
                ExecutionContext context = getExecutionContext();
                RepositoryConnectionFactory factory = getRepositoryContext().getRepositoryConnectionFactory();
                // Compute a new repository config and set it on the repository ...
                FederatedRepositoryConfig newConfig = getRepositoryConfiguration(context, factory);
                this.repository.setConfiguration(newConfig);
            }
        }
View Full Code Here

Examples of org.jboss.dna.graph.connectors.RepositoryConnectionFactory

     * @throws RepositorySourceException
     */
    protected synchronized FederatedRepository getRepository() throws RepositorySourceException {
        if (repository == null) {
            ExecutionContext context = getExecutionContext();
            RepositoryConnectionFactory connectionFactory = getRepositoryContext().getRepositoryConnectionFactory();
            // And create the configuration and the repository ...
            FederatedRepositoryConfig config = getRepositoryConfiguration(context, connectionFactory);
            repository = new FederatedRepository(context, connectionFactory, config);
        }
        return repository;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.