I'm using the following approach: the webservice bean - is the interface, and there is also an event-scoped database controller, in the database controller the whole interaction with database is done. That works for me.
thank you for the hint. I have a controller class and set it @Scope(ScopeType.EVENT) but unfortunately it still will not immediately send the newly created Object to the DB. Did you use any other special annotations?
EntityManager em = (EntityManager)Component.getComponent("entityManager, true); em.persist(obj); em.flush();
the DBController method is marked as @Transactional, and the Web-service method isn't. Ah, yeah - I've been using Seam-RESTEasy integration as the web-service.