Rob Spoor

Sheriff
+ Follow
since Oct 27, 2005
Rob likes ...
Chrome Eclipse IDE Java Windows
Forum Moderator
Rob Spoor currently moderates these forums:
Cows and Likes
Cows
Total received
87
In last 30 days
0
Total given
32
Likes
Total received
1379
Received in last 30 days
12
Total given
2232
Given in last 30 days
9
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rob Spoor

If you add a proper Maven dependency then a good IDE will automatically download the Spring source code from Maven Central. No need to do all that stuff manually.
1 week ago
The book promo has already passed, so unfortunately you can't win the book yet. As for getting answers from Josh Bloch, you can try to post in the "Java in General" forum, but I don't expect that he's actually still around to answer them.
1 week ago
It's legal SQL that creates a cross join - every record of the left hand side joined with every record of the right hand side. Definitely not what you want.

Tim Holloway wrote:Other than that, I'm not seeing the difference between the desired SQL and the generated SQL other than names and ordering of the join terms (which are transitive in any event). Could you indicate precisely where the anomaly lies?


Check the two occurrences of address_table.

Nidheesh, can you show us your select part? Do you happen to select nameRoot.addressTable? Because that would lead to the second address_table in the query - nameRoot.addressTable is not linked to your explicit join variable.
If the interface to the outside world does not change, then changing the implementation should not matter. However, you should perform thorough testing to make sure nothing breaks.
1 week ago
But use a more up-to-date version. Spring 4.1.6 is quite old, the latest 4.x version is 4.3.15. I suggest that, if you're starting a new project, you use Spring 5.x (latest: 5.0.5). Also check out http://mvnrepository.com/artifact/org.springframework/spring-webmvc for all available versions.

One more suggestion: use a property to specify the Spring version, that way you only need to define it once (and change it once to upgrade).
1 week ago
I've removed the tmp, log and cache folders often enough. Whatever you do, don't remove the data folder or anything in it. I did once, and that included removing the WebLogic admin account...
1 week ago

Prasad Saya wrote:


And what happens if I use as input date 123/456/789? Your "parsing" doesn't fail, perhaps the LocalDate.of call does. I think it's especially strange that you use DateTimeFormatter for formatting (why not use String.format("%02d%02d%02d", month, day, year) and get rid of the LocalDate?), but not for parsing.

Anyway, my advice: don't build your own date parsing, there are too many cases you have to take into account.
1 week ago
1. When the message is acknowledged. This can happen because the transaction completes successfully, or by an explicit call in non-transacted systems.

2. I think it depends on the message broker, but mostly it is free for reassignment to another consumer (or the same one), which means it will get retried. After a few errors it gets sent to the so-called dead letter queue (DLQ).

3. It will be gone from the system.

4. If processing the message fails, the message will usually get retried, and therefore delivered to more than one consumer (but only one at a time). That means that consumers must make sure that all work they do is rolled back upon failure, or they are capable of handling duplicate messages. No two consumers will ever be able to successfully process a message and report success.
1 week ago

Tony fig wrote:                    while ((len = is.read(buffer)) > 0) {


I don't know if it's the cause of the error, but you should check for >= 0 or != -1. 0 is a valid return value, which just means that nothing was available right now, but at a later time data may become available again. Only -1 has a special meaning here: the actual end of the stream.
1 week ago
Since I already have a copy, I'd like to pass my copy over to the next candidate.
2 weeks ago

Joshua Bloch wrote:It contains a promo code that will get you 35% off and free shipping from InformIT☺️


Still not as cheap as I had to pay thanks to Amazon's error (just under €18)
2 weeks ago