You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by no no <yo...@hotmail.fr> on 2008/10/31 15:02:00 UTC

ODE extensionActivity and ServiceMix

Hello,
I have two questions (perhaps for Matthieu Riou or Tammo van Lessen)

==================================================
First one is regarding the https://issues.apache.org/jira/browse/ODE-159 issue.

I implemented my proper extensionActivity which aims at invoking a web services discovered at runtime.
I use for that the ode 1.2 SNAPSHOT.
But when i tried to use my dynamic invocation bundle in ODE 1.2 release, the elements
extensions,extension, enxtensionActivity...are not recognized during the deployment
of BPEL processes using them...
Then i discovered the registereed jira issue. 
I wanted to be sure that i understood correctly :  extensionActivity element will be usable
in the ODE 1.3 relaese.

==================================================

Second question is about ODE in servicemix.

This time i deployed the JBI version of ode 1.2 SNAPSHOT in serviceMix (3.2.2), and my dynamic invocation
bundle has to communicate with a JSR 181 SE.
The trick is there, previously my bundle was doing direct web services call (in sending SOAP message
through Http) to the BC HTTP exposing my JSR 181 SE. With success.

Now i want that my bundle communicates directly with the JSR 181 SE. 
For that i want to use a ServiceMixClient in the code of my dynamix invocation bundle :

______________________________________________________
// Contacting the JSR
      ServiceMixClient client = new ServiceMixClientFacade(context);
 // HardCoded service right now.
      QName service = new QName(namespace,
                endPoint);
 EndpointResolver resolver = client
                .createResolverForService(service);

 // Sending a request to JSR service Dispatcher
        Node payload=message.getSOAPBody().getFirstChild();
        String msg=UtilityBox.nodeToString(payload);
        System.out.println("Sending this message to the bus at this service "+namespace+":"+endPoint);
        System.out.println(msg);
        Source data = (Source) client.request(resolver, null, null, msg);

_______________________________________________________

It is the same code i use to ensure the communication between two SUs on the Bus.
The problem is that i need the access to "context"( javax.jbi.component.ComponentContext),
this "context" belonging to the ODE-JBI Component holding the reference to my dynamic invocation bundle.

Is there a way for my bundle to access to this context ?
Is there perhaps in ServiceMix the possibility to get the context of any component by passing some sort of
unique identifier ? (this one i should post on servicemix user list i think :) ).

Have i been confusing ?

Thx for the support,

Youssouf Mhoma




_________________________________________________________________
Inédit ! Des Emoticônes Déjantées! Installez les dans votre Messenger ! 
http://www.ilovemessenger.fr/Emoticones/EmoticonesDejantees.aspx

Re: ODE extensionActivity and ServiceMix

Posted by Alex Boisvert <bo...@intalio.com>.
On Fri, Oct 31, 2008 at 10:43 AM, no no <yo...@hotmail.fr>wrote:

> If in next release of ODE the ComponentContext could be accessible this
> way, it should be useful for others.


Done.

https://issues.apache.org/jira/browse/ODE-406

alex

RE: ODE extensionActivity and ServiceMix

Posted by no no <yo...@hotmail.fr>.
Thx for the answer.



I was trying to find a way to bypass this problem.

I ended up discovering that it was the class OdeContext which could provide me the information i needed.
(ComponentContext )

But this class is not visible by default.

So i made a public class in my bundle in the same package as OdeContext :




package org.apache.ode.jbi;



import javax.jbi.component.ComponentContext;



public class OdeContextWrapper {

    public ComponentContext ctx;

    

    public OdeContextWrapper(){

        OdeContext odeCtx=OdeContext.getInstance();

        

        ctx=odeCtx.getContext();

    }

    

    public ComponentContext getContext(){

        return ctx;

    }



}
___________________________________________

And then in the code i use to send the emssage into the JBI bus :

// Contacting the JSR
        ServiceMixClient client = new ServiceMixClientFacade(
                new OdeContextWrapper().getContext());

        // HardCoded service right now.
        QName service = new QName(namespace, endPoint);

        EndpointResolver resolver = client.createResolverForService(service);

        // Sending a request to JSR service Dispatcher
        try {
            Node payload = message.getSOAPBody().getFirstChild();
            String msg = UtilityBox.nodeToString(payload);
            __log.info("Sending this message to the bus at this service "
                            + namespace + ":" + endPoint);
            System.out.println(msg);
            Source data = (Source) client.request(resolver, null, null, msg);
            result = (new SourceTransformer()).toString(data);
            __log.info("Receive a message from JBI:" + result);
        } catch (Exception e) {
            throw new SendException(e.getMessage());
        }
_____________________________________________

And the call succeeds.
If in next release of ODE the ComponentContext could be accessible this way, it should be useful for others.

Thx again !

Youssouf Mhoma


> Date: Fri, 31 Oct 2008 09:16:21 -0700
> From: boisvert@intalio.com
> To: user@ode.apache.org
> Subject: Re: ODE extensionActivity and ServiceMix
> 
> On Fri, Oct 31, 2008 at 7:02 AM, no no <yo...@hotmail.fr>wrote:
> 
> > The problem is that i need the access to "context"(
> > javax.jbi.component.ComponentContext),
> > this "context" belonging to the ODE-JBI Component holding the reference to
> > my dynamic invocation bundle.
> >
> > Is there a way for my bundle to access to this context ?
> 
> 
> Not at the moment.   We could introduce a way to retrieve this context with
> the JBI IL.   Do you want to propose something?
> 
> 
> > Is there perhaps in ServiceMix the possibility to get the context of any
> > component by passing some sort of
> > unique identifier ? (this one i should post on servicemix user list i think
> > :) ).
> 
> 
> I don't know.  Yes, I suggest you ask on the servicemix mailing list.
> 
> alex

