axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: How the 'init' function in the axis2_svc_skeleton_ops_t is supposed to be used?
Date Fri, 13 Jun 2008 17:07:10 GMT
Hi Alex,

> 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,

Yes I agree with you. It should have access to some of the
configurations(to be in the safe side in any case). But I cannot see a
use case where it is used. If you can provide a use case we can have a
more deeper look.

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?)

This is the general idea that comes to the mind. I had the same
impression once. But if you look at your problem more deeply you can
see that what you are requesting is not necessary and not that
important. For a single instance of Axis2/C the init function is hit
only once. Let's say there is a way to pass the initialized object
from init method to the invoke method. But since init is called only
once this initialize object is like a global or static object. So it
doesn't matter weather you initialized that object and keep it in the
axis2_svc_skeleton_t or as a global object.

> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message