Project

General

Profile

« Previous | Next » 

Revision bb9cba6b

Added by Andreas Müller almost 4 years ago

ref #9025 improve localhost mgd. handling (cont.)

View differences:

eu.etaxonomy.taxeditor.webapp/src/main/java/eu/etaxonomy/taxeditor/webapp/CdmServer.java
67 67
    private File warFile;
68 68
    private Server server;
69 69

  
70
    private boolean potentiallyMissingSchema;
71 70
    private boolean forceSchemaCreate = false;
72 71
    private boolean forceSchemaUpdate = false;
73 72

  
......
191 190
                try {
192 191
                    if(isForceSchemaCreate()) {
193 192
                        System.setProperty(ATTRIBUTE_FORCE_SCHEMA_CREATE, "true");
194
                        potentiallyMissingSchema = false; // reset flag
195
                        setForceSchemaCreate(false); // reset flag
196 193
                    }else if (isForceSchemaUpdate()){
197 194
                        System.setProperty(ATTRIBUTE_FORCE_SCHEMA_UPDATE, "true");
198
                        setForceSchemaUpdate(false); // reset flag
199 195
                    }
200 196
                    server.start();
201 197
                    server.join();
......
211 207

  
212 208
                        // pure string comparison to avoid dependencies to hibernate or cdmlib-persistance in the taxeditor
213 209
                        if(cause.getClass().getSimpleName().equals("SchemaExtractionException") || cause.getClass().getSimpleName().equals("CdmDatabaseException") ) {
214
                            potentiallyMissingSchema = true;
215 210
                            logger.debug(cause.getClass().getName() + " detected which indicates missing or corrupt schema");
216 211
                            cause = null;
217 212
                        } else {
......
286 281
    public void setForceSchemaUpdate(boolean forceSchemaUpdate) {
287 282
        this.forceSchemaUpdate = forceSchemaUpdate;
288 283
    }
289

  
290
    public boolean isPotentiallyMissingSchema() {
291
        return potentiallyMissingSchema;
292
    }
293

  
294 284
}

Also available in: Unified diff