composing new service assemblies using existing service units
JBI allows new Service Assemblies to be composed using previously deployed service units. What are the SA/SU LifeCycle semantics in this case?
For example, lets assume that SA1={SU1, SU2} is deployed first, and then another assembly SA2={SU1, SU2, ...} is deployed. When SA2 is deployed, SU1 and SU2 are detected as "duplicates" and not redeployed, but I assume that they still "belong to" SA2. We start SA1, and SA2 and then subsequently shutdown SA2. Are SU1 and SU2 shutdown when SA2 is shutdown? What does DeploymentService return for the getState method for SA1 and SA2? What happens if we undeploy one of these assemblies - are SU1 and SU2 undeployed?
This is not making much sense. Did I read the spec correctly?
[739 byte] By [
rgarg2a] at [2007-10-2 5:12:47]

This is an area that may benefit from further elaboration in the specification, and will likely be a subject of JBI 2.0.
The current (1.0) model is that any particular SA can be in a rather complex set of states, composed of all possible combinations of running states of the SUs that comprise that SA. (This includes running, stopped, and even uninstalled, in the case of a partially successful deployment.) The only combination that is not possible is "all SU's failed to deploy".
Thus it is possible (at run time) to encounter unusable services that were deployed as part of a service assembly under a variety of circumstances, including the scenario you outlined. Shutting down SA1 will cause SA2 to, in all likelihood, to fail. This becomes a system management issue, where the system administrator must understand the consequences of shutting down shared services.
More complex management infrastructure could aid the sys admin in this task. For example, service units could be tagged such that a "start counter" policy is employed by the JBI implementation. JBI 1.0 chose not to mandate such functions until we get more experience with management of multiple composite applications that overlap. (JBI 2.0 may address this in the context of a distributed system, so network considerations will enter the discussion.)