Jim Marshall
2006-05-22 20:16:17 UTC
Hi. I've got a bit of an unusual problem.
Because it takes a few seconds for openjms to start up, my client code checks
for the existence of the openjms server by just trying to create a connection.
When that fails, the client will wait for a little while to give openjms a
chance to start up and then tries again. This case will almost never happen,
but I thought I'd add it anyway.
My problem is that if the client fails to connect because openjms is not
running, then it waits and I start openjms, then the client connects again
successfully, I receive the messages (using .receive(1) and AUTO_ACK), but they
do not get deleted from the queue. If I try to read them again by restarting
the client they are not delivered. But, the admin interface says the messages
are still there. Once I shut down and restart openjms, the messages are gone.
I'm not sure what's happening here.
I'm not sure if this matters but I'm using openjms as the jndi provider, and
the client is intercepting the jndi naming exception that occurs when I do the
context lookup in order to know when to wait for openjms to start up.
I'm using OpenJMS version 0.7.7-alpha-3 with all the default configs, and the
tcp connector. Everything is running on my local machine. Thanks for any help.
Jim
Because it takes a few seconds for openjms to start up, my client code checks
for the existence of the openjms server by just trying to create a connection.
When that fails, the client will wait for a little while to give openjms a
chance to start up and then tries again. This case will almost never happen,
but I thought I'd add it anyway.
My problem is that if the client fails to connect because openjms is not
running, then it waits and I start openjms, then the client connects again
successfully, I receive the messages (using .receive(1) and AUTO_ACK), but they
do not get deleted from the queue. If I try to read them again by restarting
the client they are not delivered. But, the admin interface says the messages
are still there. Once I shut down and restart openjms, the messages are gone.
I'm not sure what's happening here.
I'm not sure if this matters but I'm using openjms as the jndi provider, and
the client is intercepting the jndi naming exception that occurs when I do the
context lookup in order to know when to wait for openjms to start up.
I'm using OpenJMS version 0.7.7-alpha-3 with all the default configs, and the
tcp connector. Everything is running on my local machine. Thanks for any help.
Jim