Hi,

On Sun, Oct 20, 2013 at 3:44 PM, Nirmal Fernando <[email protected]> wrote:

> Mohan,
>
> Yes, I can add a sleep, but the duration has to depend on the number of
> events.
>

Yes, I also felt that and i don't think stopping asyncDataPublisher is a
good option because we can configure AsyncDataPublisher to hold
events and send them when connection is available..

>
> So, would data-bridge will re-use those connections, if I didn't stop
> them? If so there's no issue AFAIS.
>
> Yes.. I think datapublishers are maintain in a thread pool..

>
> On Sun, Oct 20, 2013 at 3:40 PM, Mohanadarshan Vivekanandalingam <
> [email protected]> wrote:
>
>> Hi Nirmal,
>>
>> Yes.. I have observed the same behavior in the above sample after trying
>> out that.. AsyncDataPublisher keep the events in a queue and asynchronously
>> publish the events.. Then you can't simply call the *
>> asyncDataPublisher.stop()*;  just after the
>> asyncDataPublisher.publish(); .. Because Eventhough
>> it is called session will not end until publish the events..  For that
>> you can add the below code segments..
>>
>> asyncDataPublisher.addStreamDefinition(streamDefinition,
>> CALL_CENTER_DATA_STREAM, VERSION);
>> publishEvents(asyncDataPublisher);
>>
>> try {
>>             Thread.sleep(3000);
>>         } catch (InterruptedException e) {
>>             e.printStackTrace();
>>         }
>> asyncDataPublisher.stop();
>>
>>
>> Regards,
>> Mohan
>>
>>
>> On Sun, Oct 20, 2013 at 3:12 PM, Mohanadarshan Vivekanandalingam <
>> [email protected]> wrote:
>>
>>> Hi Nirmal,
>>>
>>> Are you sure that logs are not printing? Because I have check with
>>> AsyncDataPublisher but it printing the logs correctly as shown below.. At
>>> what situation above scenario happens??
>>>
>>> [2013-10-20 15:03:58,496]  INFO - {DataBridge}  admin connected
>>> [2013-10-20 15:04:01,977]  INFO - {DataBridge}
>>>  8c69fb70-8079-42fb-b6a5-41b4f5e20ec3 disconnected
>>>
>>> Regards,
>>> Mohan
>>>
>>>
>>> On Sun, Oct 20, 2013 at 12:57 PM, Nirmal Fernando <[email protected]>wrote:
>>>
>>>> Hi All,
>>>>
>>>> $Subject?
>>>>
>>>> I used the sample AsyncDataPublisher (
>>>> http://docs.wso2.org/display/BAM230/Data+Publisher) and when it
>>>> connected with the data bridge, I see following log in CEP:
>>>>
>>>> INFO - {DataBridge}  admin connected
>>>>
>>>> But, eventhough I stopped the AsyncDataPublisher
>>>> (asyncDataPublisher.stop();), I cannot see logs related to disconnected
>>>> session.
>>>>
>>>>  public void logout(String sessionId) throws Exception {
>>>>         log.info(sessionId + " disconnected");
>>>>         authenticator.logout(sessionId);
>>>>     }
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks & regards,
>>>> Nirmal
>>>>
>>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
>>>> Mobile: +94715779733
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> *V. Mohanadarshan*
>>> *Software Engineer,*
>>> *Data Technologies Team,*
>>> *WSO2, Inc. http://wso2.com *
>>> *lean.enterprise.middleware.*
>>> *
>>> *
>>> email: [email protected]
>>> phone:(+94) 771117673
>>>
>>
>>
>>
>> --
>> *V. Mohanadarshan*
>> *Software Engineer,*
>> *Data Technologies Team,*
>> *WSO2, Inc. http://wso2.com *
>> *lean.enterprise.middleware.*
>> *
>> *
>> email: [email protected]
>> phone:(+94) 771117673
>>
>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>


-- 
*V. Mohanadarshan*
*Software Engineer,*
*Data Technologies Team,*
*WSO2, Inc. http://wso2.com *
*lean.enterprise.middleware.*
*
*
email: [email protected]
phone:(+94) 771117673
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to