I'll answer my own question.
ND has not changed the initialization order.

I have a new question:

Does anyone know where to put code that will be called
after all initialization has been done in a project graph?
I would have thought onAfterInit on the project object,
but that is obviously not the case:

I created a project called serializeTest with
a dataobject doCountryQuery and a page called pgCountry.

These three objects have an instance initializer,
implements java.io.Serialize.writeObject and readObject,
implements init, onBeforeInit and onAfterInit.

These methods log something after '###'.

Then I configured this project to fully preload in three
instances.

What happens is this:
first project:
1    all constructors
2    init onBeforeInit on project object
3    init onBeforeInit on all subobjects (data objects, pages,...)
4    onAfterInit on all subobjects
5    onAfterInit on project object
6    serialization
subsequent projects:
1    project object is serialized again
2    deserialize init onBeforeInit onAfterInit on project object
3    deserialize init onBeforeInit on all subobjects
4    onAfterInit on all subobjects

This is NOT what I wanted/expected.
I expected the order to be consistent between first
and subsequent project graphs and
onBeforeInit to happen before init.
I wanted onAfterInit to happen AFTER serialization.

Btw, listeners are transient. A good place to add listeners
seems to be in 'init'.

/Mats

Extract from log follows:

CSpider:context:createAndSetNewProjectInstance: Instantiating a new copy of
the project 'serializeTest'
CSpider:context:instantiateFirstProjectInstance: Server-side instantiation
of the Project 'serializeTest'
serializeTest.serializeTest:context: ### instance initializer
serializeTest.serializeTest:context:readObject: Instantiating the Project
'serializeTest'. Saved version: 4.1
serializeTest.pgCountry:context: ### instance initializer
serializeTest.pgCountry:context:readObject: Instantiating the Common Page
'serializeTest.pgCountry'
serializeTest.doCountryQuery:context: ### instance initializer
serializeTest.doCountryQuery:context:readObject: Instantiating the
DataObject 'serializeTest.doCountryQuery'
serializeTest.dsBOKSER:context:readObject: Instantiating the DataSource
'serializeTest.dsBOKSER'
serializeTest.serializeTest:context: ### init
serializeTest.serializeTest:context: ### onBeforeInit
serializeTest.pgCountry:context: ### init
serializeTest.pgCountry:context: ### onBeforeInit
serializeTest.doCountryQuery:context: ### init
serializeTest.doCountryQuery:context: ### onBeforeInit
serializeTest.pgCountry:context: ### OnAfterInit
serializeTest.doCountryQuery:context: ### OnAfterInit
serializeTest.serializeTest:context: ### OnAfterInit
CSpider:context:createAndSetNewProjectInstance: First instance of the
Project 'serializeTest', not client-side and the Project has been modified.
Serialize all modified objects
serializeTest.serializeTest:context:serializeAllModifiedObjects: Serializing
all modified Objects
serializeTest.pgCountry:context: ### in WriteObject
serializeTest.doCountryQuery:context: ### in WriteObject
serializeTest.serializeTest:context: ### in WriteObject
serializeTest.serializeTest:context:serializeAllModifiedObjects:
fullSuccess=Y
CSpider:context:allocateProjectUserContext: 'Thread-5' assigned to
'serializeTest' (0)
CSpider:context:releaseProjectUserContext: 'Thread-5' releasing
'serializeTest' (0)
CSpider:context:createAndSetNewProjectInstance: Cloning project
'serializeTest'
serializeTest.serializeTest:context: ### in WriteObject
serializeTest.serializeTest:context: ### in ReadObject
serializeTest.serializeTest:context: ### init
serializeTest.serializeTest:context: ### onBeforeInit
serializeTest.serializeTest:context: ### OnAfterInit
CSpider:context:createAndSetNewProjectInstance: Creating an instance of the
Project 'serializeTest', not client-side and a Full allocation has been
requested.
serializeTest.pgCountry:context: ### in ReadObject
serializeTest.pgCountry:context: ### init
serializeTest.pgCountry:context: ### onBeforeInit
serializeTest.doCountryQuery:context: ### in ReadObject
serializeTest.doCountryQuery:context: ### init
serializeTest.doCountryQuery:context: ### onBeforeInit
serializeTest.doCountryQuery:context: ### OnAfterInit
serializeTest.pgCountry:context: ### OnAfterInit
CSpider:context:allocateProjectUserContext: 'Thread-5' assigned to
'serializeTest' (1)
CSpider:context:releaseProjectUserContext: 'Thread-5' releasing
'serializeTest' (1)
CSpider:context:createAndSetNewProjectInstance: Cloning project
'serializeTest'
serializeTest.serializeTest:context: ### in WriteObject
serializeTest.serializeTest:context: ### in ReadObject
serializeTest.serializeTest:context: ### init
serializeTest.serializeTest:context: ### onBeforeInit
serializeTest.serializeTest:context: ### OnAfterInit
CSpider:context:createAndSetNewProjectInstance: Creating an instance of the
Project 'serializeTest', not client-side and a Full allocation has been
requested.
serializeTest.pgCountry:context: ### in ReadObject
serializeTest.pgCountry:context: ### init
serializeTest.pgCountry:context: ### onBeforeInit
serializeTest.doCountryQuery:context: ### in ReadObject
serializeTest.doCountryQuery:context: ### init
serializeTest.doCountryQuery:context: ### onBeforeInit
serializeTest.doCountryQuery:context: ### OnAfterInit
serializeTest.pgCountry:context: ### OnAfterInit
CSpider:context:allocateProjectUserContext: 'Thread-5' assigned to
'serializeTest' (2)
CSpider:context:releaseProjectUserContext: 'Thread-5' releasing
'serializeTest' (2)



_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to