tags:

views:

5

answers:

0

Hello Everyone, I am very new to Cometd java. I usually follow the following link http://cometdproject.dojotoolkit.org/

I wanted to know the basic concept of the point to point model in the cometd java. I have a service which should work like a chat service . my service looks like some thing like the following

         public class myservice exterds BayuexSerivce{      

            subscribe("/service/portfolio/Account", "join");
    subscribe("/service/portfolio/unsubscribe", "unSubscribe"); 

}

This service should give back some data to particular client. If it is broadcast then i would be have used the publish subscribe model. As it has to deliver to the client particularly i wanted to make as point to point. My main goal is to have one channel which would be "/portfolio/Account" and through this channel data will be sent to particular client with the bayuexid of the browser client.

And when ever the data comes

bayuex.getClient(bayuexid).deliver(.....);//which will be delivered to a particular browser

this is in the service side ...which is kind of the server side

In the client side i am trying to do the following

_cometd.subscribe("/service/portfolio/Account",this, quoteSubscribe);

this line of code basically should call the server and set the call back function as quoteSubscribe .When ever the data comes the call back function will be called and processed the request.

This is what my plan was. when i do this _cometd.subscribe("/service/portfolio/Account",this, quoteSubscribe); the call does not go to the server .. The service is not at all called . Can some one tell me is there some thing is wrong in this approach