Revision 7e488d1b
Added by Andreas Kohlbecker over 6 years ago
- ID 7e488d1bb2f09a0bc4c282c8694b3c1e54bd04ba
- Parent 475ec4ee
src/main/java/eu/etaxonomy/cdm/vaadin/session/ViewScopeConversationHolder.java | ||
---|---|---|
14 | 14 |
|
15 | 15 |
import org.hibernate.FlushMode; |
16 | 16 |
import org.hibernate.SessionFactory; |
17 |
import org.springframework.beans.factory.DisposableBean; |
|
17 | 18 |
import org.springframework.orm.hibernate5.support.OpenSessionInViewFilter; |
18 | 19 |
import org.springframework.transaction.PlatformTransactionManager; |
19 | 20 |
import org.springframework.transaction.TransactionDefinition; |
... | ... | |
48 | 49 |
*/ |
49 | 50 |
@SpringComponent |
50 | 51 |
@ViewScope |
51 |
public class ViewScopeConversationHolder extends ConversationHolder implements Serializable { |
|
52 |
public class ViewScopeConversationHolder extends ConversationHolder implements Serializable, DisposableBean {
|
|
52 | 53 |
|
53 | 54 |
|
54 | 55 |
private static final long serialVersionUID = 1001768184000981106L; |
... | ... | |
80 | 81 |
setDefinition(definition ); |
81 | 82 |
} |
82 | 83 |
|
84 |
/** |
|
85 |
* {@inheritDoc} |
|
86 |
*/ |
|
87 |
@Override |
|
88 |
public void destroy() throws Exception { |
|
89 |
close(); |
|
90 |
} |
|
91 |
|
|
83 | 92 |
|
84 | 93 |
|
85 | 94 |
|
Also available in: Unified diff
ref #7036 disposing resources in mvp beans