Problem with openFire

Good moornig,

My name is Jibril TOURE. I am student in computer since. I developed my own web application chat Web in java. my goal is to allow to many users to chat. I use Smak 4.1 to exchange to send message to Openfire.

My problem is that: when the users are online, they get message. They only get messages when they connect.

What can to do get message intantly?

Thank you!