-
1. Re: Fresh transaction for POJO ResourceLoader?
nickarls Mar 26, 2008 10:39 AM (in response to nickarls)EJB:s have some sort of TransactionAttributeType.REQUIRES_NEW but is there something like that for POJOs?
-
2. Re: Fresh transaction for POJO ResourceLoader?
nickarls Mar 27, 2008 8:33 PM (in response to nickarls)Doing some magic with the user transaction?
Doing some magic with the seam conversation?
Waving a dead chicken across the keyboard?
-
3. Re: Fresh transaction for POJO ResourceLoader?
nickarls Mar 29, 2008 12:27 PM (in response to nickarls)OK, I'll borrow my dogs rubber chicken for monday if I dont' get any other suggestions ...
-
4. Re: Fresh transaction for POJO ResourceLoader?
pmuir Mar 29, 2008 2:45 PM (in response to nickarls)
Nicklas Karlsson wrote on Mar 26, 2008 10:39 AM:
EJB:s have some sort of TransactionAttributeType.REQUIRES_NEW but is there something like that for POJOs?Not AFAIK
/** * Transaction propagation strategies for Seam JavaBean * components. Note that unlike EJB3 components, there * are no strategies for suspending transactions. * * @author Gavin King * */
Which implies to me that you can't force a new transaction.
Apart from managing the transaction yourself (which isn't nice), I can't see an easy solution. Perhaps your ResourceLoader has to detect that the Transaction is dead and uses a property file at this point (transaction death is fairly extreme...)
-
5. Re: Fresh transaction for POJO ResourceLoader?
nickarls Apr 10, 2008 10:30 AM (in response to nickarls)Run into a side-plot when trying to make a custom log4j database appender: if there is a database error that kills the transaction and I try to log it by getting a connection from the same data source, I get a
Transaction not active
on the getConnection()Since the "transaction infestation" seems to span across connections(?), is there any way to get around this other than have a separate logging-datasource?