/*************************************************************************************************
 * 프로그램명 : HttpAssign.java 프로그램설명 : 보고자 이관 요청에 대한 정보 작성자 : 작성일 : 변경일 :
 **************************************************************************************************/

package kr.co.kihyun.beans.batch;

import java.io.IOException;
import java.io.PrintWriter;

import javax.jdo.PersistenceManager;
import javax.jdo.Transaction;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import kr.co.kihyun.beans.entity.util.MPersistenceManager;
import kr.co.kihyun.beans.entity.util.*;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@WebServlet("/servlet/kr.co.kihyun.beans.batch.AcceptSetNote")
public class AcceptSetNote extends HttpServlet {

    private static final long serialVersionUID = 1L;
    private static final Logger LOG = LoggerFactory.getLogger(AcceptSetNote.class);
    String assignInfo = "";

    
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        
        //44.적절하지 않은 예외처리(광범위예외클래스)_CWE-754 : Update by YOUNGJUN,CHO
        Transaction tx = null;
        PersistenceManager pm = null;
        
        try {
            PrintWriter out = res.getWriter();
            pm = new MPersistenceManager(PMF.get().getPersistenceManager());
            tx = pm.currentTransaction();

            AcceptNote et = new AcceptNote();

            tx.begin();
            et.AcceptNote(req, res);
            tx.commit();
        } catch (IOException ioex) {
            ioex.printStackTrace();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            if (tx.isActive())
                tx.rollback();
            pm.close();
        }
        //================================================
    }
}
