Some kind of expiring Map would work. Or perhaps place them in an LRUMap or something assuming the garbage collecor will close the channels out ok.
So I guess what you're saying is it's in theory ok to use Proxy's as singletons though it might be kind of problematic until you figure out a way to clean up the channel cache right? Mike On 3/17/06, Dan Diephouse <[EMAIL PROTECTED]> wrote: > Michael Youngstrom wrote: > > Can the proxies created from XFireProxyFactory.create() be used as > > singletons? > > > > > As long as you only ever access it with one Thread at a time. > > I noticed that AbstractTransport appears to create a Map of channels > > (if no endPointUri is provided) which don't seem to ever get disposed > > if the Proxy is never released. Is this a possible memory leak or am > > I just not supposed to use Proxies as singletons themselves? > If Channel.close() is called it should clean up. We didn't have a > Client.close() which called this though until just recently. I'm see no > good way to have the Proxy call Client.close() automatically though. > Maybe we should just clean up channels after a certain period of > inactivity? Any thoughts? > > - Dan > > -- > Dan Diephouse > Envoi Solutions > http://envoisolutions.com > http://netzooid.com/blog > >
