tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santiago Miguel Aranda Rojas <santiago.aranda.telv...@gmail.com>
Subject Re: Problem with "implementation.osgi" reference
Date Wed, 10 Jun 2009 07:07:51 GMT
Yes, you are right. I was doing some different tests and I copied you a
wrong composite. I wanted to see if the change of @target made an error in
tuscany.  But Tuscany doesn´t recognize this error because I think it
supposes that will be a "remote Component". I can see this in the tuscany
trace

ADVERTENCIA: Component reference target not found, it might be a remote
service running elsewhere in the SCA Domain: Composite = {
http://eclipse.org/SensorNetworkManagement/src/main/resources/SensorNetworkManagement}SensorNetworkManagementService
= PruebaComponent

But it is Ok, because the component I want if an Osgi Service registered in
the Osgi registry.
I have fixed the error in @target and it is not working yet.

Do you know any example when an <implementation.osgi> component is used?


I have tried to change  "xmlns" tag, but it doesn´t work.

  <sca:component name="PruebaComponent">
        <sca:implementation.osgi xmlns="
http://docs.oasis-open.org/ns/opencsa/sca/200903"
             bundleSymbolicName="RegistroService"
             bundleVersion="1.0.0">
            <sca:properties service="prueba.PruebaImpl">
            </sca:properties>
        </sca:implementation.osgi>
      </sca:component>

Thank you very much.


2009/6/10 Raymond Feng <enjoyjava@gmail.com>

>  The @target is pointing to a wrong componentName/serviceName. It should
> be "Prueba" instead of "PruebaComponent" as the component name is "Prueba".
>
>  *From:* Santiago Miguel Aranda Rojas <santiago.aranda.telvent@gmail.com>
> *Sent:* Tuesday, June 09, 2009 1:28 PM
> *To:* user@tuscany.apache.org
> *Subject:* Re: Problem with "implementation.osgi" reference
>
> Tuscany 2.02M. The last version I think. April 2009
>
> ----- Original Message -----
> *From:* Raymond Feng <enjoyjava@gmail.com>
> *To:* user@tuscany.apache.org
> *Sent:* Tuesday, June 09, 2009 7:12 PM
> *Subject:* Re: Problem with "implementation.osgi" reference
>
> Are you using Tuscany/SCA 2.x or 1.x?
>
>  *From:* santiago.aranda@telvent.com
> *Sent:* Tuesday, June 09, 2009 9:15 AM
> *To:* user@tuscany.apache.org
> *Subject:* Problem with "implementation.osgi" reference
>
>
> Hello
>
> I want to use an osgi service as a SCA component. But I can not access to
> their methods from other Component.  I mean I have created a wired instance
> to the Osgi Service ($Proxy25). It is not "null" but I can not invoke to one
> method because an error is happening
>
> --->Unable to create SCA binding invoker for local target
> SensorNetworkManagementComponent reference prueba (bindingURI=null
> operation=sayHello)
>
> This is my composite file. I want to have to two components. The first had
> a reference to the second and it is normal "implementation.java". The second
> is the SCA component that is representing to the Osgi Service that I want to
> recover. This Osgi Service was registered in the Osgi registry by Activator
> class in "RegistroService" bundle.
>
>  <sca:component name="SensorNetworkManagementComponent">
>     <sca:implementation.java
> class="es.amivital.sensornetworkmanagement.sca.SensorNetworkManagementServiceImpl"/>
>     <sca:service name="SensorNetworkManagementService">
>      <sca:*binding.ws* <http://binding.ws/> uri="*
> http://localhost:8085/SensorNetworkManagementComponent*<http://localhost:8085/SensorNetworkManagementComponent>
> "/>
>    </sca:service>
>   <sca:reference name="prueba" target="PruebaComponent"/>
>   </sca:component>
>
>
>   <sca:component name="Prueba">
>         <sca:implementation.osgi xmlns="*
> http://tuscany.apache.org/xmlns/sca/1.0*<http://tuscany.apache.org/xmlns/sca/1.0>
> "
>              bundleSymbolicName="RegistroService"
>              bundleVersion="1.0.0">
>             <sca:properties service="prueba.PruebaImpl">
>             </sca:properties>
>         </sca:implementation.osgi>
> </sca:component>
>
> ***The Java code--> The first component.
>
> public class SensorNetworkManagementServiceImpl  implements
> SensorNetworkManagementService {
> private Prueba prueba;
> public Prueba getPrueba() {
> return prueba;
> }
> @Reference
> public void setPrueba(Prueba prueba) {
> this.prueba = prueba;
> }
> }
>
> **Java code       --> The second component. It is another bundle that is
> registering one simple Osgi Service. The interface was
>
> public interface Prueba {
> public abstract String sayHello();
>
> }
>
>
>
>
>
> This instance (prueba) is not null when an outside client invoke to the
> first component. But if I invoke to one method of this interface, for
> example "prueba.sayHello" I obtained the previous error.
>
> I have read something about anottations like @AllowsPassByReference
> or @Scope, but I don´t know if they are neccesary .
>
>

Mime
View raw message