コード例 #1
0
ファイル: ContextMaker.java プロジェクト: eMerchantPay/jPOS
  public void setConfiguration(Configuration cfg) throws ConfigurationException {
    super.setConfiguration(cfg);

    Element persist = getPersist();

    String ssp = persist.getChildText("space");

    sp = SpaceFactory.getSpace(ssp != null ? ssp : "");

    String sTimeout = persist.getChildText("timeout");
    timeout = sTimeout == null ? 10000 : Long.parseLong(sTimeout);

    contextName = persist.getChildText("context-name");
    if (contextName == null) {
      throw new ConfigurationException(
          "Missing 'context-name' property - the context name of the object received on 'in'");
    }

    in = persist.getChildText("in");
    if (in == null) {
      throw new ConfigurationException(
          "Missing 'in' property - the queue to process objects from.");
    }

    out = persist.getChildText("out");
    if (out == null) {
      throw new ConfigurationException(
          "Missing 'out' property - the target queue of the created context");
    }

    Element values = persist.getChild("context-values");
    if (values != null) {
      contextValues = values.getChildren();
    }
  }
コード例 #2
0
 @Override
 protected void initService() throws Exception {
   super.initService();
   log.info("MySql Connection Pool is initializing.....");
   pool = initMySqlConnectionPool();
   NameRegistrar.register("connection.pool.MySqlConnectionPool", this);
   log.info("MySql Connection Pool initialed.");
 }
コード例 #3
0
 @Override
 protected void stopService() throws Exception {
   super.stopService();
   log.info("MySql Connection Pool is closing....");
   if (pool != null) {
     pool.close();
   }
   log.info("MySql Connection Pool was closed successfully.");
 }
コード例 #4
0
 @Override
 protected void startService() throws Exception {
   super.startService();
   if (pool != null) log.info("MySql Connection Pool is ready to serve. ");
 }
コード例 #5
0
ファイル: QBeanFactory.java プロジェクト: cqm0609/jPOS
 public void stop() {
   super.stop();
   NameRegistrar.unregister("QBeanFactory." + getName());
 }
コード例 #6
0
ファイル: QBeanFactory.java プロジェクト: cqm0609/jPOS
 public void start() {
   super.start();
   NameRegistrar.register("QBeanFactory." + getName(), this);
 }