gpt4 book ai didi

org.objectweb.howl.log.xa.XALogger类的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 13:21:05 27 4
gpt4 key购买 nike

本文整理了Java中org.objectweb.howl.log.xa.XALogger类的一些代码示例,展示了XALogger类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XALogger类的具体详情如下:
包路径:org.objectweb.howl.log.xa.XALogger
类名称:XALogger

XALogger介绍

[英]A specialized subclass of org.objectweb.howl.log.Loggerintended to provide functionality required by any XA Transaction Manager.

This class provides wrappers for all public methods of Logger to allow enforcement of policies that are in place for an XA TM log.

This class implements org.objectweb.howl.log.LogEventListener. During logOverflowNotification processing, entries in the activeTx[] are re-logged and the active mark is moved.

If the application has called setLogEventListener, then Log events are forwarded to the application after they are processed by this class.
[中]org的一个特殊的子类。objectweb。怒号日志Logger旨在提供任何XA事务管理器所需的功能。
此类为记录器的所有公共方法提供包装器,以允许执行针对XA TM日志的策略。
这个类实现了org。objectweb。怒号日志LogEventListener。在logOverflowNotification处理过程中,会重新记录activeTx[]中的条目,并移动活动标记。
如果应用程序调用了setLogEventListener,那么日志事件将在此类处理后转发给应用程序。

代码示例

代码示例来源:origin: org.apache.geronimo.components/geronimo-transaction

public void doStop() throws Exception {
  started = false;
  logger.close();
  recovered = null;
}

代码示例来源:origin: apache/felix

public void doStart() throws Exception {
  started = true;
  setLogFileDir(logFileDir);
  log.debug("Initiating transaction manager recovery");
  recovered = new HashMap();
  logger.open(null);
  ReplayListener replayListener = new GeronimoReplayListener(xidFactory, recovered);
  logger.replayActiveTx(replayListener);
  log.debug("In doubt transactions recovered from log");
}

代码示例来源:origin: org.kuali.jotm/jotm-core

/**
 * write the Commit record to the Howl Log
 * @param xaCmRec the Commit Record
 * @return the XACommittingTx returned by putCommit
 * @throws LogException could not log the record
 * @throws IOException
 * @throws InterruptedException
 */
public XACommittingTx howlCommitLog(byte [][] xaCmRec) throws LogException, IOException, InterruptedException {
  if (TraceTm.recovery.isDebugEnabled()) {
    TraceTm.recovery.debug("Commit howl log");
  }
  return xaLog.putCommit(xaCmRec);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

/**
 * add a USER record consisting of byte[] to the log.
 * <p>waits for overflow notification processing to complete
 * prior to putting the data to the log.
 * 
 * @throws LogClosedException
 * If the TM has called open() but has not called replay().
 * Also thrown if log is actually closed.
 * Check the toString() for details.
 * 
 * @see org.objectweb.howl.log.Logger#put(byte[], boolean)
 */
public long put(byte[] data, boolean sync)
throws LogClosedException, LogRecordSizeException, LogFileOverflowException,
 InterruptedException, IOException
{
 checkPutEnabled();
 
 // wait for overflow notification processor to finish.
 onpWait();
 
 return put(LogRecordType.USER, new byte[][]{data}, sync);
}

代码示例来源:origin: apache/felix

long overflowFence = 0L;
checkPutEnabled();
onpWait();
 key = put(LogRecordType.XACOMMIT, record, true);
 synchronized(this) { overflowFence = this.overflowFence; }
} while (key < overflowFence);
return activeTxAdd(key, record);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

/**
 * Wrapp Logger#replay(ReplayListener) so we can
 * intercept onRecord() notifications to process
 * XACOMMIT and XACOMMITMOVED records.
 */
public void replay(ReplayListener listener)
throws LogConfigurationException
{
 try {
  this.replay(listener, getActiveMark());
 } catch (InvalidLogKeyException e) {
  // should not happen
  assert false : "Unhandled InvalidLogKeyException" + e.toString();
 }
}

代码示例来源:origin: org.ow2.jotm/jotm-core

