David, As it stands right now, you can't pass a TransactionManager(Factory) into JDO(Manager) or similar object. But you could still implement your own TransactionManagerFactory, add it to the list of supported transaction manager factories (via the castor.properties file) and simply start using it by specifying in the JDO config file that you want to use your custom factory ?
<transaction-demarcation mode=global"> <transaction-manager name="custom" /> </transaction-demarcation mode=global"> But you are right that currently we rely on 'static trickery' .... Werner > -----Original Message----- > From: David Blevins [mailto:[EMAIL PROTECTED] > Sent: Samstag, 18. März 2006 08:16 > To: Castor Dev > Subject: [castor-dev] Giving Castor JDO a TransactionManager manually > > So I'm digging around the source looking for a way to set the > TransactionManager explicitly via some sort of > setTransactionManager method and not finding anything public. > There is obviously the whole TransactionManagerFactory thing > which would be fine if I could just implement one that I > could construct myself and pass my TransactionManager into > that, but of course there doesn't seem to be > a way to give Castor a TransactionManagerFactory instance either. > Instead it wants to parse the > "org.castor.transactionmanager.Factories", instantiate my > factory itself and make me use static field trickery to get > my TransactionManager instance handed over. > > Is there anyway we can cut the middle man out somewhere? > Maybe it's there and I can't find it? > > If I could just hand you an instance of TransactionManager or > TransactionManagerFactory at some point while constructing my > JDOManager, we'd be golden. > > Any thoughts? > > -David > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

