| .. | .. |
|---|
| 40 | 40 | import net.curisit.securis.services.exception.SeCurisServiceException; |
|---|
| 41 | 41 | import net.curisit.securis.services.exception.SeCurisServiceException.ErrorCodes; |
|---|
| 42 | 42 | import net.curisit.securis.services.helpers.LicenseHelper; |
|---|
| 43 | | -import net.curisit.securis.services.helpers.UserHelper; |
|---|
| 44 | 43 | import net.curisit.securis.utils.LicUtils; |
|---|
| 45 | 44 | import net.curisit.securis.utils.TokenHelper; |
|---|
| 46 | 45 | |
|---|
| .. | .. |
|---|
| 67 | 66 | Provider<EntityManager> emProvider; |
|---|
| 68 | 67 | |
|---|
| 69 | 68 | @Inject |
|---|
| 70 | | - private UserHelper userHelper; |
|---|
| 71 | | - |
|---|
| 72 | | - @Inject |
|---|
| 73 | 69 | private LicenseHelper licenseHelper; |
|---|
| 74 | 70 | |
|---|
| 75 | 71 | /** |
|---|
| .. | .. |
|---|
| 86 | 82 | LOG.info("Getting packs list "); |
|---|
| 87 | 83 | |
|---|
| 88 | 84 | EntityManager em = emProvider.get(); |
|---|
| 85 | + em.clear(); |
|---|
| 89 | 86 | |
|---|
| 90 | 87 | TypedQuery<Pack> q; |
|---|
| 91 | 88 | if (bsc.isUserInRole(BasicSecurityContext.ROL_ADMIN)) { |
|---|
| .. | .. |
|---|
| 127 | 124 | } |
|---|
| 128 | 125 | |
|---|
| 129 | 126 | EntityManager em = emProvider.get(); |
|---|
| 127 | + em.clear(); |
|---|
| 130 | 128 | Pack pack = em.find(Pack.class, packId); |
|---|
| 131 | 129 | if (pack == null) { |
|---|
| 132 | 130 | LOG.error("Pack with id {} not found in DB", packId); |
|---|