code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
public int getCrc32() {
return crc32;
} | Create a new transaction log ready to be stored.
@param status record type
@param gtrid global transaction id
@param uniqueNames unique names of XA data sources used in this transaction | getCrc32 | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
@Override
public Uid getGtrid() {
return gtrid;
} | Create a new transaction log ready to be stored.
@param status record type
@param gtrid global transaction id
@param uniqueNames unique names of XA data sources used in this transaction | getGtrid | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
public long getWritePosition() {
return writePosition;
} | Create a new transaction log ready to be stored.
@param status record type
@param gtrid global transaction id
@param uniqueNames unique names of XA data sources used in this transaction | getWritePosition | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
public void setWritePosition(long position) {
writePosition = position;
} | Create a new transaction log ready to be stored.
@param status record type
@param gtrid global transaction id
@param uniqueNames unique names of XA data sources used in this transaction | setWritePosition | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
@Override
public Set<String> getUniqueNames() {
return Collections.unmodifiableSortedSet(uniqueNames);
} | Create a new transaction log ready to be stored.
@param status record type
@param gtrid global transaction id
@param uniqueNames unique names of XA data sources used in this transaction | getUniqueNames | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
public int getEndRecord() {
return endRecord;
} | Create a new transaction log ready to be stored.
@param status record type
@param gtrid global transaction id
@param uniqueNames unique names of XA data sources used in this transaction | getEndRecord | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
private void refresh() {
crc32 = calculateCrc32();
} | Recalculate and store the dynamic values of this record: {@link #getRecordLength()}, {@link #getRecordHeaderLength()}
and {@link #calculateCrc32()}. This method must be called each time after the set of contained unique names is updated. | refresh | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
public boolean isCrc32Correct() {
return calculateCrc32() == getCrc32();
} | Recalculate the CRC32 value of this record (using {@link #calculateCrc32()}) and compare it with the stored value.
@return true if the recalculated value equals the stored one, false otherwise. | isCrc32Correct | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
public int calculateCrc32() {
int total = 0;
for (String uniqueName : uniqueNames) {
total += 2 + uniqueName.length(); // 2 bytes for storing the unique name length + unique name length
}
recordLength = total + getFixedRecordLength();
ByteBuffer buf = ByteBuffer.allocate(2... | Calculate the CRC32 value of this record.
@return the CRC32 value of this record. | calculateCrc32 | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
@Override
public String toString() {
StringBuilder sb = new StringBuilder(128);
sb.append("a Bitronix TransactionLogRecord with ");
sb.append("status="); sb.append(Decoder.decodeStatus(status)); sb.append(", ");
sb.append("recordLength="); sb.append(recordLength); sb.append(", ");
... | Calculate the CRC32 value of this record.
@return the CRC32 value of this record. | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
int calculateTotalRecordSize() {
return recordLength + 4 + 4; // + status + record length
} | this is the total size on disk of a TransactionLog.
@return recordLength | calculateTotalRecordSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
private int getFixedRecordLength() {
// record header length + current time + sequence number + checksum + GTRID size + GTRID + unique names count + end record marker
return 4 + 8 + 4 + 4 + 1 + gtrid.length() + 4 + 4;
} | Length of all the fixed size fields part of the record length header except status and record length.
@return fixedRecordLength | getFixedRecordLength | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
@Override
public void write(int b) throws IOException {
} | Length of all the fixed size fields part of the record length header except status and record length.
@return fixedRecordLength | write | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/journal/TransactionLogRecord.java | Apache-2.0 |
public String getUniqueName() {
return uniqueName;
} | Simple bean containing a unique resource name paired with a XID corresponding to a branch on that resource.
@author Ludovic Orban | getUniqueName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | Apache-2.0 |
public Xid getXid() {
return xid;
} | Simple bean containing a unique resource name paired with a XID corresponding to a branch on that resource.
@author Ludovic Orban | getXid | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | Apache-2.0 |
@Override
public int hashCode() {
return uniqueName.hashCode() + xid.hashCode();
} | Simple bean containing a unique resource name paired with a XID corresponding to a branch on that resource.
@author Ludovic Orban | hashCode | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | Apache-2.0 |
@Override
public boolean equals(Object obj) {
if (obj instanceof DanglingTransaction) {
DanglingTransaction otherDanglingTransaction = (DanglingTransaction) obj;
return uniqueName.equals(otherDanglingTransaction.uniqueName) &&
xid.equals(otherDanglingTransaction.... | Simple bean containing a unique resource name paired with a XID corresponding to a branch on that resource.
@author Ludovic Orban | equals | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/DanglingTransaction.java | Apache-2.0 |
public static void recover(XAResourceProducer xaResourceProducer) throws RecoveryException {
String uniqueName = xaResourceProducer.getUniqueName();
if (log.isDebugEnabled()) { log.debug("start of incremental recovery on resource " + uniqueName); }
try {
XAResourceHolderState xaReso... | Run incremental recovery on the specified resource.
@param xaResourceProducer the resource to recover.
@throws RecoveryException when an error preventing recovery happens. | recover | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/IncrementalRecoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/IncrementalRecoverer.java | Apache-2.0 |
private static void updateJournal(Uid gtrid, String uniqueName, int status) throws IOException {
if (log.isDebugEnabled()) { log.debug("updating journal, adding " + Decoder.decodeStatus(status) + " entry for [" + uniqueName + "] on GTRID [" + gtrid + "]"); }
Set<String> participatingUniqueNames = new H... | Run incremental recovery on the specified resource.
@param xaResourceProducer the resource to recover.
@throws RecoveryException when an error preventing recovery happens. | updateJournal | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/IncrementalRecoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/IncrementalRecoverer.java | Apache-2.0 |
@Override
public void run() {
if (!isRunning.compareAndSet(false, true)) {
log.info("recoverer is already running, abandoning this recovery request");
return;
}
try {
committedCount = 0;
rolledbackCount = 0;
long oldestTransactionT... | Run the recovery process. This method is automatically called by the transaction manager, you should never
call it manually. | run | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
@Override
public Exception getCompletionException() {
return completionException;
} | Get the exception reported when recovery failed.
@return the exception that made recovery fail or null if last recovery execution was successful. | getCompletionException | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
@Override
public int getRolledbackCount() {
return rolledbackCount;
} | Get the amount of transactions rolled back during the last recovery run.
@return the amount of rolled back transactions. | getRolledbackCount | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
@Override
public int getExecutionsCount() {
return executionsCount;
} | Get how many times the recoverer has run since the transaction manager started.
@return how many times the recoverer has run since the transaction manager started. | getExecutionsCount | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
@Override
public boolean isRunning() {
return isRunning.get();
} | Check if the recoverer currently is running.
@return true if the recoverer currently is running, false otherwise. | isRunning | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private void recoverAllResources() {
// a cloned registeredResources Map must be iterated as the original one can be modified in the loop
for (Map.Entry<String, XAResourceProducer> entry : new HashMap<String, XAResourceProducer>(registeredResources).entrySet()) {
String uniqueName = entry.ge... | Recover all configured resources and fill the <code>recoveredXidSets</code> with all recovered XIDs.
Step 1. | recoverAllResources | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private Set<BitronixXid> recover(XAResourceProducer producer) throws XAException, RecoveryException {
if (producer == null)
throw new IllegalArgumentException("recoverable resource cannot be null");
try {
if (log.isDebugEnabled()) { log.debug("running recovery on " + producer); ... | Run the recovery process on the target resource.
Step 1.
@return a Set of BitronixXids.
@param producer the {@link XAResourceProducer} to recover.
@throws javax.transaction.xa.XAException if {@link XAResource#recover(int)} call fails.
@throws RecoveryException if an error preventing recovery happened. | recover | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private Set<DanglingTransaction> getDanglingTransactionsInRecoveredXids(Set<String> uniqueNames, Uid gtrid) {
Set<DanglingTransaction> danglingTransactions = new HashSet<DanglingTransaction>();
for (String uniqueName : uniqueNames) {
if (log.isDebugEnabled()) { log.debug("finding dangling t... | Return {@link DanglingTransaction}s with {@link Xid}s corresponding to the GTRID parameter found in resources
specified by their <code>uniqueName</code>s.
<code>recoverAllResources</code> must have been called before or else the returned list will always be empty.
Step 2.
@param uniqueNames a set of <code>uniqueName</c... | getDanglingTransactionsInRecoveredXids | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private Set<String> filterParticipatingUniqueNamesInRecoveredXids(Set<String> uniqueNames) {
Set<String> recoveredUniqueNames = new HashSet<String>();
for (String uniqueName : uniqueNames) {
if (log.isDebugEnabled()) { log.debug("finding dangling transaction(s) in recovered XID(s) of resour... | Return {@link DanglingTransaction}s with {@link Xid}s corresponding to the GTRID parameter found in resources
specified by their <code>uniqueName</code>s.
<code>recoverAllResources</code> must have been called before or else the returned list will always be empty.
Step 2.
@param uniqueNames a set of <code>uniqueName</c... | filterParticipatingUniqueNamesInRecoveredXids | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private boolean rollback(String uniqueName, Xid xid) throws RecoveryException {
XAResourceProducer producer = registeredResources.get(uniqueName);
if (producer == null) {
if (log.isDebugEnabled()) { log.debug("resource " + uniqueName + " has not recovered, skipping rollback"); }
... | Rollback the specified branch of a dangling transaction.
Step 3.
@param uniqueName the unique name of the resource on which to rollback branches.
@param xid the {@link Xid} to rollback.
@return true when rollback was successful.
@throws RecoveryException if an error preventing recovery happened. | rollback | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private String getRegisteredResourcesUniqueNames() {
return buildUniqueNamesString(registeredResources.keySet());
} | Build a string with comma-separated resources unique names.
@return the string. | getRegisteredResourcesUniqueNames | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
private static String buildUniqueNamesString(Set<String> uniqueNames) {
StringBuilder resourcesUniqueNames = new StringBuilder();
Iterator<String> it = uniqueNames.iterator();
while (it.hasNext()) {
String uniqueName = it.next();
resourcesUniqueNames.append(uniqueName);
... | Build a string with comma-separated resources unique names.
@return the string. | buildUniqueNamesString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/Recoverer.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/Recoverer.java | Apache-2.0 |
public static Set<BitronixXid> recover(XAResourceHolderState xaResourceHolderState) throws XAException {
Set<BitronixXid> xids = new HashSet<BitronixXid>();
if (log.isDebugEnabled()) { log.debug("recovering with STARTRSCAN"); }
int xidCount;
try {
xidCount = recover(xaResour... | Run the recovery process on the target resource.
@return a Set of BitronixXids.
@param xaResourceHolderState the {@link XAResourceHolderState} to recover.
@throws javax.transaction.xa.XAException if {@link XAResource#recover(int)} calls fail. | recover | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/RecoveryHelper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/RecoveryHelper.java | Apache-2.0 |
private static int recover(XAResourceHolderState resourceHolderState, Set<BitronixXid> alreadyRecoveredXids, int flags) throws XAException {
Xid[] xids = resourceHolderState.getXAResource().recover(flags);
if (xids == null)
return 0;
boolean currentNodeOnly = TransactionManagerServi... | Call {@link XAResource#recover(int)} on the resource and fill the <code>alreadyRecoveredXids</code> Set
with recovered {@link BitronixXid}s.
Step 1.
@return the amount of recovered {@link Xid}.
@param resourceHolderState the {@link XAResourceHolderState} to recover.
@param alreadyRecoveredXids a set of {@link Xid}s alr... | recover | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/RecoveryHelper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/RecoveryHelper.java | Apache-2.0 |
public static boolean rollback(XAResourceHolderState xaResourceHolderState, Xid xid) {
String uniqueName = xaResourceHolderState.getUniqueName();
boolean success = true;
boolean forget = false;
try {
xaResourceHolderState.getXAResource().rollback(xid);
} catch (XAExce... | Rollback the specified branch of a dangling transaction.
@param xaResourceHolderState the {@link XAResourceHolderState} to rollback the branch on.
@param xid the {@link Xid} to rollback.
@return true when rollback was successful. | rollback | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/recovery/RecoveryHelper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/recovery/RecoveryHelper.java | Apache-2.0 |
public Map<String, XAResourceProducer> getResources() {
return resourcesByUniqueName;
} | Get a Map with the configured uniqueName as key and {@link XAResourceProducer} as value.
@return a Map using the uniqueName as key and {@link XAResourceProducer} as value. | getResources | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
public int init() {
String filename = TransactionManagerServices.getConfiguration().getResourceConfigurationFilename();
if (filename != null) {
if (!new File(filename).exists())
throw new ResourceConfigurationException("cannot find resources configuration file '" + filename +... | Initialize the ResourceLoader and load the resources configuration file specified in
<code>bitronix.tm.resource.configuration</code> property.
@return the number of resources which failed to initialize. | init | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
@Override
public synchronized void shutdown() {
if (log.isDebugEnabled()) { log.debug("resource loader has registered " + resourcesByUniqueName.entrySet().size() + " resource(s), unregistering them now"); }
for (Map.Entry<String, XAResourceProducer> entry : resourcesByUniqueName.entrySet()) {
... | Initialize the ResourceLoader and load the resources configuration file specified in
<code>bitronix.tm.resource.configuration</code> property.
@return the number of resources which failed to initialize. | shutdown | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
private static XAResourceProducer instantiate(String xaResourceClassName) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
Class<?> clazz = ClassLoaderUtils.loadClass(xaResourceClassName);
// resource classes are instantiated via reflection so that there is no hard class ... | Create an unitialized {@link XAResourceProducer} implementation which depends on the XA resource class name.
@param xaResourceClassName an XA resource class name.
@return a {@link XAResourceProducer} implementation.
@throws ClassNotFoundException if the {@link XAResourceProducer} cannot be instantiated.
@throws Illegal... | instantiate | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
private int init(String propertiesFilename) {
try {
FileInputStream fis = null;
Properties properties;
try {
fis = new FileInputStream(propertiesFilename);
properties = new Properties();
properties.load(fis);
} final... | Read the resources properties file and create {@link XAResourceProducer} accordingly.
@param propertiesFilename the name of the properties file to load.
@return the number of resources which failed to initialize. | init | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
int initXAResourceProducers(Properties properties) {
Map<String, List<PropertyPair>> entries = buildConfigurationEntriesMap(properties);
int errorCount = 0;
for (Map.Entry<String, List<PropertyPair>> entry : entries.entrySet()) {
String uniqueName = entry.getKey();
List<... | Initialize {@link XAResourceProducer}s given a set of properties.
@param properties the properties to use for initialization.
@return the number of resources which failed to initialize. | initXAResourceProducers | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
private Map<String, List<PropertyPair>> buildConfigurationEntriesMap(Properties properties) {
Map<String, List<PropertyPair>> entries = new HashMap<String, List<PropertyPair>>();
for (Map.Entry<Object, Object> entry : properties.entrySet()) {
String key = (String) entry.getKey();
... | Create a map using the configured resource name as the key and a List of PropertyPair objects as the value.
@param properties object to analyze.
@return the built map. | buildConfigurationEntriesMap | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
private XAResourceProducer buildXAResourceProducer(String configuredName, List<PropertyPair> propertyPairs) throws ResourceConfigurationException {
String lastPropertyName = "className";
try {
XAResourceProducer producer = createBean(configuredName, propertyPairs);
for (Property... | Build a populated {@link XAResourceProducer} out of a list of property pairs and the config name.
@param configuredName index name of the config file.
@param propertyPairs the properties attached to this index.
@return a populated {@link XAResourceProducer}.
@throws ResourceConfigurationException if the {@link XAResour... | buildXAResourceProducer | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
private XAResourceProducer createBean(String configuredName, List<PropertyPair> propertyPairs) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
for (PropertyPair propertyPair : propertyPairs) {
if (propertyPair.getName().equals("className")) {
String cl... | Create an unpopulated, uninitialized {@link XAResourceProducer} instance depending on the className value.
@param configuredName the properties configured name.
@param propertyPairs a list of {@link PropertyPair}s.
@return a {@link XAResourceProducer}.
@throws ClassNotFoundException if the {@link XAResourceProducer} ca... | createBean | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
public String getName() {
return name;
} | Create an unpopulated, uninitialized {@link XAResourceProducer} instance depending on the className value.
@param configuredName the properties configured name.
@param propertyPairs a list of {@link PropertyPair}s.
@return a {@link XAResourceProducer}.
@throws ClassNotFoundException if the {@link XAResourceProducer} ca... | getName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
public String getValue() {
return value;
} | Create an unpopulated, uninitialized {@link XAResourceProducer} instance depending on the className value.
@param configuredName the properties configured name.
@param propertyPairs a list of {@link PropertyPair}s.
@return a {@link XAResourceProducer}.
@throws ClassNotFoundException if the {@link XAResourceProducer} ca... | getValue | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
@Override
public String toString() {
return name + "/" + value;
} | Create an unpopulated, uninitialized {@link XAResourceProducer} instance depending on the className value.
@param configuredName the properties configured name.
@param propertyPairs a list of {@link PropertyPair}s.
@return a {@link XAResourceProducer}.
@throws ClassNotFoundException if the {@link XAResourceProducer} ca... | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceLoader.java | Apache-2.0 |
@Override
public Object getObjectInstance(Object obj, Name jndiNameObject, Context nameCtx, Hashtable<?,?> environment) throws Exception {
Reference ref = (Reference) obj;
if (log.isDebugEnabled()) { log.debug("referencing resource with reference of type " + ref.getClass()); }
RefAddr refAd... | {@link bitronix.tm.resource.common.XAResourceProducer} object factory for JNDI references.
@see bitronix.tm.resource.common.ResourceBean
@author Ludovic Orban | getObjectInstance | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceObjectFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceObjectFactory.java | Apache-2.0 |
public static XAResourceProducer get(final String uniqueName) {
if (uniqueName != null) {
for (ProducerHolder holder : resources) {
if (!holder.isInitialized())
continue;
if (uniqueName.equals(holder.getUniqueName()))
return hol... | Get a registered {@link XAResourceProducer}.
@param uniqueName the name of the recoverable resource producer.
@return the {@link XAResourceProducer} or null if there was none registered under that name. | get | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
public static Set<String> getResourcesUniqueNames() {
final Set<String> names = new HashSet<String>(resources.size());
for (ProducerHolder holder : resources) {
if (!holder.isInitialized())
continue;
names.add(holder.getUniqueName());
}
return Col... | Get all {@link XAResourceProducer}s unique names.
@return a Set containing all {@link bitronix.tm.resource.common.XAResourceProducer}s unique names. | getResourcesUniqueNames | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
public static void register(XAResourceProducer producer) throws RecoveryException {
try {
final boolean alreadyRunning = TransactionManagerServices.isTransactionManagerRunning();
final ProducerHolder holder = alreadyRunning ? new InitializableProducerHolder(producer) : new ProducerHolder... | Register a {@link XAResourceProducer}. If registration happens after the transaction manager started, incremental
recovery is run on that resource.
@param producer the {@link XAResourceProducer}.
@throws RecoveryException When an error happens during recovery. | register | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
public static void unregister(XAResourceProducer producer) {
final ProducerHolder holder = new ProducerHolder(producer);
if (!resources.remove(holder)) {
if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); }
}
} | Unregister a previously registered {@link XAResourceProducer}.
@param producer the {@link XAResourceProducer}. | unregister | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
public static XAResourceHolder findXAResourceHolder(XAResource xaResource) {
final boolean debug = log.isDebugEnabled();
for (ProducerHolder holder : resources) {
if (!holder.isInitialized())
continue;
final XAResourceProducer producer = holder.producer;
... | Find in the registered {@link XAResourceProducer}s the {@link XAResourceHolder} from which the specified {@link XAResource} comes from.
@param xaResource the {@link XAResource} to look for
@return the associated {@link XAResourceHolder} or null if it cannot be found. | findXAResourceHolder | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
boolean isInitialized() {
return true;
} | Implements a holder that maintains XAResourceProducers in a set only differentiating them by their unique names. | isInitialized | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
String getUniqueName() {
return producer.getUniqueName();
} | Implements a holder that maintains XAResourceProducers in a set only differentiating them by their unique names. | getUniqueName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ProducerHolder)) return false;
ProducerHolder that = (ProducerHolder) o;
return getUniqueName().equals(that.getUniqueName());
} | Implements a holder that maintains XAResourceProducers in a set only differentiating them by their unique names. | equals | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
@Override
public int hashCode() {
return getUniqueName().hashCode();
} | Implements a holder that maintains XAResourceProducers in a set only differentiating them by their unique names. | hashCode | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
@Override
public String toString() {
return "ProducerHolder{" +
"producer=" + producer +
", initialized=" + isInitialized() +
'}';
} | Implements a holder that maintains XAResourceProducers in a set only differentiating them by their unique names. | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
@Override
boolean isInitialized() {
return initialized;
} | Extends the default holder with thread safe initialization to put uninitialized holders in the set. | isInitialized | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
void initialize() {
initialized = true;
} | Extends the default holder with thread safe initialization to put uninitialized holders in the set. | initialize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/ResourceRegistrar.java | Apache-2.0 |
protected Map<Uid, XAResourceHolderState> getXAResourceHolderStatesForGtrid(Uid gtrid) {
rwLock.readLock().lock();
try {
return xaResourceHolderStates.get(gtrid);
} finally {
rwLock.readLock().unlock();
}
} | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | getXAResourceHolderStatesForGtrid | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public boolean isExistXAResourceHolderStatesForGtrid(Uid gtrid) {
rwLock.readLock().lock();
try {
return xaResourceHolderStates.containsKey(gtrid);
} finally {
rwLock.readLock().unlock();
}
} | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | isExistXAResourceHolderStatesForGtrid | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public int getXAResourceHolderStateCountForGtrid(Uid gtrid) {
rwLock.readLock().lock();
try {
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolderStates.get(gtrid);
if (statesForGtrid != null) {
return statesForGtrid.size();
... | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | getXAResourceHolderStateCountForGtrid | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public void acceptVisitorForXAResourceHolderStates(Uid gtrid, XAResourceHolderStateVisitor visitor) {
rwLock.readLock().lock();
try {
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolderStates.get(gtrid);
if (statesForGtrid != null) {
fo... | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | acceptVisitorForXAResourceHolderStates | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public void putXAResourceHolderState(BitronixXid xid, XAResourceHolderState xaResourceHolderState) {
Uid gtrid = xid.getGlobalTransactionIdUid();
Uid bqual = xid.getBranchQualifierUid();
rwLock.writeLock().lock();
try {
if (log.isDebugEnabled()) { log.debug("putting XAReso... | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | putXAResourceHolderState | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public void removeXAResourceHolderState(BitronixXid xid) {
Uid gtrid = xid.getGlobalTransactionIdUid();
Uid bqual = xid.getBranchQualifierUid();
rwLock.writeLock().lock();
try {
if (log.isDebugEnabled()) { log.debug("removing XAResourceHolderState of xid " + xid + " fro... | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | removeXAResourceHolderState | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public boolean hasStateForXAResource(XAResourceHolder<? extends XAResourceHolder> xaResourceHolder) {
rwLock.readLock().lock();
try {
for (Map<Uid, XAResourceHolderState> statesForGtrid : xaResourceHolderStates.values()) {
for (XAResourceHolderState otherXaResou... | Implementation of all services required by a {@link XAResourceHolder}. This class keeps a list of all
{@link XAResourceHolderState}s of the {@link XAResourceHolder} plus the currently active one. There is
one per transaction in which this {@link XAResourceHolder} is enlisted plus all the suspended transactions in which... | hasStateForXAResource | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
public Set<String> getXAResourceHolderStateGtrids() {
rwLock.readLock().lock();
try {
HashSet<String> gtridsAsStrings = new HashSet<String>();
for (Uid uid : xaResourceHolderStates.keySet()) {
gtridsAsStrings.add(uid.toString());
}
return... | Simple helper method which returns a set of GTRIDs of transactions in which
this resource is enlisted. Useful for monitoring.
@return a set of String-encoded GTRIDs of transactions in which this resource is enlisted. | getXAResourceHolderStateGtrids | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAResourceHolder.java | Apache-2.0 |
@Override
public Date getCreationDate() {
return creationDate;
} | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | getCreationDate | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
@Override
public State getState() {
return state;
} | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | getState | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
@Override
public void setState(State state) {
State oldState = this.state;
fireStateChanging(oldState, state);
if (oldState == state)
throw new IllegalArgumentException("cannot switch state from " + oldState +
" to " + state);
if (log.isDebugEnabled(... | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | setState | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
@Override
public void addStateChangeEventListener(StateChangeListener<T> listener) {
stateChangeEventListeners.add(listener);
} | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | addStateChangeEventListener | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
@Override
public void removeStateChangeEventListener(StateChangeListener<T> listener) {
stateChangeEventListeners.remove(listener);
} | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | removeStateChangeEventListener | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
@SuppressWarnings("unchecked")
private void fireStateChanging(State currentState, State futureState) {
if (log.isDebugEnabled()) log.debug("notifying " + stateChangeEventListeners.size() +
" stateChangeEventListener(s) about state changing from " + currentState +
" to " + fut... | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | fireStateChanging | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
@SuppressWarnings("unchecked")
private void fireStateChanged(State oldState, State newState) {
if (log.isDebugEnabled()) log.debug("notifying " + stateChangeEventListeners.size() +
" stateChangeEventListener(s) about state changed from " + oldState +
" to " + newState + " in ... | Implementation of all services required by a {@link XAStatefulHolder}.
@author Ludovic Orban | fireStateChanged | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/AbstractXAStatefulHolder.java | Apache-2.0 |
public XAStatefulHolder getXAStatefulHolder() {
return xaStatefulHolder;
} | {@link Synchronization} used to release a {@link XAStatefulHolder} object after 2PC has executed.
@author Ludovic Orban | getXAStatefulHolder | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | Apache-2.0 |
@Override
public void afterCompletion(int status) {
if (log.isDebugEnabled()) { log.debug("DeferredReleaseSynchronization requeuing " + xaStatefulHolder); }
// set this connection's state back to IN_POOL
xaStatefulHolder.setState(State.IN_POOL);
if (log.isDebugEnabled()) { log.debu... | {@link Synchronization} used to release a {@link XAStatefulHolder} object after 2PC has executed.
@author Ludovic Orban | afterCompletion | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | Apache-2.0 |
@Override
public void beforeCompletion() {
} | {@link Synchronization} used to release a {@link XAStatefulHolder} object after 2PC has executed.
@author Ludovic Orban | beforeCompletion | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | Apache-2.0 |
@Override
public String toString() {
return "a DeferredReleaseSynchronization of " + xaStatefulHolder;
} | {@link Synchronization} used to release a {@link XAStatefulHolder} object after 2PC has executed.
@author Ludovic Orban | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/DeferredReleaseSynchronization.java | Apache-2.0 |
@Override
public void close() throws Exception {
xaResourceHolder.setState(State.IN_POOL);
} | {@link XAResourceHolder} created by an {@link bitronix.tm.resource.common.XAResourceProducer} that is
used to perform recovery. Objects of this class cannot be used outside recovery scope.
@author Ludovic Orban | close | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | Apache-2.0 |
@Override
public Date getLastReleaseDate() {
return null;
} | {@link XAResourceHolder} created by an {@link bitronix.tm.resource.common.XAResourceProducer} that is
used to perform recovery. Objects of this class cannot be used outside recovery scope.
@author Ludovic Orban | getLastReleaseDate | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | Apache-2.0 |
@Override
public XAResource getXAResource() {
return xaResourceHolder.getXAResource();
} | {@link XAResourceHolder} created by an {@link bitronix.tm.resource.common.XAResourceProducer} that is
used to perform recovery. Objects of this class cannot be used outside recovery scope.
@author Ludovic Orban | getXAResource | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | Apache-2.0 |
@Override
public ResourceBean getResourceBean() {
return null;
} | {@link XAResourceHolder} created by an {@link bitronix.tm.resource.common.XAResourceProducer} that is
used to perform recovery. Objects of this class cannot be used outside recovery scope.
@author Ludovic Orban | getResourceBean | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | Apache-2.0 |
@Override
public List<RecoveryXAResourceHolder> getXAResourceHolders() {
return null;
} | {@link XAResourceHolder} created by an {@link bitronix.tm.resource.common.XAResourceProducer} that is
used to perform recovery. Objects of this class cannot be used outside recovery scope.
@author Ludovic Orban | getXAResourceHolders | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | Apache-2.0 |
@Override
public Object getConnectionHandle() throws Exception {
throw new UnsupportedOperationException("illegal connection creation attempt out of " + this);
} | {@link XAResourceHolder} created by an {@link bitronix.tm.resource.common.XAResourceProducer} that is
used to perform recovery. Objects of this class cannot be used outside recovery scope.
@author Ludovic Orban | getConnectionHandle | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/RecoveryXAResourceHolder.java | Apache-2.0 |
public String getClassName() {
return className;
} | @return the underlying implementation class name. | getClassName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setClassName(String className) {
this.className = className;
} | Specify the underlying implementation class name of the XA resource described by this bean.
@param className the underlying implementation class name. | setClassName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setUniqueName(String uniqueName) {
this.uniqueName = uniqueName;
} | Specify the resource unique name to be used to identify this resource during recovery. This name will be
registered in the transactions journal so once assigned it must never be changed.
@param uniqueName the resource's unique name. | setUniqueName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public boolean getAutomaticEnlistingEnabled() {
return automaticEnlistingEnabled;
} | @return true if the the XA resource wrapper should enlist/delist this resource automatically in global
transactions. | getAutomaticEnlistingEnabled | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setAutomaticEnlistingEnabled(boolean automaticEnlistingEnabled) {
this.automaticEnlistingEnabled = automaticEnlistingEnabled;
} | Specify if the XA resource wrapper should enlist/delist this resource automatically in global transactions.
When set to false, you have to enlist resources yourself with {@link javax.transaction.Transaction#enlistResource(javax.transaction.xa.XAResource)} and delist them
{@link javax.transaction.Transaction#delistResou... | setAutomaticEnlistingEnabled | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public boolean getUseTmJoin() {
return useTmJoin;
} | @return true if transaction branches joining should be used. | getUseTmJoin | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setUseTmJoin(boolean useTmJoin) {
this.useTmJoin = useTmJoin;
} | Specify if the transaction manager should try to join resources by calling
{@link javax.transaction.xa.XAResource#start(javax.transaction.xa.Xid, int)} with
{@link javax.transaction.xa.XAResource#TMJOIN}. The transaction manager checks if two branches can be joined by
calling {@link javax.transaction.xa.XAResource#isSa... | setUseTmJoin | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public Properties getDriverProperties() {
return driverProperties;
} | @return the properties that should be set on the underlying implementation. | getDriverProperties | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setDriverProperties(Properties driverProperties) {
this.driverProperties = driverProperties;
} | Set the properties that should be set on the underlying implementation.
@param driverProperties the properties that should be set on the underlying implementation. | setDriverProperties | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public int getMaxPoolSize() {
return maxPoolSize;
} | @return the maximum amount of connections that can be in the pool. | getMaxPoolSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setMaxPoolSize(int maxPoolSize) {
this.maxPoolSize = maxPoolSize;
} | Define the maximum amount of connections that can be in the pool.
@param maxPoolSize the maximum amount of connections that can be in the pool. | setMaxPoolSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public int getMinPoolSize() {
return minPoolSize;
} | @return the minimal amount of connections that can be in the pool. | getMinPoolSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setMinPoolSize(int minPoolSize) {
this.minPoolSize = minPoolSize;
} | Define the minimal amount of connections that can be in the pool.
@param minPoolSize the maximum amount of connections that can be in the pool. | setMinPoolSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public int getMaxIdleTime() {
return maxIdleTime;
} | @return the amount of seconds and idle connection can stay in the pool before getting closed. | getMaxIdleTime | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public void setMaxIdleTime(int maxIdleTime) {
this.maxIdleTime = maxIdleTime;
} | Define the amount of seconds and idle connection can stay in the pool before getting closed.
@param maxIdleTime the amount of seconds and idle connection can stay in the pool before getting closed. | setMaxIdleTime | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
public int getMaxLifeTime() {
return maxLifeTime;
} | @return the maximum lifetime (in seconds) that a connection can stay in the pool before getting closed. | getMaxLifeTime | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/common/ResourceBean.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.