Jsp+struts+ejb+dao+hibernate instance

Source: Internet
Author: User
Tags mysql jboss
The JS example is just a simple login test.


The JSP invokes the action of struts and then invokes the DAO call in EJB,EJB in the action hibernate, using the JBoss database connection pool.

Database is MySQL.


The package has Test.sql database table structure, import to MySQL can be.


Mysql-db.xml configures the database connection pool, and the ear is placed in the same deploy directory.


Run JBoss on it. The version I want is 3.2.5.

Specific configuration see: http://www.bcxy.com/java/eclipsej2ee.htm

Note: I used the transaction when writing hibernate, but when the EJB invoke DAO, there is a conflict, this problem should be how to solve, or completely put the transaction to the EJB, in hibernate don't worry about it, please help!



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.