Branch: refs/heads/master
Home:
https://github.com/Teiid-Designer/teiid-designer
Commit: 6908035f29c89f2aba03fc46650ecddaaceb6e17
https://github.com/Teiid-Designer/teiid-designer/commit/6908035f29c89f2ab...
Author: Paul Richardson <p.g.richardson(a)redhat.com>
Date: 2013-08-07 (Wed, 07 Aug 2013)
Changed paths:
M plugins/org.teiid.designer.core/META-INF/MANIFEST.MF
M plugins/org.teiid.designer.core/plugin.xml
M plugins/org.teiid.designer.core/src/org/teiid/designer/core/ModelerCore.java
A plugins/org.teiid.designer.core/src/org/teiid/designer/core/ModelerCoreStartup.java
R
plugins/org.teiid.designer.core/src/org/teiid/designer/core/ParentServerMonitor.java
M
plugins/org.teiid.designer.dqp.ui/src/org/teiid/designer/runtime/ui/server/editor/TeiidServerEditor.java
M plugins/org.teiid.designer.dqp/plugin.xml
M
plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/DefaultServersProvider.java
R plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/DqpPluginStartup.java
M plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/IServersProvider.java
M
plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/TeiidServerManager.java
M
plugins/org.teiid.designer.ui/src/org/teiid/designer/ui/explorer/ModelExplorerResourceNavigator.java
M
plugins/org.teiid.designer.vdb.ui/src/org/teiid/designer/vdb/ui/build/VdbBuilder.java
M
tests/org.teiid.designer.dqp.test/src/org/teiid/designer/runtime/ServerManagerTest.java
Log Message:
-----------
TEIIDDES-1813: Refine initialisation of TeiidServerManager
* ParentServerMonitor
* DefaultServersProvider
* Combines these 2 classes together since the provider is the
implementation that depends on ServerCore so should be the only class
that is concerned with its initialisation
* Allow an instance to be created but guard its public methods such as
getServers() with a check on Server Core's initialisation
* IServersProvider
* Adds MonitorListener interface from ParentServerMonitor
* Likewise methods for adding removing such listeners
* ModelerCore
* Adds a synchronising lock to getTeiidServerManager since various threads
can try to call it at the same time before the field has been set,
ensuring only 1 instance is created from the extension point
* ModelerCoreStartup
* DqpPluginStartup
* Migrates this early startup class to the same plugin that is tasked with
creating the TeiidServerManager
* This improves the performance of such creation since it no longer depends
on 2 different plugins doing the initialisation and the dqp plugin does
tend to be started later than core
* Places the initialisation request in a thread to avoid blocking the UI
* TeiidServerEditor
* ModelExplorerResourceNavigator
* With changes to the servers provider implementation, it is now possible
to safely call ModelerCore.getTeiidServerManager() without throwing the
runtime exception. As such, waiting on server initialisation in these
classes is unnecessary
* TeiidServerManager
* Adds check for started status to important methods and so creates internal
methods used by its restoration function
* Uses the given server provider for listening for server initialisation
thereby decoupling its dependence on ServerCore-related classes
* Allows unit tests to correctly run with their implementation of the
servers provider
* VdbBuilder
* Possible for the vdb validation to initiate on startup when the server
manager is still being restored. If this is the case then return since
the validation will more than likely occur later
* ServerManagerTest
* restoreState must be called in order to set the state of the server
manager to started
* isInitialised must return true in order for restoreState to restore the
state rather than adding a listener