{"action":"opened","issue":{"url":"https://api.github.com/repos/GovernIB/rolsac/issues/302","repository_url":"https://api.github.com/repos/GovernIB/rolsac","labels_url":"https://api.github.com/repos/GovernIB/rolsac/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/GovernIB/rolsac/issues/302/comments","events_url":"https://api.github.com/repos/GovernIB/rolsac/issues/302/events","html_url":"https://github.com/GovernIB/rolsac/issues/302","id":138471395,"number":302,"title":"treure lògica de negoci en FitxaInfBackController.guardarFicha()","user":{"login":"kitanibaladmin","id":14330416,"avatar_url":"https://avatars.githubusercontent.com/u/14330416?v=3","gravatar_id":"","url":"https://api.github.com/users/kitanibaladmin","html_url":"https://github.com/kitanibaladmin","followers_url":"https://api.github.com/users/kitanibaladmin/followers","following_url":"https://api.github.com/users/kitanibaladmin/following{/other_user}","gists_url":"https://api.github.com/users/kitanibaladmin/gists{/gist_id}","starred_url":"https://api.github.com/users/kitanibaladmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitanibaladmin/subscriptions","organizations_url":"https://api.github.com/users/kitanibaladmin/orgs","repos_url":"https://api.github.com/users/kitanibaladmin/repos","events_url":"https://api.github.com/users/kitanibaladmin/events{/privacy}","received_events_url":"https://api.github.com/users/kitanibaladmin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GovernIB/rolsac/milestones/4","html_url":"https://github.com/GovernIB/rolsac/milestones/1.3","labels_url":"https://api.github.com/repos/GovernIB/rolsac/milestones/4/labels","id":1621664,"number":4,"title":"1.3","description":"","creator":{"login":"kitanibaladmin","id":14330416,"avatar_url":"https://avatars.githubusercontent.com/u/14330416?v=3","gravatar_id":"","url":"https://api.github.com/users/kitanibaladmin","html_url":"https://github.com/kitanibaladmin","followers_url":"https://api.github.com/users/kitanibaladmin/followers","following_url":"https://api.github.com/users/kitanibaladmin/following{/other_user}","gists_url":"https://api.github.com/users/kitanibaladmin/gists{/gist_id}","starred_url":"https://api.github.com/users/kitanibaladmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitanibaladmin/subscriptions","organizations_url":"https://api.github.com/users/kitanibaladmin/orgs","repos_url":"https://api.github.com/users/kitanibaladmin/repos","events_url":"https://api.github.com/users/kitanibaladmin/events{/privacy}","received_events_url":"https://api.github.com/users/kitanibaladmin/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":62,"state":"open","created_at":"2016-03-04T07:01:05Z","updated_at":"2016-03-04T13:03:37Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-03-04T13:03:37Z","updated_at":"2016-03-04T13:03:37Z","closed_at":null,"body":"Numero: 101\nCreació: 2011-11-02 09:06:31.000\n*Originally created by:* ejaen\n\nS'observa que el mètode guardarFicha\\(\\) d'aquest controlador realitza les següents actualizacions sobre base de dades:\r\n\r\n&nbps;&nbps; grabarFicha \\+ borrarFichaUA \\+ crearFichaUA \\+ grabarEnlace \\+ borrarEnlace\r\n\r\n\r\nPerò, en la meva opinió, no s'ha tingut en compte que el conjunt d'aquestes actualizacions ha de ser transaccional, i que per tant s'ha de posar en un EJB de negoci, i no en el controlador\\.\r\n\r\n\r\n\r\n\n---- additional_information ----\nCrec, per altre banda, que seria bó definir una capa de servei per sobre dels FacadeEJB, doncs ara \\(per un mal disseny en la meva opinió\\) els FacadeEJB aglutinen logica de negoci \\(grabar\\), lògica d'aplicació \\(notificar al portal informador\\) i de persistència \\(grabar amb hibernate\\)\\.\r\n"}}