I am developing an SOA application with EJB and web services that are annotated as @stateless and @Webservice. In one of my web methods, my action gets a DTO object from client and returns it after persisting it. Actually I need to return the persisted Id of my object to the client in the web service DTO response. But ejb commits my insertion after finishing the action. So after calling "persist" I don't have the auto generated Id yet !
Any standard solution please?