日期:2014-05-16  浏览次数:20644 次

基于jms使用ActiveMQ实现异步日志功能.消息持久到oracle 10g 数据库
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
public class BaseEntity  implements Serializable {
/**
    
  public String toString() {
   return ReflectionToStringBuilder.toString(this);
       }

       public boolean equals(Object other) {
           if ( (this == other ) ) return true;
           return EqualsBuilder.reflectionEquals(this, other);
       }

       public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
       }
}

----------------------------

定义bean

package askyaya.entity;

import java.util.Date;

public class VisitStatInfoBean extends BaseEntity {
/**
  *
  */
private static final long serialVersionUID = 1L;
String visitor_ip;
String server_ip;
String page_url;
String parameter;
String Referer_page;
int Visitor_type;
int server_id;
int column_id;
int page_id;
int Visit_count;
int User_id;
int Product_id;
int Seller_id;
Date info_date;
public Date getInfo_date() {
  return info_date;
}
public void setInfo_date(Date info_date) {
  this.info_date = info_date;
}
public int getColumn_id() {
  return column_id;
}
public void setColumn_id(int column_id) {
  this.column_id = column_id;
}
public int getPage_id() {
  return page_id;
}
public void setPage_id(int page_id) {
  this.page_id = page_id;
}
public String getPage_url() {
  return page_url;
}
public void setParameter(String parameter) {
  this.parameter = parameter;
}
public String getParameter() {
  return parameter;
}
public void setPage_url(String parameter) {
  this.parameter = parameter;
}

public int getProduct_id() {
  return Product_id;
}
public void setProduct_id(int product_id) {
  Product_id = product_id;
}
public String getReferer_page() {
  return Referer_page;
}
public void setReferer_page(String referer_page) {
  Referer_page = referer_page;
}
public int getSeller_id() {
  return Seller_id;
}
public void setSeller_id(int seller_id) {
  Seller_id = seller_id;
}
public int getServer_id() {
  return server_id;
}
public void setServer_id(int server_id) {
  this.server_id = server_id;
}
public String getServer_ip() {
  return server_ip;
}
public void setServer_ip(String server_ip) {
  this.server_ip = server_ip;
}
public int getUser_id() {
  return User_id;
}
public void setUser_id(int user_id) {
  User_id = user_id;
}
public int getVisit_count() {
  return Visit_count;
}
public void setVisit_count(int visit_count) {
  Visit_count = visit_count;
}
public String getVisitor_ip() {
  return visitor_ip;
}
public void setVisitor_ip(String visitor_ip) {
  this.visitor_ip = visitor_ip;
}
public int getVisitor_ty