Results 1 to 1 of 1
-
Whether to make Bean Singleton or non Singleton (prototype)
Beans are deployed in singleton mode by default, unless programmer specify otherwise. By changing the type to non-singleton (prototype), each request for a bean will result in a newly created bean so it is up to programming need what type to use Singleton or prototype.
Java Code:<bean id="sampleBean" class="sample.SampleBean" singleton="false"/> <bean name="AnotherBean" class="sample.SampleBeanTwo" singleton="true"/>
Similar Threads
-
Singleton Pattern
By Java Tip in forum Java TipReplies: 0Last Post: 01-24-2008, 03:21 PM -
Whether to make Bean Singleton or non Singleton (prototype)
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:32 PM -
Google Singleton Detector 0.7.2
By levent in forum Java SoftwareReplies: 0Last Post: 07-26-2007, 08:12 PM -
singleton pattern
By Peter in forum Advanced JavaReplies: 1Last Post: 07-09-2007, 04:45 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks