Revision 3692

View differences:

org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceDescriptor.java
23 23

  
24 24
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
25 25
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
26
import org.gvsig.tools.dispose.Disposable;
27 26
import org.gvsig.tools.persistence.Persistent;
28 27
import org.gvsig.tools.util.LabeledValue;
29 28

  
......
32 31
 * @author gvSIG Team
33 32
 */
34 33
public interface VCSGisWorkspaceDescriptor 
35
        extends LabeledValue<VCSGisWorkspaceDescriptor>, Persistent, Disposable
34
        extends LabeledValue<VCSGisWorkspaceDescriptor>, Persistent
36 35
    {
37 36
    public String getCode();
38 37
    
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceDescriptorImpl.java
27 27
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
28 28
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
29 29
import org.gvsig.tools.ToolsLocator;
30
import org.gvsig.tools.dispose.DisposeUtils;
31
import org.gvsig.tools.dispose.impl.AbstractDisposable;
32 30
import org.gvsig.tools.dynobject.DynStruct;
33
import org.gvsig.tools.exception.BaseException;
34 31
import org.gvsig.tools.persistence.PersistenceManager;
35 32
import org.gvsig.tools.persistence.PersistentState;
36 33
import org.gvsig.tools.persistence.exception.PersistenceException;
......
43 40
 */
44 41
@SuppressWarnings("UseSpecificCatch")
45 42
public class VCSGisWorkspaceDescriptorImpl 
46
        extends AbstractDisposable
47 43
        implements VCSGisWorkspaceDescriptor 
48 44
    {
49 45

  
......
55 51
    private VCSGisWorkspace workspace;
56 52

  
57 53
    public VCSGisWorkspaceDescriptorImpl() {
58
        super();
54
        
59 55
    }
60 56

  
61 57
    public VCSGisWorkspaceDescriptorImpl(VCSGisWorkspace workspace) {
62
        this();
63 58
        this.workspace = workspace;
64 59
        this.explorerParameters = workspace.getExplorerParameters();
65 60
        this.explorer = workspace.getExplorer();
......
83 78
            VCSGisManager manager = VCSGisLocator.getVCSGisManager();
84 79
            this.workspace = manager.openWorkspace(this.getExplorer());
85 80
        }
86
        DisposeUtils.bind(this.workspace);
87 81
        return this.workspace;
88 82
    }
89 83

  
......
162 156
     */
163 157
    public void setWorkspace(VCSGisWorkspace workspace) {
164 158
        this.workspace = workspace;
165
        DisposeUtils.bind(this.workspace);
166 159
    }
167

  
168
    @Override
169
    protected void doDispose() throws BaseException {
170
        this.label = null;
171
        this.code = null;
172
        this.explorerParameters = null;
173
        DisposeUtils.disposeQuietly(this.explorer);
174
        this.explorer = null;
175
        DisposeUtils.disposeQuietly(this.workspace);
176
        this.workspace = null;
177
        
178
        
179

  
180
    }
181 160
    
182 161
    
183 162
    

Also available in: Unified diff