just checking

I just add

    @Resource
    private TransactionManager tx;


and in the MDB initialization I set some timeout

    @PostConstruct
    public void initialize() {
        try {
            tx.setTransactionTimeout(3);
        } catch (SystemException e) {
            e.printStackTrace();
        }
    }

and when my onMessage() executes, if it takes more than 3 seconds to
complete, it throws and exception?

and if so, how do I catch it? (or I don't?)

[]

Leo

On Tue, Apr 14, 2015 at 4:20 PM, Leonardo K. Shikida <[email protected]>
wrote:

> thx!
>
> []
>
> Leo
>
> On Tue, Apr 14, 2015 at 4:16 PM, Romain Manni-Bucau <[email protected]
> > wrote:
>
>> Get the Transactionmanager injected (@Resource) and call
>> setTransactionTimeout(seconds)
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> <http://www.tomitribe.com>
>>
>> 2015-04-14 19:38 GMT+02:00 Leonardo K. Shikida <[email protected]>:
>>
>> > Hi
>> >
>> > How do I increase the MDB onMessage() transaction timeout?
>> >
>> > []
>> >
>> > Leo
>> >
>>
>
>

Reply via email to