axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepal Jayasinghe (JIRA)" <>
Subject [jira] Commented: (AXIS2-341) service deployment
Date Tue, 04 Apr 2006 09:24:45 GMT
    [ ] 

Deepal Jayasinghe commented on AXIS2-341:

I just sent a mail to list , I really appreciate if you comment on that

> service deployment
> ------------------
>          Key: AXIS2-341
>          URL:
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Improvement

>   Components: deployment
>     Versions: 0.94
>  Environment: not pertinent
>     Reporter: Tony Dean
>     Assignee: Deepal Jayasinghe
>     Priority: Blocker

> Original email:
> 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?
> I'd like to see the following:
> 1. ServiceImplInterface
> public interface ServiceImplInterface {
>    public void init();
>    public void destroy();
> }
> 2. init is called when the service is instantiated... should handle one-time initialization
for the service.  destroy is called when the service is undeployed to release any acquired
> 3. can we be intelligent about the number of instances that are created for a particular
service?  if not heavily used, we need to reuse existing instances instead of creating additional
ones.  otherwise, we all should create singleton services so that the system does not grow
> 4. if we are allowed to create multiple instances of our services, there may be times
when we want to do one-time initialization for as a whole for all of our services instances...
is there a way to determine when the last instance is being undeployed (destroyed) so that
this singleton-type of resource acquisition can be destroyed when the last instance is going

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message