1. Hibernate Transaction Manager Issue stackoverflow.comI am new to Hibernate and attempting to run a java/spring example that retrieves data from a table in MS SqlServer. Everytime I try to run the program, the data ... |
2. Going transactionless with Hibernate stackoverflow.comIs there a way to pick-and-choose updates that Hibernate will wrap with a transaction? Inspired by EBay's drive to be transactionless whenever possible, I know of many updates in my ... |
3. How to manage java ee transactions? stackoverflow.comI'm currently using Java EE to inject my EntityManager into a web app as follows:
I have this in a request scoped JSF bean. It works, but it's a pain ... |
4. Hibernate transaction problem stackoverflow.comWhen I execute some queries inside Hibernate transaction -> the data successfully updated in my mysql, but in my application there are still old values. When i restart - it`s Ok. ... |
5. I need to know when hibernate has completed it's transaction stackoverflow.comI have an entity that has a CallBackListener registered using postPersist and postUpdate. The listener takes the entity and submits the ID to a JMS queue which perform further processing. The ... |
6. Transactions in hibernate stackoverflow.comI new to hibernate In my project, i need to handle transactions. How to handle declarative transactions with in two classes Examples:
|
7. Multi step transaction in hibernate stackoverflow.comAm facing few issues with multi step transction in hibernate. This is what I am doing. One of my DAO methods
|
8. How to do transactional without lose encapsulation? stackoverflow.comI have a code that saves a bean, and updates another bean in a DB via Hibernate. It must be do in the same transaction, because if something wrong occurs (f.ex ... |
9. what is transaction management in hibernate? stackoverflow.comwhat is transaction management in hibernate. ? in my hibernate application one- many mapping is there. Eg : student table is mapped with Subjects table. when i adding a student object that time ... |
10. org.hibernate.AssertionFailure stackoverflow.comI am getting this strange error sometimes while my thread executes. What could this be related to?
|
11. Multiple Transactions in Hibernate stackoverflow.comIs there any risk to call beginTransaction on one session multiple times? I mean for example:
I did this and it seems there is no ... |
12. Hibernate Transaction coderanch.comHi, JDBC transaction: one connection with commit()/rolback(). JTA transaction: one or more (XA) resources with start(), prepare(), commit()/rollback(). This is used for distributed transactions with 2 phase commit protocol. However, if only one resource is involved, a smart transaction manager should optimize the 2 phase commit into one phase commit by skiping the prepare() and calling commit(xid, true). Best regards, Mircea ... |
13. Hibernate transactions coderanch.comI am using struts and hibernate. My design is struts-->Business Service(Logic)-->DAOService(Per POJO)-->Hibernate I have few POJO objects that hibernate will use to store data into DB, e.g. pojo object User, Product, Catalog I have a DAOService class per POJO to provide CRUD. This will use a Session Object of hibernate to save data to database. In the DAOService it just does ... |
14. Non transactional with hibernate coderanch.comI don't know how to keep Hibernate from calling commit() other than to create your own transaction and transaction factory classes. That would allow you to intercept the transaction calls and skip them. See the source to org.hibernate.transaction.JDBCTransactionFactory and JDBCTransaction as examples. An entry in the Hibernate configuration file would tell Hibernate to use your factory: hibernate.transaction.factory_class = org.hibernate.transaction.NonTransactionalTransactionFactory |
15. Hibernate and transaction management coderanch.comReally excited about Hibernate now. My current EJB system has transactions and it uses Container to manage the transactions by setting transaction attributes. If I go with Hibernate, it seems I don't need an application server any more (correct me if I am wrong), then how do I manage the transactions ? Should I keep using application server and just convet ... |
16. Hibernate and WAS 5.0 Transaction manager look up class coderanch.com |
17. Hibernate Transaction Timed Out coderanch.comDoes anyone know how the following exception comes about? If a query takes too long (> 32 s), does Hibernate throws an exception? org.springframework.jdbc.UncategorizedSQLException: (Hibernate operation): encountered SQLException [weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception: [javax.transaction.TransactionRolledbackException: Transaction timed out after 32 seconds Xid=BEA1-1684F446B8284FFD72E3(15544473),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=32,seconds left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=ended,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@11c5b4,re-Registered = false),SCInfo[ECXDomain+ECXmanaged2]=(state=active),SCInfo[ECXDomain+ECXmanaged1]=(state=active),properties=({weblogic.jdbc=t3://8.58.203.49:7001}),CoordinatorURL=ECXmanaged2+8.58.203.49:7001+ECXDomain+t3+)]]; nested exception is java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception: [javax.transaction.TransactionRolledbackException: Transaction ... |
18. Double transaction counts when using Hibernate Statistics coderanch.comI am getting a double count of transactions when using Hibernate Statistics. The double transaction counting is happening within Hibernate's JDBCContext class. JDBCContext.afterTransactionCompletion() is called after the transaction is completed, which results in an increment of the statistics' transaction count, and then this method is called again in JDBCContext.connectionCleanedUp() as a result of a isTransactionalCallbackRegistered flag not being set, resulting in ... |
19. Hibernate Without Transactions coderanch.comHello Everyone, I am using Hibernate 3.0, jdk 1.5,MySQL and Jrun I wanted to know whether we can store/retrieve update data without using the following piece of code in hibernate session.beginTransaction(); I am attaching the hibernate.cfg.xml |
20. When do JPA and Hibernate Need Transactions? coderanch.comI've been google searching and finally fixed my problem by adding a transaction. I noticed a sample app at http://forum.springframework.org/showthread.php?t=29761 that did not start a transaction before saving but then the posting date was 2004. (I guess I should see if this sample works -- I have not yet). When do I need to start a transaction and what kind? Do ... |
21. when is Transaction used in hibernate? coderanch.comWelcome to your first schooling in Hibernate. The word transaction can be literally defined as a "unit of work." Is connecting to a database, querying its data, and getting back some information work? I'm sure the database would think so. So yes, you always need a transaction. You are always doing work. Now, when we think of transactions, we often think ... |
22. JPA - Scope extended and transaction coderanch.com |
23. Spamming transactions breaks Hibernate? coderanch.comIt's me again with my transmitters and sensors, lucky y'all - back from dealing with SSL (much easier!). In general Hibernate seems to be working, but... not 100% yet. I have some problems with transactions now, it looks like. A bit of backdrop as to the code - as this is a Swing app the Hibernate updates are going on in ... |
24. Hibernate transaction demarcation coderanch.comAre you asking about long-running transactions, such as going through a multi-page form? Hibernate uses a session, which (in short) is like a first-level cache of objects that are to be persisted to the DB. The session can be used in different ways. You can connect and disconnect different DB transaction to the session, or you can detach objects from the ... |
25. synchronizing Hibernate transactions coderanch.comHello Guys, We use Hibernate API to manage persistence of our data into a Postgresql database. we built a complex J2EE system that uses many components communicating together in different ways such as Spring managed beans , EJB and JMS for asynchronous messaging. we are testing our system now. to be able to wait until a JMS message has been received ... |
26. Hibernate Transaction coderanch.comhi, i just want to know if we shoud open and commit the transaction for each time we want to acces the database or is it possible to execute more than a query in one transation. and if it's the first response , how may do to prevent the case when in one service the first query is commited and the ... |
27. what is Transaction in hibernate coderanch.comi found this tutorial.But in this tutorial when saving data they didn't use transaction.they use Transaction for updating. here ARE THE EXAMPLES. [codeE] package roseindia.tutorial.hibernate; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class FirstExample { public static void main(String[] args) { Session session = null; try{ // This step will read hibernate.cfg.xml and prepare hibernate for use SessionFactory sessionFactory = new ... |
28. Regarding Hibernate Transactions coderanch.comHi , I am using Hibernate Session injected in my EJB3 Session Bean code for my database operations. @PersistenceContext private Session session; I am trying to put the below operations inside a transaction block. tx = session.beginTransaction(); { delete Operations Insert Operations { Insert Parent Table Insert Child Table 1 Insert Child Table 2 } } tx.commit(); If any one of ... |
29. stand-alone java app and hibernate transactions coderanch.comHi All, I have a stand-alone java app (no UI, no containers, no Spring) but we are using a layered approach internally for this app. Following is how we maintain the layers within this stand-alone java app Service Orchestration --> Service(or Manager layer) --> DAO --> Hibernate (ORM) -->Oracle The Service Orchestration layer as the name suggests orchestrates call to various ... |
30. Hibernate Transactions coderanch.comHello, I just have few clarifications in implementing transaction management in hibernate effectively with few specific scenarios in place as mentioned below. Consider that i have various DAOs which are entity specific for example, i can have a DAO for an Employee called EmployeeDAO and a DAO for Project called ProjectDAO, assume that these entity DAOs does CRUD operation on the ... |
31. Hibernate Transactions coderanch.comHi, I am using hibernate in my web application. I have made sure that when ever a session is open , it is also closed. my config looks as below |
32. Problem in begining the transaction in hibernate coderanch.comHi Friends, I am able to begin transaction in hibernate but after few clicks I cannot begin the transaction for other functions. There is no exception, the cursor gets stuck up at the particular line:- transaction.begin(); and does not move forward. Once it happens all other transactions are stuck. Please help. Thanks in advance. |
33. Hibernate and IO transactions coderanch.comI am building a process to upload a file to a file server and catalog the file attributes in SQL Server. I am using Hibernate to access the databases. I wonder if there is a way to include the IO call in the transaction, so if either the IO or the database call dies, they both get rolled back. Any ideas? ... |
34. hibernate is autocommiting transaction coderanch.com |
35. Hibernate & Transaction Management forum.hibernate.org |
36. Something is wrong with my transactions forum.hibernate.orgI'm doing something really simple with my BD, and it appears to be failing. The code is below. Basically, what myMethod() does is check if certain entry on my DB matches a certain criteria, and if it doesn't, it inserts an object that matches it. Well, I've detected that when in my application two threads go trough that point at once, ... |
37. Serializable Transaction forum.hibernate.orgSpring 2.5.6 / Hibernate 3.3.2 / Oracle 10g / hibernate.transaction.factory_class not specified (default value) / HibernateTransactionManager Code: @Service("bookService") @Transactional(propagation = Propagation.REQUIRED) public class BookServiceImpl implements IBookService { @Autowired private IBookDao bookDao; // uses @Autowired SessionFactory @Transactional(readOnly=true, isolation=Isolation.SERIALIZABLE) public List |
38. Problem in Hibernate Transaction Management. forum.hibernate.orgI am facing some problem in transaction commit/rollback. The situation is I want to update the record before deleting it. So if either of update or delete fails the current transaction should be rolled back, else it should be commited. In my DAO Impl class delete method I have written following code. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ getHibernateTemplate().getSessionFactory().getCurrentSession().getTransaction().begin(); // update Record getHibernateTemplate().update(DTOObject); // delete Record ... |
39. transaction slow down forum.hibernate.orgHi, I have application with JPA, and try to process and insert a group of records. What application start, it is very fast and take only one second to insert a group of records into database (MySQL), but But after about one or two hours, it'll take about ten seconds to finish transactions, after over night running ( about 12 hours), ... |
40. How to do a multi-step transaction? forum.hibernate.orgI have two discrete saves that needed to be wrapped as a single transaction. It is not clear how to do this. I have tried the following: @Transactional(propagation=Propagation.REQUIRES_NEW, rollbackFor=Exception.class) controller() method --- prepares first data set by creating domain objs and populating values --- invokes method A that uses em to persist --- prepares second data set by creating domain objs ... |
41. Hibernate Transactions forum.hibernate.orgHi, I want use hibernate transaction ..any body please explain me how to use Hibernate Transaction in proper way. Here is my scenario : I have 3 tables i.e user ,address ,and account tables.And every table having its own POJO if user logged into my site i have to update the above 3 tables. step 1 .Once user logged in i ... |
42. Transactions and Atomicity forum.hibernate.orgHi, Im having an odd probelm while running my Junits (Im running them within eclispe with JUnit4, Spring 3 and hibernate 2.3). I think the problem is tied up with the fact Im running my tests within a transaction, setting up database test data first within the test transaction, then using that test data in my tests. So, within a single ... |
43. Hibernate Transactions forum.hibernate.orgHi, Can anyone help me with this please? I am trying to develop a small hibernate application to learn hibernate features. I tried transferring funds from one a/c to another, in which one a/c is debited and the other is credited. 1. debit txn 2. credit txn Everything works fine and transaction goes well. However, if some exception occurs in second ... |
44. Multi-transactional issue (details inside) forum.hibernate.orgHi, all. I'm totally stuck with following scenario. I have entity A which identified by business key id. So when we create A we specify ID rather than let Hibernate generate it. Imagine it, i.e. as user, identified by username. I have also entity B which is related as many-to-one to entity A, and which is identified by generated ID. Relation ... |
45. I need to know when hibernate has completed it's transaction forum.hibernate.orgI have an entity that has a CallBackListener registered using postPersist and postUpdate. The listener takes the entity and submits the ID to a JMS queue which perform further processing. The message submission and consumption are so fast that they're occurring before the original session has completed it's transaction. As a result the MDB either can't find the entity or the ... |
46. transaction become inactive by ConstraintViolationException forum.hibernate.orgAfter a ConstraintViolationException when trying to delete an entity, the transastion become inactive so I can't make a rollback ands session.clear() close my session I work with permenant session Code: try { tx.begin(); ... |
47. Transactional and Try-Catch forum.hibernate.orgHello together! Ive got some questions to the structure of my hibernate-code and I would be glad if you could help me. To show what I mean, I wrote some classes which clarify my problems in general. The questions are written down below. Code: public class Checks { private HibernateDao projectDao; @Transactional(readOnly = ... |
48. Problem with Hibernate transactions forum.hibernate.orgHi I have been using transactions + concurrency control in my application. I tried using optimistic and pessimistic locking but it does not seem to work I am using Spring and Hibernate 3.2.5. My application scenario is : 1) user can select multiple number of files from the UI 2) for each file a NEW transaction is run consisting of SELECT ... |
49. how is 2phase transaction done in hibernate? forum.hibernate.org |
50. How do i use transaction in IdentifierGenerator? forum.hibernate.orgHello! I'm new to Hibernate and try to write my own id generator based on IdentifierGenerator. I need an id of type String, but unfortunately MySQL does not support "nextval". So I try to do a SELECT first, increment my simulated sequence number and then put it back with an UPDATE query. I want to use transactions for these two queries, ... |
51. Is ther need of transaction demarcation in hibernate forum.hibernate.org |
52. Stand By in a middle of a transaction forum.hibernate.orgNewbie Joined: Tue Jul 12, 2011 12:03 pm Posts: 1 Hi All. I'm having a problem with my app in a save section. I'm using Spring 3.0.0 and Hibernate 3.2.5 I need to save a lot of things in a for, but when I save 3 or 4 objects the appplication sleeps and I don't know how or what is the ... |
53. Jboss7 and Transactions forum.hibernate.org |
54. Jboss7 and Transactions forum.hibernate.org |
55. Hibernate transaction with WAS5.1 forum.hibernate.orgHi, I am new to hibernate and we are trying to use hibernate 3.5.6 in WAS 5.1, Since we are using session bean to call our DAO, we would like to use CMT to manage the transaction. But so far we tried different combination of configuration, but none of them is working. Here is what we tried: using: |
56. Managing transactions forum.hibernate.orgI am using tomcat for my application. So would the transaction JNDI configuration be done in the web.xml like the JNDI datasource cofiguration. If I were to use the hibernate transaction API, a typical transaction would look like this Session sess = factory.openSession(); Transaction tx; try { tx = sess.beginTransaction(); //do some work ... tx.commit(); } catch (Exception e) { if ... |
57. SEVERE : Transactions not supported forum.hibernate.orgI'm getting the exact same exception with Hibernate 2.1 and Informix 9.3, using the JDBC driver supplied with the server (2.21 JC5). If I connect the same app (a very simple helloworld-type app) to MySQL everything runs fine. I already found some suggestions about turning on logging in the database, but I have done so and it didn't help. Does anyone ... |
58. petclinic transactions without Web framework. forum.hibernate.orgI have beed doing some tests on Petclinic application in order to see how transaction management works. In [b]HibernateClinic [/b]class , method [b]loadPet[/b] I've inserted 2 calls : one to [b]storeOwner()[/b] and second to [b]storeVisit()[/b]. The method [b]storeVisit[/b] is throwing an exception and due to this transaction is rolledback. When I have been tested this code change throught petclinic web interface ... |
59. Transactions forum.hibernate.orgSystemErr R java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 [12/18/03 10:11:57:219 GMT-05:00] 6e9ac442 SystemErr R at java.util.ArrayList.RangeCheck(ArrayList.java(Compiled Code)) [12/18/03 10:11:57:219 GMT-05:00] 6e9ac442 SystemErr R at java.util.ArrayList.set(ArrayList.java:343) [12/18/03 10:11:57:219 GMT-05:00] 6e9ac442 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.countParameter(WSJdbcPrepa redStatement.java:355) [12/18/03 10:11:57:219 GMT-05:00] 6e9ac442 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.setNull(WSJdbcPreparedStat ement.java:1050) [12/18/03 10:11:57:219 GMT-05:00] 6e9ac442 SystemErr R at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:40) [12/18/03 10:11:57:219 GMT-05:00] 6e9ac442 SystemErr R at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:31) [12/18/03 10:11:57:219 GMT-05:00] ... |
60. Problem with a transaction forum.hibernate.orgHi Guys, I have the following Warning any time I try to update an Object through Hibernate 2.1.1. [ WARN] net.sf.hibernate.impl.SessionImpl - afterTransactionCompletion() was never called The code I execute is like this : Session sess = null; Transaction tx = null; Object result = null; try { sess = this.openSession(); tx = sess.beginTransaction(); sess.saveOrUpdate(object); tx.commit(); } catch (Exception e) { ... |
61. Problem with transactions forum.hibernate.orgI've deployed Hibernate as a SAR in JBoss 3.2.3. Here's my jboss-service.xml file: Code: |
62. Are Transactions required? forum.hibernate.orgI created some code following Nick Heudecker's Introduction to Hibernate tutorial, and nothing happened with my database. The basic code idea was: Session s = sf.openSession(); s.saveOrUpdate(team); s.close(); However, if I wrap a Transaction around the saveOrUpdate() and commit it before the session close(), it works. I got rid of the Transaction and put s.flush() before the s.close() and the database ... |
63. Problem understanding transaction forum.hibernate.orghi all, i've made an error thinking begin / commit transaction was unecessary in certain cases. It seems many have done the same error. To prevent this, i'd like to discuss about several cases. I know this more a "db" knowledge but i think the forum can help much better. the questions may look idiot but... So i begin: 1- we ... |
64. Transaction in progress forum.hibernate.orgIs there something atomatic in hibernate that will do the following , or do I have to use some sort of versioning Person A selects an order to work on in a web app (does some changes) Person B a couple of minutes later selects the same order (does some changes) Person A commits Person B commits Person B's data will ... |
65. Under what circumstances are transactions necessary? forum.hibernate.orgUnder what circumstances are transactions necessary? I have a Customer object with a Map as an instance variable. Modifications to the map are written to the database iff I'm using transactions--is this supposed to happen? In the following code, the attribute-value pair "COLOUR"/"BLUE" is written to the database iff the tx.commit() line is present--without it, it's not (and not error or ... |
66. replicate + transactions forum.hibernate.orgHello. Hibernate 1.2.3, mySQL 4.0.18 (windows). I use replicate method for synchronization of objects between 2 databases. I have the following code: Code: Session localSession = getLocalSession(); Session synchroSession = getSynchroSession(); Transaction tx = synchroSession.beginTransaction(); synchroSession.delete("from sometable in class " + getSynchronizedClass().getName()); Iterator it = localSession.iterate("from sometable in class " + getSynchronizedClass().getName()); while (it.hasNext()) { PersistentObject object = (PersistentObject) it.next(); localSession.evict(object); ... |
67. Transactions that spans multiple webapps forum.hibernate.orgI have read around the forums for some time now, but can't find a good answer to this question. If I have a webapp deployed as two war files in a tomcat (or similar) servlet container. These two war files access the same (mysql innodb) database, and usage of tables overlap. Is it possible for one web application to be aware ... |
68. Transactions that spans multiple webapps forum.hibernate.orgI have read around the forums for some time now, but can't find a good answer to this question. If I have a webapp deployed as two war files in a tomcat (or similar) servlet container. These two war files access the same (mysql innodb) database, and usage of tables overlap. Is it possible for one web application to be aware ... |
69. transaction management with hibernate forum.hibernate.orgHI here i need to build a jsp page which refreshes the every 10 seconds.What i want , a request is gone to the database( every 10 seconds) and get the new data and display it in the above jsp page. How can i control the transaction management, Should i always have to reestablish new connection? or hibernate should automatically sort ... |
70. Transaction and Hibernate.initialize() forum.hibernate.orgDo I need to place Hibernate.initialize() inside a transaction context? When I first asked myself, I thought it is a sure thing. The call needs to be place inside a transaction: tx = session.beginTransaction(); session.lock(user, LockMode.NONE); Hibernate.initialize(user.getSites()); tx.commit(); }catch (HibernateException e) { if ( tx != null ) { try { tx.rollback(); } catch (HibernateException he) { ....... } }finally { ... |
71. Transaction within a transaction forum.hibernate.orgHello, I'm trying to get a better understanding on how transactions work. I'm running within JBoss and I have to separate datasources set up to different databases. What happens when I open up a transaction within a transaction? For example: // get session to first datasource Session sessa = factorya.openSession(); // get session to second datasource Session sessb = factoryb.openSession(); Transaction ... |
72. Check for transaction presence needs to be added forum.hibernate.org |
73. Problem with transactions.. forum.hibernate.orgBeginner Joined: Tue Sep 21, 2004 1:49 pm Posts: 33 Location: Bogota, Colombia Hi, my problem is simple to explain: when I want to create/update/delete an item from any class it works when I do not use hibernate transactions! In addition, when I use transactions, no exception is thrown. Why could this be happening? This code works: Code: try { ... |
74. strange use of transactions? forum.hibernate.orgHi, I have to analyze and improve a pretty complex web application which sometimes has unexpected behaviour... Sometimes code looks like this : Transaction transaction = session.beginTransaction(); // jdbc transaction try{ ... session.save(object); transaction.commit(); // commit 1 ... session.save(object2); transaction.commit(); // commit 2 } catch (Exception e) { if (transaction != null) try { transaction.rollback(); } catch (HibernateException e1) { } ... |
75. Hibernate and jbpm transaction forum.hibernate.org |
76. break up huge transaction into smaller transactions forum.hibernate.orgHello all, I have a situation where i would like to save an object map to the db using hibernate 2.1.6. I get a native sql error from my database saying something about transaction log getting too big, and the transaction aborts. Can anyone suggest a strategy for breaking up a large object graph into smaller piecies, while maintaining the original ... |
77. problem with transaction handling forum.hibernate.orghello all, whenevr i try to delete any instance from memory then first of all the following exception is thrown but after that the instance also gets removed.Can anyone help me in resolving this issue.Any help is highly appreciated. Hibernate version: 2.0 Mapping documents: My Hibernate.cfg.xml file:- |
78. Problems with transactions in WAS when using hibernate forum.hibernate.orgHi guys, I have had problems with hibernate 2 when using it in WAS 5.X. The problem concerns the management of transactions. I have an EJB Session Bean method which requires a transaction. I have configured the .cfg.xml file to use JTATransactionFactory and a ConnectionProvider like this: |
79. Getting a delta for the current transaction. forum.hibernate.orgHi All, I posted a topic a few weeks ago about getting a list of items from the level 1 cache (see http://forum.hibernate.org/viewtopic.php?t=937687 ). Emmanuel suggested that an Interceptor might help. I managed to get this working to a degree, however I'm not entirely happy with the solution. It looks like a fair amount of overhead, and some of the logic ... |
80. maintaing transactions forum.hibernate.orgcreateUser(name) { User user = new User(); user.setName(name); dao.createUser(user); } addRoleToUser(userId, roleId) { User = getUser(userId) role = getRole(roleId); user.addRole(role); dao.updateUser(user); } copyUser(id, name) { User existingUser = getUser(id); createUser(name); Role[] roles = exisitingUser.getRoles(); for ... |
81. Transaction Management and Hibernate forum.hibernate.orgSummary: I have an application that uses the following technologies: Databses: Oracle 9i, Sybase Application Servers: Weblogic, JBoss, WebSphere Hibernate 2.1.8 I am using CMT. I also have code that explicitly begins and commits transactions as shown in the fragment below. Transaction code is : public void insertOrUpdate(ProcessInstance pi) throws HibernateException { Session s = HibernateUtil.openSession(); Transaction tx = s.beginTransaction(); try ... |
82. Setting Transaction Manager forum.hibernate.org |
83. Recommneded Transaction Manager Setup (newbie) forum.hibernate.orgSorry if this question is basic but im seeing the following log message and I'm not sure the proper way to implement transactions. I see this log warning in the logs but don't know if its a big deal or not. Can anyone help? ------------------ INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is ... |
84. Cancel a deletetion in the same transaction. forum.hibernate.orgThere is an isolated database table named "MESSAGE", with correspond class Message. In a transaction, there exists a persistent Message object named "message". Now, session.delete(message); // Now message is a transient object, isn't it? Later, in the same transaction: // Cancel the previous delete, so that object message // becomes the original persistent object before the deletion. // And then message.setText("..."); ... |
85. Probleme with Transaction forum.hibernate.org |
86. Problem configuring Hibernate transactions with Websphere6 forum.hibernate.orgAfter alot of problems and misunderstandings I have almost got Hibernate to create a record when running in Websphere 6 but it is complaining it cannot find UserTransaction in JNDI. Is this something I have to do, I have created a JTA based Datasource in Websphere and Hibernate can use this Datasource to retrieve records but is unable to create them. ... |
87. Unexpected Transaction Behavior with SLSB forum.hibernate.orgWe have several Stateless Session Beans that are accessing/updating data via hibernate. These SLSB's fall into 2 categories: 1-Business/Service Layer and 2-DAO. We are also using the ThreadLocalSession method of creating and using a session across SLSB calls We have the following call stack/Transactions: Code: BO1 - Required DAO1 - RequiresNew We are encountering 1 oddball situation where the ... |
88. javax.transaction.SystemException? forum.hibernate.orgSEVERE: Initial SessionFactory creation failed. java.lang.NoClassDefFoundError: javax/transaction/SystemException at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055) at com.davidhaynes.probe.HibernatePersist. |
89. Transaction problem... forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:3.0[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close(): /////////////////////////////--- query 1 ---//////////////////////// Session aSession = null; //Transaction tx = null; try { aSession = HibernateUtil.currentSession(); //tx = aSession.beginTransaction(); Query q = aSession.createQuery("FROM Customer c order by c.name"); out.println("SIZE1: " + q.list().size()); //tx.commit(); } catch (Exception e) { //if (tx != ... |
90. Dummy transaction manager forum.hibernate.orgDoes Hibernate have a dummy transaction manager that I can use? We need the read/write capabilities of JBossCache but we don't need the app server overhead. I thought I read somewhere that one was available. JBoss has confirmed that JBossCache is not XA compliant. Why is it necessary for Hibernate and JBossCache to be transactional? How does it even work? Does ... |
91. Do you need to be in a transaction ? forum.hibernate.orgDo you need to begin and end a transaction if all you are dealing with a read-only database, and are only ever retrieving objects from the store ?. All the examples I've found seem to start and end a transaction even when doing just Queries. Is this always the case ?. Aled (As a test I tried doing a query without ... |
92. transactions forum.hibernate.orgSLSB can use JTA/CMT if you have configured the correct Transaction semantics for SLSB method(s), eg, tx required. If you do this then you do not need to call any Transaction API methods since the container will manage it. You do need to provide the rollback hint as per CMT standards if an error occurs or the situation requires a rollback. ... |
93. Why is javax.transaction required? forum.hibernate.org |
94. Second and subsequent transactions not actioned forum.hibernate.orgNewbie Joined: Mon Jul 04, 2005 12:48 pm Posts: 2 I'm attempting to use Hibernate within a non-J2EE free standing app to simplify how we persist Java objects into a DB. My "pattern" initially appears extremely simple, but the 2nd and subsequent transactions don't appear to trigger SQL BEGIN/COMMIT/ROLLBACK within the Postgres back-end. Here's a test code fragment: Code: ... |
95. Transactions forum.hibernate.org |
96. Hibernate 3 and Sub Transactions forum.hibernate.org |
97. Disable RDBMS-based Transactions forum.hibernate.orgI think I have to specify my problem a little bit more: My DBMS is a DB2 running on an AS400. The Files/Tables - how ever you'd like to call them - are also used by a lot of old RPG-programs running also on this AS400. My problem is now, that these tables do not have activated journaling for transaction-management. (Apart ... |
98. Transactions hanging forum.hibernate.orgI query via SQL and session beans but use Hibernate as the persistence part of the application I use the HibernateUtil class on pg. 301 of 'Hibernate In Action'. When I try to update a record via Hibernate the application freezes on the transaction commit statement. No exceptions, no erors no nothing. I really don't know where to start. Suggestions please!! ... |
99. Why transaction is not rolledback? forum.hibernate.orgHibernate version: 2.1.8 JBoss version: 3.2.6 Name and version of the database: Oracle 9i As it is shown below I use Mbean and I get sessions from HibernateContext. I have a CMT Stateless Session bean which containts two methods: method dummySave inserts 3 records (with column KOD set to T00x, T0x and III, when x = 1,2,3) into database, while method ... |
100. "after transaction completion" forum.hibernate.org |