Anupreet Arora

Ranch Hand
+ Follow
since Jun 17, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anupreet Arora

Dileep..

Thanks for your response. The exceptions I am talking about would come under the 18.2.2 System exceptions section of the specs.

What is happening is, if a NullPointer comes for some unknown reason, it is to be thrown as is .. it gets propagated across the tiers of the application till it reaches EJB stubs and skeleton, which are supposed to convert it to remote exception.

"The Container catches a non-application exception; logs it (which can result in alerting the SystemAdministrator); and, unless the bean is a message-driven bean, throws the java.rmi.RemoteException(or subclass thereof) to the client if the client is a remote client, or throws the javax.ejb.EJBException (or subclass thereof) to the client if the client is a local client. TheBean Provider can rely on the Container to perform the following tasks when catching a non-applicationexception:
The transaction in which the bean method participated will be rolled back.
No other method will be invoked on an instance that threw a non-application exception.



But sth goes wrong, and all we get is Corba Unknown Exception (org.omg.CORBA.portable.UnknownException)
17 years ago
Thanks for the response Scott.

Have tried a number of things. Changing the database shared_pool_size and cursor_space_for_time parameters seem to be helping the most here.
I am facing the following problem.
I execute a query, which is large and complex, it takes a 4 to 5 seconds to execute and returns around 20 rows. But while populating the cachedrowset, takes more than the time it takes to execute the query. The database is Oracle 9i.



It will be great if anybody has experiences similar problem before or knows what is going on here. Any inputs are greatly appreciated.

Many Thanks
Anupreet
Whenever any unchecked runtime exeption (For Ex
Nullpointer) is thrown from beyond the EJB layer in our application, it is
getting converted to Corba Unknown Exception (org.omg.CORBA.portable.UnknownException) and shown to the user on the
error screen.

This is misleading as the actual error gets lost. This happens in WSAD as well as WAS server (Version 5.1) where the application is deployed.

Early investigation shows that there is some problem with the stubs and ties being generated by websphere.

Has anybody faced similar problem using Websphere 5.1 and is there a fix or workaround.

Many Thanks
Anupreet
17 years ago
Can we use java to reliable change permissions (chmod) or owner (chown) of files in a unix file system ?

Any ideas will be most appreciated

Thanks
Anupreet
17 years ago


Cheers
ASA
18 years ago
Thanks for the promt response Henry !!

Cheers
Anupreet
Hi,

Can anbody please help me understand why this long argument is getting rounded to Integer.MAX_VALUE when I use Math.round function?

TIA
Anupreet



Output :
No, its not a development center. Its a sales and marketing office.
The main development centres for Satyam in India are at Hyderabad, Bangalore, Chennai, Pune and Bhubhaneshwar.

Its not a very good place to work.No cabins,you can see the values of private variables declared by person sitting 2 chairs away from you



I have to disagree. What kind of criterion is this.. to make a judgement about the work culture in a company. Satyam is one of the top few IT companies in India, on all counts, and the work culture as well as physical work environment is also top class. By all comparisons, it is atleast on par with the other major IT companies in India, if not better.
19 years ago
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException

Return Type = VOID
19 years ago
use java.util.StringTokenizer to break the string at the comma and then use it as u like
19 years ago
Hello Ernest !!

If I had 10000 records in that db, wouldn't this method be a drawback since everyone that asks for my guestbook will have a Vector with 10000 records in it? Doesn't this affect server memory?



U are quite right ..but a typical case where such applications are required is when a user searches for some records. So I will design my application in such a manner that the user is kind of forced to give search criteria which restircts the records returned to a more managable number...
Practically, its not feasible for a user to browse 10000 records...so u will have a search screen where the user will give some primary search criterion...and ur database query will have the where clauses built out of those and hopefully the search will return a smaller result set ... to the eventual goal of less of memory consumption in the session or server and also the ease of browsing the resultset ..

Hope this makes sense...

I haven't explored the approach II Stan mentioned in his alogorithms ...that involves caching the result set.. can anyone give me a lead on how to implement such a thing...any links etc..
19 years ago
Hi,

To give U a brief idea of how such a thing is implemented typically :
U need to put each record in a value object ( just a simple java bean). And as U keep on creating java bean objects of your record type, keep adding them to an arraylist. This arraylist is going to be in your http session.
So all you need to do in your jsp by default is to show the first 100 objects of that arraylist. There should be a next button on the jsp on click of which you will show 101 to 200 records and so on !!
How will U keep track of records index ?
Just keep two more variables in your session. startIndex and endIndex. The default values will be 1 and 100 respectively. So the JSP will refer to these variable to determine the which records from the arraylist to show. On click of Next add 100 to both the session variables. So the JSP should show the next hundred records.

Hope this helps...
Cheers
Anupreet
19 years ago
Why is CGI technology being used on Javaranch if the purpose of the site/and its promoters is to advocate the use of Java and Servlets and related technologies ?

Secondly, are PHP/CGI based bulletin boards the only feasible and quick ways to provide forums facility on a website. Why aren't Servlets/JSP based bulletin boards the order of the day ?

Cheers
Anupreet
19 years ago