diff options
author | Justin Clarke Casey | 2009-04-22 22:19:43 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-22 22:19:43 +0000 |
commit | 342126b7b9ca386f9160daecb51ecc14487a5f9f (patch) | |
tree | a485a50aebead411fa2f38528b4c0b7ba19e91db /OpenSim/Grid/UserServer | |
parent | * Resolve http://opensimulator.org/mantis/view.php?id=3509 by passing up the ... (diff) | |
download | opensim-SC-342126b7b9ca386f9160daecb51ecc14487a5f9f.zip opensim-SC-342126b7b9ca386f9160daecb51ecc14487a5f9f.tar.gz opensim-SC-342126b7b9ca386f9160daecb51ecc14487a5f9f.tar.bz2 opensim-SC-342126b7b9ca386f9160daecb51ecc14487a5f9f.tar.xz |
* Resolve http://opensimulator.org/mantis/view.php?id=3509 by putting some service initialization into CommsManager
* What is really needed is a plugin and interface request system as being done for region modules
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 11 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserServerCommsManager.cs | 40 |
2 files changed, 49 insertions, 2 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index c0cba4a..0a5abd3 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -145,9 +145,16 @@ namespace OpenSim.Grid.UserServer | |||
145 | /// <param name="inventoryService"></param> | 145 | /// <param name="inventoryService"></param> |
146 | protected virtual void StartupUserServerModules() | 146 | protected virtual void StartupUserServerModules() |
147 | { | 147 | { |
148 | m_log.Info("[STARTUP]: Establishing data connection"); | 148 | m_log.Info("[STARTUP]: Establishing data connection"); |
149 | |||
150 | //we only need core components so we can request them from here | ||
151 | IInterServiceInventoryServices inventoryService; | ||
152 | TryGet<IInterServiceInventoryServices>(out inventoryService); | ||
153 | |||
154 | CommunicationsManager commsManager = new UserServerCommsManager(inventoryService); | ||
155 | |||
149 | //setup database access service, for now this has to be created before the other modules. | 156 | //setup database access service, for now this has to be created before the other modules. |
150 | m_userDataBaseService = new UserDataBaseService(); | 157 | m_userDataBaseService = new UserDataBaseService(commsManager); |
151 | m_userDataBaseService.Initialise(this); | 158 | m_userDataBaseService.Initialise(this); |
152 | 159 | ||
153 | //TODO: change these modules so they fetch the databaseService class in the PostInitialise method | 160 | //TODO: change these modules so they fetch the databaseService class in the PostInitialise method |
diff --git a/OpenSim/Grid/UserServer/UserServerCommsManager.cs b/OpenSim/Grid/UserServer/UserServerCommsManager.cs new file mode 100644 index 0000000..519dfbc --- /dev/null +++ b/OpenSim/Grid/UserServer/UserServerCommsManager.cs | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenSim.Framework.Communications; | ||
29 | |||
30 | namespace OpenSim.Grid.UserServer | ||
31 | { | ||
32 | public class UserServerCommsManager : CommunicationsManager | ||
33 | { | ||
34 | public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService) | ||
35 | : base(null, null, null, false, null) | ||
36 | { | ||
37 | m_interServiceInventoryService = interServiceInventoryService; | ||
38 | } | ||
39 | } | ||
40 | } | ||