Tuesday, May 27, 2008

Simple JNDI Accessing MySQL Datasource

Base on the previous post, I have used the struts-config.xml to define the datasource to access to the MySQL database. The datasource class is code within the Action class (controller layer) and map to the struts-config.xml.

In order to improve the programming pratice, the datasource can be created via JNDI and the java code should be sit within the model layer. As a result, business logic will separate from the controller layer and making the Action class without knowing any relation with business class at all.

Click here to read more...

1 comment:

BB COMMUNITY said...

hi leejeok, since u r so good in technology staffs, come visit my blog today la, i've written a post asking opinion from all u guys, come help out come help out~