In order to create ADF application on based on MySQL database you need some little different steps to work with it. Possibly you will hit by some bugs and for example you cannot create EOs and VOs by using normal Business Component Wizard you have to create Entity object, View Objects, Application Module manually (as i experienced). To connect mysql from any J2EE application you need to work with special driver called Connect/J.
Enough talking lets get into the steps
- Download MySQL from mysql website
- Install MySQL (as simple any blind man can do the installation)
- Make sure MySQL database is up and running (Windows services MySQL 5.1)
Note: I have one table called Mytable in mysql database named "mysql"
- Download Connect/J and extract it on your computer
- Copy the mysql-connector-java-5.1.12-bin.jar file and paste into
(it is required you to create a custom domain in weblogic server to deploy your applications)
- Rename the Jar file to mysqljdbc.jar for ease of administration.
Creating connection in Application:
- Create New ADF fusion based on Fusion application template.
- Create connection named mysqlconn
- Enter settings as shown in the slide (its the defaults of mysql)
- Click the Browse button with the Library
- Create New on the Left side Add an Entry called MYSQL in User Section
- Select Classpath and Choose Add Entry and select the path where you have putted the mysqljdbc.jar file
- Click OK
- Test the Connection
Creating EOs, VOs and AM:
- I am not going into detail (if you are regular blog visitor you know the rest) of these steps just for help you can follow the important slides.
- Right click on Model Page and Choose New Entity Object
- Add an Instance of MyTableVO
-Create a Basic JSF page and Drag and Drop ADF Read-only Table on the page
Note: You might not able to run it from integrated weblogic server because of our mysqljdbc.jar is not in classpath of the integrated weblogic server
Next Step: Deploying MySQL based ADF application to Weblogic Server