Transactional support

Jul 10, 2009 at 4:25 PM


great project, I am very happy I found this project, it will save me alot of
time. One thing though, even though it partly supports transactional
queues, I really need an explicit commit and rollback method, instead
of an implicit one. I know it is possible in MSMQ. I hope you can find the
time to implement this. I can send you the C# code for it, if that helps.

Best regards,

Aug 11, 2009 at 9:57 PM

I am not familiar with how to do transactions in C code on Windows.

I'll need more than a little help implementing that feature.

Aug 25, 2009 at 3:16 PM
Edited Aug 25, 2009 at 4:17 PM

I guess it will be near impossible to attach the MSQM-operations to a java-transaction.

MSMQ has its own transaction manager. It can be started using MQBeginTransaction.

I guess one should create a transaction manager-wrapper, that will handle commit/abort of the MQ-Transaction. This will ensure that if exceptions are thrown after having started a MSMQ transaction, then it will automatically abort the transaction when the transaction manager is destroyed (Unless explicit commit was performed). No idea if this is possible in java garbage collection world.

Jan 6, 2011 at 1:10 PM

Hi All,

It seems that the latest version still can not send message to a transactional MSMQ queue.

Do you have any ideal about this issue?

Urgent case, I'll wait for your response online.


Jan 6, 2011 at 1:16 PM

See "TransactionType" when calling send on the Queue-object

Jan 6, 2011 at 1:29 PM

you mean you have tested it successfully with a TransactionType is not null?

I've tried all the TransactionalType "MTS ,XA, SINGLE_MESSAGE, None", all of them can't work.

I just change the source of into this "queue.send(msg, TransactionType.MTS);", anyother code needs to be changed?

Note: My destination queue is a private transactional queue, I can send to a non-transactional queue successfully without change the code.




Jan 6, 2011 at 2:58 PM

Must admit that I have pretty much rewritten the code for this project, as it had several design flaws in its initial implementation. I mailed the updated code to the original author, not sure what has happened from there.

Not sure if it is possible to attach files to this forum.

Jan 9, 2011 at 9:17 AM
Edited Jan 9, 2011 at 9:17 AM

Have attached the file here:

Jan 10, 2011 at 12:01 PM

Thanks for your sharing..I wanner know why the API don't need username/password when launching all the operations?

It seems that it cann't do any operation on the MSMQ successfully which installed in Win7 OS, is that because Win7 requires a higher security level?

Any suggestions?

Jan 10, 2011 at 6:01 PM

You might have to grantt access right to the queue, before you can read and write to it.

Jan 12, 2011 at 2:52 AM

I've granted all the right to the user: everyone,anonymous, administator. But it still can not works.

I just can not do any operations on the MSMQ installed in win7 OS remotely.

Can you tell me anything else should I do?

Jan 12, 2011 at 6:20 AM

When installing MSMQ make sure you are not installing any AD integration addons for MSMQ, since they usually cause troubles.

Also reinstalling MSMQ will some times solve some problems as well.

Maybe also check that the firewall on the Win7 is turned off, or allows incoming MSMQ operations.

Jan 14, 2011 at 4:20 AM

Thanks for you response snakefoot!

I've tried all the methods you mentioned, but it still can't works.

I guess its mainly due to the security level of Win7 is much higher than XP. But I guess if we can pass the user/pwd to MSMQ

before doing any kind of operations on it should be much better!

If anyone who receive/send message to MSMQ installed on Win7 successfully, please tell me how you configure your MSMQ.

Thanks a lot in advance!