[
https://jira.jboss.org/jira/browse/JBTM-295?page=com.atlassian.jira.plugi...
]
Andrew Dinn closed JBTM-295.
----------------------------
Resolution: Done
The following classes have been modifed either to remove the finalize method or to remove
redundant assignments of null to object type fields. In cases where implementtaion sin a
super and subclass both logged a debug message the responsibility for logging has been
devolved to the parent class with a type name included in the debug message.
Mostly, these deletions will be transparent to user subclasses. For the most part they
merely elide redundant code which was setting fields to null. This does not change the
class signature and will only affect code which relies upon the value of inherited fields
(since it is at liberty to read these before calling the super method this has little
significance). However, in a very small number of cases deletion of the finalize call has
caused small changes to behaviour:
i) the implementation of finalize in several subclasses of StateManager failed to invoke
super.finalize() which, in certain circumstances, may call method cleanup(). Deletion of
the finalize method on these classes has, therefore, reinstated invocaton of
Statemanager.finalize() and, possibly, cleanup() where they were not previously invoked.
This was the original desired behaviour and the failure to execute this code is regarded
as a bug.
ii) ServerTopLevelAction used to call tidyUp() which is also called by its parent class
finalize method. This will now only get called once per instance during finalization.
iii) SimpleList and HashList no longer call, respectively, pop() (in a loop) or clear() to
delete all entries in the list/table.
The full list of changes with a brief description of each change is:
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java -- removed null
assignments
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/CadaverRecord -- deleted, parent logs
message
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/DisposeRecord -- deleted, parent logs
message
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/PersistenceRecord -- deleted, parent logs
message
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper -- deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/RecoveryRecord -- now logs message and
calls super n.b. unlatches potential call to cleanup() in StateManager
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement --
already deleted
XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/ParticipantRecord --
deleted
XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/as/coordinator/arjunacore/ParticipantRecord
-- deleted
XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/ParticipantRecord --
deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/recoverycoordinators/ResourceCompletor
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/TopLevelTransactionRecoveryModule
-- already deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransactionReplayer
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransaction
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ServerTransactionRecoveryModule
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredServerTransaction
-- deleted, parent does logging
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/resources/ResourceRecord -- deleted,
parent does logging
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/resources/ExtendedResourceRecord --
deleted, parent does logging
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/interposition/resources/arjuna/ServerNestedAction
-- deleted, parent does logging
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/interposition/resources/arjuna/ServerTopLevelAction
deleted, parent does cleanup (tidyUp() call was replicated action in super.finalize())
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/interposition/resources/ServerSynchronization
-- deleted (failed to call super but that was Object.finalize())
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/interposition/ServerControl
-- deleted, cleanup done by parent
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/recovery/recoverycoordinators/GenericRecoveryCoordinator
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/TransactionFactoryImple --
deleted
ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/SynchronizationImple
-- deleted
ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord
-- deleted
ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/SynchronizationImple
-- already deleted
ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord --
deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/utils/FileLock.java -- deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java -- deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/gandiva/nameservice/NameService.java --
deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/gandiva/ObjectName.java -- deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/PersistenceRecord.java -- already deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/RecoveryAbstractRecord.java --
deleted, n.b. unlatches potential call to cleanup() in StateManager
ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/ActionHierarchy.java --
already deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/thread/ThreadSpecificData.java --
deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/template/SimpleListEntry.java --
deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/template/SimpleList.java --
deleted, means pop() no longer called iteratively to clear list
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/template/OrderedListIterator.java
-- deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/template/HashListIterator.java:public
void finalize () deleted
ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/template/HashList.java:public
void finalize () deleted, no longer calls empty()
ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicLockStore.java:public
void finalize () -- deleted
ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/semaphore/BasicSemaphoreSetup.java --
deleted
ArjunaCore/txoj/classes/com/arjuna/ats/txoj/LockListIterator.java:public void finalize ()
-- deleted
ArjunaCore/txoj/classes/com/arjuna/ats/txoj/lockstore/LockStore.java -- deleted
ArjunaCore/txoj/classes/com/arjuna/ats/txoj/semaphore/Semaphore.java -- deleted
XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/as/coordinator/arjunacore/SynchronizationRecord.java
-- deleted
XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/SynchronizationRecord.java
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/resources/arjuna/InterposedHierarchy.java
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/resources/arjuna/Interposition.java:public
void finalize () -- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/FactoryList.java --
deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/CachedRecoveredTransaction.java
-- deleted
ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/resources/SynchronizationRecord.java --
deleted
ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/ConnectionImple.java -- deleted
Identify redundant finalize methods on classes employed by the JTS
implementation and remove them.
--------------------------------------------------------------------------------------------------
Key: JBTM-295
URL:
https://jira.jboss.org/jira/browse/JBTM-295
Project: JBoss Transaction Manager
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JTS Implementation
Affects Versions: 4.2.3
Reporter: Andrew Dinn
Assignee: Andrew Dinn
Fix For: 4.5
Identify redundant finalize methods in classes employed by the JTS which are adversely
affecting GC performance and remove them, documenting any effect this may have in the
relevant release notes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira