I suggest to use a stateless EJB with a container-managed entity manager for transaction to be taken care of by JTA. See this Section in Java EE 6-Tutorial
Container-managed is just the easy way that is to be chosen over the more complex application-managed way except you have good reasons to do so.
Try this:
package containing.package;
import package.of.your.UserService
import java.io.Serializable;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless
public class UserServiceImpl implements UserService, Serializable {
@PersistenceContext
EntityManager em;
@Override
public User register(User user) {
em.persist(user);
return user;
}
}