You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Malujo Rev <ma...@gmail.com> on 2009/09/24 23:09:50 UTC

Please give advice: query current composite info

Hi,
I am trying to build this little component which will automatically discover
all components inside the current composite and then dynamic invoke whatever
service available. I checked some doc, it seems CurrentCompositeContect
class should serve this function. but it seems not exist any more. Do you
know what java classes I can use for this purpose?
Many Thanks ,
Malujo

Re: Please give advice: query current composite info

Posted by Raymond Feng <en...@gmail.com>.
What Tuscany Object do you have as the starting point? 

If you bootstrap Tuscany using SCANodeFactory, you can look into http://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.5.1/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java.

There are two methods related:
getServiceReference()
getComposite()

If you use Tuscany web application, take a look at http://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.5.1/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java. There is an attribute set into the ServeletContext for the SCADomain object.

Thanks,
Raymond


From: Malujo Rev 
Sent: Friday, September 25, 2009 8:53 AM
To: dev@tuscany.apache.org 
Subject: Re: Please give advice: query current composite info


I have been struggling this diffculty for many days. Hope any expert can help me out please.
Malujo


On Thu, Sep 24, 2009 at 4:16 PM, Malujo Rev <ma...@gmail.com> wrote:

  Thanks Raymond. I am using 1.4. What I want to do is that use a servlet or jsp to automatically list all components in that composite and then allow user to invoke some service through web. I don't know what is the best way to do it? I checked all the class provided, just cannot find some classes serving this kind of functions. please help.
  Thanks,
  Malujo 



  On Thu, Sep 24, 2009 at 2:57 PM, Raymond Feng <en...@gmail.com> wrote:

    Which level of Tuscany are you using? 1.x (branches/sca-java-1.x) or 2.x (java/sca)?

    If you are using 2.x, how do you bootstrap Tuscany? Are you using NodeFactory.newInstance().createNode(...)? org.apache.tuscany.sca.node.impl.NodeImpl.getDomainComposite() can give you the information. But this method is not available on org.apache.tuscany.sca.node.Node interface. Node.getService() or org.oasisopen.sca.client.SCAClient.getService() allows you to get service proxies using <componentName>/<serviceName>, but you cannot list all the services.

    If you can give us more details about your scenario, we can probably work out a solution without hacking the current code.

    Thanks,
    Raymond


    From: Malujo Rev 
    Sent: Thursday, September 24, 2009 2:09 PM
    To: dev-tuscany 
    Subject: Please give advice: query current composite info


    Hi, 
    I am trying to build this little component which will automatically discover all components inside the current composite and then dynamic invoke whatever service available. I checked some doc, it seems CurrentCompositeContect class should serve this function. but it seems not exist any more. Do you know what java classes I can use for this purpose?
    Many Thanks ,
    Malujo




Re: Please give advice: query current composite info

Posted by Malujo Rev <ma...@gmail.com>.
I have been struggling this diffculty for many days. Hope any expert can
help me out please.
Malujo

On Thu, Sep 24, 2009 at 4:16 PM, Malujo Rev <ma...@gmail.com> wrote:

