Skip to content

Commit

Permalink
BUG sulla chiusura dei remote iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Sep 22, 2016
1 parent 5c1ed3e commit c027a25
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -23,7 +23,7 @@
<java.version>1.8</java.version>
<opencmis.version>1.0.0</opencmis.version>
<spring.version>4.3.3.RELEASE</spring.version>
<jada.version>4.0.4</jada.version>
<jada.version>4.0.5</jada.version>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<sigla.build.number>${maven.build.timestamp}</sigla.build.number>
<slf4j.version>1.7.21</slf4j.version>
Expand Down
Expand Up @@ -91,7 +91,6 @@ public Forward doPredisponiPerLaFirma(ActionContext context) {
} finally {
bp.openIterator(context);
}
bp.openIterator(context);
return context.findDefaultForward();
} catch(Exception e) {
return handleException(context,e);
Expand All @@ -115,7 +114,6 @@ public Forward doEliminaPredisposizione(ActionContext context) {
} finally {
bp.openIterator(context);
}
bp.openIterator(context);
return context.findDefaultForward();
} catch(Exception e) {
return handleException(context,e);
Expand Down
Expand Up @@ -248,7 +248,6 @@ public void eliminaPredisposizione(ActionContext context) throws BusinessProcess
List<StatoTrasmissione> selectedElements = getSelectedElements(context);
if (selectedElements == null || selectedElements.isEmpty())
throw new ApplicationException("Selezionare almeno un elemento!");
EJBCommonServices.closeRemoteIterator(context, getIterator());
for (StatoTrasmissione v_mandato_reversaleBulk : selectedElements) {
aggiornaStato(context, MandatoBulk.STATO_TRASMISSIONE_NON_INSERITO, v_mandato_reversaleBulk);
}
Expand Down Expand Up @@ -366,13 +365,11 @@ public void sign(ActionContext actioncontext, FirmaOTPBulk firmaOTPBulk) throws
if (selectelElements == null || selectelElements.isEmpty()){
throw new ApplicationException("Selezionare almeno un documento contabile!");
}
EJBCommonServices.closeRemoteIterator(actioncontext, getIterator());
addSomethingToSelectedElements(actioncontext, selectelElements);
executeSign(actioncontext, selectelElements, firmaOTPBulk);
}

protected void executeSign(ActionContext actioncontext, List<StatoTrasmissione> selectelElements, FirmaOTPBulk firmaOTPBulk) throws Exception{
EJBCommonServices.closeRemoteIterator(actioncontext, getIterator());
String webScriptURL = documentiContabiliService.getRepositoyURL().concat("service/sigla/firma/doccont");
Map<String, String> subjectDN = documentiContabiliService.getCertSubjectDN(firmaOTPBulk.getUserName(), firmaOTPBulk.getPassword());
if (subjectDN == null)
Expand Down
Expand Up @@ -24,6 +24,7 @@
import it.cnr.contab.utenze00.bulk.UtenteBulk;
import it.cnr.contab.utenze00.bulk.UtenteFirmaDettaglioBulk;
import it.cnr.jada.action.ActionContext;
import it.cnr.jada.action.BusinessProcess;
import it.cnr.jada.action.BusinessProcessException;
import it.cnr.jada.action.Config;
import it.cnr.jada.action.HttpActionContext;
Expand Down Expand Up @@ -473,4 +474,17 @@ private Integer getLastPagePDF(InputStream stream) throws IOException {
document.close();
return lastPage;
}

@Override
protected void closed(ActionContext context)
throws BusinessProcessException {
try {
distintaCassiere1210LettereCollegate.closed(context);
distintaCassiere1210LettereDaCollegare.closed(context);
} catch (RemoteException e) {
throw handleException(e);
}
super.closed(context);
}

}
Expand Up @@ -1886,10 +1886,21 @@ public String getDocumentoFirmato() {
.concat(distinta.getCd_unita_organizzativa() == null ? ""
: distinta.getCd_unita_organizzativa())
.concat("-")
.concat(String.valueOf(distinta.getPg_distinta_def()))
.concat(String.valueOf(distinta.getPg_distinta_def()))
.concat("-I.xslt.p7m");
}
return null;
}

