Murali Nanchala

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

Recent posts by Murali Nanchala

I see two places where there is a potential for trouble. First, when you are reading in from the Spreadsheet. Second, when you are writing to the serialized object.

Not sure what your access modifiers are on the two methods, but yes, two users can potentially corrupt the read and/or writes.

What kind of access does the method (you posted) in the service allow?

Since it is in turn calling the loadSpreadSheet() method, restricting access to this method should suffice your need. But if you want a less obtrusive way, just synchronize the serialized object and go from there.
17 years ago
You can get some info with this method
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/BatchUpdateException.html#getUpdateCounts()

I would probably NOT run the rest of the statements if something fails. But if they are unrelated and not transaction-oriented, you could.
17 years ago
Need more information about the code and how you actually do the reads and writes.

On the outset, it looks like a synchronization issue. Depending on your current implementation, the solution could be very simple to somewhat complicated. But definitely do-able.
17 years ago
Read Jan van Mansum 's reply one more time. Slowly.

Yes, you want to introduce the 'in-directness' (as you call it) into the code to de-couple the classes. So, in the future you can update/change the implementation of the method with [almost] no effect to the rest of the code.

This has more advantages in distributed applications. You will find out if you don't already know.
17 years ago
Then you can use a HashMap object AND synchronize it.

But if you intend to put million items in the collection, I suggest you re-think your approach. It is definitely going to slow down with increase in size. Especially after synchronization.

What would be your servlet's client [traffic] volume?
[ November 29, 2007: Message edited by: Murali Nanchala ]
17 years ago
Off topic. But most people who come from countries which were colonised by the English would understand what perchance means. Even today.
Other than that, it is a good find on the debug message.
20 years ago
OK. Look at this piece of code

You can see that the statement
txrecord is null!
is being printed out. Meaning that txrecord is actually null. And then you call a method on the null object.
[ March 02, 2004: Message edited by: Murali Nanchala ]
20 years ago
Neverming my babble about the getText() method. What you had in your code works just fine. I cleaned up the program, left your original lines in there. So you know what was happening.
21 years ago
What are you feeding the StringTokenizer?
I don't see any getText() method calls to get the value of the textfield. Get the String from the textfield and then feed it to the tokenizer. Make sure it is not null or empty.
[ December 01, 2003: Message edited by: Murali Nanchala ]
21 years ago
Check your PATH variable.
21 years ago
All the documentation you need comes with every distribution of Ant in the 'docs' folder. This includes the Ant API.
Check out the 'manual' sub folder in the 'docs' folder.
21 years ago
Can you do a jar -tvf on the jar you created and post the output here.
21 years ago
I assume you would want this in order to debug your servlet.
1. Compile your classes using the debug option
2. Make sure Tomcat's jar is in your classpath in Jbuilder.
3. Configure a run item for starting Tomcat. It may be available in the script that usually launches Tomcat. These go into the VM parameters section of the run configuration.
4. Start Tomcat in JBuilder in debug mode.
5. Hit your servlet in a browser (or however you usually do).
Keep the rest of the servlet deployment same.
I run WebLogic 7.1 in JBuilder 5 Enterprise. Let know if this helps.
21 years ago