NetBpm 配置篇(2)

來源:互聯網
上載者:User

標籤:style   blog   http   color   os   檔案   io   資料   

轉載註明出處:http://www.cnblogs.com/anbylau2130/p/3877353.html 

 

上一篇中介紹了Netbpm在IIS和CassiniWebServer伺服器的安裝

  

通過上節的配置應該可以開啟首頁了

                          

到這裡要說的是資料庫配置了

       1,修改資料庫連接

                Netbpm下資料庫映射是通過NHibernate來實現的,目錄中 app_config.xml是NHibernate的設定檔

          

<configuration>    <components><!--  This classloader loads classes from assemblies in the database.       Different versions of the same process can have use different assemblies.   -->        <component id="ClassLoader"             service="NetBpm.Workflow.Delegation.ClassLoader.IClassLoader, NetBpm"             type="NetBpm.Workflow.Delegation.ClassLoader.Impl.DBClassLoader, NetBpm" /><!--   This classloader loads only classes from the local assemblies   --><!--        <component id="ClassLoader"             service="NetBpm.Workflow.Delegation.ClassLoader.IClassLoader, NetBpm"             type="NetBpm.Workflow.Delegation.ClassLoader.Impl.DefaultClassLoader, NetBpm" />-->        <component id="OrganisationSession"             service="NetBpm.Workflow.Organisation.EComp.IOrganisationSessionLocal, NetBpm"             type="NetBpm.Workflow.Organisation.EComp.Impl.OrganisationEComp, NetBpm" />        <component id="SchedulerSession"             service="NetBpm.Workflow.Scheduler.EComp.ISchedulerSessionLocal, NetBpm"             type="NetBpm.Workflow.Scheduler.EComp.Impl.SchedulerEComp, NetBpm" />        <component id="DefinitionSession"             service="NetBpm.Workflow.Definition.EComp.IDefinitionSessionLocal, NetBpm"             type="NetBpm.Workflow.Definition.EComp.Impl.DefinitionEComp, NetBpm" />        <component id="ExecutionSession"             service="NetBpm.Workflow.Execution.EComp.IExecutionSessionLocal, NetBpm"             type="NetBpm.Workflow.Execution.EComp.Impl.ExecutionEComp, NetBpm" />        <component id="LogSession"             service="NetBpm.Workflow.Log.EComp.ILogSessionLocal, NetBpm"             type="NetBpm.Workflow.Log.EComp.Impl.LogEComp, NetBpm" />        <component id="SchedulerThread"             service="NetBpm.Workflow.Scheduler.EComp.Impl.SchedulerThread, NetBpm"             type="NetBpm.Workflow.Scheduler.EComp.Impl.SchedulerThread, NetBpm" />    </components>    <facilities>        <facility             id="transactions"             type="Castle.Facilities.AutomaticTransactionManagement.TransactionFacility, Castle.Facilities.AutomaticTransactionManagement"/>        <facility id="nhibernate"            type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration">            <factory id="nhibernate.factory">                <!-- MYSQL Config -->                <!--<settings>                    <item key="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</item>                    <item key="hibernate.connection.driver_class">NHibernate.Driver.MySqlDataDriver</item>                    <item key="hibernate.connection.connection_string">Database=nbpm;Data Source=localhost;User Id=nbpm;Password=nbpm</item>                    <item key="hibernate.dialect">NHibernate.Dialect.MySQLDialect</item>                </settings>-->                <!-- MSSql Config-->                <settings>                    <item key="hibernate.connection.driver_class">NHibernate.Driver.SqlClientDriver</item>                    <item key="hibernate.dialect">NHibernate.Dialect.MsSql2000Dialect</item>                    <item key="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</item>                    <item key="hibernate.connection.connection_string">Data Source=.;uid=sa;pwd=123;database=MyTest</item>                </settings>                 <assemblies>                          <assembly>NetBpm</assembly>                 </assemblies>            </factory>        </facility>    </facilities></configuration>

 

     我們需要改的只是hibernate.connection.connection_string節點的字串串連改為我們需要的資料庫就行了

  <settings>                    <item key="hibernate.connection.driver_class">NHibernate.Driver.SqlClientDriver</item>                    <item key="hibernate.dialect">NHibernate.Dialect.MsSql2000Dialect</item>                    <item key="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</item>                    <item key="hibernate.connection.connection_string">Data Source=.;uid=sa;pwd=123;database=MyTest</item>  </settings>

 

  2,在你給定的資料庫中運行Sql目錄下的sql檔案--建表

 

  3,運行Organisation.sql 增加資料庫資料即可登入,出現這個介面表示登入成功

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.