public static StudentBean fetchStudentInfo(int id) {
		StudentBean bean = new StudentBean();
		ResultSet rs=null;
		Connection con=null;
		PreparedStatement ps=null;
		try{
			String sql="SELECT S.S_ID, S.DEPTID, S.MAJOR, D.DEPTNAME "
					+ "FROM STUDENT S, DEPARTMENT D WHERE S.DEPTID=D.DEPTID AND"
					+ " S_ID=?";
			con=ConnectionPool.getConnectionFromPool();
			ps=con.prepareStatement(sql);
			ps.setInt(1, id);
			rs=ps.executeQuery();
			if(rs.next())
			{
				bean.setDeptId(rs.getInt("DEPTID"));
				bean.setDepartmentName(rs.getString("DEPTNAME"));
				bean.setMajor(rs.getString("MAJOR"));
			}
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		finally{
			if(rs!=null)
			{
				try {
					rs.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			if(ps!=null)
			{
				try {
					ps.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
			if(con!=null)
			{
				try {
					ConnectionPool.addConnectionBackToPool(con);;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
		
		return bean;
	}