« Return to Thread: [jira] Commented: (HIVEMIND-116) add destroy-method attribute to the construct element of BuilderFactory

[jira] Commented: (HIVEMIND-116) add destroy-method attribute to the construct element of BuilderFactory

by JIRA hivemind-dev@jakarta.apache.org :: Rate this Message:

Reply to Author | View in Thread


    [ https://issues.apache.org/jira/browse/HIVEMIND-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597502#action_12597502 ]

Johan Lindquist commented on HIVEMIND-116:
------------------------------------------

Another one for the group - when attempting to decorate the implementation class & the destroy method does exist but is final, javassist will throw an exception that the a class is being extended, overriding a final method. The check can easily be done, but the question is how to report it - warn the user (i.e log it) or throw an exception?

> add destroy-method attribute to the construct element of BuilderFactory
> -----------------------------------------------------------------------
>
>                 Key: HIVEMIND-116
>                 URL: https://issues.apache.org/jira/browse/HIVEMIND-116
>             Project: HiveMind
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: 1.1
>            Reporter: Richard Hensley
>
> 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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

 « Return to Thread: [jira] Commented: (HIVEMIND-116) add destroy-method attribute to the construct element of BuilderFactory

LightInTheBox - Buy quality products at wholesale price!