Páginas filhas
  • Instalação do Servidor - Server (JBoss EAP 6.3.0.GA)

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Introdução

O TOTVS Intellector é uma solução para a gestão de processos decisórios, fornecendo uma interação fácil através de uma linguagem simples e prática. Este manual descreve passo-a-passo o processo de instalação do servidor TOTVS Intellector para o JBoss Enterprise Application Server versão 6.3.0.GA.

  • Para o manual de instalação no JBoss 4.2.3. clique aqui.Para o manual de instalação no JBoss 7.1.1. clique aqui.

...

Para quem se destina o manual

O público alvo para este manual são administradores de sistemas e application servers, e que tenha bom conhecimento de JBoss e JVM.

 

O que é necessário para entender esse manual

Este manual assume que os administradores tem familiaridade com os conceitos de administração e deployment do JBoss, Linux ou Windows e Sun JDK.

 

Pré-requisitos

Como um primeiro passo, verifique e tenha certeza de qual versão do TOTVS Intellector você deseja instalar ou atualizar. Baseado na versão, você pode determinar a compatibilidade apropriada das versões de JBoss, Linux (veja as versões abaixo) ou Windows, e Java Oracle JDK.

  • Red Hat Enterprise versões 56.x (TikangaSantiago) e 67.x (SantiagoMaipo) 64 bits;
  • Cent OS versões 67.x 64 bits;
  • Ubuntu Server versão 14.04 LTS 64 bits.
JDK 1.7

Instale a Sun JDK 1.7 64bits apropriada para sua plataforma. As bibliotecas JDK estão disponíveis no seguinte site: http://java.sun.com/javase/downloads/index.jsp

...

Não se esqueça de configurar JAVA_HOME no seu ambiente, mas, forneceremos um bootstrap para o TOTVS Intellector onde essa variável é configurada.  É necessário realizar essa configuração e caso necessite poderá ser colocada em outro lugar. Embora a localização da instalação da JDK seja livre, sugerimos criar uma pasta "<drive>:\opt" no Windows ou usar o "/opt" no Unix, isso ajuda para propósitos de suporte. Instalando em sistemas Unix, tenha bastante cuidado com as permissões de escrita para owner/group para o diretório do JBoss, pois o TOTVS Intellector irá precisar "escrever" nesse diretório.

 

 JBoss

O TOTVS Intellector foi homologado nas versões JBoss 4.2.3-GA, JBoss 7.1.1 e JBoss EAP 6.3.0.GA. Você pode fazer o download do JBoss para qualquer plataforma nos seguintes sites:

 

Este é um bom lugar para tirar dúvidas e procurar dicas sobre o JBoss: http://wiki.jboss.org/ .

 

Instalando a versão EAP 6.3.0.GA

Após instalar o Java JDK e o JBoss nos locais apropriados, é necessário realizar um teste de verificação da instalação, subindo o JBoss ($JBOSS_HOME/bin/standalone.sh ou standalone.bat no Windows). Para verificar a instalação, deverá clicar na url  http://localhost:9990/console  de administração do application server. Se a console pedir autenticação, siga esse artigo para criar usuários que podem ter acesso ao container.

...

Conheça mais sobre JBoss Enterprise Application Platform.

 

Bootstrap para JBoss e TOTVS Intellector

Os scripts de bootstrap para o TOTVS Intellector são simples, precisando apenas de pequenas modificações no que concerne a utilização de memória e variáveis de ambientes. Usar o nome run-intellector.sh no Linux/Unix e run-intellector.bat no Windows e, deve ficar em $JBOSS_HOME/bin com permissão explícita de execução (básico para os linuxers).

...

  • Não use a variável de ambiente -Duser.dir=seu_dir, pois isso impede o TOTVS Intellector de compilar as políticas.

 

Linux

  • Por questões de segurança em ambiente Linux NÃO pode ser usado o usuário root para executar o script de "startup" do JBoss. É indicada a criação de um usuário normal para executar o script.

 

Linux

Bloco de código
languagejava
linenumbers
Bloco de código
languagejava
linenumberstrue
#!/bin/bash
# exporta variaveis de ambiente necessarias
export JAVA_OPTS="-XX:+TieredCompilation -Dprogram.name=standalone.sh -Xms512M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Duser.server.node=mynode -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone-full.xml -Dfile.encoding=ISO-8859-1 -Dpersistence.configuration=$JBOSS_HOME/bin/persistence.properties"

