不是很明白你的意思,能不能讲述的详细一点。我猜想你是不是
return this.con 
其中con是个数组呢?

解决方案 »

  1.   

    package defcenter;
    不太明白你的意思:
    给你一个序列化类例子
    import java.io.Serializable;public class ViewDefStore implements Serializable{
    public  String strNodeID;
    public  String strViewID;
    public String strViewSet;
    public int intViewType;
      //String strViewSQL;
      public ViewDefStore(){  }
      public ViewDefStore(String strNodeID,String strViewID,String strViewSet,int intViewType){
        this.strNodeID = strNodeID;
        this.strViewID = strViewID;
        this.strViewSet = strViewSet;
        this.intViewType= intViewType;
    //    this.strViewSQL = strViewSQL;
      }
    }
    当调用ejb时把得到的ejbobject对象用get方法得到每一列的值然后把得到的列值放在序列化类中传递
    例如:
    try{
            col = viewDefHome.findViewDef(strNodeID,strViewID);//查询finder方法
            ite = col.iterator();
            while(ite.hasNext()){
              Object obj = ite.next();
              vviewDef =(ViewDef)obj;//得到ejbobject
              ViewDefStore viewDefStore = new ViewDefStore(vviewDef.getStrNodeID()/*得到列值*/,vviewDef.getStrViewID(),vviewDef.getStrViewSet(),vviewDef.getIntViewType());
              vec.add(viewDefStore);
            }
          }
          catch(FinderException fe){
            System.out.println("Err 52:"+fe.getMessage());
          }