Package org.xmlBlaster.contrib.replication.impl

Examples of org.xmlBlaster.contrib.replication.impl.SearchableConfig


    */
   public boolean isColumnSearchConfigured(String column) {
      if (this.configuredSearchableColumns == null) {
         synchronized (this) {
            if (this.configuredSearchableColumns == null) {
               SearchableConfig searchableConfig = (SearchableConfig)this.info.getObject(SearchableConfig.NAME);
               String catalog = getCatalog();
               String table = this.identity;
               if (searchableConfig != null)
                  this.configuredSearchableColumns = searchableConfig.getSearchableColumnNames(catalog, getSchema(), table);
               if (this.configuredSearchableColumns == null)
                  this.configuredSearchableColumns = new HashSet();
               else { // do the complete check here
                  if (this.hasPk())
                     log.warning("The table '" + getCompleteTableName() + "' has primary keys defined. You configured explicitly searchable columns which overwrite the PK defaults. I hope you know what you are doing");
View Full Code Here


      this.info = info_;
      this.pool = (I_DbPool)info_.getObject(DbWriter.DB_POOL_KEY);
      if (this.pool == null)
         throw new Exception(ME + ".init: the pool has not been configured, please check your '" + DbWriter.DB_POOL_KEY + "' configuration settings");

      SearchableConfig searchableConfig = new SearchableConfig();
      searchableConfig.init(this.info);
      this.info.putObject(SearchableConfig.NAME, searchableConfig);
     
      // this avoids the publisher to be instantiated (since we are on the slave side)
      this.info.put(I_DbSpecific.NEEDS_PUBLISHER_KEY, "false");
      boolean forceCreationAndInit = true;
View Full Code Here

        
         DbPool pool = new DbPool();
         pool.init(info);
         info.putObject(DbWriter.DB_POOL_KEY, pool);
        
         SearchableConfig searchableConfig = new SearchableConfig();
         searchableConfig.init(info);
         info.putObject(SearchableConfig.NAME, searchableConfig);
        
         pool.update("drop table table1");
         String txt = "create table table1 (first VARCHAR(100), second VARCHAR(100), third blob, fifth VARCHAR(29), primary key(first))";
         pool.update(txt);
        
         pool.update("INSERT INTO table1 (first, second, fifth) values ('oldOne', 'oldTwo', 'oldFive')");
        
         Set vals = searchableConfig.getSearchableColumnNames(null, "XMLBLASTER", "TABLE1");
         String[] ret = (String[])vals.toArray(new String[vals.size()]);
         assertEquals("Wrong number of colums found", 4, ret.length);
        
         SqlInfo sqlInfo = new SqlInfo(info);
         Connection conn = pool.reserve();
View Full Code Here

TOP

Related Classes of org.xmlBlaster.contrib.replication.impl.SearchableConfig

Copyright © 2018 www.massapicom. 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.