ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Using Dependency Injection in Java EE 5.0
Subject:   One class != one object
Date:   2007-05-01 10:12:33
From:   docbillnet
Response to: One class != one object

Opps. My example should have been:

<bean id="displayMessage1" class="DisplayMessage">
<property name="message" ref="message1"/>
<bean id="displayMessage2" class="DisplayMessage">
<property name="message" ref="message2"/>
<bean id="displayMessage3" class="DisplayMessage">
<property name="message" ref="message3"/>

Just imagine how cluttered your project files will look with hundreds of duplicated classes.