If you are using consumer.receive(), add a small timeout to give the broker a chance to see your subscription, like receive(500). The MDB probably uses a message listener, you could use that approach in your java client also.
2009/5/26 Websphere and ActiveMQ <derrick...@hotmail.com> > > Right now I can receive message from ActiveMQ on linux by Java Client, but > I > have to run java client many many times, then I can receive the message. > However, J2EE MDB hasn't this problem, every times I use Java client to > send > message, it can receive message on time. > > I use default setting for ActiveMQ. > -- > View this message in context: > http://www.nabble.com/Now-another-problem-appears-tp23731817p23731817.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source SOA http://FUSESource.com