torsten@24: package de.intevation.service; torsten@24: torsten@24: import java.util.logging.Logger; torsten@24: torsten@24: import javax.ejb.Stateless; torsten@24: import javax.ejb.TransactionAttribute; torsten@24: import javax.ejb.TransactionAttributeType; torsten@24: import javax.inject.Inject; torsten@24: import javax.persistence.EntityManager; torsten@24: torsten@24: import de.intevation.model.LProbe; torsten@24: torsten@24: @Stateless torsten@24: public class LProbeService { torsten@24: torsten@24: @Inject torsten@24: private Logger log; torsten@24: torsten@24: @Inject torsten@24: private EntityManager em; torsten@24: torsten@24: // @Inject torsten@24: // private Event memberEventSrc; torsten@24: torsten@24: @TransactionAttribute(TransactionAttributeType.REQUIRED) torsten@24: public void delete(String id) throws Exception { torsten@24: LProbe probe = em.find(LProbe.class, id); torsten@24: log.info("Deleting " + probe.getProbeId()); torsten@24: em.remove(probe); torsten@24: //memberEventSrc.fire(member); torsten@24: } torsten@24: }