From 30e32bfd81668c00123036700918d66581971a91 Mon Sep 17 00:00:00 2001 From: gleimar Date: Fri, 29 Apr 2016 20:50:41 +0000 Subject: [PATCH] =?UTF-8?q?refatora=C3=A7=C3=A3o=20fixes=20bug#7405?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@55421 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/web/utilerias/MyAppInit.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java index 0d18c9cca..6389cf571 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java @@ -54,15 +54,23 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit { public void init(WebApp wapp) throws Exception { Labels.register(new MyLabelLocatorGeneral((ServletContext) wapp.getNativeContext())); Labels.register(new MyLabelLocatorCliente((ServletContext) wapp.getNativeContext())); - - Constante constanteServidorException = getConstanteService().buscarPorNomeConstante("SERVIDOR_EXCEPCION_GENERACION_CORRIDA"); - String ipConstante = constanteServidorException == null ? "" : constanteServidorException.getValorconstante(); - if (!IPValidatorUtileria.ipExternoException(ipConstante)) { + + if (!ipBloqueadoGeracaoServico()) { // Generacion Automatica de Corridas jobGeneracionCorridas(); } } + private boolean ipBloqueadoGeracaoServico() { + Constante constanteServidorException = getConstanteService().buscarPorNomeConstante("SERVIDOR_EXCEPCION_GENERACION_CORRIDA"); + String ipConstante = constanteServidorException == null ? "" : constanteServidorException.getValorconstante(); + if (ipConstante.equals("")){ + return false; + } + + return (IPValidatorUtileria.ipExternoException(ipConstante)); + } + private Integer[] horaExecucion() { Constante constante = getConstanteService().buscarPorNomeConstante("HORA_GENERACION_CORRIDA");