Yes, you would use a timer. You'll have to experiment with the timing (too often and it thrashes).
You would select any message newer than the last message that was retrieved.
then how do i have a thread periodically select the latest message from the
should i use a timer or something
Donald McLean-3 wrote:
> You might also want to have a messageID and maybe a messageTimestamp.
> If everyone is connecting directly to the database server then you're just
> going to have to do a select periodically to see if anyone posted anything
> I don't know what kind of connection limits a database server has, but if
> your target audience is large enough, your architecture could break down
> even just bog down).
> On Feb 13, 2008 10:06 AM, musky <email@example.com> wrote:
>> also i dont want to use any sockets.
>> all the chat clients connect to the database server.
>> musky wrote:
>> > i want to use derby as a chat server,
>> > my idea is to insert whatever a user types into a table in the
>> > database.This table can have two fields UserID and the
>> > message(VARCHAR).how do i convey the inserted message to the other