Hello, I'm trying to send bytemessage thru JMS, but failed where i receive error message
java.lang.ClassCastException: org.jboss.mq.SpyTextMessage I've tried to check some forum but unfortunately not much info found. Snipet sender ========= String textPub = "hello"; BytesMessage byteMessage = session.createBytesMessage(); byteMessage.writeInt(textPub.length()); byteMessage.writeBytes(textPub.getBytes()); send.publish(byteMessage); Snipet Receiver ========== BytesMessage byteMessage = (BytesMessage) message; int strLength = byteMessage.readInt(); byte[] strBytes = new byte[strLength]; byteMessage.readBytes(strBytes); String str1 = new String(strBytes); View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852657#3852657 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852657 ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user