Gregg Wonderly wrote:
Sim IJskes - QCG wrote:
Hello,
Has anybody ever worked on/with a static class that functions as a
exporter registry? And, is it a really bad idea?
I would love to be able to do 'mysrv = GlobalExporter.export(myobj);'.
I've done this to create tracking of "authenticated" exports that allow
me to free some resources when these objects become unreferenced or
unexported explicitly.
And whats your view on using it? Did it work, would it be apropriate in
River?
I use single instance instead of static instance as my model though so
that I can create test instances and do particular injections for other
reasons too.
So this means, 'mysrv = GlobalExporter.getExporter().export(myobj);' yes?
And what do you think about a GlobalExporter with a list of exporters
with priorities, who are allowed to have a go in order of priority until
one exports? Would you still use a single instance?
Gr. Sim
--
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397