Celina Joseph

Greenhorn
+ Follow
since Aug 23, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Celina Joseph

Following is the scenario -
I have to store old batch ids(of type integer/long). And then I have to store new batch ids.
And then I have to compare the old and the new batch ids to come up with a list of batch ids found in new but not existing in the old.
I am not sure if I need to use collection to do this. But I thought Collection framework might have some APIs to achieve this without writing comparison code.
Please let me know a better way of coding this functionality.
Thanks.
22 years ago
Hi Maulin,
Thanks for the confirmation. Unfortunately I cannot use available schedulers because the time to run the application varies depending upon certain other variables.
22 years ago
Hi,
I have an application which runs once in a day and sleeps for the rest of the period.
I have written certain general utility classes which can be made static easily and can be shared amongst all the other classes.
But the disadvantage that I see here is that since my application sleeps for most of the time, these static objects would not be released and would be there all the time holding memory.
I was thinking of making these classes non-static and initializing them when needed and immediately releasing them after use.
Does this make sense ?
22 years ago
The code sample is -
Date dtt = new Date();
dtt.setTime(10480291150);
And the error that I got is -
C:\perso\SampleCode>javac TestUTCDate.java
TestUTCDate.java:14: integer number too large: 10480291150
dtt.setTime(10480291150);
^
1 error
22 years ago
Hi,
I am passing a long value to the java.util.Date API -
setTime()
It gives me error - "integer number too large."
The API signature is -
public void setTime(long time)
It is expecting a long, but I do not understand on passing a valid long value, it gives me error saying the integer value is too large.
Please let me know what is happening here.
Thanks
22 years ago
I want to know if there is any API available in Java 2 APIs which can be used to convert a UTC into a date format.
22 years ago
I checked out javaw, but would it work in Unix too ?
22 years ago
Hi All,
I have to write a Java program which sleeps for some particular time, wakes up and sends emails, then sleeps again.
The program needs to run in the background.
It needs to run on both windows and unix...
Does anybody has any idea about how to do it ?
Thanks!
22 years ago
Thanks everybody.
I feel convinced now. Would be back soon with new bunch of questions....
22 years ago
Thanks for the quick reply.
Arun's response triggered a new question in my mind -
-----------------------------------
constructor is called for every instance of the class. Init i called only when first time servlet is called. There after untill next
restart or code change in servlet/jsp init method code is not executed.
-----------------------------------
Suppose my servlet implements SingleThreadModel and my application server maintains a pool of servlet instances for concurrent requests. In this case would not the init() method be called once for each instance ?
And also, what happens if there is a code change in the servlet and the servlet is recompiled.
I was assuming that the old servlet instance is removed and the new instance is loaded.But please let me know the exact behaviour.
Thanks.
22 years ago
Hi,
I have a basic question....something of which I could not think satisfying answer...
Why do we have init() method in the servlets ?
Why not like other java classes whatever initialization is to be done is done in the constructor of servlet during the instantiation ?
The only one thing that comes to my mind is that the ServletConfig object is passed only through the init() method. But is there any other concrete reason ?
22 years ago
The content that I am sending from the server to the browser, the MIME_TYPE of that content should be supported by just my browser or my web server should also support it ?
Hi everybody,
I have a servlet. Its buffer size (I used the API - getBufferSize to get the buffer size of the response stream )is 1024 KB.
I filled it up with data more than 1024KB and it still does not give any error (I was expecting some buffer overflow errors) and displays the data properly on the browser.
Is it normal ?
22 years ago
Hi Cindy,
Thanks for the reply, but I am not sure if the link works.Also, I could not reach -
http://www.kcmultimedia.com
22 years ago
I want to run a java program as a service.
The O.S. is Windows NT and 2000.
What is the quickest and simplest way to go for it ?
22 years ago