先决条件:
1.开发工具eclipse安装了插件lomboz,并指明server为jboss 【程序编程相关:华为进攻(宽带城域网引发的华为营销策略分】 【推荐阅读:Visual C++.NET编程基础讲座】2.已经在jboss中建立了与mysql的datasource连接,jndi为 java:/mysqlds 【扩展信息:Visual C++.NET编程基础讲座】 3.已经在mysql中建立了表 cat column | type | modifiers --------+-----------------------+----------- cat_id | character(32) | not null name | character varying(16) | not null sex | character(1) | weight | real | indexes: cat_pkey primary key btree (cat_id) 整合步骤: 1.生成一个web应用 2.在这个应用的web-inf\lib下应该包含以下hibernate必需包 hibernate2.jar odmg-3.0.jar commons-collections-2.1.1.jar commons-logging-1.0.4.jar dom4j-1.4.jar ehcache-0.9.jar cglib-full-2.0.2.jar 3.在这个应用的web-inf\classes下生成hibernate配置文件hibernate.cfg.xml(也可以用hibernate.properties,此处不议),内容如下: <?xml version=´1.0´ encoding=´utf-8´?> <!doctype hibernate-configuration public "-//hibernate/hibernate configuration dtd//en" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <hibernate-configuration> ... 下一页