Re: Sequence diagram for client/server application
Wednesday, April 24, 2002 10:32 AM
well, you are right and wrong. client is invoking a method or sending a message on the server. in sequence diagrams, method of invocation is not important. it does not matter whether you are invoking a local class or remote server. you are showing the flow of control and data through your application. so model as if they are running in the same JVM. the only thing that you need to worry is that if the call is asyncronous, then you need to model that. otherwise, model as if they are in the same JVM. if you ever see a sequence diagram that involves a remote client executing a method on the EJB, you will see that most diagrams show it as if client is calling some method on the bean itself. what in fact happens is that a client is using a remote stub of the bean to send a method invocation which gets transferred over the network to a stub on the server where call is intercepted by the ejb container for processing before it ever gets to the EJB implementation. but those details are not interesting on the sequence diagrams. on the sequence diagrams, you are showing what 'eventually' invokes what without showing the mundane details of where the classes are located. there are other diagrams where this is shown.