-
1. Questions on the SessionStore API
objectiser Feb 4, 2011 4:10 AM (in response to jeff.yuchang)Jeff Yu wrote:
1. For the create method in the API, we currently have as following:
public java.io.Serializable create(ProtocolId pid, ConversationInstanceId cid) throws IllegalArgumentException, java.io.IOException;
I think we need to have the Serializable Object that we want to initialize, especially on the RDBMSSessionStore class, cause typically it just needs to know how to store/retrieve objects from/to back-end database, the object initialization should be happened somewhere else.
Yes you are right - the reason for passing serializables is so (for now) the sessions themselves are untyped in respect of the store - however the way I have created the API at the moment, the implementation would need to know the concrete type to be able to create it
So yes the serializable should be passed in - if you could update the API and impl accordingly.
Jeff Yu wrote:
This is the first implementation of the API, so I am happy for you to remove the exception declarations for now - and we can always review this later if needed.
Jeff Yu wrote:
Agree that this can be an issue - however it means that the structure of the session needs to be fixed (i.e. to map onto the fields). Currently the session is associated with another project, and it is difficult to know how that may evolve, and be used in conjunction with Savara. Hence the reason for dealing with sessions as untyped concepts for now.
In terms of the implementation of the session, we can use externalisable to help manage the structure if changes are required (within reason) - obviously wouldn't cope with class name changes.
Regards
Gary