public < R > R executeTransactionalCommandInSeparateThread ( final TransactionalCommand < R > command ) throws MithraBusinessException { return this . executeTransactionalCommandInSeparateThread ( command , this . defaultTransactionStyle ) ; }
Use this method very carefully . It can easily lead to a deadlock . executes the transactional command in a separate thread . Using a separate thread creates a brand new transactional context and therefore this transaction will not join the context of any outer transactions . For example if the outer transaction rolls back this command will not . Calling this method will lead to deadlock if the outer transaction has locked any object that will be accessed in this transaction . It can also lead to deadlock if the same table is accessed in the outer transaction as this command . It can also lead to a deadlock if the connection pool is tied up in the outer transaction and has nothing left for this command .