[JBoss-user] transaction timeout problems
hi, I am using jboss 3.2.1 with jetty. When I am trying to create a CMP Entity Bean, the transaction is timing out. My method call is somewhat like this - public void createA(HashMap aHash){ Set keySet=aHash.keySet(); Iterator ite=keySet.iterator(); while(ite.hasNext()){ Integer id=(Integer)ite.next(); // here I create a new entity AHome.create(aHash.get(id)); Collection BList=BHome.findByA(id); Iterator ite2=BList.iterator(); while(ite2.hasNext()){ BObject bobject=(BObject)ite2.next(); // here I update an entity bobject.setStatus(2); } Collection CList=CHome.findByA(id); Iterator ite3=CList.iterator(); while(ite3.hasNext()){ CObject cobject=(CObject)ite3.next(); // here I update an entity cobject.setStatus(2); } } } All this happens inside a session bean method, which is marked with tx-attribute required. The entity beans are CMP 2.0 and all have a tx-attribute required. I am using Optimistic Concurrency with version column. How can I diagnose what is going wrong here ? Raghu --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Transaction timeout
On Tue, 29 Jul 2003 01:15, Rafal Kedziorski wrote: > how can I increase a transaction timeout for a session bean and entity > bean? From a previous answer to this question: > From: "Barlow, Dustin" <[EMAIL PROTECTED]> >> In 3.2.1, in /server//deploy/transaction-service.xml >> you will find the following stanza: >> >> >> > name="jboss:service=TransactionManager"> >> 300 >> > optional-attribute-name="XidFactory">jboss:service=XidFactory >> >> >> Change the 300 (in seconds) to whatever you want. >> >> I suspect this is the same for 3.0.6 as well. The comment about being the same for 3.0.x is not quite correct, it is in a different place. You will find the same definition for the MBean but in /server//conf/jboss-service.xml. I have tried changing this on a running system via the jmx-console and it seems to work. Just change the attribute value TransactionTimeout" on the service service=TransactionManager under the jboss namespace. From my reading of the code of the TransactionManagerFactory I think you will also need to stop and start the service as well after changing this value (but I haven't verified any of this). brian wallis... --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transaction timeout
hi, how can I increase a transaction timeout for a session bean and entity bean? regards, Rafal --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transaction timeout setting not honored
I'm using JBoss 2.4.8 with Tyrex as the TM. In the Tyrex domain.xml file, I set the timeout to 360 seconds (6 minutes). In code, I set the transaction timeout to 600 seconds (10 minutes). After 120 seconds (2 minutes), the default timeout for Tyrex (http://tyrex.exolab.org/configuration.html), the transaction times out and an exception is thrown, stating that the transaction is no longer active. Right now, due to a slow connection, I need to be able to set the transaction timeout to whatever it takes to get the data that I want. With some performance tuning or an upgrade in the connection, I may be able to lower it, but I need it to be higher. I would appreciate any help in solving this problem. Thanks for your time, Craig --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transaction Timeout
Hi All I have a StatelessSession bean which is been called by a servlet. Here is my problem. I have two browsers from which I make calls to the StatlessSessionBean method at the same time. At times this call at the same time causes a "Transaction Time Out" and then the RemoteException is thrown. Also my transaction attributes for the session beans as well as the entity beans are Required. Since the calls come from 2 servelets I believe they will have their own Transaction contexts. But why would this consequence calls to the bean cause a Transaction time out. Would appreciate any input from any one. Btw. I also tried giving the Isolation levels. But that did not help. Cheers and TIA Imran ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] transaction timeout and ctrl-C
Hi All... I have been doing some testing on a P166 with 64MB RAM running Debian linux. jBoss 2.2.1/Tomcat does remarkable well on this machine. However, when the machine gets very overtaxed, I see transation fialures due to transaction timeout. Thats fine. However, I have noticed that after a transaction timeout, jBoss seems to stop responding to CTRL-C and I can't shut it down, short of a kill -9. Has anyone else noticede this? Thanks... Jim ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Transaction timeout
You could modify the source to read the timeout from an appropriate property and post the change. Even better, you may want to simply store the first name in the Stateful session bean without starting a transaction. When you get all the additional information, start and commit the transaction in one step. jim - Original Message - From: "sujith s.pillai." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 2:53 PM Subject: [JBoss-user] Transaction timeout > Hi, > I am running JBoss 2.1 alongwith Jetty 3.0.2 / JDK > 1.3. > > We have a stateful session bean running with bean > managed transaction. It has got the transaction > boundaries set as follows: > getFirstName() is where the transaction is initiated > by UserTransaction.begin(). In getNextName(), the > transaction is committed by UserTransaction.commit(). > > Now, the two methods are invoked by two different > servlets. When the user calls the first servlet, it > calls the bean's getFirstName() method, and fetches > the values for us. When the user clicks on the "Next" > button on the form, the second servlet is invoked, and > it calls the bean's getNextName() and fetches the > required values; and commits the transaction. > > Our problem is, when the user invokes the first > servlet, and then, chooses to remain idle for more > than 5 minutes, the transaction gets timed out, and > then, if we try to invoke the second servlet, it gives > a RollbackException in the getNextName(). > > This is because the org.jboss.tm.TxManager class has > got the timeout value hard-coded in it as : > START OF JBOSS SOURCE CODE- > > /** > * Default timeout in milliseconds. > * Must be >= 1000! > */ >long timeOut = 5*60*1000; > > END OF JBOSS SOURCE CODE--- > > Because of this, we cannot let the user remain idle > for more than 5 minutes. > > However, our application, which is a conversion > project from AS/400, needs to have the timeout set to > a higher limit as in the earlier AS/400 version of the > application. > > Can we change this timeout value in the > org.jboss.tm.TxManager class, without affecting > anything else? > > > Thanks, > Sujith. > > Additional info: > > >From the org.jboss.tm.TxCapsule class: > > JBOSS SOURCE CODE--- >/** > * Create a new TxCapsule. > * > * @param tm The transaction manager for this > transaction. > * @param timeout The timeout for this transaction > in milliseconds > * (timeouts are not yet > implemented). > */ >TxCapsule(TxManager tm, long timeout) >{ > this(tm); > > status = Status.STATUS_ACTIVE; > > start = System.currentTimeMillis(); > this.timeout = > TimeoutFactory.createTimeout(start+timeout, this); > branchXids = new HashMap(); >} > --END OF JBOSS SOURCE CODE > > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transaction timeout
Hi, I am running JBoss 2.1 alongwith Jetty 3.0.2 / JDK 1.3. We have a stateful session bean running with bean managed transaction. It has got the transaction boundaries set as follows: getFirstName() is where the transaction is initiated by UserTransaction.begin(). In getNextName(), the transaction is committed by UserTransaction.commit(). Now, the two methods are invoked by two different servlets. When the user calls the first servlet, it calls the bean's getFirstName() method, and fetches the values for us. When the user clicks on the "Next" button on the form, the second servlet is invoked, and it calls the bean's getNextName() and fetches the required values; and commits the transaction. Our problem is, when the user invokes the first servlet, and then, chooses to remain idle for more than 5 minutes, the transaction gets timed out, and then, if we try to invoke the second servlet, it gives a RollbackException in the getNextName(). This is because the org.jboss.tm.TxManager class has got the timeout value hard-coded in it as : START OF JBOSS SOURCE CODE- /** * Default timeout in milliseconds. * Must be >= 1000! */ long timeOut = 5*60*1000; END OF JBOSS SOURCE CODE--- Because of this, we cannot let the user remain idle for more than 5 minutes. However, our application, which is a conversion project from AS/400, needs to have the timeout set to a higher limit as in the earlier AS/400 version of the application. Can we change this timeout value in the org.jboss.tm.TxManager class, without affecting anything else? Thanks, Sujith. Additional info: >From the org.jboss.tm.TxCapsule class: JBOSS SOURCE CODE--- /** * Create a new TxCapsule. * * @param tm The transaction manager for this transaction. * @param timeout The timeout for this transaction in milliseconds * (timeouts are not yet implemented). */ TxCapsule(TxManager tm, long timeout) { this(tm); status = Status.STATUS_ACTIVE; start = System.currentTimeMillis(); this.timeout = TimeoutFactory.createTimeout(start+timeout, this); branchXids = new HashMap(); } --END OF JBOSS SOURCE CODE __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user