HiveMind
  1. HiveMind
  2. HIVEMIND-116

add destroy-method attribute to the construct element of BuilderFactory

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None

      Description

      In order to keep object agnostic of container, please add attributes to the BuilderFactory contruct element that support the standard lifecycle management of Hivemind. This request is for the destroy step in the life cycle of a service. This attribute could be used instead of RegistryShutdownListener and Discardable.

      The following is a specification should be a reasonable start.

      add a destroy-method attribute to the construct element recognized by BuilderFactory

      When the destroy-method is specified, the method must be a public void method taking no parameters. This method is called when the registry is shutdown for primitive, singleton, and pooled services. This method is
      called when the thread is cleaned up for a threaded service. When autowire-service is enabled and destroy-method is not specified, BuilderFactory will introspect for a method called destroyService() and
      treat it as a destroy-method. In the case of singleton and pooled services, if the service implements the RegistryShutdownListener, the destroy-method is called before the RegistryShutdownListener.registryDidShutdown() method. In the case of threaded services, if the service implements the Discardable interface, the destroy-method is called before the
      Discardable.threadDidDiscardService() method.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Richard Hensley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development