CPD Results

The following document contains the results of PMD's CPD 3.7.

Duplications

FileLine
org/apache/geronimo/transaction/log/HOWLLog.java275
org/apache/geronimo/transaction/log/HOWLLog.java298
        data[0] = new byte[]{ROLLBACK};
        data[1] = intToBytes(xid.getFormatId());
        data[2] = xid.getGlobalTransactionId();
        data[3] = xid.getBranchQualifier();
        try {
            logger.putDone(data, (XACommittingTx) logMark);
//            logger.putDone(null, (XACommittingTx) logMark);
        } catch (LogClosedException e) {
            throw (IllegalStateException) new IllegalStateException().initCause(e);
        } catch (LogRecordSizeException e) {
            throw (IllegalStateException) new IllegalStateException().initCause(e);
        } catch (LogFileOverflowException e) {
            throw (IllegalStateException) new IllegalStateException().initCause(e);
        } catch (InterruptedException e) {
            throw (IllegalStateException) new IllegalStateException().initCause(e);
        } catch (IOException e) {
            throw new LogException(e);
        }
    }

    public Collection recover(XidFactory xidFactory) throws LogException {

FileLine
org/apache/geronimo/transaction/manager/GeronimoTransactionManagerGBean.java43
org/apache/geronimo/transaction/manager/TransactionManagerImplGBean.java43
        super(defaultTransactionTimeoutSeconds, xidFactory, transactionLog, resourceManagers);
    }


    /**
     * We can track as resources are added into the geronimo kernel.
     *
     * @param resourceManagers
     * @return the original list of resources.
     */
    protected List watchResourceManagers(Collection resourceManagers) {
        if( resourceManagers instanceof ReferenceCollection ) {
            List copy;
            synchronized (resourceManagers) {
                copy = new ArrayList(resourceManagers);
                    ((ReferenceCollection)resourceManagers).addReferenceCollectionListener(new ReferenceCollectionListener() {
                    public void memberAdded(ReferenceCollectionEvent event) {
                        ResourceManager resourceManager = (ResourceManager) event.getMember();
                        recoverResourceManager(resourceManager);
                    }

                    public void memberRemoved(ReferenceCollectionEvent event) {
                    }

                });
            }
            return copy;
        } else {
            return super.watchResourceManagers(resourceManagers);
        }
    }

    public static final GBeanInfo GBEAN_INFO;

    static {
        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(TransactionManagerImplGBean.class, NameFactory.TRANSACTION_MANAGER);