|
|
@ -53,8 +53,8 @@ public abstract class AbstractCertificateDAOImpl implements CertificateDAO{
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
conn = this.getConnection();
|
|
|
|
conn = this.getConnection();
|
|
|
|
stmt = conn.prepareStatement(
|
|
|
|
stmt = conn.prepareStatement(
|
|
|
|
"INSERT INTO DM_DEVICE_CERTIFICATE (SERIAL_NUMBER, CERTIFICATE, TENANT_ID, USERNAME)"
|
|
|
|
"INSERT INTO DM_DEVICE_CERTIFICATE (SERIAL_NUMBER, CERTIFICATE, TENANT_ID, USERNAME, DEVICE_IDENTIFIER)"
|
|
|
|
+ " VALUES (?,?,?,?)");
|
|
|
|
+ " VALUES (?,?,?,?,?)");
|
|
|
|
PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext.
|
|
|
|
PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext.
|
|
|
|
getThreadLocalCarbonContext();
|
|
|
|
getThreadLocalCarbonContext();
|
|
|
|
String username = threadLocalCarbonContext.getUsername();
|
|
|
|
String username = threadLocalCarbonContext.getUsername();
|
|
|
@ -70,6 +70,7 @@ public abstract class AbstractCertificateDAOImpl implements CertificateDAO{
|
|
|
|
stmt.setBytes(2, bytes);
|
|
|
|
stmt.setBytes(2, bytes);
|
|
|
|
stmt.setInt(3, certificate.getTenantId());
|
|
|
|
stmt.setInt(3, certificate.getTenantId());
|
|
|
|
stmt.setString(4, username);
|
|
|
|
stmt.setString(4, username);
|
|
|
|
|
|
|
|
stmt.setString(5, certificate.getDeviceIdentifier());
|
|
|
|
stmt.addBatch();
|
|
|
|
stmt.addBatch();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stmt.executeBatch();
|
|
|
|
stmt.executeBatch();
|
|
|
|