David Jencks wrote:
Thank you, David.On Thursday, January 23, 2003, at 06:21 AM, Igor Fedorenko wrote:Hi,
There was a race in XAManagedConnectionFactory.getXADataSource that I've temporary fixed by synchronizing calls to this method. To provide a better (faster) implementation I need to initialize XADatasource when XAManagedConnectionFactory gets started but I cannot find appropriate callback in BaseWrapperManagedConnectionFactory class hierarchy. Am I missing something?
I'm not sure what you expect to find. There aren't any lifecycle methods in ManagedConnectionFactory, so you pretty much have to initialize it when you first use it. I'm not sure initializing in a start method would remove the need for synchronization anyway. (In jca 1.5 there is a ResourceAdapter class with a start method)
Actually, I have found that XAManagedConnectionFactory implements javax.resource.spi.ManagedConnectionFactory thus I could implement createManagedConnection(...) methods to performs initialization. However, I also realized that getXADataSource is called only a few times (thanks for XAConnection cache), so there is no real point trying to optimize it.
--
Igor Fedorenko
Think smart. Think automated. Think Dynamics.
www.thinkdynamics.com
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
