Examples of PluginInfo


Examples of org.xmlBlaster.util.plugin.PluginInfo

      try {
         String type = PLUGIN_TYPES[this.count];
         this.glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");
         java.util.Properties prop = (java.util.Properties)pluginInfo.getParameters();
         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");
         I_Queue tmpQueue = pluginManager.getPlugin(pluginInfo, queueId, cbProp);
         tmpQueue.clear();
         // add some persistent entries and then shutdown ...
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

         int maxWaitingThreads = 10;

         Global ownGlobal = this.glob.getClone(null);

         QueuePluginManager pluginManager = new QueuePluginManager(ownGlobal);
         PluginInfo pluginInfo = new PluginInfo(ownGlobal, pluginManager, "JDBC", "1.0");

         pluginInfo.getParameters().put("connectionBusyTimeout", "10000");
         pluginInfo.getParameters().put("maxWaitingThreads", "" + maxWaitingThreads);
         pluginInfo.getParameters().put("connectionPoolSize", "" + numConn);

         JdbcConnectionPool pool = new JdbcConnectionPool();
         pool.initialize(ownGlobal, pluginInfo.getParameters());

         Connection[] conn = new Connection[numConn];        
         for (int i=0; i < numConn; i++) {
            log.info(" getting connection " + i);
            conn[i] = pool.getConnection();
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

      String me = ME + ".setUp";
      try {
         // connectionBusyTimeout
         // connectionPoolSize
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         info = new TestInfo();
         ((TestInfo)info).init(glob, pluginInfo);
         pool = new DbPool();
         pool.init(info);
        
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

      this.count       = currImpl;

      try {
         glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
         QueuePluginManager pluginManager = this.glob.getQueuePluginManager();
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         java.util.Properties pluginProp = (java.util.Properties)pluginInfo.getParameters();
         pluginProp.put("tableNamePrefix", "TEST");
         pluginProp.put("entriesTableName", "_entries");
         this.glob.getProperty().set("QueuePlugin[JDBC][1.0]", pluginInfo.dumpPluginParameters());
      }
      catch (Exception ex) {
         log.severe("could not propertly set up the database: " + ex.getMessage());
      }
   }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

      try {
         String type = PLUGIN_TYPES[currImpl];
         this.glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
         QueuePluginManager pluginManager = new QueuePluginManager(glob);

         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         java.util.Properties prop = (java.util.Properties)pluginInfo.getParameters();
         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");
         this.glob.getProperty().set("QueuePlugin[JDBC][1.0]", pluginInfo.dumpPluginParameters());

         pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "SomeQueueId");
         this.queue = pluginManager.getPlugin(pluginInfo, queueId, new CbQueueProperty(this.glob, Constants.RELATING_CALLBACK, this.glob.getStrippedId()));
         this.queue.shutdown(); // to allow to initialize again
      }
      catch (Exception ex) {
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

//         prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
//         StorageId queueId = new StorageId(Constants.RELATING_CALLBACK, "SetupQueue");

         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         java.util.Properties pluginProp = (java.util.Properties)pluginInfo.getParameters();
         pluginProp.put("tableNamePrefix", "TEST");
         pluginProp.put("entriesTableName", "_entries");
         this.glob.getProperty().set("QueuePlugin[JDBC][1.0]", pluginInfo.dumpPluginParameters());
/*
         I_Queue jdbcQueue = (I_Queue)this.constructor[this.count].newInstance(null);
         jdbcQueue.initialize(queueId, prop);
         jdbcQueue.clear();
         jdbcQueue.destroy();
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

   protected void setUp() {
      //here you should clean up the DB (the three tables)
      String me = ME + ".setUp";
      try {
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         String className = pluginInfo.getClassName();
         if (!className.equals(JdbcQueueCommonTablePlugin.class.getName()))
            doExecute = false;
         else
            doExecute = true;
         if (!doExecute) {
            log.warning("NOT GOING TO EXECUTE THE TEST SINCE JDBC NOT CONFIGURED FOR THIS TEST");
            return;
         }
        
         java.util.Properties
            prop = (java.util.Properties)pluginInfo.getParameters().clone();

         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");
         prop.put("dbAdmin", "true");

         JdbcConnectionPool pool = new JdbcConnectionPool();
         pool.initialize(this.glob, prop);

         this.manager = new CommonTableDatabaseAccessor(pool, this.glob.getEntryFactory(), pluginInfo.getTypeVersion(), null);
         this.manager.setUp();
         try {
            this.manager.wipeOutDB(false);
         }
         catch (Exception ex) {
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

    * therefore the plugin of same typeVersion is only loaded once.
    * @param typeVersion The type and version e.g. "Priority,1.0"
    * @return null if no plugin was loaded
    */
   public I_MsgDispatchInterceptor getPlugin(String typeVersion) throws XmlBlasterException {
      PluginInfo pluginInfo = new PluginInfo(getGlobal(), this, typeVersion);
      pluginInfo.setUserData(typeVersion); // transport to postInstantiate() without any modification
      return (I_MsgDispatchInterceptor)getPluginObject(pluginInfo);
   }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

      try {
         if (log.isLoggable(Level.FINE)) log.fine("Trying Class.forName('"+param[0]+"') ...");
         Class cl = java.lang.Class.forName(param[0]);
         clntPlugin = (I_ClientPlugin)cl.newInstance();
         PluginInfo pluginInfo = new PluginInfo(glob, null, this.getType(), this.getVersion());
         clntPlugin.init(glob, pluginInfo);
         if (log.isLoggable(Level.FINE)) log.fine("Found I_ClientPlugin '"+param[0]+"'");
      }
      catch (IllegalAccessException e) {
         if (log.isLoggable(Level.FINE)) log.fine("The plugin class '"+param[0]+"' is not accessible\n -> check the plugin name and/or the CLASSPATH");
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

    */
   public I_XmlBlasterConnection getPlugin(String type, String version) throws XmlBlasterException {
      if (log.isLoggable(Level.FINER)) log.finer("Creating instance of " + createPluginPropertyKey(type, version));

      // We need a new instance every time! (no caching in base class)
      PluginInfo pluginInfo = new PluginInfo(glob, this, type, version);
      I_XmlBlasterConnection driver = (I_XmlBlasterConnection)super.instantiatePlugin(pluginInfo, false);
      if (driver == null) {
         log.warning("Creating instance of " + createPluginPropertyKey(type, version) + " failed, no such plugin found.");
      }
      return driver;
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.