aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
authorMike Mazur2008-07-18 04:51:41 +0000
committerMike Mazur2008-07-18 04:51:41 +0000
commite0e0db366061eae148364e3d5670f275b1ab25b7 (patch)
treecbd4890958aa28a3ff98a917909ec77247a80d00 /OpenSim/Data/MSSQL
parentMake scripts LSL compliant. (diff)
downloadopensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.zip
opensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.tar.gz
opensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.tar.bz2
opensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.tar.xz
Thanks, sempuki, for a patch that moves all grid plugins to new PluginLoader (issue 1763).
Diffstat (limited to 'OpenSim/Data/MSSQL')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridData.cs22
-rw-r--r--OpenSim/Data/MSSQL/MSSQLLogData.cs30
2 files changed, 41 insertions, 11 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs
index 0abd0d0..7de77d1 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs
@@ -33,12 +33,18 @@ using System.Security.Cryptography;
33using System.Text; 33using System.Text;
34using libsecondlife; 34using libsecondlife;
35using log4net; 35using log4net;
36using Mono.Addins;
37using OpenSim.Framework;
38
39[assembly : Addin]
40[assembly : AddinDependency("OpenSim.Data", "0.5")]
36 41
37namespace OpenSim.Data.MSSQL 42namespace OpenSim.Data.MSSQL
38{ 43{
39 /// <summary> 44 /// <summary>
40 /// A grid data interface for MSSQL Server 45 /// A grid data interface for MSSQL Server
41 /// </summary> 46 /// </summary>
47 [Extension("/OpenSim/GridDataStore")]
42 public class MSSQLGridData : GridDataBase 48 public class MSSQLGridData : GridDataBase
43 { 49 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -50,6 +56,12 @@ namespace OpenSim.Data.MSSQL
50 56
51 private string m_regionsTableName; 57 private string m_regionsTableName;
52 58
59 override public void Initialise()
60 {
61 m_log.Info("[MSSQLGridData]: " + Name + " cannot be default-initialized!");
62 throw new PluginNotInitialisedException (Name);
63 }
64
53 /// <summary> 65 /// <summary>
54 /// Initialises the Grid Interface 66 /// Initialises the Grid Interface
55 /// </summary> 67 /// </summary>
@@ -101,7 +113,7 @@ namespace OpenSim.Data.MSSQL
101 /// <summary> 113 /// <summary>
102 /// Shuts down the grid interface 114 /// Shuts down the grid interface
103 /// </summary> 115 /// </summary>
104 override public void Close() 116 override public void Dispose()
105 { 117 {
106 // nothing to close 118 // nothing to close
107 } 119 }
@@ -110,18 +122,18 @@ namespace OpenSim.Data.MSSQL
110 /// The name of this DB provider. 122 /// The name of this DB provider.
111 /// </summary> 123 /// </summary>
112 /// <returns>A string containing the storage system name</returns> 124 /// <returns>A string containing the storage system name</returns>
113 override public string getName() 125 override public string Name
114 { 126 {
115 return "Sql OpenGridData"; 127 get { return "Sql OpenGridData"; }
116 } 128 }
117 129
118 /// <summary> 130 /// <summary>
119 /// Database provider version. 131 /// Database provider version.
120 /// </summary> 132 /// </summary>
121 /// <returns>A string containing the storage system version</returns> 133 /// <returns>A string containing the storage system version</returns>
122 override public string getVersion() 134 override public string Version
123 { 135 {
124 return "0.1"; 136 get { return "0.1"; }
125 } 137 }
126 138
127 /// <summary> 139 /// <summary>
diff --git a/OpenSim/Data/MSSQL/MSSQLLogData.cs b/OpenSim/Data/MSSQL/MSSQLLogData.cs
index 849d0fb..d0d81b6 100644
--- a/OpenSim/Data/MSSQL/MSSQLLogData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLLogData.cs
@@ -25,21 +25,39 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
29using System.Reflection;
28using System.Collections.Generic; 30using System.Collections.Generic;
29using System.Data; 31using System.Data;
32using log4net;
33using Mono.Addins;
34using OpenSim.Framework;
35
36// Only one attribute per assembly. See: *GridData.cs
37// [assembly : Addin]
38// [assembly : AddinDependency("OpenSim.Data", "0.5")]
30 39
31namespace OpenSim.Data.MSSQL 40namespace OpenSim.Data.MSSQL
32{ 41{
33 /// <summary> 42 /// <summary>
34 /// An interface to the log database for MSSQL 43 /// An interface to the log database for MSSQL
35 /// </summary> 44 /// </summary>
36 internal class MSSQLLogData : ILogData 45 [Extension("/OpenSim/GridLogData")]
46 internal class MSSQLLogData : ILogDataPlugin
37 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49
38 /// <summary> 50 /// <summary>
39 /// The database manager 51 /// The database manager
40 /// </summary> 52 /// </summary>
41 public MSSQLManager database; 53 public MSSQLManager database;
42 54
55 public void Initialise()
56 {
57 m_log.Info("[MSSQLLogData]: " + Name + " cannot be default-initialized!");
58 throw new PluginNotInitialisedException (Name);
59 }
60
43 /// <summary> 61 /// <summary>
44 /// Artificial constructor called when the plugin is loaded 62 /// Artificial constructor called when the plugin is loaded
45 /// </summary> 63 /// </summary>
@@ -97,15 +115,15 @@ namespace OpenSim.Data.MSSQL
97 /// Returns the name of this DB provider 115 /// Returns the name of this DB provider
98 /// </summary> 116 /// </summary>
99 /// <returns>A string containing the DB provider name</returns> 117 /// <returns>A string containing the DB provider name</returns>
100 public string getName() 118 public string Name
101 { 119 {
102 return "MSSQL Logdata Interface"; 120 get { return "MSSQL Logdata Interface"; }
103 } 121 }
104 122
105 /// <summary> 123 /// <summary>
106 /// Closes the database provider 124 /// Closes the database provider
107 /// </summary> 125 /// </summary>
108 public void Close() 126 public void Dispose()
109 { 127 {
110 // Do nothing. 128 // Do nothing.
111 } 129 }
@@ -114,9 +132,9 @@ namespace OpenSim.Data.MSSQL
114 /// Returns the version of this DB provider 132 /// Returns the version of this DB provider
115 /// </summary> 133 /// </summary>
116 /// <returns>A string containing the provider version</returns> 134 /// <returns>A string containing the provider version</returns>
117 public string getVersion() 135 public string Version
118 { 136 {
119 return "0.1"; 137 get { return "0.1"; }
120 } 138 }
121 } 139 }
122} 140}