Hi,

It seems that OASIS version of the spec provides a direction here. See: 
http://www.osoa.org/jira/browse/ASSEMBLY-44. The proposal is quoted below:

"All of these artifacts within an SCA Domain are defined in SCA contributions 
in files called META-INF/definitions.xml (relative to the contribution base 
URI). Although the definitions are specified within a single SCA contribution, 
the definitions are visible throughout the domain. Because of this, all of the 
QNames for these definitions MUST be unique within the domain. "

I personally think it might be better to provide a bit scoping based on the 
import/export statements. But it would be a question to the spec people.

Thanks,
Raymond



From: Simon Laws 
Sent: Monday, January 12, 2009 2:15 AM
To: [email protected] 
Subject: Re: [1.x][2.x][DISCUSS] definitions.xml processing


Hi Greg

Comments in line...

Simon


On Fri, Jan 9, 2009 at 10:38 PM, Greg Dritschler <[email protected]> 
wrote:

  Simon,

  Regarding bullet A, this is fine if the set of contributions is static. What 
happens as contributions are added and removed (particularly contributions that 
contain definitions)?  I think the spec is silent about what should happen.


I think the confusion is because the spec doesn't state that definitions.xml 
will be provided via contributions. I think having definitions.xml inside 
contributions is a Tuscany thing. The spec talks about a domain wide file named 
definitions.xml. Hence it makes no comment on what happens as contributions are 
added and removed. 

Given that we allow definitions.xml files inside contribution I was looking at 
what it would take to really consider these definitions artifacts as domain 
wide. The answer is that we have to change our read and resolution process a 
bit but it's not a huge change. 

Another approach would be to change the way Tuscany works and read 
definitions.xml files independently of contributions or, for example, mandate 
that a separate system contribution must be provided to add defintions.xml to 
the domain. 

As you point out, I haven't addressed what should happen as contributions are 
added and removed in a running syste. In fact we currently don't address this 
generally. The Tuscany domain is static in that all contributions must be 
present before you start nodes. I'd like to see us move toward a more dynamic 
solution but we aren't there yet. Any change in contributions (or 
defintions.xml) within a running system would imply some kind of eventing to 
notify running nodes that their configuration has changed. This is obviously a 
rather complex proposition given where we are now.

Give where we are with 1.x I think the answer is to;
  - fix our read/resolve process so that definitions.xml are considered to be 
domain wide
  - fix our domain manager so that the domain definitions.xml model is passed 
to each node
  Given these two changes we can close off TUSCANY-2499
  - make a statement that once contributions have been added they can't be 
removed without restarting the nodes that refer to them. If you are prepared to 
restart a node then you are presented with the domain configuration as it 
appears at that time taking into account whatever contributions have been added 
or removed. 
 
For 2.x we could either apply the changes to make definitions that appear in 
contributions be processed as domain wide defintions or take a wider view and 
choose a different approach to reading in definitions.xml. 




  Raymond,

  Are you suggesting that the user should have to explicitly import definitions 
from other user (non-system) contributions?  As far as I know all definitions 
that have been contributed to the domain are implicitly visible to all 
contributions.  

I agree. I don't think the user should have to import artifacts from 
definitions.xml files. The spec refers to them as domain wide artifacts.  

Reply via email to