I was seeing random failures with org.jboss.test.tm.test.TxTimeoutUnitTestCase - testOverriddenTimeoutExpires()
The timeout is set to 5'' while the bean is actually waiting 8'' inside a method. Some times the asynchronous timeout/rollback doesn't happen and I had to do a 7'' [+ 2''] seconds sleep to make it reliably pass (at least locally).
I'm wondering how tx timeouts are implemented by JBoss TS. Is there a thread that wakes up periodically (e.g. every 5'') and evaluates the timeouts or does it wake up at the exact timeout time?
Does it deal with the timeouts themselves in separate threads?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055617#4055617
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055617
"sergeypk" wrote : Yes, this will work. It seems quite inflexible to me though (a user can either access any temporary queue or none at all), but it's better than nothing.
How is this inflexible?
What is the use case for someone being able to read/write from some temporary destinations rather than others? I don't see it yet.
Even if you wanted the ability to specify different security configuration on a per temporary queue basis, how would you specify this?
This would have to be done programmatically by the creator of the temp destination. What API would they use?
I am still struggling to see what the point of this is.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055613#4055613
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055613
http://jira.jboss.com/jira/browse/JBAS-4489
I see you were already suspending incomplete transactions,
which means you had already seen and resolved the problem.
I think there is still an issue that you should be throwing an exception
for the incomplete transaction, otherwise the caller isn't going to know it failed!
The real problem is that my test is broken, it doesn't assert that it actually
got the expected exception. It should be something like:
| public void testTxTimeout()
| {
| + boolean gotException = true;
| BMTCleanUp remote = (BMTCleanUp) sessionCtx.getEJBObject();
| try
| {
| remote.doTimeout();
| }
| catch (EJBException expected)
| {
| // expected
| expected.printStackTrace();
| + gotException = true;
| }
| + if (gotException == false)
| + throw new EJBException("Did not get expected exception for incomplete transaction");
| checkTransaction();
| remote.doNormal();
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055598#4055598
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055598
Suppose we have user joe and he wants to send a message to some destination and receive a reply. So he does createConnection("joe", "joespassword") and then creates a temporary queue and sends a message to some queue with JMSReplyTo set to the temporary queue.
In the ideal world, I would probably want to configure the temporary queue so that only the intended recipient can write to it and only joe can read from it.
But what if then we have user jane trying to send a message of her own to some destination totally unrelated to that of joe's, and she wants to use a temporary queue as well? How would we configure temporary queue permissions to be adequate for both cases if both users are to use the same connection factory?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055592#4055592
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055592