Announcement Announcement Module
Collapse
No announcement yet.
Transaction propogation support with Hessian/Burlap/HTTPInvoker Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction propogation support with Hessian/Burlap/HTTPInvoker

    Hi,

    Does RPC protocols like Hessian/Burlap/HttpInvoker supports transaction propogation?

    Any example/sample will be really a great help.
    The scenario can be:

    A gui client/java client calls ejb. This ejb commits to database and calls a hessian service which in turn calls an ejb that commits to database.

    Thanks in Advance
    MJ

  • #2
    No, transaction propagation is only implemented in RMI-IIOP.

    Federico.

    Comment


    • #3
      What stops me from adding a Jta transaction manager to the service calls (or the EJB which is used by it)? If everything is in the same app server, then it should co-ordinate the transaction.

      Comment


      • #4
        Well, if you're using Hessian/Burlap to expose your services I assume they're not in the same server. Even if they're, tx coordination will not work because the underlying protocol doesn't provide that feature.
        If they're, in fact, in the same server I guess it should also expose an ejb local interface to achieve the desired coordination.

        Federico.

        Comment


        • #5
          Hessian Protocol

          Below is text from hessian spec.

          <hessian-specs>
          Headers
          Headers are (string, object) pairs that preceed the arguments.

          The value of the header can be any serialized object.

          For example, a request might include a transaction context in a header.
          <code>
          Call with Distributed Transaction Context c x01 x00
          H x00 x0b transaction
          r t x00 x28 com.caucho.hessian.xa.TransactionManager
          S x00 x23 http://hostname/xa?ejbid=01b8e19a77
          m x00 x05 debug
          I x00 x03 x01 xcb
          z
          </code>
          </hessian-spec>

          Also, if you read the hessian design goals, one of the goal was the support for transaction.

          When they say, they support transactions, it is hard to believe that it cannot be achieved using spring....

          Any taker of this challenge...

          Comment


          • #6
            You also need a JTA XA transaction manager that's capable of distributed transactions on the side that initializes the transaction. Not all JTA XA transaction managers support it (JBoss has no support for it - maybe 4.0.5 or 5.0.0 support it, not sure).

            If you are doing ejb<->ejb communication why do you need hessian?

            Edit: if we are talking about one single server, yes it should work, but then you need no remoting at all.

            Comment


            • #7
              Originally posted by sp_ojha View Post
              Also, if you read the hessian design goals, one of the goal was the support for transaction.

              When they say, they support transactions, it is hard to believe that it cannot be achieved using spring....
              As you say it's listed in the design goals, however I haven't ever seen a working example or even a reference of that. (I didn't make an exhaustive research though).
              There's no reference of that even in the spring docs (http://www.springframework.org/docs/.../remoting.html), section 17.8

              Maybe you're right and it works, but nobody tried it yet.

              dejanp: Why should it work in a single server? Are you assuming everything happens in the same thread? Isn't transaction information lost in such a call?

              Comment

              Working...
              X