JSP + STRUTS + EJB + DAO + Hibernate instance

xiaoxiao2021-03-06  56

Example is just a simple login test.

JSP calls the Struts an action, then calls EJB in the action, and the DAO in EJB calls Hibernate, with the JBoss database connection pool.

The database is mysql.

There is a Test.sql database table structure in the bag, it is possible to import mysql.

MySQL-DB.XML Configure the database connection pool, and EAR put it in the same deploy directory.

You can run JBOSS. The version I want is 3.2.5

See the specific configuration: http://www.bcxy.com/java/eclipsej2ee.htm

Source program download: http://www.bcxy.com/tools/ebhibernate.rar Note: I used the transaction when I wrote Hibernate, but there was a conflict when I was calling DAO in EJB. How to solve this problem, or complete Give your business to EJB, don't worry about Hibernate, please help!

If you have any questions, you can send your email: Webmaster@bcxy.com Programming

转载请注明原文地址:https://www.9cbs.com/read-114300.html

New Post(0)