This is part of my source code.
Please check my code out and reply to me.

Especially, the error is occurred in the following code.
pstmt = conn.prepareStatement ( SQL_SELECT_STATUS_DESC );

Thank you in advance
-------------------------------------------------------------------------
        try
        {
            conn = getConnection ( );            
            log.info("DB Connection:" + conn);
            //log.info(conn.isClosed());
            
            for(int i = 0; i< listOfLoanNumber.size();i++){
                log.info("inside the loop");
                pstmt = conn.prepareStatement ( SQL_SELECT_STATUS_DESC ); 
                           
                pstmt.setString ( 1, (String)listOfLoanNumber.elementAt(i) );
                rs = pstmt.executeQuery();
                if(rs.next()){
                        OrderBean orbean = new OrderBean();
                        orbean.setOrderNumber(rs.getString(1));
                        orbean.setLoanNumber((String)listOfLoanNumber.elementAt(i));
                        orbean.setOrderStatus(rs.getString(2));
                        orbean.setComment(rs.getString(3));
                        listOfStatus.add(orbean);
                } else {
                        OrderBean orbean = new OrderBean();
                        orbean.setLoanNumber((String)listOfLoanNumber.elementAt(i));
                        orbean.setOrderStatus("");
                        orbean.setComment("");
                        listOfStatus.add(orbean);
                }       
                        rs.close();             
                pstmt.close();
            }
            conn.close ( );
        }
        catch ( NamingException e )
        {
            throw new EJBException ( e.toString() );
        }
        catch ( SQLException e )
        {
            throw new SQLException ( e.toString() );
                                } 
       finally 
      {
         try{
                if(pstmt        != null) pstmt.close();
        if(rs   != null) rs.close();
        if(conn         != null) conn.close();
         }      catch(SQLException e){
            log.error("SQL Exception in " + this.getClass().getName(), e);
         }
  
       }                                


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

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


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to