首页 > 代码库 > NetBpm 配置篇(2)
NetBpm 配置篇(2)
转载注明出处: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个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。