Quantcast

How to register Services to Mule ESB at runtime

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to register Services to Mule ESB at runtime

Denis Bessmertnyj-3
Hi folks,

It is unclear from documentation, is it possible to register Services to Mule ESB at runtime,
for exmample invoke some sort of java methods or maybe Mule has web-services interface for such proposes. 
Or maybe via JMX?
 
Thanks for answer,
 
-
Denis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Dimitar Dimitrov
Hi Denis,

Mule supports dynamic component registration by registering and manually wiring the appropriate service, component, routers and endpoints using the transient registry.

For examples and related JIRA issues check the links mentioned in this article:
http://foobarbazqux.blogspot.com/2008/09/dynamic-components-in-mule.html

Regards,
Dimitar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Denis Bessmertnyj-3
Hi Dimitar,
 
I have read your article, but it is not clear after reading does Mull
supports dynamic component registration and how to use it, if yes.
May you show me some examples or something else.
 
Thanks,
 
-
Denis

On Sat, Sep 20, 2008 at 4:10 AM, Dimitar Dimitrov <[hidden email]> wrote:

Hi Denis,

Mule supports dynamic component registration by registering and manually
wiring the appropriate service, component, routers and endpoints using the
transient registry.

For examples and related JIRA issues check the links mentioned in this
article:
http://foobarbazqux.blogspot.com/2008/09/dynamic-components-in-mule.html

Regards,
Dimitar
--
View this message in context: http://www.nabble.com/How-to-register-Services-to-Mule-ESB-at-runtime-tp19570884p19578772.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Denis Bessmertnyj-3
Dimitar,
 
And it is interesting that in your letter you write that it is possible,
but in article I see
 
"Usually I write about how to implement stuff with Mule, but this time I'm going to write why Mule might not be your best choice if your use-case is anything like above."
 
So, does Mule support it?


On Sun, Sep 21, 2008 at 12:06 PM, Denis Bessmertnyj <[hidden email]> wrote:
Hi Dimitar,
 
I have read your article, but it is not clear after reading does Mull
supports dynamic component registration and how to use it, if yes.
May you show me some examples or something else.
 
Thanks,
 
-
Denis

On Sat, Sep 20, 2008 at 4:10 AM, Dimitar Dimitrov <[hidden email]> wrote:

Hi Denis,

Mule supports dynamic component registration by registering and manually
wiring the appropriate service, component, routers and endpoints using the
transient registry.

For examples and related JIRA issues check the links mentioned in this
article:
http://foobarbazqux.blogspot.com/2008/09/dynamic-components-in-mule.html

Regards,
Dimitar
--
View this message in context: http://www.nabble.com/How-to-register-Services-to-Mule-ESB-at-runtime-tp19570884p19578772.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Leegorous
Hi,

I think user can do that with mule, but that's not the recommendation.

On Sun, Sep 21, 2008 at 12:08 PM, Denis Bessmertnyj
<[hidden email]> wrote:

> Dimitar,
>
> And it is interesting that in your letter you write that it is possible,
> but in article I see
>
> "Usually I write about how to implement stuff with Mule, but this time I'm
> going to write why Mule might not be your best choice if your use-case is
> anything like above."
>
> So, does Mule support it?
>
> On Sun, Sep 21, 2008 at 12:06 PM, Denis Bessmertnyj
> <[hidden email]> wrote:
>>
>> Hi Dimitar,
>>
>> I have read your article, but it is not clear after reading does Mull
>> supports dynamic component registration and how to use it, if yes.
>> May you show me some examples or something else.
>>
>> Thanks,
>>
>> -
>> Denis
>>
>> On Sat, Sep 20, 2008 at 4:10 AM, Dimitar Dimitrov
>> <[hidden email]> wrote:
>>>
>>> Hi Denis,
>>>
>>> Mule supports dynamic component registration by registering and manually
>>> wiring the appropriate service, component, routers and endpoints using
>>> the
>>> transient registry.
>>>
>>> For examples and related JIRA issues check the links mentioned in this
>>> article:
>>> http://foobarbazqux.blogspot.com/2008/09/dynamic-components-in-mule.html
>>>
>>> Regards,
>>> Dimitar
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-register-Services-to-Mule-ESB-at-runtime-tp19570884p19578772.html
>>> Sent from the Mule - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>
>



