Move IOS plugin to ios proprietary repo

revert-dabc3590
manoj 10 years ago
parent c070c0c599
commit e3f3753e7e

@ -63,7 +63,7 @@ public abstract class MobileDeviceManagementDAOFactory implements MobileDeviceMa
* @param config Mobile data source configuration
* @return data source resolved from the data source definition
*/
protected static DataSource resolveDataSource(MobileDataSourceConfig config) {
public static DataSource resolveDataSource(MobileDataSourceConfig config) {
DataSource dataSource = null;
if (config == null) {
throw new RuntimeException("Device Management Repository data source configuration " +
@ -111,7 +111,7 @@ public abstract class MobileDeviceManagementDAOFactory implements MobileDeviceMa
private static void assertDataSourceInitialization() {
if (!isInitialized) {
throw new DataSourceNotAvailableException("Mobile device management metadata repository datasource " +
throw new DataSourceNotAvailableException("Mobile device management metadata repository data source " +
"is not initialized");
}
}
@ -178,7 +178,7 @@ public abstract class MobileDeviceManagementDAOFactory implements MobileDeviceMa
}
}
} catch (SQLException e) {
throw new MobileDeviceManagementDAOException("Error occurred while rollbacking the transaction", e);
throw new MobileDeviceManagementDAOException("Error occurred while rollback the transaction", e);
} finally {
closeConnection();
}

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.mobile.impl.android.dao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig;
import org.wso2.carbon.device.mgt.mobile.dao.*;
import org.wso2.carbon.device.mgt.mobile.impl.android.dao.impl.AndroidDeviceDAOImpl;
@ -33,8 +34,9 @@ public class AndroidDAOFactory extends MobileDeviceManagementDAOFactory
private static final Log log = LogFactory.getLog(AndroidDAOFactory.class);
private static DataSource dataSource;
public static void init(MobileDataSourceConfig config) {
dataSource = resolveDataSource(config);
public static void init() {
dataSource = MobileDeviceManagementDAOFactory.getDataSource(DeviceManagementConstants.MobileDeviceTypes.
MOBILE_DEVICE_TYPE_ANDROID);
}
@Override

@ -24,7 +24,6 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService;
import org.wso2.carbon.device.mgt.mobile.common.MobileDeviceMgtPluginException;
import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager;
@ -76,10 +75,9 @@ public class MobileDeviceManagementServiceComponent {
Map<String, MobileDataSourceConfig> dsConfigMap =
config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap();
MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap);
MobileDeviceManagementDAOFactory.init();
AndroidDAOFactory
.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
MOBILE_DEVICE_TYPE_ANDROID));
AndroidDAOFactory.init();
String setupOption = System.getProperty("setup");
if (setupOption != null) {
@ -89,8 +87,7 @@ public class MobileDeviceManagementServiceComponent {
"to begin");
}
try {
Map<String, DataSource> dataSourceMap = MobileDeviceManagementDAOFactory.
getDataSourceMap();
Map<String, DataSource> dataSourceMap = MobileDeviceManagementDAOFactory.getDataSourceMap();
for (DataSource dataSource : dataSourceMap.values()) {
MobileDeviceManagementDAOUtil
.setupMobileDeviceManagementSchema(dataSource);

@ -20,11 +20,6 @@
<MobileDeviceMgtConfiguration>
<ManagementRepository>
<DataSourceConfigurations>
<DataSourceConfiguration type="ios">
<JndiLookupDefinition>
<Name>jdbc/MobileIOSDM_DS</Name>
</JndiLookupDefinition>
</DataSourceConfiguration>
<DataSourceConfiguration type="android">
<JndiLookupDefinition>
<Name>jdbc/MobileAndroidDM_DS</Name>

Loading…
Cancel
Save