1 Reply Latest reply on Jan 9, 2003 4:39 AM by Sacha Labourey

    SFSB state replication & socket cnxns

    Sriraam Newbie

      Hi ,

      We are using JBoss 3.0.4 currently and have bought the paid docs for clustering and CMP. The current issue we are facing is about state replication for SFSB.
      Specifically can someone help us to understand the following
      1)What constitutes the state that gets replicated ?
      2)Is there any deployment descriptor setting that allows us to say what attributes of a SFSB needs to be replicated leaving the remaining untouched?
      3)How are Socket connections/ DB connections handled in replication? For eg if the bean has opened a socket and stores the socket reference as its state, how will that reference be replicated.?
      It might be meaningless for the failover bean to directly make use of the socket reference of the failed bean instead of creating a connection of its own.

      The same applies to DB connections with BMP.


      What are the methods to use to use in such cases of acquiring non-duplicatable resources and yet achieve fault-tolerance?


      Thanks in advance and happy new year,
      Sriraam

        • 1. Re: SFSB state replication & socket cnxns
          Sacha Labourey Master

          Hello,

          > 1)What constitutes the state that gets replicated ?

          Read the EJB spec, the section on SFSB passivation: it is *yours* to decide what is the state of a SFSB, the container do not have a clue about it (do not confuse SFSB with Entity Beans)

          > 2)Is there any deployment descriptor setting that
          > allows us to say what attributes of a SFSB needs to
          > be replicated leaving the remaining untouched?

          there is no attribute notion in SFSB.

          There is the isModified() optimisation in JBoss though (see the doc)

          > 3)How are Socket connections/ DB connections handled
          > in replication? For eg if the bean has opened a
          > socket and stores the socket reference as its state,
          > how will that reference be replicated.?

          see the spec on SFSB ;) There is nothing new here. The question could be: if I open a socket in my SFSB, what happens if the container wants to passivate my bean? What is my responsability as a developer?

          Personnaly, I would implement some kind of service running on each node that would deal with these sockets issues, etc. and not handle that in my beans directly.

          > It might be meaningless for the failover bean to
          > o directly make use of the socket reference of the
          > failed bean instead of creating a connection of its
          > own.

          Open Sockets are not serializable...

          > The same applies to DB connections with BMP.

          in this case you use a local datasource which is pooled, you don't manage resources yourself in your bean implementation.

          Cheers,


          Sacha