Author: solomax Date: Mon May 12 06:06:14 2014 New Revision: 1593888 URL: http://svn.apache.org/r1593888 Log: [OPENMEETINGS-997] M$ sql server support is added to the installer
Added: openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/MssqlPatcher.java openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/MssqlPatcher.java Modified: openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionProperties.java openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java openmeetings/branches/3.0.x/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionProperties.java openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml Modified: openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionProperties.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionProperties.java?rev=1593888&r1=1593887&r2=1593888&view=diff ============================================================================== --- openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionProperties.java (original) +++ openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionProperties.java Mon May 12 06:06:14 2014 @@ -22,6 +22,7 @@ public class ConnectionProperties { public enum DbType { db2 , derby + , mssql , mysql , oracle , postgresql Modified: openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java?rev=1593888&r1=1593887&r2=1593888&view=diff ============================================================================== --- openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java (original) +++ openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java Mon May 12 06:06:14 2014 @@ -49,6 +49,9 @@ public abstract class ConnectionProperti case db2: patcher = new Db2Patcher(); break; + case mssql: + patcher = new MssqlPatcher(); + break; case mysql: patcher = new MysqlPatcher(); break; Added: openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/MssqlPatcher.java URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/MssqlPatcher.java?rev=1593888&view=auto ============================================================================== --- openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/MssqlPatcher.java (added) +++ openmeetings/branches/3.0.x/src/install/java/org/apache/openmeetings/cli/MssqlPatcher.java Mon May 12 06:06:14 2014 @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.cli; + +public class MssqlPatcher extends ConnectionPropertiesPatcher { + @Override + protected String getUrl(String _url, String host, String _port, String _db) { + String port = (_port == null) ? "1433" : _port; + String db = (_db == null) ? "openmeetings" : _db; + return "jdbc:sqlserver://" + host + ":" + port + ";databaseName=" + db; + } +} Modified: openmeetings/branches/3.0.x/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml?rev=1593888&r1=1593887&r2=1593888&view=diff ============================================================================== --- openmeetings/branches/3.0.x/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml (original) +++ openmeetings/branches/3.0.x/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml Mon May 12 06:06:14 2014 @@ -77,7 +77,10 @@ <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported" /> <property name="openjpa.ConnectionDriverName" value="org.apache.commons.dbcp.BasicDataSource" /> <property name="openjpa.ConnectionProperties" - value="DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver,Url=jdbc:sqlserver://localhost:1433;databaseName=openmeetings;user=Username;password=Password;" /> + value="DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver + , Url=jdbc:sqlserver://localhost:1433;databaseName=openmeetings + , Username=Username + , Password=Password" /> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" /> <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO" /> <property name="openjpa.DataCache" value="true" /> Modified: openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionProperties.java URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionProperties.java?rev=1593888&r1=1593887&r2=1593888&view=diff ============================================================================== --- openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionProperties.java (original) +++ openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionProperties.java Mon May 12 06:06:14 2014 @@ -22,6 +22,7 @@ public class ConnectionProperties { public enum DbType { db2 , derby + , mssql , mysql , oracle , postgresql Modified: openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java?rev=1593888&r1=1593887&r2=1593888&view=diff ============================================================================== --- openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java (original) +++ openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/ConnectionPropertiesPatcher.java Mon May 12 06:06:14 2014 @@ -49,6 +49,9 @@ public abstract class ConnectionProperti case db2: patcher = new Db2Patcher(); break; + case mssql: + patcher = new MssqlPatcher(); + break; case mysql: patcher = new MysqlPatcher(); break; Added: openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/MssqlPatcher.java URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/MssqlPatcher.java?rev=1593888&view=auto ============================================================================== --- openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/MssqlPatcher.java (added) +++ openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/cli/MssqlPatcher.java Mon May 12 06:06:14 2014 @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.cli; + +public class MssqlPatcher extends ConnectionPropertiesPatcher { + @Override + protected String getUrl(String _url, String host, String _port, String _db) { + String port = (_port == null) ? "1433" : _port; + String db = (_db == null) ? "openmeetings" : _db; + return "jdbc:sqlserver://" + host + ":" + port + ";databaseName=" + db; + } +} Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml?rev=1593888&r1=1593887&r2=1593888&view=diff ============================================================================== --- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml (original) +++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/mssql_persistence.xml Mon May 12 06:06:14 2014 @@ -77,7 +77,10 @@ <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported" /> <property name="openjpa.ConnectionDriverName" value="org.apache.commons.dbcp.BasicDataSource" /> <property name="openjpa.ConnectionProperties" - value="DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver,Url=jdbc:sqlserver://localhost:1433;databaseName=openmeetings;user=Username;password=Password;" /> + value="DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver + , Url=jdbc:sqlserver://localhost:1433;databaseName=openmeetings + , Username=Username + , Password=Password" /> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" /> <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO" /> <property name="openjpa.DataCache" value="true" />