No announcement yet.
  • Filter
  • Time
Clear All
new posts

    12.0p comprehension question: Are serverObject member variables OK?

    Hi Isomorphic,

    short comprehension question:
    I do have a DataSource serverObject with many methods. In order not to have pass parameters between methods, I do have member variables.
    All member variables are always initialized with reasonable values in the add() method (it's an upload, so add() is the only method called from outside).
    The member variables store generated IDs.

    Is this allowed for
    • normal DataSources?
    • Dynamic DataSources from DSGenerator?
    I do have default settings from here:
    • general pooling enabled (datasources.pool.enabled: true)
    • Pooling for dynamic DataSources not enabled ("#datasources.poolDynamicDataSources: true" with the "#")
    The one DataSource where I have this is actually dynamic, so I don't use pooling anyways.
    But what for normal DataSources or if I enable that setting - are member variables then still OK?

    I read of course read the ServerDataSourceImplementation docs.

    Thank you & Best reagards

    We do not pool serverObjects or keep them associated with particular DataSources - we just drop them after calling the indicated method.

    So whether it's safe to have state depends on your chosen lookupStyle, whether you've implement them as singletons, whether you're trying to support a clustered environment, etc - but has nothing to do with our framework. We just use the method indicated by the lookupStyle to find your serverObject, and that's it.


      Hi Isomorphic,

      thank you, just the information I needed.
      Would it make sense to add this also to the ServerDataSourceImplementation docs?

      Best regards