Hi Chintan,
What you're trying to do is (in my opinion) a gray area. You have a stateless EJB, but are expecting the EntityManager to track the state of a set of entities between method calls. If you start a transaction before calling read() and that transaction is still active when you call update() your scenario might work. It depends on the application server to associate a specific EntityManager instance with a transaction (I think most app servers do this but I could be all wet). In general if you want an EntityManager to track a set of entities across method invocations I find it more intuitive to use a Stateful bean, which guarantees that the same instance of the bean (and EntityManager) will be used throughout a conversation. Hope this helps, -mike On Wed, Apr 6, 2011 at 11:51 PM, chintan4181 <[email protected]> wrote: > Read and Update are two functions exposed as a part of web service. > > In first step web service client call read service to get the data. > in second step it may update values and call update service. and both of > these methods are part of @stateless EJB. > > I think they will not part of same entity. please correct me if i m wrong. > > What should be the approach to identify dirty fields/objects? > > Thanks > chintan > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Need-help-to-understand-how-getDirtyObjects-works-tp6239101p6248646.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >
