diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagementSchemaInitializer.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagementSchemaInitializer.java index 4ed4e8ad5d..448ae42007 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagementSchemaInitializer.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagementSchemaInitializer.java @@ -27,18 +27,19 @@ import java.io.File; public final class DeviceManagementSchemaInitializer extends DatabaseCreator { private static final Log log = LogFactory.getLog(DeviceManagementSchemaInitializer.class); - private static final String setupSQLScriptLocation = CarbonUtils.getCarbonHome() + File.separator + "dbscripts" ; + private static final String setupSQLScriptBaseLocation = + CarbonUtils.getCarbonHome() + File.separator + "dbscripts" + File.separator + "cdm" + File.separator; public DeviceManagementSchemaInitializer(DataSourceConfig config) { super(DeviceManagerUtil.resolveDataSource(config)); } protected String getDbScriptLocation(String databaseType) { - String scriptName = "wso2_cdm_" + databaseType + ".sql"; + String scriptName = databaseType + ".sql"; if (log.isDebugEnabled()) { log.debug("Loading database script from :" + scriptName); } - return setupSQLScriptLocation.replaceFirst("DBTYPE", databaseType) + scriptName; + return setupSQLScriptBaseLocation.replaceFirst("DBTYPE", databaseType) + scriptName; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml index 043e0dd60e..8dd8ef138c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml @@ -35,6 +35,7 @@ ${project.artifactId} ${project.version} Device Management Mobile Impl Bundle + org.wso2.carbon.device.mgt.mobile.impl.internal.MobileDeviceManagementBundleActivator org.wso2.carbon.device.mgt.mobile.impl.internal org.osgi.framework, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/internal/MobileDeviceManagementServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/internal/MobileDeviceManagementBundleActivator.java similarity index 96% rename from components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/internal/MobileDeviceManagementServiceComponent.java rename to components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/internal/MobileDeviceManagementBundleActivator.java index 7978214969..e614119492 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/internal/MobileDeviceManagementServiceComponent.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/internal/MobileDeviceManagementBundleActivator.java @@ -26,9 +26,9 @@ import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManagerServic import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManagerService; import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManagerService; -public class MobileDeviceManagementServiceComponent implements BundleActivator { +public class MobileDeviceManagementBundleActivator implements BundleActivator { - private static final Log log = LogFactory.getLog(MobileDeviceManagementServiceComponent.class); + private static final Log log = LogFactory.getLog(MobileDeviceManagementBundleActivator.class); private ServiceRegistration androidServiceRegRef; private ServiceRegistration iOSServiceRegRef; private ServiceRegistration windowsServiceRegRef; diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf index e69de29bb2..b5222094b3 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/p2.inf @@ -0,0 +1,3 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/cdm-config.xml,target:${installFolder}/../../conf/cdm-config.xml,overwrite:true);\ + diff --git a/product/modules/distribution/src/assembly/bin.xml b/product/modules/distribution/src/assembly/bin.xml index eee52239eb..6b06f312f5 100644 --- a/product/modules/distribution/src/assembly/bin.xml +++ b/product/modules/distribution/src/assembly/bin.xml @@ -153,7 +153,7 @@ **/api-manager.xml **/sso-idp-config.xml - **/emm-config.xml + @@ -170,6 +170,7 @@ wso2cdm-${project.version}/repository/conf/datasources **/master-datasources.xml + **/cdm-datasources.xml @@ -358,6 +359,16 @@ true 644 + + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/cdm-config.xml + ${pom.artifactId}-${pom.version}/repository/conf + true + 644 + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading-environments.xml ${pom.artifactId}-${pom.version}/repository/conf/tomcat diff --git a/product/modules/distribution/src/repository/conf/datasources/cdm-datasources.xml b/product/modules/distribution/src/repository/conf/datasources/cdm-datasources.xml new file mode 100755 index 0000000000..e24759f81b --- /dev/null +++ b/product/modules/distribution/src/repository/conf/datasources/cdm-datasources.xml @@ -0,0 +1,28 @@ + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + WSO2DEVICE_DB + The datasource used for EMM + + jdbc/WSO2DEVICE_DB + + + + jdbc:h2:repository/database/WSO2DEVICE_DB;DB_CLOSE_ON_EXIT=FALSE + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + diff --git a/product/modules/p2-profile-gen/pom.xml b/product/modules/p2-profile-gen/pom.xml index 97d4a18cdd..5418904a50 100644 --- a/product/modules/p2-profile-gen/pom.xml +++ b/product/modules/p2-profile-gen/pom.xml @@ -107,7 +107,7 @@ org.wso2.carbon:org.wso2.carbon.device.mgt.server.feature:${project.version} - + org.wso2.carbon:org.wso2.carbon.device.mgt.mobile.feature:${project.version} @@ -164,7 +164,7 @@ org.wso2.carbon.device.mgt.server.feature.group ${project.version} - + org.wso2.carbon.device.mgt.mobile.feature.group ${project.version} diff --git a/product/pom.xml b/product/pom.xml index c9fbafc3d0..3c38159663 100644 --- a/product/pom.xml +++ b/product/pom.xml @@ -34,7 +34,7 @@ WSO2 Connected Device Manager (CDM) - Parent - + modules/agents/android/jax-rs modules/p2-profile-gen modules/distribution modules/integration