Hi All,
The init functionality is part of the 'dependency injection' capability of the message receiver. It would be inappropriate to have an interface representing this since the service author is somewhat restricted if he is bound to an interface. It will also not be the proper dependency injection model.
However I agree that our model for scoping is still not complete. We have to work on that (allowing session and application wide service objects) and perhaps on an appropriate destroy method as well.
On 12/16/05, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
Tony,
Yes, you are right. We need to clean this up. Could you please start
with a JIRA?
- I don't think we have an interface corresponding to the init.
- Yes, it is for every operation call.
- No, we don't have a destroy() AFAIK.
thanks,
dims
On 12/16/05, Tony Dean <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have been using the "public void init()" method of my service implemenation to perform one-time initialization. I can't remember how I stumbled across this functionality, but it would be nice for you to define an implemenation interface that describes this functionality. Maybe you have and I just do not know about it. When I tested my service, it appeared that the engine called init() on every operation invocation. I did not spend much time looking through the code so I'm asking how you conceptually designed these semantics? In particular, how many instances of a particular service will be instantiated by the engine? The init() method should only be called once when the service is initally instantiated. Will the engine be able to quiesce unused service instances? These are the semantics that are usually derived from the container itself. Also, suppose I have some initialization code that needs to be done once and can be shared among all of my service instances
> (singleton functionality). How can I accomplish this... for instance, is there a way to tell how many instances of myself have been instantiated? Lastly, is there an analogous "public void destroy()" that can be used to release any required resources obtained by my service?
>
> Thank you very much.
>
> Tony Dean
> SAS Institute Inc.
> 919.531.6704
> [EMAIL PROTECTED]
>
> SAS... The Power to Know
> http://www.sas.com
>
>
--
Davanum Srinivas : http://wso2.com/blogs/
--
Ajith Ranabahu
