Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 87987 Details for
Bug 181090
Unpredictable results when one GLA instance runs multiple adapters concurrently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for the Adapter class
patch.txt (text/plain), 3.32 KB, created by
Dave Smith
on 2008-01-28 01:26:39 EST
(
hide
)
Description:
Patch for the Adapter class
Filename:
MIME Type:
Creator:
Dave Smith
Created:
2008-01-28 01:26:39 EST
Size:
3.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.logging.adapter >Index: src/org/eclipse/hyades/logging/adapter/Adapter.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.hyades.logging.adapter/src/org/eclipse/hyades/logging/adapter/Adapter.java,v >retrieving revision 1.15 >diff -u -r1.15 Adapter.java >--- src/org/eclipse/hyades/logging/adapter/Adapter.java 24 Jan 2008 02:25:53 -0000 1.15 >+++ src/org/eclipse/hyades/logging/adapter/Adapter.java 28 Jan 2008 06:19:59 -0000 >@@ -197,11 +197,19 @@ > * @throws AdapterException If an error occurs during execution. > */ > public void start(boolean separateThread, boolean daemon) throws AdapterException { >+ /* bugzilla 181090 >+ * Only run the adapter if it is not already running. >+ */ >+ synchronized(this) { >+ if (status.isActive()) { >+ return; >+ } >+ > /* bugzilla 86674 > * Set the active status of the Adapter to true here so we include the configuration time > */ >- status.setActive(true); >- >+ status.setActive(true); >+ } > /* If the controller object already exists and the adapter configuration file has not changed Then > * use the current configuration. > */ >@@ -246,7 +254,9 @@ > /* Run the controller and therefore the adapter in the current thread. */ > rootController.run(); > // All contexts have stopped so set the active status to false >- status.setActive(false); >+ synchronized(this) { >+ status.setActive(false); >+ } > } > else { > /* Run the controller and therefore the adapter in a separate thread */ >@@ -265,7 +275,9 @@ > if (rootController != null) { > rootController.stop(); > } >- status.setActive(false); >+ synchronized(this) { >+ status.setActive(false); >+ } > } > > /** >@@ -276,7 +288,9 @@ > if (rootController != null) { > rootController.hardStop(); > } >- status.setActive(false); >+ synchronized(this) { >+ status.setActive(false); >+ } > } > > /** >@@ -358,12 +372,14 @@ > * @return the org.eclipse.hyades.logging.adapter.IStatus object representing the status. > */ > public IStatus getStatus() { >- // This method may be called before start() is called so check for null rootController >- if (rootController != null) { >- status.setChildrenStatus(rootController.getStatus()); >- } >- else { >- status.setActive(false); >+ synchronized(this) { >+ // This method may be called before start() is called so check for null rootController >+ if (rootController != null) { >+ status.setChildrenStatus(rootController.getStatus()); >+ } >+ else { >+ status.setActive(false); >+ } > } > return status; > } >@@ -376,7 +392,14 @@ > * @param outputter component where GLA will log its messages. > */ > public void setLogOutputter(IOutputter outputter) { >- logOutputter = outputter; >+ /* bugzilla 181090 >+ * Only set the log outputter if the adapter is not already running. >+ */ >+ synchronized(this) { >+ if (!status.isActive()) { >+ logOutputter = outputter; >+ } >+ } > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 181090
:
87987
|
88621