Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-26-2007, 09:32 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
Rep Power: 10
JavaBean is on a distinguished road
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
Whether to make Bean Singleton or non Singleton (prototype) Java Tip Java Tips 0 03-29-2008 01:41 PM
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
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 05:38 PM.



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