On Mon, 14 Jan 2002 20:01, Paul Hammant wrote:
> What is the feeling about the inter-sar communication.  Clearly we need
> a lookup stage before the service can be used just like normal.
> Question is should it be part of the existing API :-
>
>   public void compose( final ComponentManager componentManager ) throws
> ComponentException {
>         mMyService = (MyService) componentManager.lookup( MyService.ROLE );
>         mJoService = (Jo) coponentManager.lookup( Jo.ROLE );
>   }
>
> Or a separate API? :-
>
>   public void compose( final ComponentManager componentManager ) throws
> ComponentException {
>         mMyService = (MyService) componentManager.lookup( MyService.ROLE );
>   }
>   public void compose( final CrossApplicationComponentManager
> componentManager ) throws ComponentException {
>         mMyService = (MyService) componentManager.lookup( MyService.ROLE );
>   }
>
> It is important because we might need to juggle the needs of Phoenix
> which might like to do all lifecycles methods against each sar in turn
> and the assembler who might like to choose whether a particular
> application depends on a block that the sar contains or another in an
> alternate sar that is also deployed.

I guess there are are a few real questions that need to be answered before we 
can get clean inter-application communication. It really depends upon the 
answers to these questions, how inter-sar communication can be enabled.

Q1. Do we need "pass by reference" or can we live with "pass by value" 
semantics for inter app communication?
Q2. If Application A depends on Application B then does shutdding down B 
require the shutting down of A?
Q3. Should you be able to "browse" the services offered by another 
application or should you only access services that you declare dependencies 
on and are wired together via an assembly mechanism?
Q4. Should it matter if applications are on different JVMs or not?
Q5. Do services offered by other applications need to be accessed via 
standard mechanisms or can they be accessed from the somewhat round-about 
dynamic dispatching APIs ? ie is something like 

final Object[] args = new Object[] { param1, param2 };
Object result = myObject.invoke( "myMethodSignature", args );

So I guess the question comes down to which types of services can and should 
be exported between applications. I have a few ideas that I sketched out in 
november but I would like to hear your ideas first.

-- 
Cheers,

Pete

--------------------------------------------------
 Logic: The art of being wrong with confidence...
--------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to