Hi,
The service is supposed to define several functions that Axis calls
during the lifetime of the service (pointers to these functions are
assigned to the members of axis2_svc_skeleton_ops_t structure); one of
these functions is an 'init' function, that is called by Axis when the
service is loaded.
I'm trying to figure out how this 'init' function could be useful. The
parameters that Axis passes to the 'init' function are
axis2_svc_skeleton_t and axutil_env_t. From none of these parameters
the 'init' function can get access to any data that are related to the
service itself: it can't get access to the config parameters that are
defined in the 'services.xml' file, and there is no place where it
could leave some pre-initialized data for the service to use when the
'invoke' function is called.
Before I looked at the 'init' function attentively, I thought that it
might be a good place to create and initialize my other library object
that needs to be initialized with the path to the config file for this
library; and this path could be provided to the service as one of the
parameters in the 'services.xml' file; and I thought that there must
be some way to pass a pointer to this initialized library object to
the 'invoke' function. But now I see that the 'init' function just
can't do this. (Is not such scenario one of the basic patterns for
initialization of something that later is called back by some
framework?)
So, is the 'init' function suitable only for initialization of a
global or static objects? Or there is some way that I did not find yet
to pass something - just a void pointer, that's all that is really
needed - from the 'init' function to 'invoke' function (and to 'free'
function for disposing)?
Thank you,
alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]