xaLog = new XALogger(cfg);
} catch (LogConfigurationException e) {
  TraceTm.jotm.error("XALogger: LogConfigurationException" + e.getMessage());
  xaLog.open(null);
} catch (LogException e) {
  TraceTm.jotm.error("xaLog.open: LogException" + e.getMessage());
xaLog.replayActiveTx (myxarl);

代码示例来源:origin: org.ow2.jotm/jotm-core

/**
 * write the Done record to the Howl Log
 * @param xaDnRec the Done Record
 * @param xaCmTx the XACommittingTx
 * @throws LogException could not log the record
 * @throws IOException
 * @throws InterruptedException
 */
public void howlDoneLog(byte [][] xaDnRec, XACommittingTx xaCmTx) throws LogException, IOException, InterruptedException {
  if (TraceTm.recovery.isDebugEnabled()) {
    TraceTm.recovery.debug("Done howl log");
  }
  xaLog.putDone(xaDnRec, xaCmTx);
}

代码示例来源:origin: org.apache.geronimo.components/geronimo-transaction

public Collection<Recovery.XidBranchesPair> recover(XidFactory xidFactory) throws LogException {
  log.debug("Initiating transaction manager recovery");
  Map<Xid, Recovery.XidBranchesPair> recovered = new HashMap<Xid, Recovery.XidBranchesPair>();
  ReplayListener replayListener = new GeronimoReplayListener(xidFactory, recovered);
  logger.replayActiveTx(replayListener);
  log.debug("In doubt transactions recovered from log");
  return recovered.values();
}

代码示例来源:origin: apache/felix

setThreadsWaitingForceThreshold(threadsWaitingForceThreshold);
this.xidFactory = xidFactory;
this.logger = new XALogger(configuration);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

InterruptedException, IOException
checkPutEnabled();
   doneKey = put(LogRecordType.USER, record, false);
  } catch (LogFileOverflowException e) {
   Thread.sleep(10);  
do {
 try {
  xadoneKey = put(LogRecordType.XADONE, tx.logKeyData, false);
 } catch (LogFileOverflowException e) {
  Thread.sleep(10);

代码示例来源:origin: org.apache.geronimo/com.springsource.org.apache.geronimo.transaction

public String getXMLStats() {
  return logger.getStats();
}

代码示例来源:origin: apache/felix

super.replay(xaListener, getActiveMark(), true); // replay CTRL records also
} catch (InvalidLogKeyException e) {
 throw new LogClosedException(e);

代码示例来源:origin: org.kuali.jotm/jotm-core

xaLog = new XALogger(cfg);
} catch (LogConfigurationException e) {
  TraceTm.jotm.error("XALogger: LogConfigurationException" + e.getMessage());
  xaLog.open(null);
} catch (LogException e) {
  TraceTm.jotm.error("xaLog.open: LogException" + e.getMessage());
xaLog.replayActiveTx (myxarl);

代码示例来源:origin: apache/felix

/**
 * add a USER record consisting of byte[] to the log.
 * <p>waits for overflow notification processing to complete
 * prior to putting the data to the log.
 * 
 * @throws LogClosedException
 * If the TM has called open() but has not called replay().
 * Also thrown if log is actually closed.
 * Check the toString() for details.
 * 
 * @see org.objectweb.howl.log.Logger#put(byte[], boolean)
 */
public long put(byte[] data, boolean sync)
throws LogClosedException, LogRecordSizeException, LogFileOverflowException,
 InterruptedException, IOException
{
 checkPutEnabled();
 
 // wait for overflow notification processor to finish.
 onpWait();
 
 return put(LogRecordType.USER, new byte[][]{data}, sync);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

long overflowFence = 0L;
checkPutEnabled();
onpWait();
 key = put(LogRecordType.XACOMMIT, record, true);
 synchronized(this) { overflowFence = this.overflowFence; }
} while (key < overflowFence);
return activeTxAdd(key, record);

代码示例来源:origin: org.kuali.jotm/jotm-core

/**
 * write the Done record to the Howl Log
 * @param xaDnRec the Done Record
 * @param xaCmTx the XACommittingTx
 * @throws LogException could not log the record
 * @throws IOException
 * @throws InterruptedException
 */
public void howlDoneLog(byte [][] xaDnRec, XACommittingTx xaCmTx) throws LogException, IOException, InterruptedException {
  if (TraceTm.recovery.isDebugEnabled()) {
    TraceTm.recovery.debug("Done howl log");
  }
  xaLog.putDone(xaDnRec, xaCmTx);
}

代码示例来源:origin: org.apache.geronimo/com.springsource.org.apache.geronimo.transaction

public Collection recover(XidFactory xidFactory) throws LogException {
  log.debug("Initiating transaction manager recovery");
  Map recovered = new HashMap();
  ReplayListener replayListener = new GeronimoReplayListener(xidFactory, recovered);
  logger.replayActiveTx(replayListener);
  log.debug("In doubt transactions recovered from log");
  return recovered.values();
}

代码示例来源:origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

setThreadsWaitingForceThreshold(threadsWaitingForceThreshold);
this.xidFactory = xidFactory;
this.logger = new XALogger(configuration);

代码示例来源:origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

/**
 * Wrapp Logger#replay(ReplayListener) so we can
 * intercept onRecord() notifications to process
 * XACOMMIT and XACOMMITMOVED records.
 */
public void replay(ReplayListener listener)
throws LogConfigurationException
{
 try {
  this.replay(listener, getActiveMark());
 } catch (InvalidLogKeyException e) {
  // should not happen
  assert false : "Unhandled InvalidLogKeyException" + e.toString();
 }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com