Rergarding the names Startable and Stoppable, they imply some kind of dynamism to me, i.e. a service can actually be started and stopped at runtime (as in OSGi). Is this actually the case? If these services are actually meant as static instead and only hooks for post-construct/pre-destroy logic are required, we could provide that by supporting the @PostConstruct/@PreDestroy annotations from Commons Annotations
Rergarding the names Startable and Stoppable, they imply some kind of dynamism to me, i.e. a service can actually be started and stopped at runtime (as in OSGi). Is this actually the case?
Sure. The service gets started on first request and stopped when the count hits 0 (meaning the last client has released the service). I think it fits very well that a service has a start/stop methods and hence might be Startable and/or Stoppable.
If these services are actually meant as static instead and only hooks for post-construct/pre-destroy logic are required, we could provide that by supporting the @PostConstruct/@PreDestroy annotations from Commons Annotations
I don't see the benefit here.
|