Results 1 to 1 of 1
-
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:
Where abcBean contains createObject methodJava Code:<bean id="abcBean" class="..."> </bean> <!-- the bean to be created via the factory bean --> <bean id="sampleBean" factory-bean="abcBean" factory-method="createObject"/>
Similar Threads
-
Trouble with factory method - unhandled exception type Exception
By desmond5 in forum New To JavaReplies: 1Last Post: 03-08-2008, 06:41 PM -
instantiation
By Camden in forum New To JavaReplies: 1Last Post: 03-02-2008, 04:44 PM -
Instantiation
By kavithas in forum New To JavaReplies: 2Last Post: 12-05-2007, 04:56 PM -
Instantiation using an instance factory method
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:25 PM -
Secure FTP Factory 7.0
By vglass in forum Java SoftwareReplies: 0Last Post: 07-20-2007, 01:44 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks