Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-26-2007, 09:25 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Instantiation using an instance factory method
There is provision where factory method of an existing bean from the container can be the factory bean, which contains a method called createInstance().

To use this technique the 'class' attributes must be left empty, and the 'factory-bean' attribute will specify the name of a bean in the current or lower bean factory which contains the factory method. The factory method is set via the 'factory-method' attribute.

Following code will give more clarity

Code:
<bean id="abcBean" class="..."> </bean> <!-- the bean to be created via the factory bean --> <bean id="sampleBean" factory-bean="abcBean" factory-method="createObject"/>
Where abcBean contains createObject method.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


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

vB 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
Instantiation using an instance factory method Java Tip Java Tips 0 03-29-2008 01:35 PM
Trouble with factory method - unhandled exception type Exception desmond5 New To Java 1 03-08-2008 07:41 PM
instantiation Camden New To Java 1 03-02-2008 05:44 PM
Instantiation kavithas New To Java 2 12-05-2007 05:56 PM
Secure FTP Factory 7.0 vglass Java Announcements 0 07-20-2007 02:44 PM


All times are GMT +3. The time now is 08:14 AM.


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