everson . [
http://community.jboss.org/people/everjava] created the discussion
"Re: QueueBrowser - JBossQueueBrowser$BrowserEnumeration cannot be cast to
javax.jms.ObjectMessage"
To view the discussion, visit:
http://community.jboss.org/message/630748#630748
--------------------------------------------------------------
I fixed as below
ObjectMessage objectMessage = (ObjectMessage) messages*.nextElement();*
QueueBrowser queueBrowser = session.createBrowser(queue);
Enumeration<ObjectMessage> messages = queueBrowser.getEnumeration();
while (messages.hasMoreElements()) {
* ObjectMessage objectMessage = (ObjectMessage) messages;// error here*
Jms jms = new Jms();
People p = jms.new People();
p = (People) objectMessage.getObject();
System.err.println(p.getName());
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/630748#630748]
Start a new discussion in JBoss Messaging at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]