|
Problem(Abstract) |
What are the differences between using Java DataBase
Connectivity (JDBC™) and Dynamic Enterprise JavaBeans™ Query
Language? |
|
|
|
Resolving the
problem |
There is a fundamental, conceptual difference between
using Java DataBase Connectivity (JDBC) and Dynamic
Enterprise JavaBeans Query Language - the latter works at
the object schema level and the former works at the database table level.
Using JDBC implies that the programmer knows how the deployer is going to
create the schema map for the Enterprise JavaBeans components. A JDBC
query will not be able to materialize an Enterprise JavaBean object, only
data. If you have any container-managed relationships established between
Enterprise JavaBeans, the schema specifics will need to be known in order
to query across the relationship with JDBC. With Dynamic Query Service,
the query is done against the container and the schema and the
relationship details are not needed when querying related objects.
From a performance standpoint, JDBC is faster in most cases. However,
Dynamic Query Service is applied at the abstract schema level and is more
flexible and portable as you are not tied to database specific SQL syntax.
If your entity beans are using bean-managed persistence (BMP), JDBC is
your only option. However, if you are using container-managed persistence
(CMP), as explained above Dynamic Query Service provides a lot of
flexibility and portability. |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Business Integration |
WebSphere Business Integration Server Foundation |
General |
|
5.1.1 |
All Editions |
Application Servers |
WebSphere Application Server |
EJB Container |
|
6.0 |
Base, Network Deployment |
|
|
|