rsanchez
2014-12-12 4c13c7324a920f5cca9601154e5224e5d7484fa9
securis/src/main/java/net/curisit/securis/services/LicenseResource.java
....@@ -107,6 +107,7 @@
107107 LOG.info("Getting licenses list ");
108108
109109 EntityManager em = emProvider.get();
110
+ em.clear();
110111
111112 if (!bsc.isUserInRole(BasicSecurityContext.ROL_ADMIN)) {
112113 Pack pack = em.find(Pack.class, packId);
....@@ -141,6 +142,7 @@
141142 LOG.info("Getting organization data for id: {}: ", licId);
142143
143144 EntityManager em = emProvider.get();
145
+ em.clear();
144146 License lic = getCurrentLicense(licId, bsc, em);
145147 return Response.ok(lic).build();
146148 }
....@@ -156,6 +158,7 @@
156158 @Produces({
157159 MediaType.APPLICATION_OCTET_STREAM
158160 })
161
+ @Transactional
159162 public Response download(@PathParam("licId") Integer licId, @Context BasicSecurityContext bsc) throws SeCurisServiceException {
160163
161164 EntityManager em = emProvider.get();