| .. | .. |
|---|
| 107 | 107 | LOG.info("Getting licenses list "); |
|---|
| 108 | 108 | |
|---|
| 109 | 109 | EntityManager em = emProvider.get(); |
|---|
| 110 | + em.clear(); |
|---|
| 110 | 111 | |
|---|
| 111 | 112 | if (!bsc.isUserInRole(BasicSecurityContext.ROL_ADMIN)) { |
|---|
| 112 | 113 | Pack pack = em.find(Pack.class, packId); |
|---|
| .. | .. |
|---|
| 141 | 142 | LOG.info("Getting organization data for id: {}: ", licId); |
|---|
| 142 | 143 | |
|---|
| 143 | 144 | EntityManager em = emProvider.get(); |
|---|
| 145 | + em.clear(); |
|---|
| 144 | 146 | License lic = getCurrentLicense(licId, bsc, em); |
|---|
| 145 | 147 | return Response.ok(lic).build(); |
|---|
| 146 | 148 | } |
|---|
| .. | .. |
|---|
| 156 | 158 | @Produces({ |
|---|
| 157 | 159 | MediaType.APPLICATION_OCTET_STREAM |
|---|
| 158 | 160 | }) |
|---|
| 161 | + @Transactional |
|---|
| 159 | 162 | public Response download(@PathParam("licId") Integer licId, @Context BasicSecurityContext bsc) throws SeCurisServiceException { |
|---|
| 160 | 163 | |
|---|
| 161 | 164 | EntityManager em = emProvider.get(); |
|---|