package com.ecolane.mpk.rest;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.ws.rs.POST;
import javax.ws.rs.Path;

import com.ecolane.mpk.persistence.BugReproEntity;

/**
 * @author Jari Juslin, zds@ecolane.com
 */
@Stateless
@LocalBean
@Path("/bug_repro2")
public class BugRepro2Rest {
    @PersistenceContext(unitName = "persistence_context2")
    protected EntityManager entityManager;
    
    @POST
    public String manifestArjunaBug() {
        BugReproEntity entry = new BugReproEntity();

        entityManager.persist(entry);
        
        entry.setHasChanges(true);
        
        return "Success\n";
    }
}
