Tuesday, January 25, 2005

MDB

I found in the JMS forums that people usually don’t know the difference between MDB management modes. The following summary should clarify things:

With container-managed transactions, the MDB container sets the boundaries of the transactions. Typically, the container begins a transaction and receives a message within it (On the implementation level it is a little bit more complicated than that and I might Blog more details if I am asked). It is the responsibility of the container to enlist other Bean operations (invoked within the onMessage code) whit the running transaction. The container then commits the transaction just after the onMessage method exits or rolls it back when setRollbackOnly is set or when an exception is thrown.

With bean-managed transactions, the code in the MDB explicitly marks the boundaries of the transaction. It is the responsibility of the programmer to get a transaction, to enlist resources and to decide of its outcome. It is not possible to associate the received message with a transaction as messages are delivered to the MDB within a standard session (not an XA Session as it is the case for CMT).

Note that this is also true for the Arjuna MDS (Message Driven Service) container. I’ll tell you more about MDS later.


Monday, January 24, 2005

Messaging in J2EE 1.4

Today I had a look through developerworks at IBM's, and stumbled across an article called 'Get the message: Messaging in J2EE 1.4 from ibm.com .


The paper says that the J2EE 1.4 introduces changes to the way an application server uses JMS. In particular, you can only have one active (not-closed) Session per connection at any one time. This could be a bit confusing at first but that's part of the EJB spec. A call to createSession returns always the same session. In J2EE 1.4 this has moved from the app server to a JCA 1.5 resource provider. So for outbound messaging it has only 1 session per connection, so in fact the connection will be the entity for transactional control like it is the case for a database connection.




Monday, January 17, 2005

My first post

I have been reading Mark Little’s weblog (http://markclittle.blogspot.com) for few months now and I have been inspired (I really recommend it, Mark is an excellent writer) and decided to create my own one. I take that as an exercise of style that should help me improving my written English (I need feedback for that).
I don’t know exactly what I am going to talk about but I would guess on general IT, Javaish stuff as well as philosophical comments on everything. I should talk about my leisure activities: biking, running (It’s time to register for the great North Run!!!! Hurry up!), swimming, golf, music cinema etc… I could as well be inspired by management studies and this semester I may bore you with some accounting things.
We will see what will inspire me the most. I may even start writing a fiction, who knows.