Histórico da Página
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
============================================================== <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory name="iw-Editor"> <!-- conexao via JNDI --> <property name="hibernate.connection.datasource">java:/intellector/totvs</property> <!-- ORACLE --> <property name="hibernate.dialect">br.com.totvs.oracle.Oracle10gDialectFix</property> <!-- MSSQL SERVER --> <!--<property name="hibernate.dialect">org.hibernate.dialect.SQLServer2012Dialect</property>--> <!-- POSTGRESQL --> <!--<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL9Dialect</property>--> <property name="hibernate.show_sql">true</property> <property name="hibernate.format_sql">true</property> <property name="hibernate.hbm2ddl.auto">update</property> <property name="hibernate.enable_lazy_load_no_trans">true</property> <!-- PARA ORACLE DESCOMENTAR E DEFINIR O NOME DO SCHEMA --> <!--<property name="hibernate.default_schema">NOME_DO_SCHEMA</property>--> <!-- cache --> <property name="hibernate.cache.use_second_level_cache">true</property> <property name="hibernate.max_fetch_depth">1</property> <property name="hibernate.cache.use_minimal_puts">true</property> <property name="hibernate.use_second_level_cache">false</property> <!-- class mapping --> <mapping class="br.com.totvs.policy.IwPolitica" /> <mapping class="br.com.totvs.action.IwAcao" /> <mapping class="br.com.totvs.action.IwAcaoTipoPolitica" /> <mapping class="br.com.totvs.var.IwVariavel" /> <mapping class="br.com.totvs.var.IwVariavelPolitica" /> <mapping class="br.com.totvs.parameter.IwParameter" /> <mapping class="br.com.totvs.policy.IwCtrlEdicaoPolitica" /> <mapping class="br.com.totvs.user.IwUsuarios" /> <mapping class="br.com.totvs.profile.IwPerfil" /> <mapping class="br.com.totvs.functionality.IwFuncionalidade" /> <mapping class="br.com.totvs.policytype.IwTipoPolitica" /> <mapping class="br.com.totvs.policy.IwPoliticaObjeto" /> <mapping class="br.com.totvs.plugin.IwPlugin" /> <mapping class="br.com.totvs.trace.IntTracePolitica" /> <mapping class="br.com.totvs.policy.IntExecucaoPolitica" /> <mapping class="br.com.totvs.fare.TarExecucaoAnalitica" /> <mapping class="br.com.totvs.access.IntPersistenciaAcesso" /> <mapping class="br.com.totvs.fare.TarParametros" /> <mapping class="br.com.totvs.fare.TarLogArquivosTarifacao" /> <mapping class="br.com.totvs.fare.TarExecucaoTotalHist" /> <mapping class="br.com.totvs.fare.TarExecucaoTotal" /> <mapping class="br.com.totvs.fare.TarExecucaoDiariaHist" /> <mapping class="br.com.totvs.fare.TarExecucaoDiaria" /> <mapping class="br.com.totvs.fare.TarExecucaoAnaliticaHist" /> <mapping class="br.com.totvs.access.IntPersistenciaAcessoHist" /> <mapping class="br.com.totvs.access.IntPersistenciaAcesso" /> <mapping class="br.com.totvs.audit.IntAuditaAcesso" /> </session-factory> </hibernate-configuration> |
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.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 language xml title Exemplo datasource Postgres <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> <pool> <min-pool-size>1</min-pool-size> <max-pool-size>30</max-pool-size> </pool> <security> <user-name>postgres</user-name> <password>01totvs02tools03</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>
Exemplo datasource Oracle
Bloco de código language xml title Exemplo datasource Oracle <datasource jta="false" jndi-name="java:/intellector/totvs" pool-name="intellector/totvs" enabled="true" use-ccm="false"> <connection-url>jdbc:oracle:thin:@10.5.1.1:1521:Oralin</connection-url> <driver-class>oracle.jdbc.OracleDriver</driver-class> <driver>oracle-driver</driver> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> <pool> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size> </pool> <security> <user-name>Protheus12_teste</user-name> <password>totvs@1</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>
- Exemplo datasource Postgres
Apontamento dos drivers de conexão.
Informar todos os drivers/modules que foram utilizados dentro do arquivo standalone.xml
Bloco de código | ||||
---|---|---|---|---|
| ||||
<drivers> <driver name="postgresql-driver" module="org.postgresql"> <driver-class>org.postgresql.Driver</driver-class> </driver> <driver name="oracle-driver" module="com.oracle.ojdbc6"> <driver-class>oracle.jdbc.OracleDriver</driver-class> </driver> <driver name="jtds-driver" module="net.sourceforge.jtds"> <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> </driver> </drivers> |
Informações |
---|
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 1112c, SQL Server 2008 e PostgreSQL 9.x. |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas