What is the correct way to invoke Beans.instantiate()?
Location: http://www.jguru.com/faq/view.jsp?EID=704314 Created: Dec 28, 2001 Author: Govind Seshadri (http://www.jguru.com/guru/viewbio.jsp?EID=14) Typically, you should invoke the method as: Beans.instantiate(this.getClass().getClassLoader(), yourBeanName) Beans.instantiate() basically loads a class, creates a Class object, and then n instantiates an object of that class. If the Bean name corresponds to a serialized Bean prototype, it uses that prototype. Otherwise the instantiation uses a zero-argument constructor. When invoking instantiate(), you should ensure that you have specified the correct name for the class. Also, the class should have public scope and should contain a no-arg constructor.