Thank u for ur help, But I have another problem, Because the Attributes I transfer into the constructor are not only String, but have complicate class, such as Properties. How do I first construct the child Object, and then transfer the child Object into the father Constructor.
Best Regards IMCaptor -----�ʼ�ԭ��----- ������: Simon Kitching [mailto:[EMAIL PROTECTED]] ����ʱ��: 2002��11��25�� 4:32 �ռ���: Jakarta Commons Users List ����: Re: [digest help] How two construct a Object without a defaultConstructor? Hi "IMCaptor" (what an unusual name you have :-) What you need is the FactoryCreateRule. Step 1: Write a class which extends org.apache.commons.digester.AbstractObjectCreationFactory. Implement the createObject method. Step 2: call method addFactoryCreateRule on your digester instance to set up the appropriate rule. See the javadoc for class FactoryCreateRule for more info. Regards, Simon On Mon, 2002-11-25 at 03:04, ���챦 wrote: > Hi All: > I want to config the connection factory with a xml file, and want to > parse the file with digest. But the > org.apache.commons.dbcp.DriverManagerConnectionFactory > has not default constructor, > How can I do this? > > this java file has two contructor > > public DriverManagerConnectionFactory(String connectUri, Properties props) { > _connectUri = connectUri; > _props = props; > } > public DriverManagerConnectionFactory(String connectUri, String uname, String passwd) { > _connectUri = connectUri; > _uname = uname; > _passwd = passwd; > } > > and my xml file like this > <connnection-factory> > <connection-uri>jdbc:tset:fasdf</connection-uri> > <properties> > <property key="fdaf" value="fdasf"><property> > ................ > </properties> > </connection-factory> > > the class DriverManagerConnectionFactory has no public getter and > setter. > > > Thank u! > > IMCaptor > Best Regards > > ______________________________________________________________________ > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> -- Simon Kitching <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
