When to Use JDBC with Java Application Servers
Because of the issues related to multiple mappings of Java objects to tables and vice versa, it is best to use JDBC with Java application servers when the data being mapped is quite simple. For example, JDBC would be an excellent way to look up simple account information based on an account number. There would be little mapping of data needed in this case.
If your data mapping is complex, however, you should look at either JDO or EJB accelerators:
For more information on JDBC issues related to data mapping, see JDBC Data Conversion.
Also, if you are not familiar with the concept of complex data, see complex data.
More on the general topic: Using JDBC with Application Servers