Issue-ID: APPC-1019
Change-Id: I738c4ad72c29f494488a3fe3657243927797e2b5
Signed-off-by: vidhyasree <sn141y@att.com>
*
* @return The encryption tool to be used
*/
*
* @return The encryption tool to be used
*/
- public static final EncryptionTool getInstance() {
+ public static final synchronized EncryptionTool getInstance() {
- synchronized (lock) {
- if (instance == null) {
- instance = new EncryptionTool();
- }
- }
+ instance = new EncryptionTool();
import java.util.UUID;
import static com.att.eelf.configuration.Configuration.*;
import java.util.UUID;
import static com.att.eelf.configuration.Configuration.*;
-import static com.att.eelf.configuration.Configuration.MDC_SERVICE_INSTANCE_ID;
-import static com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME;
/**
* This abstract class is base class for all Command tasks. All command task must inherit this class.
/**
* This abstract class is base class for all Command tasks. All command task must inherit this class.
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
+import java.util.TimeZone;
import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID;
import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN;
import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID;
import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN;
}
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.STATE, record.getRequestState());
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.RESULT_CODE,
}
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.STATE, record.getRequestState());
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.RESULT_CODE,
- String.valueOf(record.getResultCode()));
+ String.valueOf(record.getResultCode()));
if (RequestStatus.valueOf(record.getRequestState()).isTerminal()) {
if (RequestStatus.valueOf(record.getRequestState()).isTerminal()) {
- Date endTime = new Date(System.currentTimeMillis());
+ Date endTime = new Date();
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.END_TIME,
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.END_TIME,
- dateToStringConverterMillis(endTime));
+ dateToStringConverterMillis(endTime));
}
try {
transactionRecorder.update(record.getTransactionId(), updateColumns);
}
try {
transactionRecorder.update(record.getTransactionId(), updateColumns);
public static String dateToStringConverterMillis(Date date) {
SimpleDateFormat customDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
public static String dateToStringConverterMillis(Date date) {
SimpleDateFormat customDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+ customDate.setTimeZone(TimeZone.getTimeZone("UTC"));
if (date != null) {
return customDate.format(date);
}
if (date != null) {
return customDate.format(date);
}