rsanchez
2014-11-17 04f9a9d2dbd2d79bfffea9c5a6b7ba1b32c5f42b
securis/src/main/java/net/curisit/securis/services/LicenseResource.java
....@@ -358,11 +358,11 @@
358358 try {
359359 lic.setRequestData(JsonUtils.toJSON((RequestBean) signedLicense));
360360 if (BlockedRequest.isRequestBlocked(lic.getRequestData(), em)) {
361
- throw new SeCurisServiceException(ErrorCodes.BLOCKED_REQUEST_DATA, "Given request data is blocked and cannot be activate");
361
+ throw new SeCurisServiceException(ErrorCodes.BLOCKED_REQUEST_DATA, "Given request data is blocked and cannot be activated");
362362 }
363363 lic.setLicenseData(JsonUtils.toJSON(signedLicense));
364364 } catch (SeCurisException e) {
365
- LOG.error("Error generaing license JSON", e);
365
+ LOG.error("Error generating license JSON", e);
366366 throw new SeCurisServiceException(ErrorCodes.INVALID_FORMAT, "Error generating license JSON");
367367 }
368368 } else {
....@@ -371,11 +371,15 @@
371371 lic.setCreatedBy(createdBy);
372372 lic.setCreationTimestamp(new Date());
373373 lic.setModificationTimestamp(lic.getCreationTimestamp());
374
+ LOG.info("LICENSE: {}", lic);
374375 em.persist(lic);
376
+ LOG.info("LICENSE on HISTORY create");
375377 em.persist(licenseHelper.createLicenseHistoryAction(lic, createdBy, LicenseHistory.Actions.CREATE));
376378 if (lic.getStatus() == LicenseStatus.ACTIVE) {
379
+ LOG.info("LICENSE ACTIVATION on HISTORY create");
377380 em.persist(licenseHelper.createLicenseHistoryAction(lic, createdBy, LicenseHistory.Actions.CREATE, "Activated on creation"));
378381 }
382
+ LOG.info("LICENSE created oK ??");
379383
380384 return Response.ok(lic).build();
381385 }