7 Replies Latest reply on Aug 6, 2013 10:25 AM by pedrosantos

    funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird

    pedrosantos Newbie

      Hola a todos, les escribo por que tengo un extraño problema con el JBoss, ya que tengo una aplicacion echa en tomcat  5.5 que cuando consulto registros me arroja 11626 registros, hasta ahi esta bien , pero cuando paso la aplicacion a JBoss o le hago deploy en JBoss , al consultar me arroja 11023  registros, lleno un grid con ellos, y he googleado pero no encuentro el error o no se si se tiene que configurar algo mas, les agradezco

       

      Hi all, Im newbie on JBoss, let me commenting my problem, i have one applicacion running on tomcat 5.5 , so when my application execute a query this thrown me 11626 records, it's ok , but when run the same application on JBoss 5.1.0 GA only  thrown me 11023 records, it's very  weird, And I dont know why, if someone give me one tip , sorry my english is poor, thanks in advance

       

      Cheers

        • 1. Re: funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird
          Jean-Frederic Clere Master

          without a description of what your webapp is doing there isn't much we can do to help.

          What is the webapp doing? Any piece of code you can share? configuration?

          • 3. Re: funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird
            pedrosantos Newbie

            Hi Jean, thanks for your reply, I was testing from the DAO and looking at  how many records throw me my query, and so then in the log on JBoss there were 11,672 records, but it didn´t still show, my application is on JackBe, thanks for your help

            These is a part of my code

             

            public StringBuffer getFindDI(String state, String city, String despacho, String cartera,String cuenta,String morosidad,String zona) {
              int cont = 0;
              Connection con = super.getDirectConnection();
              PreparedStatement ps = null;
              ResultSet rs = null;
              StringBuffer GE = new StringBuffer();
              try{
               StringBuffer query = new StringBuffer();
                  query.append("exec GEE_GETCLIENTESXZONA_DESPACHO ?,?,?,?,?,?,?");
                  System.out.println("ejec GEE_GETCLIENTESXZONA_DESPACHO ");
                  System.out.println("exec GEE_GETCLIENTESXZONA_DESPACHO '" + state+"','"+city+"','"+despacho+"','"+cartera+"','"+cuenta+"','"+morosidad+"','"+zona+"'");
                  ps = con.prepareStatement(query.toString());
                  ps.setString(1, state);
                  ps.setString(2, city);
               ps.setString(3, despacho);
               ps.setString(4, cartera);
               ps.setString(5, cuenta);
               ps.setString(6, morosidad);
               ps.setString(7, zona);
                  rs = ps.executeQuery();
                  while(rs.next()){
                          if(cont > 0)
            //               x
                           GE.append((char)31);
                           GE.append("" + (char)30);
                           GE.append(rs.getString("ACCOUNT_ICO")+ (char)30);
                              GE.append(rs.getString("name_ico")+ (char)30);
                              GE.append(rs.getString("TOTALDEBT_DCO")+ (char)30);
                              GE.append(rs.getString("NOMBRE_DES")+ (char)30);
                              GE.append(rs.getString("bucket")+ (char)30);
                              GE.append(rs.getString("STATUS_ICO")+ (char)30);
                              GE.append(rs.getString("state_ico")+ (char)30);
                              GE.append(rs.getString("cartera_ico")+ (char)30);
                              GE.append(rs.getString("name_zona"));
                              cont++;
                         
                       }       
                 System.out.println("rows total"+cont);
              }
              catch(SQLException ex){
               ex.printStackTrace();
              }finally{
                  try{
                      ps.close();
                      rs.close();
                      con.close();
                  }catch(SQLException ex){
                      ex.printStackTrace();
                  }
                 }  
              return GE;
            }

             

             

            • 4. Re: funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird
              Jean-Frederic Clere Master

              Ok to sumarize the problem you write a huge StringBuffer but the client only receives the first part, correct?

              What is the size of the StringBuffer?

              • 5. Re: funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird
                pedrosantos Newbie

                Hi Jean, thanks , the size of the StringBuffer is not defined, and the client only receive one part , it seems as if the stringbuffer was cut, but I dont know why, thanks four your help.

                 

                Cheers

                • 6. Re: funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird
                  Jean-Frederic Clere Master

                  So how many bytes are received? Is that random?

                  • 7. Re: funcionamiento extraño JBoss 5.1.0 GA / JBoss is weird
                    pedrosantos Newbie

                    Hi Jean, It´s random , the problem is in the front, I was checking the size of response , first on tomcat and it´s ok, but in JBoss response size changes , my code in javascript , is JackBe for the front, thanks again.

                     

                    else if(req.getResponseHeader("CDI")== "getFindDI"){

                                        A('longitud '+req.responseText.length);

                                            dmcontactru.add(req.responseText);

                                      AV('txttotalru', dmcontactru.getSize());

                                        }