Yes, my data will come from a DB queue.  So I could put the loop in the
MyEndpoint class, correct?  In this loop how would I send a message to an
http provider?



gnodet wrote:
> 
> I don't know where your data comes from, but let's say you want
> to load data from a DB.  In such a case, the endpoint would be configured
> with a DataSource and maybe some other parameters. The endpoint could
> inherit the polling endpoint so that it periodically send an sql request
> and
> send a JBI exchange from the data retrieved.  If you want a real loop,
> just
> use the start / stop method from the endpoint to launch / stop a thread.
> 
> On 5/11/07, Benamin <[EMAIL PROTECTED]> wrote:
>>
>>
>> Yes, that is what I assumed from looking at the hello world example.  In
>> the
>> helloworld example a processInOut method is used to do the business
>> logic.
>> What I am trying to figure out is how i can make my business logic start.
>> It needs to run a continuous loop.  This loop should start as soon as the
>> SE
>> is deployed and should be able to continuously send data to an http
>> provider.  Something like the following:
>>
>> while true
>> {
>>   dequeue data
>>   send data to http provider
>> }
>>
>>
>>
>> gnodet wrote:
>> >
>> > Take a look at the HelloWorld SE tutorial on the web site.
>> > I guess you will find some useful information.
>> > All your business logic should be in the endpoint implementation
>> > that will be activated as part of your SU deployment.
>> >
>> > On 5/10/07, Benamin <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Yes, I am deploying an SU to my SE.  So I would do a call to
>> addEndpoint
>> >> in
>> >> the init/start method of the SE?  And the endpoint I am adding would
>> be
>> >> the
>> >> SU's?
>> >>
>> >> Also, this dequeue I am doing is custom functionality.  I am wondering
>> >> where
>> >> to place the custom logic within my SE?
>> >>
>> >>
>> >>
>> >> gnodet wrote:
>> >> >
>> >> > The dequeue will automatically be done when the SE is started and
>> >> > exchanges
>> >> > will be dispatched to activated endpoints.  Note that you can't send
>> an
>> >> > exchange
>> >> > to a component, you have to send it to an endpoint activated by a
>> >> > component.
>> >> > Are you deploying a SU to your SE ? Else you can easily configure an
>> >> > endpoint
>> >> > in the init / start method of the component by using the addEndpoint
>> >> > method.
>> >> >
>> >> > On 5/10/07, Benamin <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> Ok, so where in the code for an SE is the main processing loop?  Is
>> >> this
>> >> >> a
>> >> >> method I can override?  I just need somewhere to be able to create
>> a
>> >> loop
>> >> >> that starts trying to call my dequeue logic, and then send dequeued
>> >> data
>> >> >> out
>> >> >> to an http provider.
>> >> >>
>> >> >>
>> >> >> gnodet wrote:
>> >> >> >
>> >> >> > The JBI spec defines the lifecycle of SA / SE.
>> >> >> > If by "starting the SE" you mean "activating the JBI endpoint",
>> >> >> > it should be done when the SA is started.  Btw, the SE has to be
>> >> >> started
>> >> >> > before the SA is deployed, else the deployment will fail.
>> >> >> >
>> >> >> > On 5/10/07, Benamin <[EMAIL PROTECTED]> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >> I am having problems trying to figure out how to make an SE
>> startup
>> >> >> >> automatically.  I have an SE that I want to have retrieve data
>> from
>> >> a
>> >> >> >> queue.
>> >> >> >> Once dequeued, the SE should be able to send this data to an
>> >> >> >> HTTP-Provider
>> >> >> >> and continue trying to dequeue more data.  I've looked into
>> putting
>> >> >> this
>> >> >> >> loop into the processInOut method for the MyEndpoint class of
>> the
>> >> SE,
>> >> >> and
>> >> >> >> then just send the dequeued data in the out parameter.  Is this
>> the
>> >> >> right
>> >> >> >> way to go?
>> >> >> >>
>> >> >> >> Also, how do I configure this SE to start as soon as my SA is
>> >> >> deployed?
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> http://www.nabble.com/Starting-an-SE-tf3723654s12049.html#a10419975
>> >> >> >> Sent from the ServiceMix - User mailing list archive at
>> Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Cheers,
>> >> >> > Guillaume Nodet
>> >> >> > ------------------------
>> >> >> > Principal Engineer, IONA
>> >> >> > Blog: http://gnodet.blogspot.com/
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >> http://www.nabble.com/Starting-an-SE-tf3723654s12049.html#a10420834
>> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > Cheers,
>> >> > Guillaume Nodet
>> >> > ------------------------
>> >> > Principal Engineer, IONA
>> >> > Blog: http://gnodet.blogspot.com/
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Starting-an-SE-tf3723654s12049.html#a10421070
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Principal Engineer, IONA
>> > Blog: http://gnodet.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Starting-an-SE-tf3723654s12049.html#a10425509
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Principal Engineer, IONA
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Starting-an-SE-tf3723654s12049.html#a10432485
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to