|
From: Colin S. <col...@ex...> - 2004-04-29 18:35:06
|
I just realized that TransactionProxyFactoryBean always returns true for
ProxyFactoryBean's the isSingleton() method, and internally does not
support non-singleton operation, since it only sets up the proxy once in
afterPropertiesSet().
I have a case where a client of the beanfactory is using
bf.getBean("xxx"), and needs to get back a new transactionally wrapped
instance on every call, sine the object is stateful, unlike every other
service I've wrapped transactionally so far.
Does anybody know why the class was set up to operate in singleton mode
only? It makes sense as a default of course, but I can't see anything in
the code precluding allowing it to operate in non-singleton mode as
well, if things were moved around a bit...
Regards,
Colin
|