Right, to optimize database updates it is better to use
stored procedures thus you do not have anys SQL syntax
into your code
-----Message d'origine-----
De: Chanoch Wiggers [mailto:ChanochW@w...]
Date: vendredi 9 novembre 2001 12:46
=C0: Java 2 Enterprise Edition
Objet: [j2ee] RE: Query regarding Weblogic 5.1
of for really efficient system use stored procedures
chanoch
-----Original Message-----
From: THIRY, Jean Luc [mailto:jl-thiry@u...]
Sent: 07 November 2001 16:53
To: Java 2 Enterprise Edition
Subject: [j2ee] RE: Query regarding Weblogic 5.1
Hi vinay,
I have been working on the same subject not very long
ago. Here are a few answers I have managed to work out.
1) Use entity beans
This is rather tricky and they come out to be difficult
to use under certain circumstances. For instance, when you
want to create a query on tables related one to another you
have to manage relashionships between different entity beans
and the workload of the server gets heavy. Whereas, the response
time to get going several instances of entity beans is worse
than when you use queries directly on databases.
What you need to keep in mind is scalability and transaction
management that is offered by entity beans. If you whant to access
data with several thousands of users with a workload management
over different app servers, this solution seems suited and the
effort neaded to implement entity beans is justified
2) dbKona of weblogic
I do not know this product but it looks like a Java Data Object
utility. Another alternative is the DataAccessObject Framework.
The advantage of this framework is that you encapsulate SQL queries
into objects and that you do not have to work anymore with SQL
statements. You become Database independant and improve the
softwares stability.
Using the Weblogic utility is dangerous because you loose the
portability
of your software over other application servers so I would rather
recommend using a DAO Framework that is J2EE compliant and that does
not use any specificity from any editor
3) using SQL statements
This is the solution that is the simpliest of all but that is the
worse for reusability. It improves network handling and seems quite
adequate for data presentation because it is fast and simple.
As long as you do not have any data update this is the best solution.
On the other side if you want to manage data updates you need to
include
business logic on the top of data management and if you mix this
business
logic with SQL statements, the danger remains in the reusability of the
software
and its maintenance.
I believe that if you do not have high scalability constraints Entity
EJBs
are not
suitable. The best is to use a DAO framework that improves the software
stability by
introducing an object abstraction layer. On the other side I think that
the
DAO framework
is good for managing business logic but for data presentation, direct
access
to the database
is more efficient
JEANLUC
-----Message d'origine-----
De: Vinay Agarwal [mailto:vinayagri@y...]
Date: mercredi 7 novembre 2001 13:49
=C0: Java 2 Enterprise Edition
Objet: [j2ee] Query regarding Weblogic 5.1
Hi,
I am using weblogic 5.1. I can access database by
using either of these
1. SQL statement in a class like: "select * from
table...where....."
2. dbKona utility of weblogic i.e. pass the tablename,
columnname and 'where' conditions in its specific
methods rather than writing SQL statement.
3. Use entity ejb to interact with database and in
that ejb mention the SQL statement.
I want to know which one of these will be most
efficient in yielding the result; which one will be
most efficient for network handling and which one will
be most efficient for reusability.
thanks
vinay
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com