Scott Johnson

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

Recent posts by Scott Johnson

Is there any other way to do it

Yes, has some information on how to manage transactions.
Unless you enable auto-commit, you'll need to explicitly commit the transaction.
It sounds like the result is getting cached in the query cache.

Do you have the Hibernate query cache enabled? Set this query to be non-cacheable and see if the problem disappears. For more information read section 19 of the Hibernate documentation.

Why REST is called lighter weight Web Service???

One reason is because there is a certain amount of overhead involved in creating, transmitting and parsing the XML for a SOAP envelope.
16 years ago
Is your point that the compiler should give you an "unreachable code" error at compile time?

That would be a really hard thing for the compiler to detect.

It would have to know:

1. exactly what object(s) nt1 could ever reference
2. what types those objects are (i.e., is the object actually a subtype that has overridden the run() method?)
3. that when executed the run() method of those objects will always go into an infinite loop
4. that there is code in the method after is called.

I guess it's theoretically possible for the compiler to implement an algorithm to check every possible code path for every possible combinations of objects to verify there is no obviously unreachable code, but I'm sure Sun decided it's not worth the effort.
If you mean that, since is not executing in it's own thread [in spite of the name of the object], the run() methods of the other two NiceThread objects will never get executed, then yes.

When testing the equality of two objects use '.equals()' instead of '=='. has posted an interesting introduction to the concept of an Enterprise Service Bus (ESB). The article describes an open source ESB called Mule and why one IT department chose it over several other options.

[Full disclosure: The author is a co-worker of mine.]
17 years ago
The -Xmx parameter sets the maximum Java heap size. Heap is only part of the total memory used by the JVM. So yes, the JVM process as a whole can consume more than that amount.

See chapter 3 of the JVM spec for more information.
[ January 14, 2007: Message edited by: Scott Johnson ]
17 years ago
I've not used JavaDB yet, but in general, committing after every 100 or 1,000 rows [or more] will probably result in a major improvement in the number of rows you can insert per second. Building and tearing down a transction can be quite a bit of overhead.

I've seen over 100+% improvement in performance by using this technique. You have to balance the performance improvement with the resources (i.e., locks) held for the duration of the transaction.

If you are going to allow the transaction to span several callbacks, things may be a little complex if, in the event of a failure, you need to notify the caller that that certain rows that you previously processed failed to be inserted (and not just the last/current one.)
With all due respect, the experts expect that you'll make a reasonable effort to find the answer on your own. When you get stuck they can help you resolve your problem.

You need to get access to a machine with a servlet container. A big part of learning is experimentation.
[ January 10, 2007: Message edited by: Scott Johnson ]
See java.util.Arrays. It has some methods you'll be interested in.
17 years ago
Why don't you try them yourself and find out?
Take a look at InetAddress.getAllByName();
17 years ago

That was very helpful, but sometimes the best way to teach is to point the student in the right direction and let him find the solution on his own.

If Param had to code it himself, he would end up much more familiar with the methods of the Calendar class and how to use them.

17 years ago