package org.example.demo.praktikum2;

import jakarta.ejb.Stateless;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

@Stateless
public class PersonService implements PersonServiceRemote {

    @PersistenceContext
    private EntityManager em;

    @Override
    public int speicherePerson(Person m) {
        em.persist(m);
        return m.getId();
    }
}
