zoukankan      html  css  js  c++  java
  • wildfly 10上使用最新的 Hibernate ORM OGM

    ORM是关系型数据库连接;ogm是No sql数据库连接,Mongo, redis等。

    1,下载ogm zip包,解压到wildfly_homemodulessystemlayersase, ogm模块在orghibernateogm下

    2,下载orm zip,同样解压。新增版本是5.1

    3,在文件wildfly-10.0.0.Finalmodulessystemlayersaseorghibernateogm5.1module.xml

    注释掉 <module name="org.hibernate.search.orm" slot="5.6.1.Final-orm51" optional="true" />

    要不总报找不到slot错误。

    ——————————————————————————————————

    ORM:

    http://docs.jboss.org/hibernate/orm/current/topical/html_single/wildfly/Wildfly.html

    persistence.xml

    <persistence-unit name="primary">
            <jta-data-source>java:jboss/datasources/MySqlDS</jta-data-source>
            <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
            <class>com.italktv.colnv.stat.entity.Seat</class>
            <class>com.italktv.colnv.stat.entity.SeatType</class>
        
            <properties>
            <property name="jboss.as.jpa.providerModule" value="org.hibernate:5.1"/>
                <property name="hibernate.hbm2ddl.auto" value="update" />
                <!-- <property name= "hibernate.hbm2ddl.auto" value ="validate" /> create-drop -->
                <property name="hibernate.jdbc.fetch_size" value="500" />
                <property name="hibernate.jdbc.batch_size" value="500" />
                <property name="hibernate.show_sql" value="false" />
                <property name="hibernate.format_sql" value="true"></property>
                
            </properties>
        </persistence-unit>

    ————————————————————————————————————————

    4.5. How to package Hibernate OGM applications for WildFly 10

    https://docs.jboss.org/hibernate/stable/ogm/reference/en-US/html_single/?v=5.1#_configuring_hibernate_search

          <persistence-unit name="mongo-ogm" transaction-type="JTA">
          <provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
        <class>xxx</class>
     
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
        
          <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
          <!--  <property name="hibernate.ogm.datastore.provider" value="mongodb" />-->
          <property name="hibernate.ogm.datastore.database" value="mongo_db"/>
          <property name="hibernate.ogm.datastore.host" value="xxxx.xx.xx.xx"/>
          <property name="hibernate.ogm.datastore.provider" value="MONGODB"/>
          <!-- 
                <property name="hibernate.ogm.datastore.username" value="db_user" />
                <property name="hibernate.ogm.datastore.password" value="top_secret!" />
                -->
        </properties>
      </persistence-unit>

    ——————————————————————————————————————————————

    https://www.cnblogs.com/coder-fang/p/6428454.html

  • 相关阅读:
    TechED 2005 : 《实战基于SPS2003的知识管理系统》
    《SharePoint Portal Server 2003 深入指南》即将完稿 & 大纲
    ows.js里面的ctx和itemTable到底有哪些参数?
    用代码获取SharePoint站点中InfoPath表单的数据
    新年快乐!
    Office with .Net 系列之 ――― 在自己的程序中宿主Office
    如何在WebPart中访问页面上的其他WebPart
    将SPS中被FrontPage修改过的页面重置为Ghost Page
    Office with .Net 系列之 ――― 在自己的程序中宿主Office
    ASP.NET 2.0与SharePoint 2.0
  • 原文地址:https://www.cnblogs.com/bigben0123/p/8004301.html
Copyright © 2011-2022 走看看