<
From version < 22.1 >
edited by Vincent Massol
on 2014/09/23
To version < 23.1 >
edited by Vincent Massol
on 2014/09/24
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -118,6 +118,28 @@
118 118  
119 119  {{image reference="renderingerror.png"/}}
120 120  
121 +== Component Disposal ==
122 +
123 +The order used by the ComponentManager to dispose its components is computed based on declared dependencies. However there might be cases when you wish a Component's ##dispose()## method to be called before or after all other components. In this case you can use the ##DisposePriority## annotation. The default priority is 1000. A higher value will mean disposing before all other components not having this annotation. For example:
124 +
125 +{{code language="java"}}
126 +@Component
127 +@Singleton
128 +@DisposePriority(10000)
129 +public class DefaultHibernateSessionFactory implements HibernateSessionFactory, Disposable
130 +{
131 +...
132 + @Override
133 + public void dispose() throws ComponentLifecycleException
134 + {
135 + ... called after other components in order to shut down the database late...
136 + }
137 +...
138 +}
139 +{{/code}}
140 +
141 +See the [[Component Reference documentation>>extensions:Extension.Component Module]] for other details.
142 +
121 121  == Deprecated and Retired projects ==
122 122  
123 123  <description of deprecated and retired projects>

Get Connected