Avianu Sud

Ranch Hand
+ Follow
since Jan 20, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Avianu Sud

Chris, et al,
The Arcitecture community has 2 very difficult choices to make today in terms of using AJAX techniques.

1. Use Javascript/DHTML code directly for AJAX implementation: Most open and flexible option, but most difficult to maintain code.

2. Use AJAX libraries: Save plenty of time & pain, but non-standard & incomplete implementations.

Then there is everything in the middle.

What do the experts recommend?
The query itself runs very fast (< 1sec). Most of the time is in the while loop traversal of the result set, and storing in HashMap. Is it typical for 20,000 rows to take as much as 13 sec (with light load on the system).

Retrieving chunks of rows will be more effective I think. I am using oracle. Do share your ideas on retrieving rows in chunks from the database or from the result set.
I have a query returning 20,000 rows.
When I loop through the result set it take 13 seconds to store the results in a hash (See code snippet below)

while(resultSet.next()) {
int countResult = resultSet.getInt("COUNT");
Object groupFieldResult = resultSet.getObject(1);
if(groupFieldResult!=null) {
if(groupFieldResult instanceof Date) {
Date date = (Date)groupFieldResult;
results.put(date.toString(), new Integer(countResult));

Q1. Is there a way to reduce the time in traversing through these number of records?

In the meantime, As I only need 500 Rows at a time, so I set the MaxRows to Fetch (see below)

stmt.setMaxRows(500);
stmt.setFetchSize(500);

Now this works perfect for the 1st 500 rows.
Q2. The issue is that how do we get the next 500 rows quickly using JDBC?

I can implement some custom cashing strategy, but a JDBC solution will be more cleaner and simpler.

Please share your thoughts.
Regards, Avi
[ November 22, 2005: Message edited by: Bear Bibeault ]
From a thread safety perspective, what kind of issues can we encounter using java.util.ArrayList class instances in Servlet classes, and EJB classes? It will be great to describe this with an example, where an error can occur

It is recommended as very safe, and widely used, so when should it be not used in a Web environment?

Thanks in advance,
Avi.
Hi I have a question about Threads use in Weblogic:

Weblogic recommends 25 Threads as a good number of Threads.

Top performing servers (Linux server with 4 CPU) can process 3000 Transactions per second.

http://www-03.ibm.com/servers/eserver/pseries/news/pressreleases/2005/aug/570.html

So I am unsure how(and whether) such few threads can give such as high performance?
If this data is common across all users, put it in the Application Scope or even as a static Hash. Putting the same info for all sessions is a huge overhead.

If its specific to a user, thats a different story.

Good luck,
Avi
19 years ago
Very Very helpful. Thanks much.

Owe you one.
Hi, My question is regarding some detaails that WL has given to plan for how many servers(CPU's) are needed for predicted system load. Can someone help out in clarifying this:

1) In one section of the document(Click below):
http://e-docs.bea.com/wls/docs81/capplan/capbase.html

For a 4 CPU Windows2000 server: It appears to say Max Transaction per second = 80.24 (from lmW1)

2) On the next section it says:
http://e-docs.bea.com/wls/docs81/capplan/capgen.html#1056496
The preferred hardware configuration is Windows 2000 using 4x700 MHz processors.
The Reference TPS is 205, from Table 2-3, configuration number lmW1

I am not sure how they are coming up with the maximum TPS of 205 for a Windows 2000 Box, when the benchmarking says it can support maximum of 80.

Is it a Typo, or am I missing something?

Additionally, in your experience, how many concurrent users can a 4 CPU machine utilize?

Thanks in Advance,

-Avi
19 years ago
Hello,
I am looking at a Weblogic CLustering setup.
Have a basic question.

When a user has a Active HttpSession(in one instance), we keep a handle to the StatefulSession EJB in the Http Session. Further the HttpSession Keeps many domain objects.

With Clustering, will Weblogic ensure that the complete HttpSession Data is replicated on both Weblogic Clusters? This can be expensive, with double memory and processing?

Additionally, when a user makes multiple requests, can they switch between the cluster servers, or will does WL provide Session Affinity, and switchover only during a failure?

Please share your ideas,
- Avi
Now, I can have a different VM for every weblogic installation on the same machine,right?

Each VM can have a max 4G memory space and give high resource usage.

Can we bind a VM into using a particular CPU(or more than one?)

Are there any articles discussion confiuration of JVM's and usage of CPU/memory resoruces.

Once motivation for different VM's for Servlet engine, and EJB, is to give separate VM resources to both. Are there any downsides to this? I can see transfer object's overheads.

Thanks.
agree with you.

that was a typo (supports does not create new tx)
so ejb's are not really instantiated, they are "picked" from a pool of already instantiated objects;thus ejbCreate() needed.
Pradip,
So if a public method "parent" has a attribute of "Requires New", would the private method suspend the "parent" transaction and start its own.

and if the same private method is called from a "parent2" with attribute of "Mandatory", the private method will "Join" the transaction?


I thought private methods behaved like the "supports" attribute, ie. If there is a existing transaction, they join it. If there is no transaction, they do create a new transaction.

Now I am not sure,
Please comment...
Avi
Hello,
I have a question about using JVM for J2EE container and Servlet container.

In Weblogic 8.1 can we use different JVM for servlet classes and different JVM for EJB container (using the same Weblogic instance).

Is there a advanage to use different JVM versus the same?

What is the performance impact of using different VM's

Additionally, is it possible to BIND a weblogic instance to a specific VM?

Thanks in Advance.

- Avi
Throughput, Processes waiting and memory usage are better indicators of performance. 100% CPU usage is fine as long as its not impacting throughput or dealing with runaway processes
19 years ago