read « Transaction « JPA Q&A





1. how to set query to be read uncommited?    stackoverflow.com

with hibernate, how can I set a query to be read uncommitted? I don't want this to be a global setting, just want to do it on a per query basis. ...

2. hibernate's transaction read and subsequent update    stackoverflow.com

I have situation in which I read a record from a database. And if everything is ok I'll modify few properties and commit transaction. But in situations two threads do the same, ...

3. Read only transaction table locking    stackoverflow.com

I'm using JPA 2.0, Hibernate and MySQL. The isolation of MySQL db is TRANSACTION_REPEATABLE_READ. I have a set of queries which will be used for displaying data on the website. Some ...

4. JPA lock entity for reading    stackoverflow.com

I have I code:

public static Computation findByDateAndPaymentSystem(EntityManager em, Calendar date, PaymentSystem paymentSystem) throws SCException {
        Query query = em.createNamedQuery("Computation.findByDateAndPaymentSystem");
      ...

5. In hibernate is it necessary to use Transaction while reading?    bytes.com

Hi, In some examples of hibernate I have seen on the net, people have used Transaction while doing a session.get. Is it necessary to use Transaction while reading using hibernate? The ...

6. Optimistic lock - read increase version number    forum.hibernate.org

Hi, I use optimistic lock to prevent concurrent update, configured like this: ... ... But even if I only read the record the version number increased I read it like this for example: Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); Criteria criteria =session.createCriteria(Cls.class); criteria.list(); session.getTransaction().commit(); What is wrong ...

7. The open transaction does not read the updated value from ex    forum.hibernate.org

I have a testcase which use the JPA Transaction Manager, transaction annotation to open a transaction. once the transaction is open, that is the flow is inside the method , I put a breakpoint. Now I modify the first name of teh record that is going to be fetched from the method from DB visualizer.(It is on auto commit). no I ...

8. concurrent read stop    forum.hibernate.org

9. Table Locking for Read Access possible with Hibernate?    forum.hibernate.org

Hi group, we use Hibernate 3.6.1 together with MySQL 5.0/5.1 (InnoDB dialect) in our project. Currently, we are facing the problem of getting a lock on an object that has not been persisted yet: public class OurObject { Long id; String name; Set myelements; } We have an API method "void addElementToObject(String name, Element someElem)" with a straight-forward algorithm: Begin Transaction. ...





10. read locking    forum.hibernate.org

11. Using read-only transactions    forum.hibernate.org

Using read-only transactions ---------------------------------- You see i am try to connect to a informix 7.3 database but i get a error say read ony mode not supported. When i investigated .. The DataStoreConnection's readOnlyTx property controls whether a transaction is read-only or not. To make JDBC connections use read-only transactions, I need to set the readOnly property of the java.sql.Connection object ...

13. Transactions required for read only ?    forum.hibernate.org

1. Apart from factors like phanton read ( isolation level ), I m wondering if one is expected to use Transactions for a query operation. 2. In case of a query, what happens when one rolls back the transaction. 3. Also with respect to Clob, am I expected to be within the transactional context when I do the query ? 4. ...

14. Read only transactions in Worked Example    forum.hibernate.org

hi mate, this is not related to hibernate. Everything you do on your database needs a transaction no matter if it is hidden or not. Autocommit for example is a kind of hidden transaction management and it is not a good thing. Google may help you to have all the story about read only also needs a transaction

15. BeginTransaction and commit slow down read throughput    forum.hibernate.org

Hi, I am using Hibernate 3.0, and have two read-only objects which map to tables with 11,000 and 100,000 rows respectively. I am not currently using the latest HibernateUtil mentioned in the Manning book, I am opening session through my util, but starting the transaction using the Session object. I beginTransaction() and commit() for all my Hibernate operations, read or write, ...

16. Old data is read after Transaction.comit()    forum.hibernate.org





17. JTA and read-only queries    forum.hibernate.org

Hi all, I'm using Hibernate 3.0.5 as a DAO implementation that sits behind a session bean to load/persist everything against an Oracle 9i database. All on a Weblogic 8.1 SP 2 server. Since updating from Hibernate 3.0.3 my server logs are filling up with the following log statement: Code: 03-Jun-2005 09:44:08 org.hibernate.jdbc.ConnectionManager afterStatement INFO: Skipping aggresive-release due to open resources on ...

18. Necessary to use transactions for read-only queries    forum.hibernate.org

See documentation about configuration and managed transactions, hibernate integrates with container and you can use declarative transaction demarcation. I prefer to use client transactions, it is more clear for me. Typical transaction demarcations is a transaction per request anyway. It is a web application, is not it ? If it is a web application then demarcate transactions in filter or in ...

19. Is there a need for tx.commit after just reading from DB?    forum.hibernate.org

Session session = HibernateUtil.currentSession(); Transaction tx = null; tx = session.beginTransaction(); org.hibernate.Query query = session.createQuery("from Document"); ...

20. How to enforce read-only transactions?    forum.hibernate.org