Great. Does this EJBContainer, probabely, have a getSession() or (getUnitOfWork()) or something in which we can access the session and set parameters to be valid in the request scope and accessible across the application during serving of a request?
The idea of unit-of-work is really nice and in my experience with EJB I frequently was in trouble for lacking of this feature please have a look at this article: http://blog.objectmentor.com/articles/2007/09/04/thread-local-a-convenient-abomination The nice thing in EJB3.1 is Singleton session beans and I am eager to see it in actual work but another problem is exceptions thrown from the JPA. I didn't have enough time to read the draft completely but is there any exception defined like UniqueConstraintViolatedException? This exception is really vital. consider a user entered a code which is already inserted and we have a unique-constraint defined in DB. how we can notify the user that the code you inserted is already taken by another record? Currently the only exception we get is PersistenceException and you can't even parse it to find out what the problem is!!! and we send back the general message "You made a mistake in entered data!!!!" and you know how much users will be angered by this vague message. The only solution is to enquiry for each insertion request to check if the code is already exist and I don't think this is a good idea in terms of performance and desing. Thanks ----- -- Regards Mohammad Norouzi Help each other to reach the future faster http://pixelshot.wordpress.com Pixelshot Photoblog http://brainable.blogspot.com Brainable Blog -- View this message in context: http://www.nabble.com/EJB-3.1-PFD2-is-up-for-download-tp22462651p22470431.html Sent from the OpenEJB Dev mailing list archive at Nabble.com.
