[jboss-user] [JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object

chicken do-not-reply at jboss.com
Mon Feb 2 02:58:02 EST 2009


thank you so much for your quickly help

I mean I reload my web application: I usually modify the web.xml in my application so that the application reloads and applies my new source.

the onMessage() method only throws the exception after I reload my application and run the function that uses JMS.
usually it works well.
When I develop my web application, I usually have to reload my application, and I always face the exception so that I have to restart JBoss application server (not reload my application) and It will take more time than reloading my web application. 

here is my CustomMessageBean.java:


  | import java.io.Serializable;
  | import java.util.Date;
  | 
  | public class CustomMessageBean implements Serializable {
  | 	private String server;
  | 
  | 	private String from;
  | 
  | 	private String to;
  | 
  | 	private String toNew;
  | 
  | 	private String cc;
  | 
  | 	private String bcc;
  | 
  | 	private String subject;
  | 
  | 	private String content;
  | 
  | 	private boolean isHTML;
  | 
  | 	private String charSet;
  | 
  | 	private String attachment;
  | 
  | 	private Date date;
  | 
  | 	private String admMemNo;
  | 
  | 	private String user_id;
  | 
  | 	private String serverName;
  | 
  | 	public MessageBean() {
  | 	}
  | 
  | 	public CustomMessageBean (String server, String from, String to, String toNew,
  | 			String cc, String bcc, String subject, String content,
  | 			boolean isHTML, String charSet, String attachment, Date date,
  | 			String admMemNo, String user_id, String serverName) {
  | 		this.server = server;
  | 		this.from = from;
  | 		this.to = to;
  | 		this.toNew = toNew;
  | 		this.cc = cc;
  | 		this.bcc = bcc;
  | 		this.subject = subject;
  | 		this.content = content;
  | 		this.isHTML = isHTML;
  | 		this.charSet = charSet;
  | 		this.attachment = attachment;
  | 		this.date = date;
  | 		this.admMemNo = admMemNo;
  | 		this.user_id = user_id;
  | 		this.serverName = serverName;
  | 	}
  | 
  | 	public void setServer(String server) {
  | 		this.server = server;
  | 	}
  | 
  | 	public String getServer() {
  | 		return server;
  | 	}
  | 
  | 	public void setFrom(String from) {
  | 		this.from = from;
  | 	}
  | 
  | 	public String getFrom() {
  | 		return from;
  | 	}
  | 
  | 	public void setTo(String to) {
  | 		this.to = to;
  | 	}
  | 
  | 	public String getTo() {
  | 		return to;
  | 	}
  | 
  | 	public void setToNew(String toNew) {
  | 		this.toNew = toNew;
  | 	}
  | 
  | 	public String getToNew() {
  | 		return toNew;
  | 	}
  | 
  | 	public void setCc(String cc) {
  | 		this.cc = cc;
  | 	}
  | 
  | 	public String getCc() {
  | 		return cc;
  | 	}
  | 
  | 	public void setBcc(String bcc) {
  | 		this.bcc = bcc;
  | 	}
  | 
  | 	public String getBcc() {
  | 		return bcc;
  | 	}
  | 
  | 	public void setSubject(String subject) {
  | 		this.subject = subject;
  | 	}
  | 
  | 	public String getSubject() {
  | 		return subject;
  | 	}
  | 
  | 	public void setContent(String content) {
  | 		this.content = content;
  | 	}
  | 
  | 	public String getContent() {
  | 		return content;
  | 	}
  | 
  | 	public void setIsHTML(boolean isHTML) {
  | 		this.isHTML = isHTML;
  | 	}
  | 
  | 	public boolean getIsHTML() {
  | 		return isHTML;
  | 	}
  | 
  | 	public void setCharSet(String charSet) {
  | 		this.charSet = charSet;
  | 	}
  | 
  | 	public String getCharSet() {
  | 		return charSet;
  | 	}
  | 
  | 	public void setAttachment(String attachment) {
  | 		this.attachment = attachment;
  | 	}
  | 
  | 	public String getAttachment() {
  | 		return attachment;
  | 	}
  | 
  | 	public void setDate(Date date) {
  | 		this.date = date;
  | 	}
  | 
  | 	public Date getDate() {
  | 		return date;
  | 	}
  | 
  | 	public void setAdmMemNo(String admMemNo) {
  | 		this.admMemNo = admMemNo;
  | 	}
  | 
  | 	public String getAdmMemNo() {
  | 		return admMemNo;
  | 	}
  | 
  | 	public void setUser_id(String user_id) {
  | 		this.user_id = user_id;
  | 	}
  | 
  | 	public String getUser_id() {
  | 		return user_id;
  | 	}
  | 
  | 	public void setServerName(String serverName) {
  | 		this.serverName = serverName;
  | 	}
  | 
  | 	public String getServerName() {
  | 		return serverName;
  | 	}
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206163#4206163

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206163



More information about the jboss-user mailing list