Re: Flush Mode

2007-09-17 Thread Gurkan Erdogdu
Ok. Thanks all. I understand the concept now. - Original Message From: Craig L Russell <[EMAIL PROTECTED]> To: users@openjpa.apache.org Sent: Monday, September 17, 2007 7:47:38 PM Subject: Re: Flush Mode Hi Gurkan, JPA is designed to provide transaction isolation b

Re: Flush Mode

2007-09-17 Thread Patrick Linskey
> q.setParameter("oid", getOid()); > > > > > > User s = (User)q.getResultList().get(0); //In this user state > still with 'B' > > > > }finally{ > if(m != null) > > SessionOperations.closeEntityManager(m); &g

Re: Flush Mode

2007-09-17 Thread Craig L Russell
{ if(m != null) SessionOperations.closeEntityManager(m); } } persistence-xml just contains entity class definitions, and datasource specific properties. EJB 3.0 spec says that when entitymanager or query flush mode is AUTO then, all queries after that will con

Re: Flush Mode

2007-09-17 Thread Gurkan Erdogdu
datasource specific properties. EJB 3.0 spec says that when entitymanager or query flush mode is AUTO then, all queries after that will contain new values. But I am not sure this is in the same entity manager, because in method1 and method2, I use two different entitymanager. -

Re: Flush Mode

2007-09-17 Thread Patrick Linskey
Can you post the actual code plus your persistence.xml file please? -Patrick On 9/17/07, Gurkan Erdogdu <[EMAIL PROTECTED]> wrote: > Hi; > > When I change User status in method1 using flush, it does not sync with the > database. It still looks the same status value in other method. > > public vo

Flush Mode

2007-09-17 Thread Gurkan Erdogdu
Hi; When I change User status in method1 using flush, it does not sync with the database. It still looks the same status value in other method. public void method1(){ EntityManager m; EntityTransaction t; m.setFLushMode(AUTO); t = m.gettransaction(); t.begin; Query q = some query to get User