Tabnine Logo
PooledConnectionFactoryConfigurationBuilder.connectionUrl
Code IndexAdd Tabnine to your IDE (free)

How to use
connectionUrl
method
in
org.infinispan.persistence.jdbc.configuration.PooledConnectionFactoryConfigurationBuilder

Best Java code snippets using org.infinispan.persistence.jdbc.configuration.PooledConnectionFactoryConfigurationBuilder.connectionUrl (Showing top 8 results out of 315)

origin: org.infinispan/infinispan-cachestore-jdbc

public static ConnectionFactoryConfigurationBuilder<?> configureUniqueConnectionFactory(AbstractJdbcStoreConfigurationBuilder<?, ?> store) {
 switch (dt) {
 case H2:
   return store
    .connectionPool()
      .driverClass(org.h2.Driver.class)
      .connectionUrl(String.format("jdbc:h2:mem:%s;DB_CLOSE_DELAY=-1", extractTestName() + userIndex.incrementAndGet()))
      .username("sa");
 case MYSQL:
   return store
    .simpleConnection()
      .driverClass(com.mysql.jdbc.Driver.class)
      .connectionUrl("jdbc:mysql://localhost/infinispan?user=ispn&password=ispn")
      .username("ispn")
      .password("ispn");
 default:
   throw new RuntimeException("Cannot configure connection for database type "+dt);
 }
}
origin: org.infinispan/infinispan-cachestore-jdbc

public void testImplicitPooledConnectionFactory() {
 ConfigurationBuilder b = new ConfigurationBuilder();
 b.persistence().addStore(JdbcStringBasedStoreConfigurationBuilder.class)
   .connectionPool().connectionUrl(JDBC_URL);
 Configuration configuration = b.build();
 JdbcStringBasedStoreConfiguration store = (JdbcStringBasedStoreConfiguration) configuration.persistence().stores().get(0);
 assert store.connectionFactory() instanceof PooledConnectionFactoryConfiguration;
}
origin: org.infinispan/infinispan-cachestore-jdbc

  public void testTableProperties() {
   Properties props = new Properties();
   props.put("createOnStart", "false");
   props.put("dropOnExit", "true");

   ConfigurationBuilder b = new ConfigurationBuilder();
   b.persistence().addStore(JdbcStringBasedStoreConfigurationBuilder.class)
     .connectionPool().connectionUrl(JDBC_URL)
     .withProperties(props);
   Configuration stringConfiguration = b.build();

   JdbcStringBasedStoreConfiguration stringStoreConfiguration = (JdbcStringBasedStoreConfiguration) stringConfiguration.persistence().stores().get(0);
   assertFalse(stringStoreConfiguration.table().createOnStart());
   assertTrue(stringStoreConfiguration.table().dropOnExit());
  }
}
origin: org.infinispan/infinispan-tools

  private static void createConnectionConfig(StoreProperties props, JdbcStringBasedStoreConfigurationBuilder storeBuilder) {
   props.required(props.key(CONNECTION_POOL, CONNECTION_URL));
   props.required(props.key(CONNECTION_POOL, DRIVER_CLASS));

   storeBuilder.connectionPool()
      .connectionUrl(props.get(CONNECTION_POOL, CONNECTION_URL))
      .driverClass(props.get(CONNECTION_POOL, DRIVER_CLASS))
      .username(props.get(CONNECTION_POOL, USERNAME))
      .password(props.get(CONNECTION_POOL, PASSWORD))
      .create();
  }
}
origin: org.infinispan/infinispan-tools

private void parseConnectionPoolAttributes(XMLExtendedStreamReader reader,
                     PooledConnectionFactoryConfigurationBuilder<?> builder) throws XMLStreamException {
 for (int i = 0; i < reader.getAttributeCount(); i++) {
   ParseUtils.requireNoNamespaceAttribute(reader, i);
   String value = replaceProperties(reader.getAttributeValue(i));
   Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
   switch (attribute) {
    case CONNECTION_URL: {
      builder.connectionUrl(value);
      break;
    }
    case DRIVER_CLASS: {
      builder.driverClass(value);
      break;
    }
    case PASSWORD: {
      builder.password(value);
      break;
    }
    case USERNAME: {
      builder.username(value);
      break;
    }
    default: {
      throw ParseUtils.unexpectedAttribute(reader, i);
    }
   }
 }
 ParseUtils.requireNoContent(reader);
}
origin: org.infinispan/infinispan-cachestore-jdbc

builder.connectionUrl(value);
break;
origin: org.infinispan/infinispan-cachestore-jdbc

b.persistence().addStore(JdbcStringBasedStoreConfigurationBuilder.class)
  .connectionPool()
   .connectionUrl(JDBC_URL)
  .fetchPersistentState(true)
  .table()
origin: org.infinispan/infinispan-lucene-directory

@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
 ConfigurationBuilder cb = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
 cb.persistence()
    .addStore(JdbcStringBasedStoreConfigurationBuilder.class)
    .preload(true)
    .key2StringMapper(LuceneKey2StringMapper.class)
    .table()
    .idColumnName("ID_COLUMN")
    .idColumnType("VARCHAR(255)")
    .tableNamePrefix("ISPN_JDBC")
    .dataColumnName("DATA_COLUMN")
    .dataColumnType("BLOB")
    .timestampColumnName("TIMESTAMP_COLUMN")
    .timestampColumnType("BIGINT")
    .connectionPool()
    .driverClass(org.h2.Driver.class)
    .connectionUrl("jdbc:h2:mem:infinispan;DB_CLOSE_DELAY=0")
    .username("sa");
 return TestCacheManagerFactory.createClusteredCacheManager(cb);
}
org.infinispan.persistence.jdbc.configurationPooledConnectionFactoryConfigurationBuilderconnectionUrl

Popular methods of PooledConnectionFactoryConfigurationBuilder

  • driverClass
  • username
  • password
  • create
  • fetchPersistentState
  • propertyFile
  • withProperties

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JFrame (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now