--
My Blog:
http://leegorous.net/blog

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Dimitar Dimitrov
In reply to this post by Denis Bessmertnyj-3
Denis,

Dynamic components are supported, but more cumbersome than need to be, which is the main topic of my write up, here are the two examples that I've linked to:

http://fisheye.codehaus.org/browse/mule/branches/mule-2.0.x/examples/loanbroker/esb/src/test/java/org/mule/example/loanbroker/esb/LoanBrokerEsbConfigurationBuilder.java?r=11569

http://fisheye.codehaus.org/browse/mule/trunk/mule/modules/scripting/src/test/resources/mule-config.groovy?r=9093

They show you how to bootstrap Mule instance by manually wiring and adding the components. You can also add, start, stop and dispose services any time given MuleContext instance. To obtain a MuleContext, you need to implement MuleContextAware interface or something like this. From the context, you need to obtain a registry and register or lookup your beans from there, then you wire them by using setters and finally you start your service. Let me know if it's not clear, I can post some code when I'm back to work.

Right now Mule focuses on the mediator and ETL scenarios which typically are implemented by static component graph and their support for dynamic components is suboptimal (possible, but vebose). The JIRA issues in the article, if implemented, would simplify some common cases that I have encountered. I urge you to take a look and vote, so we can let the Mulesource guys know that there is demand for these features.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Denis Bessmertnyj-3
Dimitar,
 
We need the possibility to register Dynamic components as usual, i.e. for example put xml file to config directory while
Mule already running and Mule should register new Service at runtime according to new xml.
Because we also need the possibility that after Mule restarting all our adding changes to Mule during runtime should be saved.
So, as I understand it is not possible with Mule?

On Sun, Sep 21, 2008 at 3:20 PM, Dimitar Dimitrov <[hidden email]> wrote:

Denis,

Dynamic components are supported, but more cumbersome than need to be, which
is the main topic of my write up, here are the two examples that I've linked
to:

http://fisheye.codehaus.org/browse/mule/branches/mule-2.0.x/examples/loanbroker/esb/src/test/java/org/mule/example/loanbroker/esb/LoanBrokerEsbConfigurationBuilder.java?r=11569

http://fisheye.codehaus.org/browse/mule/trunk/mule/modules/scripting/src/test/resources/mule-config.groovy?r=9093

They show you how to bootstrap Mule instance by manually wiring and adding
the components. You can also add, start, stop and dispose services any time
given MuleContext instance. To obtain a MuleContext, you need to implement
MuleContextAware interface or something like this. From the context, you
need to obtain a registry and register or lookup your beans from there, then
you wire them by using setters and finally you start your service. Let me
know if it's not clear, I can post some code when I'm back to work.

Right now Mule focuses on the mediator and ETL scenarios which typically are
implemented by static component graph and their support for dynamic
components is suboptimal (possible, but vebose). The JIRA issues in the
article, if implemented, would simplify some common cases that I have
encountered. I urge you to take a look and vote, so we can let the
Mulesource guys know that there is demand for these features.


--
View this message in context: http://www.nabble.com/How-to-register-Services-to-Mule-ESB-at-runtime-tp19570884p19592171.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to register Services to Mule ESB at runtime

Dimitar Dimitrov
Denis Bessmertnyj-3 wrote
We need the possibility to register Dynamic components as usual, i.e. for
example put xml file to config directory while
Mule already running and Mule should register new Service at runtime
according to new xml.
Because we also need the possibility that after Mule restarting all our
adding changes to Mule during runtime should be saved.
So, as I understand it is not possible with Mule?
No, this kind of dynamism is not possible right now. The capability to update the component graph from configuration file without restarting the container is being tracked as the "Hot Deploy" feature, scheduled to be one of the major topics for Mule 3 (the other major topics are transparent clustering and failover).

Remembering the settings should be achievable by using persistent JMX parameters (I've never done it myself and I'm not sure how robust is the default implementation)
Loading...