Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2008, 01:41 PM
Java Tip's Avatar
Moderator
 
Join Date: Nov 2007
Posts: 1,691
Rep Power: 5
Java Tip will become famous soon enoughJava Tip will become famous soon enough
Default 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.


Code:
 
<bean id="sampleBean"
class="sample.SampleBean" singleton="false"/>
<bean name="AnotherBean"
class="sample.SampleBeanTwo" singleton="true"/>
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Singleton - Creational Design Pattern (II) JavaForums Java Blogs 0 03-08-2008 10:00 PM
Singleton Pattern Java Tip Java Tips 0 01-24-2008 04:21 PM
Whether to make Bean Singleton or non Singleton (prototype) JavaBean Java Tips 0 09-26-2007 09:32 PM
Google Singleton Detector 0.7.2 levent Java Announcements 0 07-26-2007 09:12 PM
singleton pattern Peter Advanced Java 1 07-09-2007 05:45 AM


All times are GMT +2. The time now is 04:24 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org