Bugs item #1004163, was opened at 2004-08-05 14:46
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1004163&group_id=16035

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ashutosh Aman (ashutoshaman)
Assigned to: Nobody/Anonymous (nobody)
Summary: using a different DocumentFactory

Initial Comment:
Its not exactly a bug.

I am using a Factory of Factory pattern to integrate 
various XML models available in the market, which will 
give flexibility to the user to switch between different 
models, depending on the requirement, by changing the 
document factory system property. In this regard, I tried 
to set the System property to a different Document 
Factory (in the case of Dom4j, I extended the dom4j 
DocumentFactory and implemented the inhouse Factory: 
someFactory interface). I wanted to leverage the 
singleton framework of the DocumentFactory, but it did 
not work as getInnstance casts the object to a 
DocumentFactory and returns a DocumentFactory.

I had to duplicate the work of making the extended 
factory a singleton class as I could not leverage the 
existing DocumentFactory getInstance() method.

will it make sense to to provide two flavors of 
getInstance methods, second one would return an 
Object, so that extened classes can reuse it.

Thanks
Ashutosh Aman

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1004163&group_id=16035


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to