Risk in modifying GsCurrentSession>>initialize
The method GsCurrentSession>>initialize provides a way for you to add application
specific behavior for every login to the repository in version 2.x and
However, unhandled errors in the application-specific modifications may
cause session initializaion to be incorrect for all subsequent logins to
the repository. This incorrect initialization may allow login, but disable
all commits for this session. This is not recoverable; you must restore
from backup taken before the modifications were committed.
In version 3.1, loginHook: has been added to UserProfile instances allowing
you to more safely attach login behavior. In version 3.1 and later, you
should not modify GsCurrentSession>>initialize.
There is no workaround, you must restore from backup to recover. If this
is not possible for critical applications, contact GemStone Technical Support.
Make a backup of the repository prior to making any modifications to this
Leaving a separate idle session logged in as SystemUser, while modifications
are being tested, will allow these modifications to be removed to recover
Only executing the modifications for users other than SystemUser, and handling
errors in the modifications, will also help avoid situations requiring
restore from backup. For example,
(self userProfile userId = 'SystemUser') ifFalse: [
on: (Globals at: #Error)
do: [:ex | ex return]