Re: Getting the Tuscany model objects for a contribution

2011-06-25 Thread Nirmal Fernando
Hi,

On Thu, Jun 23, 2011 at 1:17 PM, ant elder ant.el...@gmail.com wrote:

 Someone was asking me about how to load a contribution and get the
 Tuscany model objects for its artifacts so I've just committed a
 testcase to show one way of doing that, see:


 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java

 That loads a contribution jar and then gets the composite, component
 and service thats in the contribution. The main part of the code is:

Node node = TuscanyRuntime.newInstance().createNode();
String curi =
 node.installContribution(src/test/resources/sample-helloworld.jar);
node.validateContribution(curi);
Contribution contribution = node.getContribution(curi);

 If you wanted to run that in a separate Maven build outside of the
 domain-node module build then the simplest dependency to use in a
 Maven pom.xml is:

  dependency
 groupIdorg.apache.tuscany.sca/groupId
 artifactIdtuscany-base-runtime/artifactId
 version2.0-SNAPSHOT/version
  /dependency


It seems like  2.0-SNAPSHOT is not there in the Maven public repository,
instead 2.0-Beta2.

Is it okay to use 2.0-Beta2?


 That seems the simplest approach to me, there are other ways such as
 using the Deployer directly, does anyone want to show some code to do
 that?

   ...ant




-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science  Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Blog: http://nirmalfdo.blogspot.com/


[Composite Diagram Generator] Need a suggestion

2011-06-25 Thread Nirmal Fernando
Hi All,

I need your help to decide how should Composite Diagram Generator loads
composite XML.
I can see two main options:

1) Load from the Jar file
2) Directly load the composite XML (i.e. user gives it as the input)

Thanks.


Re: [Composite Diagram Generator] Need a suggestion

2011-06-25 Thread Luciano Resende
On Sat, Jun 25, 2011 at 5:54 AM, Nirmal Fernando
nirmal070...@apache.org wrote:
 Hi All,

 I need your help to decide how should Composite Diagram Generator loads
 composite XML.
 I can see two main options:

 1) Load from the Jar file
 2) Directly load the composite XML (i.e. user gives it as the input)

 Thanks.


How do you plan to run the tool that loads the composite diagram ? If
this is part of a Domain Manager kind of thing, you  could have some
options like :
a) display the diagram from the domain composite, this would display
the aggregate view of all contributions, components, etc available on
the domain
b) from the information harvested from the domain, you could list the
contributions, and it's deployable composites, and the user can click
on it, to display the diagram for that specific composite.

I had started doing some of harvesting of the domain composite and
list of components, etc on nodeManager module in trunk


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/


Re: Getting the Tuscany model objects for a contribution

2011-06-25 Thread Luciano Resende
On Sat, Jun 25, 2011 at 4:38 AM, Nirmal Fernando nirmal070...@gmail.com wrote:
 Hi,

 On Thu, Jun 23, 2011 at 1:17 PM, ant elder ant.el...@gmail.com wrote:

 Someone was asking me about how to load a contribution and get the
 Tuscany model objects for its artifacts so I've just committed a
 testcase to show one way of doing that, see:


 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java

 That loads a contribution jar and then gets the composite, component
 and service thats in the contribution. The main part of the code is:

        Node node = TuscanyRuntime.newInstance().createNode();
        String curi =
 node.installContribution(src/test/resources/sample-helloworld.jar);
        node.validateContribution(curi);
        Contribution contribution = node.getContribution(curi);

 If you wanted to run that in a separate Maven build outside of the
 domain-node module build then the simplest dependency to use in a
 Maven pom.xml is:

      dependency
         groupIdorg.apache.tuscany.sca/groupId
         artifactIdtuscany-base-runtime/artifactId
         version2.0-SNAPSHOT/version
      /dependency

 It seems like  2.0-SNAPSHOT is not there in the Maven public repository,
 instead 2.0-Beta2.

 Is it okay to use 2.0-Beta2?

 That seems the simplest approach to me, there are other ways such as
 using the Deployer directly, does anyone want to show some code to do
 that?

   ...ant


When you build current trunk, the 2.-SNAPSHOT will be available in
your local maven repo, and it's also available in the apache snapshot
repository [1]

[1] 
https://repository.apache.org/content/groups/snapshots/org/apache/tuscany/sca/tuscany-assembly/



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/


Re: [Composite Diagram Generator] Need a suggestion

2011-06-25 Thread Nirmal Fernando
On Sat, Jun 25, 2011 at 10:02 PM, Luciano Resende luckbr1...@gmail.comwrote:

 On Sat, Jun 25, 2011 at 5:54 AM, Nirmal Fernando
 nirmal070...@apache.org wrote:
  Hi All,
 
  I need your help to decide how should Composite Diagram Generator loads
  composite XML.
  I can see two main options:
 
  1) Load from the Jar file
  2) Directly load the composite XML (i.e. user gives it as the input)
 
  Thanks.
 

 How do you plan to run the tool that loads the composite diagram ?


Currently the tool runs independently. It gets the composite XML as the
input and
outputs the composite diagram.

To load the composite diagram Ant suggested me to use Tuscany which makes
implementation easier.
So the issue I have is whether to load the composite XML using jar file is
better than directly loading composite XML (By the way, is this possible
with Tuscany?).

Highly appreciate your ideas!


If
 this is part of a Domain Manager kind of thing, you  could have some
 options like :
 a) display the diagram from the domain composite, this would display
 the aggregate view of all contributions, components, etc available on
 the domain
 b) from the information harvested from the domain, you could list the
 contributions, and it's deployable composites, and the user can click
 on it, to display the diagram for that specific composite.

 I had started doing some of harvesting of the domain composite and
 list of components, etc on nodeManager module in trunk



Thanks!

 --
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/