Hi,

Is there a best practice for creating factories?.

I am pretty much creating 1 factory per unit of database work (which is 
roughly a request in a web application) and pass it a connection from a 
connection pool.

Is this a good way to do it? Is it expensive to create them? Or should I be 
pooling the factories too?

Also, kinda related... is there a way to close a factory so that updateable 
records don't accidently try and use the factories connection when it has 
actually been reassigned to somewhere else (from the connection pool). So 
if I call MyRecord.store() and it was attached to a closed factory, it will 
give an exception.

Thanks, Ryan

Reply via email to