_________________________________________________________________
Inédit ! Des Emoticônes Déjantées! Installez les dans votre Messenger ! 
http://www.ilovemessenger.fr/Emoticones/EmoticonesDejantees.aspx

Re: ODE extensionActivity and ServiceMix

Posted by Alex Boisvert <bo...@intalio.com>.
On Fri, Oct 31, 2008 at 7:02 AM, no no <yo...@hotmail.fr>wrote:

> The problem is that i need the access to "context"(
> javax.jbi.component.ComponentContext),
> this "context" belonging to the ODE-JBI Component holding the reference to
> my dynamic invocation bundle.
>
> Is there a way for my bundle to access to this context ?


Not at the moment.   We could introduce a way to retrieve this context with
the JBI IL.   Do you want to propose something?


> Is there perhaps in ServiceMix the possibility to get the context of any
> component by passing some sort of
> unique identifier ? (this one i should post on servicemix user list i think
> :) ).


I don't know.  Yes, I suggest you ask on the servicemix mailing list.

alex

Re: ODE extensionActivity and ServiceMix

Posted by Tammo van Lessen <tv...@gmail.com>.
Youssouf,

sorry for the confusion, I should have read your email more carefully.
The extension activity support will be released from trunk, not from our
1.x branch. So it will be most likely ODE 2.0, which is also planned to
be released as soon as possible (but then going through a beta/rc cycle
first).

Cheers,
  Tammo

no no wrote:
> 
> Thanx for the response. I will switch to 1.3 as soon as it's released.
> 
> 
> Youssouf Mhoma
> 
> 
>> Date: Mon, 3 Nov 2008 16:21:03 +0100
>> From: tvanlessen@gmail.com
>> To: user@ode.apache.org
>> Subject: Re: ODE extensionActivity and ServiceMix
>>
>> Hi,
>>
>> On Fri, Oct 31, 2008 at 15:02, no no <yo...@hotmail.fr> wrote:
>>> ==================================================
>>> First one is regarding the https://issues.apache.org/jira/browse/ODE-159 issue.
>>>
>>> I implemented my proper extensionActivity which aims at invoking a web services discovered at runtime.
>>> I use for that the ode 1.2 SNAPSHOT.
>>> But when i tried to use my dynamic invocation bundle in ODE 1.2 release, the elements
>>> extensions,extension, enxtensionActivity...are not recognized during the deployment
>>> of BPEL processes using them...
>>> Then i discovered the registereed jira issue.
>>> I wanted to be sure that i understood correctly :  extensionActivity element will be usable
>>> in the ODE 1.3 relaese.
>>>
>>> ==================================================
>> Yes, both extensionActivity and extensionAssignOperation will be
>> usable in the next release from trunk.
>>
>> Best,
>>   Tammo
>>
>> -- 
>> Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de
> 
> _________________________________________________________________
> Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
> http://www.windowslive.fr/messenger/1.asp


RE: ODE extensionActivity and ServiceMix

Posted by no no <yo...@hotmail.fr>.

Thanx for the response. I will switch to 1.3 as soon as it's released.


Youssouf Mhoma


> Date: Mon, 3 Nov 2008 16:21:03 +0100
> From: tvanlessen@gmail.com
> To: user@ode.apache.org
> Subject: Re: ODE extensionActivity and ServiceMix
> 
> Hi,
> 
> On Fri, Oct 31, 2008 at 15:02, no no <yo...@hotmail.fr> wrote:
> > ==================================================
> > First one is regarding the https://issues.apache.org/jira/browse/ODE-159 issue.
> >
> > I implemented my proper extensionActivity which aims at invoking a web services discovered at runtime.
> > I use for that the ode 1.2 SNAPSHOT.
> > But when i tried to use my dynamic invocation bundle in ODE 1.2 release, the elements
> > extensions,extension, enxtensionActivity...are not recognized during the deployment
> > of BPEL processes using them...
> > Then i discovered the registereed jira issue.
> > I wanted to be sure that i understood correctly :  extensionActivity element will be usable
> > in the ODE 1.3 relaese.
> >
> > ==================================================
> 
> Yes, both extensionActivity and extensionAssignOperation will be
> usable in the next release from trunk.
> 
> Best,
>   Tammo
> 
> -- 
> Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de

_________________________________________________________________
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
http://www.windowslive.fr/messenger/1.asp

Re: ODE extensionActivity and ServiceMix

Posted by Tammo van Lessen <tv...@gmail.com>.
Hi,

On Fri, Oct 31, 2008 at 15:02, no no <yo...@hotmail.fr> wrote:
> ==================================================
> First one is regarding the https://issues.apache.org/jira/browse/ODE-159 issue.
>
> I implemented my proper extensionActivity which aims at invoking a web services discovered at runtime.
> I use for that the ode 1.2 SNAPSHOT.
> But when i tried to use my dynamic invocation bundle in ODE 1.2 release, the elements
> extensions,extension, enxtensionActivity...are not recognized during the deployment
> of BPEL processes using them...
> Then i discovered the registereed jira issue.
> I wanted to be sure that i understood correctly :  extensionActivity element will be usable
> in the ODE 1.3 relaese.
>
> ==================================================

Yes, both extensionActivity and extensionAssignOperation will be
usable in the next release from trunk.

Best,
  Tammo

-- 
Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de