@Override
protected void closed(ActionContext context)
throws BusinessProcessException {
try {
distintaCassDet.closed(context);
distinteCassCollegateDet.closed(context);
} catch (RemoteException e) {
throw handleException(e);
}
super.closed(context);
}
}
Expand Up @@ -83,7 +83,6 @@ public void openIterator(ActionContext actioncontext)
}
@Override
protected void aggiornaStato(ActionContext actioncontext, String stato, StatoTrasmissione...bulks) throws ComponentException, RemoteException {
EJBCommonServices.closeRemoteIterator(actioncontext, getIterator());
for (StatoTrasmissione statoTrasmissione : bulks) {
Lettera_pagam_esteroBulk lettera = new Lettera_pagam_esteroBulk(statoTrasmissione.getCd_cds(),statoTrasmissione.getCd_unita_organizzativa(),
statoTrasmissione.getEsercizio(), statoTrasmissione.getPg_documento_cont());
Expand Down
Expand Up @@ -124,7 +124,6 @@ public void openIterator(ActionContext actioncontext)
}
@Override
protected void aggiornaStato(ActionContext actioncontext, String stato, StatoTrasmissione...bulks) throws ComponentException, RemoteException {
EJBCommonServices.closeRemoteIterator(actioncontext, getIterator());
DistintaCassiereComponentSession distintaCassiereComponentSession = Utility.createDistintaCassiereComponentSession();
for (StatoTrasmissione v_mandato_reversaleBulk : bulks) {
if (v_mandato_reversaleBulk.getCd_tipo_documento_cont().equalsIgnoreCase(Numerazione_doc_contBulk.TIPO_MAN)) {
Expand Down Expand Up @@ -171,7 +170,6 @@ public void predisponiPerLaFirma(ActionContext actioncontext) throws BusinessPro
throw new ApplicationException("Selezionare almeno un elemento!");
Format dateFormat = new SimpleDateFormat("yyyy/MM/dd");
String message = "";
EJBCommonServices.closeRemoteIterator(actioncontext, getIterator());
addSomethingToSelectedElements(actioncontext, selectedElements);
for (StatoTrasmissione statoTrasmissione : selectedElements) {
V_mandato_reversaleBulk v_mandato_reversaleBulk = (V_mandato_reversaleBulk)statoTrasmissione;
Expand Down
Expand Up @@ -2841,6 +2841,8 @@ public SQLBuilder selectDettagliFileCassiereByClause(
*/
public SQLBuilder selectDistintaCassiere1210LettereDaCollegareByClause(UserContext userContext, DistintaCassiere1210Bulk distinta, Class bulkClass, CompoundFindClause clauses) throws ComponentException {
SQLBuilder sql = getHome(userContext, Lettera_pagam_esteroBulk.class).createSQLBuilder();
if (clauses != null)
sql.addClause(clauses);
sql.addClause(FindClause.AND, "esercizio", SQLBuilder.EQUALS, CNRUserContext.getEsercizio(userContext));
sql.addClause(FindClause.AND, "stato_trasmissione", SQLBuilder.EQUALS, MandatoBulk.STATO_TRASMISSIONE_PRIMA_FIRMA);
sql.addClause(FindClause.AND, "distintaCassiere", SQLBuilder.ISNULL, null);
Expand All @@ -2858,6 +2860,8 @@ public SQLBuilder selectDistintaCassiere1210LettereDaCollegareByClause(UserConte
*/
public SQLBuilder selectDistintaCassiere1210LettereCollegateByClause(UserContext userContext, DistintaCassiere1210Bulk distinta, Class bulkClass, CompoundFindClause clauses) throws ComponentException {
SQLBuilder sql = getHome(userContext, Lettera_pagam_esteroBulk.class).createSQLBuilder();
if (clauses != null)
sql.addClause(clauses);
if (distinta.getEsercizio() == null)
sql.addClause(FindClause.AND, "esercizio", SQLBuilder.EQUALS, 0);
sql.addClause(FindClause.AND, "distintaCassiere", SQLBuilder.EQUALS, distinta);
Expand Down
Expand Up @@ -219,6 +219,7 @@ public it.cnr.jada.action.Forward doConfermaSelezioneMenu(it.cnr.jada.action.Act
it.cnr.contab.utenze00.bp.GestioneUtenteBP bp = (it.cnr.contab.utenze00.bp.GestioneUtenteBP)context.getBusinessProcess("/GestioneUtenteBP");
if (optionbp.getOption() == OptionBP.NO_BUTTON)
return context.findDefaultForward();
bp.closeAllChildren(context);
it.cnr.contab.config00.sto.bulk.Unita_organizzativaBulk uo = bp.getUserInfo().getUnita_organizzativa();
it.cnr.contab.utenze00.bulk.Albero_mainBulk nodo = getComponentSession().validaNodoPerUtente(context.getUserContext(),bp.getUserInfo().getUtente(),uo == null ? null : uo.getCd_unita_organizzativa(), (String)optionbp.getAttribute("cd_nodo"));
return startNodo(context,bp,nodo);
Expand Down

0 comments on commit c027a25

Please sign in to comment.