|
|
|
@ -77,6 +77,15 @@ public class WindowsDAOFactory extends AbstractMobileDeviceManagementDAOFactory
|
|
|
|
|
if (currentConnection.get() == null) {
|
|
|
|
|
Connection conn;
|
|
|
|
|
try {
|
|
|
|
|
if (dataSource == null) {
|
|
|
|
|
try {
|
|
|
|
|
String dataSourceName = "jdbc/MobileWindowsDM_DS";
|
|
|
|
|
Context ctx = new InitialContext();
|
|
|
|
|
dataSource = (DataSource) ctx.lookup(dataSourceName);
|
|
|
|
|
} catch (NamingException e) {
|
|
|
|
|
throw new MobileDeviceManagementDAOException("Error occurred while initializing datasource", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
conn = dataSource.getConnection();
|
|
|
|
|
currentConnection.set(conn);
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|