The Artima Developer Community
Sponsored Link

Java Buzz Forum
Spring solves the Javahut problem

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Dominic Da Silva

Posts: 374
Nickname: dsuspense
Registered: Jul, 2003

Dominic Da Silva is President of SilvaSoft, Inc.
Spring solves the Javahut problem Posted: Mar 31, 2004 10:18 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Dominic Da Silva.
Original Post: Spring solves the Javahut problem
Feed Title: dsuspense
Feed URL: http://tss9.serverconfig.com/suspended.page/
Feed Description: Java/J2EE, .NET, OpenSource, Orlando living, Trinidad stuff and of course the Dolphins!...
Latest Java Buzz Posts
Latest Java Buzz Posts by Dominic Da Silva
Latest Posts From dsuspense

Advertisement
I came up with a Spring solution to the Javahut problem defined in James Turner's LinuxWorld article and highlighted in Russell's post.
The problem is defined as:

Imagine if the Perl cafe and Javahut were across the street from each other. You walk into Javahut, and ask to sit down. "I'm sorry," says the person at the door. I'm not actually the hostess, I'm a Factory class that can give you a hostess if you tell me what type of seat you want." You say you want a non-smoking seat, and the person calls over a NonSmokingSeatHostess. The hostess takes you to your seat, and asks if you'll want breakfast, lunch, or dinner. You say lunch, and she beckons a LunchWaitress. The LunchWaitress takes your order, brings over your food, but there's no plates to put it on because you forgot to get a CutleryFactory and invoke getPlates, so the Waitress throws a null pointer exception and you get thrown out of the place.

And my solution:

If he was using Spring, 400 he would have had everything he needed to order, seat, and eat already specified before he walked in the door.
So upon entering Javahut all his depend objects would be there waiting for him.

Read: Spring solves the Javahut problem

Topic: Saturday Previous Topic   Next Topic Topic: OC4J is officially J2EE 1.4 compatible

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use