44 |
{ |
{ |
45 |
try |
try |
46 |
{ |
{ |
47 |
|
//first load transports |
48 |
transportController = TransportController.getInstance(); |
transportController = TransportController.getInstance(); |
49 |
|
|
50 |
|
//then load remoteControl |
51 |
|
startRemoteControl(); |
52 |
|
|
53 |
|
//finally start the worker thread |
54 |
|
// create our threadstart object to wrap our delegate method |
55 |
|
ThreadStart ts = new ThreadStart(this.ServiceWorkerMethod); |
56 |
|
|
57 |
|
// create the manual reset event and |
58 |
|
// set it to an initial state of unsignaled |
59 |
|
m_shutdownEvent = new ManualResetEvent(false); |
60 |
|
|
61 |
|
// create the worker thread |
62 |
|
m_thread = new Thread(ts); |
63 |
|
|
64 |
|
// go ahead and start the worker thread |
65 |
|
m_thread.Start(); |
66 |
|
|
67 |
} |
} |
68 |
catch (Exception e) |
catch (Exception e) |
69 |
{ |
{ |
70 |
EventLog.WriteEntry("DaoMqPump2", "Error starting DaoMqPump2: " + e.Message, EventLogEntryType.Error); |
EventLog.WriteEntry("DaoMqPump2", "Error starting DaoMqPump2: " + e.Message, EventLogEntryType.Error); |
71 |
throw e; |
throw e; |
72 |
} |
} |
|
|
|
|
|
|
|
// create our threadstart object to wrap our delegate method |
|
|
ThreadStart ts = new ThreadStart(this.ServiceWorkerMethod); |
|
|
|
|
|
// create the manual reset event and |
|
|
// set it to an initial state of unsignaled |
|
|
m_shutdownEvent = new ManualResetEvent(false); |
|
|
|
|
|
// create the worker thread |
|
|
m_thread = new Thread(ts); |
|
|
|
|
|
// go ahead and start the worker thread |
|
|
m_thread.Start(); |
|
|
|
|
|
|
|
|
startRemoteControl(); |
|
73 |
} |
} |
74 |
|
|
75 |
// Stop this service. |
// Stop this service. |