Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

optimizing java code related to beans and jdbc

843833Jul 27 2001 — edited Jul 28 2001
HI,

I have a question about optimizing Database Hits from a Bean.

I have a java bean that is currently in request scope.
All methods in the bean returns Vector which contains the contents of different JDBC queries - Several Select Statements.

After the bean is instantiated all the methods are called separately
ie Vector v1=MyBean.getVector1(a, b);
Vector v2=MyBean.getVector2(b);
Vector v3=MyBean.getVector3(b,a);
all the methods have something in common which is that they all accept a b or c as parameters in different orders and combinations.

As a result each page of the application is slow.
Apart from Optimizing queries and table structure with indexes etc, I'm under the impression that I could optimize this.

How would you guys optimize the Bean Code?

I'm under the impression that since i use this same bean on every page (although the parameters are different for every page because they are passed in from the querystring ), I am better off putting the bean in session variable .
What else would you guy do to improve the performance -- interms of java code.

Currently it is using java beans (not enterprise java beans) on a weblogic server with oracle 8 i database.
I am using SQL statements instead of stored procedures - the sql statements are in the
stephen

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2001
Added on Jul 27 2001
1 comment
131 views