-
1. Re: SFSB state replication & socket cnxns
slaboure Jan 9, 2003 4:39 AM (in response to gvsriraam)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