# remove indicativo de erros no deployment
rm -fv /opt/jboss-eap6/standalone/deployments/*.failed
# atualize com seu IP
./standalone.sh -Djboss.bind.address.management=<IP_MAQUINA> -b <IP_MAQUINA>

...

  • Considerando intellector.datadir=/home/intellector como diretório raiz:
    1. /home/intellector/acessos -  diretório de instalação dos plugins de acesso; o TOTVS Intellector cria uma pasta para cada acesso;
    2. /home/intellector/key -  diretório para as licenças do TOTVS Intellector;
    3. /home/intellector/dados -  diretório raiz para persistência de cadastros (usuários, perfis, plugins, auditorias, etc.)
    4. /home/intellector/dados/person -  persistência de usuários cadastrados
    5. /home/intellector/dados/audit -  persistência de auditoria de execução de políticas (intellector.auditpolicy=true/false)
    6. /home/intellector/dados/plugin - persistências dos dados dos plugins instalados
    7. /home/intellector/dados/layouts - persistências de todos os layouts das políticas
    8. /home/intellector/dados/policy - persistências de todos as políticas enviadas do servidor
    9. /home/intellector/politicas - onde serão mantidas as classes das políticas compiladas
    10. /home/intellector/politicas/classes
    11. /home/intellector/politicas/classes/br
    12. /home/intellector/politicas/classes/br/com
    13. /home/intellector/politicas/classes/br/com/tools
    14. /home/intellector/politicas/classes/br/com/tools/politicas
    15. /home/intellector/tarifacao - pasta para os arquivos de Tarifação
 
Configurações do Application Server para o TOTVS Intellector

As seguintes configurações devem ser efetuadas no Appllication Server para que o TOTVS Intellector funcione corretamente.

...

 

Bloco de código
languagehtml/xml
linenumberstrue
<jms-destinations> destinations> 
 
      ....... 
 
      <!-- Acrescentar à lista de filas que já existam as filas do Intellector -->
    <jms-queue name="intellectorQueue"> 
    <entry name="queue/intellector"/> 
    <entry name="java:jboss/exported/jms/queue/intellector"/> 
    </jms-queue> 
    <jms-topic name="intellectorTopic"> 
    <entry name="topic/intellector"/> 
    <entry name="java:jboss/exported/jms/topic/intellector"/> 
    </jms-topic> 
</jms

      ....... 



</jms-destinations> 

 

  • Adicionar duas extensões no arquivo $JBOSS_HOME/standalone/standalone-full.xml. 

    Bloco de código
    languagexml
    title$JBOSS_HOME\\standalone\\standalone-full.xml
    ...
    <extensions>
        <extension module="org.jboss.as.configadmin"/>
        <extension module="org.jboss.as.osgi"/>
        ...
    </extensions>
    
    
<extension module="org.jboss.as.configadmin"/>
<extension module="org.jboss.as.osgi"/>

 

Módulos Globais - EE Subsystem - Global Modules

Adicionar módulos globais

    • org.apache.commons.collections

    • org.apache.commons.codec
    • org.apache.commons.io

    • org.apache.commons.beanutils

    • org.apache.xerces

    • org.apache.santuario.xmlsec

    • org.apache.commons.lang

 

Módulos a serem alterados e criados

Criar módulo e registrar os drivers de banco. Como exemplo usaremos a criação de um módulo com o driver para Postgres.

    • Definições: 
      • Assumimos que o driver usado é a versão 9.3: postgresql-9.3-1103.jdbc4.jar. 
      • Será usado o método de deploy do driver diretamente no diretório de módulos do JBoss. 
    • Passos:
      • Crie o caminho $JBOSS_HOME\modules\system\layers\base\org\postgresql\main. Parte do caminho já deve existir, portanto basta criar o restante.
      • Crie um arquivo com o nome $JBOSS_HOME\modules\system\layers\base\org\postgresql\main\module.xml com o conteúdo abaixo. Repare que o conteúdo do atributo "path" refere-se ao nome do jar do driver que será usado.  

 

Bloco de código
languagexml
titleGlobal Modules
...
        <subsystem xmlns="urn:jboss:domain:ee:1.2">
            <global-modules>
                <module name="org.apache.commons.collections" slot="main"/>
				<module name="org.apache.commons.codec" slot="main"/>
       
Bloco de código
languagexml
titleExemplo de criação de módulo para registrar o driver PostgreSQL JDBC.
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.postgresql">
     <resources>
         <resource-root<module pathname="postgresql-9.3-1103.jdbc4.jarorg.apache.commons.io" slot="main"/>
     </resources>
     <dependencies>
         <module name="javax.apiorg.apache.commons.beanutils" slot="main"/>
         <module name="javax.transaction.api"/>
         <module name="javaxorg.servletapache.apixerces" optionalslot="truemain"/>
      </dependencies>
 </module>

 

    • Coloque o arquivo postgresql-9.3-1103.jdbc4.jar no mesmo diretório que o arquivo module.xml. Após esse procedimento o driver já pode ser utilizado para configurar uma conexão JNDI no arquivo standalone-full.xml ou no arquivo de configuração usado pela instância.

Spring Framework - versão 3.0.7.RELEASE

          <module name="org.apache.santuario.xmlsec" slot="main"/>
                <module name="org.apache.commons.lang" slot="main"/>
            </global-modules>
			...
        </subsystem>
...

 

Módulos a serem alterados e criados

Criar módulo e registrar os drivers de banco. Como exemplo usaremos a criação de um módulo com o driver para Postgres.

    • Definições: 
      • Assumimos que o driver usado é a versão 9.3: postgresql-9.3-1103.jdbc4.jar. 
      • Será usado o método de deploy do driver diretamente no diretório de módulos do JBoss. 
    • Passos:
      • Crie o caminho $JBOSS_HOME\modules\system\layers\base\org\postgresql\main. Parte do caminho já deve existir, portanto basta criar o restante.
      • Crie um arquivo com o nome $JBOSS_HOME\modules\system\layers\base\org\postgresql\main\module.xml com o conteúdo abaixo. Repare que o conteúdo do atributo "path" refere-se ao nome do jar do driver que será usado.  

 

Bloco de código
languagexml
titleExemplo de criação de módulo para registrar o driver PostgreSQL JDBC.

 

Bloco de código
languagexml
title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\springframework\\spring\\main\\module.xml
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2011, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->
<module xmlns="urn:jboss:module:1.1" name="org.springframework.spring">
    <resources>
    <resource-root path="spring-aop-3.0.7.RELEASE.jar"/>
    <resource-root path="spring-asm-3.0.7.RELEASE.jar"/>
    <resource-root path="spring-beans-3.0.7.RELEASE.jar"/>
	<resource-root path="spring-context-3.0.7.RELEASE.jar"/>
	<resource-root path="spring-core-3.0.7.RELEASE.jar"/>
    <resource-root path="spring-expression-3.0.7.RELEASE.jar"/>
	<resource-root path="spring-jms-3.0.7.RELEASE.jar"/>
	<resource-root path="spring-tx-3.0.7.RELEASE.jar"/>
	<resource-root path="spring-web-3.0.7.RELEASE.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api" />
        <module name="javax.jms.api" />
        <module name="javax.annotation.api" />
        <module name="org.apache.commons.logging" />
        <module name="org.jboss.vfs" />
    </dependencies>
</module>

<module xmlns="urn:jboss:module:1.1" name="org.postgresql">
     <resources>
         <resource-root path="postgresql-9.3-1103.jdbc4.jar"/>
     </resources>
     <dependencies>
         <module name="javax.api"/>
         <module name="javax.transaction.api"/>
         <module name="javax.servlet.api" optional="true"/>
     </dependencies>
 </module>

 

    • Coloque o arquivo postgresql-9.3-1103.jdbc4.jar no mesmo diretório que o arquivo module.xml. Após esse procedimento o driver já pode ser utilizado para configurar uma conexão JNDI no arquivo standalone-full.xml ou no arquivo de configuração usado pela instância.


Spring Framework - versão 4.0.5.RELEASE

 

Bloco de código
languagexml
title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\springframework\\spring\\main\\module.xml
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2011, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->
<module xmlns="urn:jboss:module:1.1" name="org.springframework.spring">
    <resources>
    <resource-root path="spring-jms-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-web-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-tx-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-context-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-aop-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-expression-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-beans-4.0.5.RELEASE.jar"/>
    <resource-root path="spring-core-4.0.5.RELEASE.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api" />
        <module name="javax.jms.api" />
        <module name="javax.annotation.api" />
        <module name="org.apache.commons.logging" />
        <module name="org.jboss.vfs" />
    </dependencies>
</module>

 

jTDS JDBC Driver -  MSSQL Server

    • Criar módulo $JBOSS_HOME\modules\system\layers\base\net\sourceforge\jtds\main.
    • Baixar o jar jtds-1.2.7jar e colocar no diretório criado no item anterior.
    • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:
Bloco de código
languagexml
title$JBOSS_HOME\\modules\\system\\layers\\base\\net\\sourceforge\\jtds\\main\\module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="net.sourceforge.jtds">
  <resources>
    <resource-root path="jtds-1.2.7
 

jTDS JDBC Driver -  MSSQL Server

    • Criar módulo $JBOSS_HOME\modules\system\layers\base\net\sourceforge\jtds\main.
    • Baixar o jar jtds-1.2.7jar e colocar no diretório criado no item anterior.
    • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:
Bloco de código
languagexml
title$JBOSS_HOME\\modules\\system\\layers\\base\\net\\sourceforge\\jtds\\main\\module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="net.sourceforge.jtds">
  <resources>
    <resource-root path="jtds-1.2.7.jar"/>
        <!-- Insert resources here -->
  </resources>
  <dependencies>
    <module name="javax.api"/>
    <module name="javax.transaction.api"/>
  </dependencies>
</module>

 

Simple API For CSS

  • Criar módulo $JBOSS_HOME\modules\system\layers\base\org\w3c\css\sac\main.
  • Baixar o jar sac-1.3.jar e colocar no diretório criado no item anterior.
  • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:

    Bloco de código
    languagexml
    title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\w3c\\css\\sac\\main\\module.xml
    <?xml version="1.0" encoding="UTF-8"?> <!-- ~ JBoss, Home of Professional Open Source. ~ Copyright 2011, Red Hat, Inc., and individual contributors ~ as indicated by the @author tags. See the copyright.txt file in the ~ distribution for a full listing of individual contributors. ~ ~ This is free software; you can redistribute it and/or modify it ~ under the terms of the GNU Lesser General Public License as ~ published by the Free Software Foundation; either version 2.1 of ~ the License, or (at your option) any later version. ~ ~ This software is distributed in the hope that it will be useful, ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~ Lesser General Public License for more details. ~ ~ You should have received a copy of the GNU Lesser General Public ~ License along with this software; if not, write to the Free ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. --> <module xmlns="urn:jboss:module:1.1" name="org.w3c.css.sac"> <properties> <property name="jboss.api" value="private"/> </properties> <resources> <resource-root path="sac-1.3
    .jar"/>
            <!-- Insert resources here -->
      
    </resources>
    
    
      <dependencies>
    
        
    <module name="
    net
    javax.
    sourceforge.cssparser
    api"/>
        <module name="javax.transaction.api"/>
      </dependencies>
    </module>

    CXF 2.6.4

     

    Simple API For CSS

      • Criar módulo Remover o conteúdo do diretório $JBOSS_HOME\modules\system\layers\base\org\apachew3c\cxfcss\implsac\main.
      • Baixar os jars da lista a seguir e o jar sac-1.3.jar e colocar no diretório criado no item anterior.
      • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:

        Bloco de código
        languagexml
        title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\w3c\\css\\sac\\main\\module.xml
        <?xml version="1.0" encoding="UTF-8"?>
        
        <!--
          ~ JBoss, Home of Professional Open Source.
          ~ Copyright 2011, Red Hat, Inc., and individual contributors
          ~ as indicated by the @author tags. See the copyright.txt file in the
          ~ distribution for a full listing of individual contributors.
          ~
          ~ This is free software; you can redistribute it and/or modify it
          ~ under the terms of the GNU Lesser General Public License as
          ~ published by the Free Software Foundation; either version 2.1 of
          ~ the License, or (at your option) any later version.
          ~
          ~ This software is distributed in the hope that it will be useful,
          ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
          ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
          ~ Lesser General Public License for more details.
          ~
          ~ You should have received a copy of the GNU Lesser General Public
          ~ License along with this software; if not, write to the Free
          ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
          ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
          -->
        
        <module xmlns="urn:jboss:module:1.1" name="org.w3c.css.sac">
        
            <properties>
                <property name="jboss.api" value="private"/>
            </properties>
        
            <resources>
                <resource-root path="sac-1.3.jar"/>
                <!-- Insert resources here -->
            </resources>
        
            <dependencies>
                <module name="net.sourceforge.cssparser"/>
            </dependencies>
        </module>

    CXF 2.6.4

      • Remover o conteúdo do diretório $JBOSS_HOME\modules\system\layers\base\org\apache\cxf\impl\main.
      • Baixar os jars da lista a seguir e colocar no diretório criado no item anterior

      • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:

        Bloco de código
        languagexml
        title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\apache\\cxf\\impl\\main\\module.xml
         <?xml version="1.0" encoding="UTF-8"?>
        <!--
          ~ JBoss, Home of Professional Open Source.
          ~ Copyright 2012, Red Hat, Inc., and individual contributors
          ~ as indicated by the @author tags. See the copyright.txt file in the
          ~ distribution for a full listing of individual contributors.
          ~
          ~ This is free software; you can redistribute it and/or modify it
          ~ under the terms of the GNU Lesser General Public License as
          ~ published by the Free Software Foundation; either version 2.1 of
          ~ the License, or (at your option) any later version.
          ~
          ~ This software is distributed in the hope that it will be useful,
          ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
          ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
          ~ Lesser General Public License for more details.
          ~
          ~ You should have received a copy of the GNU Lesser General Public
          ~ License along with this software; if not, write to the Free
          ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
          ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
          -->
        <module xmlns="urn:jboss:module:1.1" name="org.apache.cxf.impl">
            <properties>
                <property name="jboss.api" value="private"/>
            </properties>
            <resources>
                <resource-root path="cxf-rt-bindings-coloc-2.6.4.jar"/>
                <resource-root path="cxf-rt-bindings-object-2.6.4.jar"/>
                <resource-root path="cxf-rt-bindings-soap-2.6.4.jar"/>
                <resource-root path="cxf-rt-bindings-xml-2.6.4.jar"/>
                <resource-root path="cxf-rt-core-2.6.4.jar"/>
                <resource-root path="cxf-rt-databinding-aegis-2.6.4.jar"/>
                <resource-root path="cxf-rt-databinding-jaxb-2.6.4.jar"/>
                <resource-root path="cxf-rt-frontend-jaxws-2.6.4.jar"/>
                <resource-root path="cxf-rt-frontend-simple-2.6.4.jar"/>
                <resource-root path="cxf-rt-management-2.6.4.jar"/>
                <resource-root path="cxf-rt-transports-http-2.6.4.jar"/>
                <resource-root path="cxf-rt-transports-jms-2.6.4.jar"/>
                <resource-root path="cxf-rt-transports-local-2.6.4.jar"/>
                <resource-root path="cxf-rt-ws-addr-2.6.4.jar"/>
                <resource-root path="cxf-rt-ws-mex-2.6.4.jar"/>
                <resource-root path="cxf-rt-ws-policy-2.6.4.jar"/>
                <resource-root path="cxf-rt-ws-rm-2.6.4.jar"/>
                <resource-root path="cxf-rt-ws-security-2.6.4.jar"/>
                <resource-root path="cxf-services-sts-core-2.6.4.jar"/>
                <resource-root path="cxf-tools-common-2.6.4.jar"/>
                <resource-root path="cxf-tools-java2ws-2.6.4.jar"/>
                <resource-root path="cxf-tools-validator-2.6.4.jar"/>
                <resource-root path="cxf-tools-wsdlto-core-2.6.4.jar"/>
                <resource-root path="cxf-tools-wsdlto-databinding-jaxb-2.6.4.jar"/>
                <resource-root path="cxf-tools-wsdlto-frontend-jaxws-2.6.4.jar"/>
                <resource-root path="cxf-xjc-boolean-2.6.1.jar"/>
                <resource-root path="cxf-xjc-dv-2.6.1.jar"/>
                <resource-root path="cxf-xjc-ts-2.6.1.jar"/>
            </resources>
            <dependencies>
                <module name="asm.asm" />
                <module name="javax.api" />
                <module name="javax.annotation.api" />
                <module name="javax.jms.api" />
                <module name="javax.jws.api" />
                <module name="javax.mail.api" />
                <module name="javax.resource.api" />
                <module name="javax.servlet.api" />
                <module name="javax.wsdl4j.api" />
                <module name="javax.xml.bind.api" services="import"/>
                <module name="com.sun.xml.bind" services="import"/>
                <module name="javax.xml.soap.api" />
                <module name="javax.xml.stream.api" />
                <module name="javax.xml.ws.api" />
                <module name="org.apache.commons.lang" />
                <module name="org.apache.neethi" />
                <module name="org.apache.velocity" />
                <module name="org.apache.xml-resolver" />
                <module name="org.apache.ws.xmlschema" />
                <module name="org.apache.ws.security" />
                <module name="org.apache.santuario.xmlsec" />
                <module name="org.joda.time" />
                <module name="org.opensaml" />
                <module name="org.springframework.spring" optional="true"/> 
                <module name="org.apache.cxf" export="true"/> 
            </dependencies>
        </module>

     

    Hibernate 2.6.4 - NÃO  PRECISA -AINDA EM ANÁLISE

      • Remover o diretório $JBOSS_HOME\modules\system\layers\base\org\hibernate\commons-annotations.
      • Remover o conteúdo do diretório $JBOSS_HOME\modules\system\layers\base\org\hibernate\envers\main.
        • Baixar o jar hibernate-envers-4.0.1.Final e colocar no diretório criado no item anterior.

        • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:
    Bloco de código
    languagexml
    title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\hibernate\\envers\\main\\module.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
      ~ JBoss, Home of Professional Open Source.
      ~ Copyright 2011, Red Hat, Inc., and individual contributors
      ~ as indicated by the @author tags. See the copyright.txt file in the
      ~ distribution for a full listing of individual contributors.
      ~
      ~ This is free software; you can redistribute it and/or modify it
      ~ under the terms of the GNU Lesser General Public License as
      ~ published by the Free Software Foundation; either version 2.1 of
      ~ the License, or (at your option) any later version.
      ~
      ~ This software is distributed in the hope that it will be useful,
      ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
      ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
      ~ Lesser General Public License for more details.
      ~
      ~ You should have received a copy of the GNU Lesser General Public
      ~ License along with this software; if not, write to the Free
      ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
      ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
      -->
    <module xmlns="urn:jboss:module:1.1" name="org.hibernate.envers">
        <resources>
            <resource-root path="hibernate-envers-4.0.1.Final.jar"/>
            <!-- Insert resources here -->
        </resources>
        <dependencies>
            <module name="org.hibernate"/>
            <module name="org.jboss.logging"/>
            <module name="org.dom4j"/>
            <module name="javax.api"/>
            <module name="javax.persistence.api"/>
            <module name="javax.transaction.api"/>
            <module name="org.javassist"/>
        </dependencies>
    </module>

     

     

      • Bloco de código
        languagexml
        title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\apache\\cxf\\
    hibernate
      • impl\\main\\module.xml
    <
      •  <?xml version="1.0" encoding="UTF-8"?>
        <!--
          ~ JBoss, Home of Professional Open Source.
          ~ Copyright 
    2011
      • 2012, Red Hat, Inc., and individual contributors
          ~ as indicated by the @author tags. See the copyright.txt file in the
          ~ distribution for a full listing of individual contributors.
          ~
          ~ This is free software; you can redistribute it and/or modify it
          ~ under the terms of the GNU Lesser General Public License as
          ~ published by the Free Software Foundation; either version 2.1 of
          ~ the License, or (at your option) any later version.
          ~
          ~ This software is distributed in the hope that it will be useful,
          ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
          ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
          ~ Lesser General Public License for more details.
          ~
          ~ You
    should have received a copy of the GNU Lesser General Public ~ License along with this software; if not, write to the Free ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. --> <!-- Represents the Hibernate 4.0.x module--> <module xmlns="urn:jboss:module:1.1" name="org.hibernate"> <resources>
      •  should have received a copy of the GNU Lesser General Public
          ~ License along with this software; if not, write to the Free
          ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
          ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
          -->
        <module xmlns="urn:jboss:module:1.1" name="org.apache.cxf.impl">
            <properties>
                <property name="jboss.api" value="private"/>
            </properties>
            <resources>
                <resource-root path="cxf-rt-bindings-coloc-2.6.4.jar"/>
                <resource-root path="cxf-rt-bindings-object-2.6.4.jar"/>
                <resource-root path="
    hibernate-core-4.0.1.Final
      • cxf-rt-bindings-soap-2.6.4.jar"/>
                <resource-root path="
    hibernate
      • cxf-rt-
    commons
      • bindings-
    annotations
      • xml-
    4
      • 2.
    0
      • 6.
    1.Final
      • 4.jar"/>
                <resource-root path="
    hibernate
      • cxf-rt-
    entitymanager
      • core-
    4
      • 2.
    0
      • 6.
    1.Final
      • 4.jar"/>
                <resource-root path="
    hibernate-infinispan-4.0.1.Final
      • cxf-rt-databinding-aegis-2.6.4.jar"/>
                
    <!-- Insert resources here --> </resources> <dependencies> <module name="asm.asm"/> <module name="javax.api
      • <resource-root path="cxf-rt-databinding-jaxb-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    javax.persistence.api
      • cxf-rt-frontend-jaxws-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    javax.transaction.api
      • cxf-rt-frontend-simple-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    javax.validation.api
      • cxf-rt-management-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.antlr
      • cxf-rt-transports-http-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.apache.commons.collections
      • cxf-rt-transports-jms-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.dom4j
      • cxf-rt-transports-local-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.infinispan" optional="true"
      • cxf-rt-ws-addr-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.javassist
      • cxf-rt-ws-mex-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.jboss.as.jpa.hibernate" slot="4" optional="true
      • cxf-rt-ws-policy-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.jboss.logging
      • cxf-rt-ws-rm-2.6.4.jar"/>
                
    <module
      • <resource-root 
    name
      • path="
    org.hibernate.envers" services="import" optional="true
      • cxf-rt-ws-security-2.6.4.jar"/>
                <resource-root path="cxf-services-sts-core-2.6.4.jar"/>
              
    </dependencies> </module>

     

      • Remover o conteúdo do diretório $JBOSS_HOME\modules\system\layers\base\org\hibernate\validator\main.
        • Baixar o jar hibernate-validator-4.2.0.Final e colocar no diretório criado no item anterior.

        • Criar o arquivo module.xml no diretório main e inserir o conteúdo abaixo:
    Bloco de código
    languagexml
    title$JBOSS_HOME\\modules\\system\\layers\\base\\org\\hibernate\\validator\\main\\module.xml
    <?xml version="1.0" encoding="UTF-8"?> <!-- ~ JBoss, Home of Professional Open Source. ~ Copyright 2010, Red Hat, Inc., and individual contributors ~ as indicated by the @author tags. See the copyright.txt file in the ~ distribution for a full listing of individual contributors. ~ ~ This is free software; you can redistribute it and/or modify it ~ under the terms of the GNU Lesser General Public License as ~ published by the Free Software Foundation; either version 2.1 of ~ the License, or (at your option) any later version. ~ ~ This software is distributed in the hope that it will be useful, ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~ Lesser General Public License for more details. ~ ~ You should have received a copy of the GNU Lesser General Public ~ License along with this software; if not, write to the Free ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. --> <module xmlns="urn:jboss:module:1.1" name="org.hibernate.validator"> <resources> <resource-root path="hibernate-validator-4.2.0.Final.jar"
      •   <resource-root path="cxf-tools-common-2.6.4.jar"/>
                <resource-root path="cxf-tools-java2ws-2.6.4.jar"/>
                <resource-root path="cxf-tools-validator-2.6.4.jar"/>
                <resource-root path="cxf-tools-wsdlto-core-2.6.4.jar"/>
                <resource-root path="cxf-tools-wsdlto-databinding-jaxb-2.6.4.jar"/>
                <resource-root path="cxf-tools-wsdlto-frontend-jaxws-2.6.4.jar"/>
                <resource-root path="cxf-xjc-boolean-2.6.1.jar"/>
                <resource-root path="cxf-xjc-dv-2.6.1.jar"/>
                <resource-root path="cxf-xjc-ts-2.6.1.jar"/>
            </resources>
            <dependencies>
                <module name="asm.asm" />
                <module name="javax.api" />
                <module name="javax.annotation.api" />
                <module name="javax.jms.api" />
                <module name="javax.jws.api" />
                <module name="javax.mail.api" />
                <module name="javax.resource.api" />
                <module name="javax.servlet.api" />
                <module name="javax.wsdl4j.api" />
                <module name="javax.xml.bind.api" services="import"/>
                <module name="com.sun.xml.bind" services="import"/>
                <module name="javax.xml.soap.api" />
                <module name="javax.xml.stream.api" />
                
    <!-- Insert resources here --
      • <module name="javax.xml.ws.api" />
          
    </resources>
      •   
    <dependencies>
      •     <module name="
    javax.api"/>
      • org.apache.commons.lang" />
                <module name="
    javax
      • org.
    persistence
      • apache.
    api
      • neethi" />
                <module name="
    javax
      • org.
    validation
      • apache.
    api
      • velocity" />
                <module name="
    javax
      • org.
    persistence
      • apache.
    api
      • xml-resolver" />
                <module name="
    javax
      • org.
    xml
      • apache.
    bind
      • ws.
    api
      • xmlschema" />
                <module name="org.apache.
    jboss
      • ws.
    logging
      • security" />
                <module name="org.apache.
    jboss
      • santuario.
    common-core
      • xmlsec" />
                <module name="org.joda.time" />
                <module name="org.
    slf4j
      • opensaml" />
                <module name="org.
    apache
      • springframework.
    xerces
      • spring" 
    services
      • optional="
    import
      • true"/> 
                <module name="
    sun
      • org.apache.
    jdk
      • cxf" 
    services
      • export="
    import
      • true"/> 
            </dependencies>
        </module>

     

    Instalando uma Licença para o TOTVS Intellector

    ...

    1. Enterprise -  totalmente livre para execução de qualquer política sem data de expiração;
    2. Limited -      determinada por um tipo específico e uma data de expiração ou não;
    3. Trial -          tipos de políticas livres e com uma data de expiração.
     
    Configurando Pool de Conexões - JNDI

    • O pool de conexão deve ser habilitado usando a console.

    • Deve-se definir um banco de dados para o Intellector persistir suas informações. A definição do banco de dados é efetuada no arquivo standalone-full.xml na tag <datasources>. O nome do JNDI não pode ser alterado (jndi-name="java:/intellector/totvs).
      .
      • Exemplo datasource Postgres
        • Formato da conexão: <IP_SERVIDOR_BANCO_DE_DADOS>:<PORTA>/<BASE>

          Bloco de código
          languagexml
          titleExemplo datasource Postgres
          <subsystem xmlns="urn:jboss:domain:datasources:1.2">
          	<datasources>
          			....
          		<datasource jta="false" jndi-name="java:/intellector/totvs" pool-name="intellector/totvs" enabled="true" use-ccm="false">
          			<connection-url>jdbc:postgresql://127.0.0.1:5432/postgres</connection-url>
          			<driver-class>org.postgresql.Driver</driver-class>
          			<driver>postgresql-driver</driver>
          			<security>
          				<user-name>postgres</user-name>
          				<password>postgres</password>
          			</security>
          			<validation>
          				<validate-on-match>false</validate-on-match>
          				<background-validation>false</background-validation>
          			</validation>
          			<timeout>
          				<set-tx-query-timeout>false</set-tx-query-timeout>
          				<blocking-timeout-millis>0</blocking-timeout-millis>
          				<idle-timeout-minutes>0</idle-timeout-minutes>
          				<query-timeout>0</query-timeout>
          				<use-try-lock>0</use-try-lock>
          				<allocation-retry>0</allocation-retry>
          				<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
          			</timeout>
          			<statement>
          				<share-prepared-statements>false</share-prepared-statements>
          			</statement>
          		</datasource>
                  .....
          		<drivers>
                  .....
                  <driver name="postgresql-driver" module="org.postgresql">
                      <driver-class>org.postgresql.Driver</driver-class>
                  </driver>
                  .....
          		</drivers>
          	</datasources>
          </subsystem>
      • Exemplo datasource Oracle

        Bloco de código
        languagexml
        titleExemplo datasource Oracle
        <?xml version="1.0" encoding="UTF-8"?>
        <datasources>
          <local-tx-datasource>
            <jndi-name>jdbc/OracleDS</jndi-name>
            <connection-url>jdbc:oracle:thin:@192.168.0.149:1521:oralin</connection-url>
            <!--
            Here are a couple of the possible OCI configurations.
            For more information, see [http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm]
         
            <connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
                or
            <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
         
            Clearly, its better to have TNS set up properly.
             -->
            <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
            <user-name>cartao_h</user-name>
            <password>uma_senha_qualquer</password>
            <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
            <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
            <!-- Checks the Oracle error codes and messages for fatal errors -->
            <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
            <!-- sql to call when connection is created
            <new-connection-sql>some arbitrary sql</new-connection-sql>
            -->
            <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
            <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
            -->
            <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
            <metadata>
               <type-mapping>Oracle10g</type-mapping>
            </metadata>
          </local-tx-datasource>
        </datasources> 
    Arquivo persistence.properties

    Para utilização da persistência de acessos no TOTVS Intellector Server, na primeira execução antes da utilização do cache, deverá ser copiado o arquivo de configuração persistence.properties para o diretório $JBOSS_HOME/bin, como descrito abaixo.

    ...

     

    Bloco de código
    languagehtml/xml
    linenumberstrue
    #persistence.properties 
    #Fri Feb 03 13:52:26 BRST 2012 
      
    ### Define se o intellector utilizará banco de dados para persistência dos dados de acessos e políticas 
    intellector.usesdatabase=true
      
    ### Nome da fila utilizada pelo MDB (Não pode ser alterado) 
    persistence.queue.name=queue/intellector
      
    ### Connection Factory 
    persistence.queue.connection.factory=/ConnectionFactory
      
    ### Endereço da fila JMS 
    persistence.jndi.address=jnp://127.0.0.1:1099 
      
    ### Emails de aviso de erro na fila de tarifação, separados por virgula, de preferência sem espaço 
    user.emailsWarning= 
    #user.emailsWarning=<e-mail>@totvs.com.br, <e-mail>@totvs.com.br 
      
    ### Credenciais de conexão na fila Usuário/Senha 
    persistence.jndi.security.principal= 
    persistence.jndi.security.credentials= 
      
    ### Parâmetros do Hibernate do Cache ### 
    ######################################## 
    ## Endereço JNDI da conexão 
    hibernate.connection.datasource=java:/intellector/totvs
    hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 
    #hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect 
    #hibernate.dialect=br.com.totvs.persistence.dialectfix.Oracle9iDialectFix 
    #hibernate.dialect=br.com.totvs.persistence.dialectfix.Oracle10gDialectFix 
      
    ## auto schema export 
    hibernate.hbm2ddl.auto=update 
      
    # cache 
    #hibernate.cache.provider_class=org.hibernate.hibernate.NoCacheProvider 
    hibernate.cache.use_second_level_cache=true
    hibernate.max_fetch_depth=1 
    hibernate.cache.use_minimal_puts=true
      
    ## Delimitador de comandos específico do Banco de dados utilizado 
    hibernate.hbm2ddl.delimiter=; 
      
    #hibernate.session_factory_name=TSessionFactory 
    hibernate.show_sql=true
    hibernate.format_sql=true
    hibernate.use_sql_comments=true
    hibernate.generate_statistics=true
    hibernate.jdbc.batch_versioned_data=true
    hibernate.use_second_level_cache=false
    hibernate.use_query_cache=false
    hibernate.connection.release_mode=after_transaction 
    hibernate.connection.autocommit=false
    hibernate.session_factory_name=sessionFactory 
    hibernate.current_session_context_class=thread 
      
    # transaction controll 
    hibernate.transaction.flush_before_completion=false
    hibernate.transaction.auto_close_session=false 
     
    # Informar o schema default quando for Oracle
    #hibernate.default_schema=<NOME_DO_SCHEMA>
    Nota
    titleConfigurações do persistense.properties

    Após criar o arquivo persistense.properties ajustar as seguines variáveis de acordo com a instalação:

    • persistence.jndi.address=jnp://<IP_MAQUINA>:1099

     

    Informar o dialeto de acordo com o DMBS utilizado:

    ### Parâmetros do Hibernate do Cache ###
    ########################################
    ## Endereço JNDI da conexão
    hibernate.connection.datasource=java:/intellector/totvs
    hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
    #hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
    #hibernate.dialect=br.com.totvs.persistence.dialectfix.Oracle9iDialectFix
    #hibernate.dialect=br.com.totvs.persistence.dialectfix.Oracle10gDialectFix

     

     

    Informações

    Importante ressaltar que as variáveis:

          hibernate.connection.datasource
          hibernate.dialect

    Se referem ao banco de dados onde serão armazenadas as informações de cache e auditoria. Os bancos homologados para essas funcionalidades foram Oracle 10g e 11, SQL Server 2008 e PostgreSQL 9.x.

     

    Deployment do TOTVS Intellector no JBoss

    Considerando que o item instalando o JBoss foi seguido, o próximo passo será o deployment (instalação) do pacote intellector-ear.ear em uma instância do JBoss.

    ...

    1. Copiar intellector-ear.ear dentro do diretório $JBOSS_HOME/standalone/deployments;
    2. Se for uma atualização de versão, simplesmente remova o intellector-ear.ear, ANTES de extrair a nova versão. As pastas log, tmp e work situadas abaixo da instância, neste caso: $JBOSS_HOME/standalone/log, $JBOSS_HOME/standalone/tmp e $JBOSS_HOME/standalone/work poderão ser guardadas, mas é uma boa prática excluí-las.
     
    Iniciando o JBoss

    Se os passos foram seguidos e tudo correu bem, então é hora de iniciar o JBoss. No diretório $JBOSS_HOME/bin, inicie o batch simplesmente digitando ./run-intellector.sh (linux/unix) ou run.bat (Windows). Segue abaixo o início e o fim do bootstrap do JBoss:

    ...

    Bloco de código
    languagejava
    linenumberstrue
    09:56:38,051 INFO  [br.com.tools.intellector] (ServerService Thread Pool -- 72) -----------------------------------------------------------
    09:56:38,051 INFO  [br.com.tools.intellector] (ServerService Thread Pool -- 72) --------- Intellector configurado com sucesso... ----------
    09:56:38,051 INFO  [br.com.tools.intellector] (ServerService Thread Pool -- 72) -----------------------------------------------------------
    ...
    09:56:38,191 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 32) JBAS018559: Implantado "intellector-ear-06.1137.001.22967.ear" (runtime-name: "intellector-ear-06.1137.001.22967.ear")
    ...
    09:56:38,426 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: A interface do gerenciamento ouvindo no http://127.0.0.1:9990/management
    09:56:38,426 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: O console de administração ouvindo no http://127.0.0.1:9990
    09:56:38,442 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.3.0.GA (AS 7.4.0.Final-redhat-19) iniciado em 114205ms - Iniciado 661 de serviços 697 (os serviços 75 são lazy, passivos ou em demanda)
    
    

     

    Configurações adicionais

    Normalmente, ajustes adicionais, ou tuning, dependem de plataforma, número de requisições, escalabilidade, multi-ip, dentre outras; a mais comum é alterar a porta onde o container irá atender, default é a 8080. Outros casos, como HTTPS ou load balancer, envolvendo o Apache, devem ser analisadas e não fazem parte do escopo desse manual.