revert-70aa11f8
inosh-perera 10 years ago
commit 13b96d9b93

@ -27,18 +27,19 @@ import java.io.File;
public final class DeviceManagementSchemaInitializer extends DatabaseCreator { public final class DeviceManagementSchemaInitializer extends DatabaseCreator {
private static final Log log = LogFactory.getLog(DeviceManagementSchemaInitializer.class); 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) { public DeviceManagementSchemaInitializer(DataSourceConfig config) {
super(DeviceManagerUtil.resolveDataSource(config)); super(DeviceManagerUtil.resolveDataSource(config));
} }
protected String getDbScriptLocation(String databaseType) { protected String getDbScriptLocation(String databaseType) {
String scriptName = "wso2_cdm_" + databaseType + ".sql"; String scriptName = databaseType + ".sql";
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Loading database script from :" + scriptName); log.debug("Loading database script from :" + scriptName);
} }
return setupSQLScriptLocation.replaceFirst("DBTYPE", databaseType) + scriptName; return setupSQLScriptBaseLocation.replaceFirst("DBTYPE", databaseType) + scriptName;
} }
} }

@ -35,6 +35,7 @@
<Bundle-Name>${project.artifactId}</Bundle-Name> <Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${project.version}</Bundle-Version> <Bundle-Version>${project.version}</Bundle-Version>
<Bundle-Description>Device Management Mobile Impl Bundle</Bundle-Description> <Bundle-Description>Device Management Mobile Impl Bundle</Bundle-Description>
<Bundle-Activator>org.wso2.carbon.device.mgt.mobile.impl.internal.MobileDeviceManagementBundleActivator</Bundle-Activator>
<Private-Package>org.wso2.carbon.device.mgt.mobile.impl.internal</Private-Package> <Private-Package>org.wso2.carbon.device.mgt.mobile.impl.internal</Private-Package>
<Import-Package> <Import-Package>
org.osgi.framework, org.osgi.framework,

@ -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.ios.IOSDeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManagerService; 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 androidServiceRegRef;
private ServiceRegistration iOSServiceRegRef; private ServiceRegistration iOSServiceRegRef;
private ServiceRegistration windowsServiceRegRef; private ServiceRegistration windowsServiceRegRef;

@ -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);\

@ -153,7 +153,7 @@
<includes> <includes>
<include>**/api-manager.xml</include> <include>**/api-manager.xml</include>
<include>**/sso-idp-config.xml</include> <include>**/sso-idp-config.xml</include>
<include>**/emm-config.xml</include> <!-- <include>**/emm-config.xml</include>-->
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
@ -170,6 +170,7 @@
<outputDirectory>wso2cdm-${project.version}/repository/conf/datasources</outputDirectory> <outputDirectory>wso2cdm-${project.version}/repository/conf/datasources</outputDirectory>
<includes> <includes>
<include>**/master-datasources.xml</include> <include>**/master-datasources.xml</include>
<include>**/cdm-datasources.xml</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
@ -358,6 +359,16 @@
<filtered>true</filtered> <filtered>true</filtered>
<fileMode>644</fileMode> <fileMode>644</fileMode>
</file> </file>
<!--cdm config file-->
<file>
<source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/cdm-config.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
<filtered>true</filtered>
<fileMode>644</fileMode>
</file>
<file> <file>
<source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading-environments.xml</source> <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading-environments.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory> <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>

@ -0,0 +1,28 @@
<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">
<providers>
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
</providers>
<datasources>
<datasource>
<name>WSO2DEVICE_DB</name>
<description>The datasource used for EMM</description>
<jndiConfig>
<name>jdbc/WSO2DEVICE_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:repository/database/WSO2DEVICE_DB;DB_CLOSE_ON_EXIT=FALSE</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
</datasources>
</datasources-configuration>

@ -107,7 +107,7 @@
<featureArtifactDef> <featureArtifactDef>
org.wso2.carbon:org.wso2.carbon.device.mgt.server.feature:${project.version} org.wso2.carbon:org.wso2.carbon.device.mgt.server.feature:${project.version}
</featureArtifactDef> </featureArtifactDef>
<featureArtifactDef> <featureArtifactDef>
org.wso2.carbon:org.wso2.carbon.device.mgt.mobile.feature:${project.version} org.wso2.carbon:org.wso2.carbon.device.mgt.mobile.feature:${project.version}
</featureArtifactDef> </featureArtifactDef>
<featureArtifactDef> <featureArtifactDef>
@ -164,7 +164,7 @@
<id>org.wso2.carbon.device.mgt.server.feature.group</id> <id>org.wso2.carbon.device.mgt.server.feature.group</id>
<version>${project.version}</version> <version>${project.version}</version>
</feature> </feature>
<feature> <feature>
<id>org.wso2.carbon.device.mgt.mobile.feature.group</id> <id>org.wso2.carbon.device.mgt.mobile.feature.group</id>
<version>${project.version}</version> <version>${project.version}</version>
</feature> </feature>

@ -34,7 +34,7 @@
<name>WSO2 Connected Device Manager (CDM) - Parent</name> <name>WSO2 Connected Device Manager (CDM) - Parent</name>
<modules> <modules>
<!--<module>modules/agents/android/jax-rs</module>--> <module>modules/agents/android/jax-rs</module>
<module>modules/p2-profile-gen</module> <module>modules/p2-profile-gen</module>
<module>modules/distribution</module> <module>modules/distribution</module>
<module>modules/integration</module> <module>modules/integration</module>

Loading…
Cancel
Save