> Thanks Raymond. I am using 1.4. What I want to do is that use a servlet or
> jsp to automatically list all components in that composite and then allow
> user to invoke some service through web. I don't know what is the best way
> to do it? I checked all the class provided, just cannot find some classes
> serving this kind of functions. please help.
> Thanks,
> Malujo
>
>
> On Thu, Sep 24, 2009 at 2:57 PM, Raymond Feng <en...@gmail.com> wrote:
>
>>  Which level of Tuscany are you using? 1.x (branches/sca-java-1.x) or 2.x
>> (java/sca)?
>>
>> If you are using 2.x, how do you bootstrap Tuscany? Are you using
>> NodeFactory.newInstance().createNode(...)? org.apache.tuscany.sca.node.impl.NodeImpl.getDomainComposite()
>> can give you the information. But this method is not available on
>> org.apache.tuscany.sca.node.Node interface. Node.getService() or
>> org.oasisopen.sca.client.SCAClient.getService() allows you to get service
>> proxies using <componentName>/<serviceName>, but you cannot list all the
>> services.
>>
>> If you can give us more details about your scenario, we can probably work
>> out a solution without hacking the current code.
>>
>> Thanks,
>> Raymond
>>
>>  *From:* Malujo Rev <ma...@gmail.com>
>> *Sent:* Thursday, September 24, 2009 2:09 PM
>> *To:* dev-tuscany <de...@tuscany.apache.org>
>> *Subject:* Please give advice: query current composite info
>>
>> Hi,
>> I am trying to build this little component which will automatically
>> discover all components inside the current composite and then dynamic invoke
>> whatever service available. I checked some doc, it seems
>> CurrentCompositeContect class should serve this function. but it seems not
>> exist any more. Do you know what java classes I can use for this purpose?
>> Many Thanks ,
>> Malujo
>>
>
>

Re: Please give advice: query current composite info

Posted by Malujo Rev <ma...@gmail.com>.
Thanks Raymond. I am using 1.4. What I want to do is that use a servlet or
jsp to automatically list all components in that composite and then allow
user to invoke some service through web. I don't know what is the best way
to do it? I checked all the class provided, just cannot find some classes
serving this kind of functions. please help.
Thanks,
Malujo

On Thu, Sep 24, 2009 at 2:57 PM, Raymond Feng <en...@gmail.com> wrote:

>  Which level of Tuscany are you using? 1.x (branches/sca-java-1.x) or 2.x
> (java/sca)?
>
> If you are using 2.x, how do you bootstrap Tuscany? Are you using
> NodeFactory.newInstance().createNode(...)? org.apache.tuscany.sca.node.impl.NodeImpl.getDomainComposite()
> can give you the information. But this method is not available on
> org.apache.tuscany.sca.node.Node interface. Node.getService() or
> org.oasisopen.sca.client.SCAClient.getService() allows you to get service
> proxies using <componentName>/<serviceName>, but you cannot list all the
> services.
>
> If you can give us more details about your scenario, we can probably work
> out a solution without hacking the current code.
>
> Thanks,
> Raymond
>
>  *From:* Malujo Rev <ma...@gmail.com>
> *Sent:* Thursday, September 24, 2009 2:09 PM
> *To:* dev-tuscany <de...@tuscany.apache.org>
> *Subject:* Please give advice: query current composite info
>
> Hi,
> I am trying to build this little component which will automatically
> discover all components inside the current composite and then dynamic invoke
> whatever service available. I checked some doc, it seems
> CurrentCompositeContect class should serve this function. but it seems not
> exist any more. Do you know what java classes I can use for this purpose?
> Many Thanks ,
> Malujo
>

Re: Please give advice: query current composite info

Posted by Raymond Feng <en...@gmail.com>.
Which level of Tuscany are you using? 1.x (branches/sca-java-1.x) or 2.x (java/sca)?

If you are using 2.x, how do you bootstrap Tuscany? Are you using NodeFactory.newInstance().createNode(...)? org.apache.tuscany.sca.node.impl.NodeImpl.getDomainComposite() can give you the information. But this method is not available on org.apache.tuscany.sca.node.Node interface. Node.getService() or org.oasisopen.sca.client.SCAClient.getService() allows you to get service proxies using <componentName>/<serviceName>, but you cannot list all the services.

If you can give us more details about your scenario, we can probably work out a solution without hacking the current code.

Thanks,
Raymond


From: Malujo Rev 
Sent: Thursday, September 24, 2009 2:09 PM
To: dev-tuscany 
Subject: Please give advice: query current composite info


Hi, 
I am trying to build this little component which will automatically discover all components inside the current composite and then dynamic invoke whatever service available. I checked some doc, it seems CurrentCompositeContect class should serve this function. but it seems not exist any more. Do you know what java classes I can use for this purpose?
Many Thanks ,
Malujo