mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fix windows enrollment issue
This commit is contained in:
parent
4226755991
commit
b04acfdf53
@ -16,7 +16,6 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
|
||||
|
||||
public WindowsTokenServiceImpl() {
|
||||
windowsEnrollmentTokenDAO = new WindowsEnrollmentTokenDAOImpl();
|
||||
WindowsDAOFactory windowsDAOFactory = new WindowsDAOFactory();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user