transaction « Database « JSP-Servlet Q&A





2. Transaction in JSP    coderanch.com

3. Transaction management and Security in JSP    coderanch.com

JSP is a technology for the presentation layer; it does not address problems of transactionality and security. J2EE does, of which JSP is a small part. And that's a good thing. Many ASP sites of old used to mix all these functionalities together, with the result quite often being horrible spaghetti code. With servlets, you can move some of the security ...

4. Transactions with JSP ?    coderanch.com

6. Refresh problem while doing transaction    coderanch.com

Hi Friends, I wrote a program for online banking and I used mvc model 2 approach for that,I have refresh problem while doing withdrawal and deposit: First let me explain how this transaction of withdrawal takes place: In my JSP page user enters amount to be withdrawn -> control gets transfered to transactionController servlet -> Controller servlet create object of transaction ...

7. Transactions Rollback in jsp    coderanch.com

9. Transaction rollback in ejb2.0    coderanch.com





10. jms message ack problem in transaction    coderanch.com

11. MDB XA Transactions Behaviour    coderanch.com

12. transaction in jsp    coderanch.com

Hi, I have two methods in my jsp page, which in turn call java beans, which call ejbs. I want both the methods to execute only if both of them return desired results. First method posts to a site, and the second method updates a table in the database. Now, if the post is unsuccessful, I'm not calling the update method. ...

14. transaction rollback in servlet    coderanch.com

15. transactions across jsp pages best practice    coderanch.com

I am creating a web application using a mvc jsp/servlet architecture. I am having a problem deciding how to maintain transaction state across multiple pages. Eg I have say three jsp pages which will each save information to separate database tables which comprise a single transaction. The problem arises when the user decides to hit the back button and goes back ...

16. Transactions in Servlet    coderanch.com





19. FTP transaction using a servlet    coderanch.com

I wrote a program that uploads files to a FTP server and then downloads it if necessary later on. The program is working successfully but there is a problem when i download the file. The file is an excel file and when i try to open it the following message is displayed... "The file cannot be accessed. The file may be ...

21. XA transactions Problem    coderanch.com

HI Using OC4J 10.1.3.1 i've set up a message driven bean that consumes messages from a queue(Websphere MQ). I've got a scenario whereby on rare occasions my bean won't be able to process the message due to the absence of an external service. When this happens, i roll back the transaction so the message is returned to the queue, the idea ...

23. java mail and transaction    coderanch.com

Hi. Can Java Mail participate in a Transaction when used in the container? I mean, I send a message, then I try to store sth in the db, and it fails, and the message is never sent. Is this possible? If yes, how can one make Java Mail Session be part of a transaction? Cheers.

25. [JTA] Distributed transactions questions    coderanch.com

Hi. I've been reading the JTA specs and also did some reading of the original OMG XA, DTP and TX specifications, and I get the idea of how this stuff works. However, I still have a few questions, any answers appreciated. 1. There are heuristic commits / rollbacks. How can this occur? I know of some that are caused by a ...

29. Context transaction and propagation.    coderanch.com

Hi, I have a distributed application (CMT) that has a bean and calls another bean within the same scope, the bean 1 makes an insert in a table A, then the bean 2 insert another register in the same table, when I try to see the inserted row 1 by the bean 1 from the bean 2 I can not see ...

32. Regarding the Transaction suppourt when using MDB and SessionBeans    coderanch.com

Depends wht you want to achieve, and which type of transaction management you want to use - bean or container? For exanple, if you want the message receipt be part of the same transaction as operations in the stateless bean, you use CMT on the message bean, and make the transaction context propagate to the bean. This way when the stateless ...

33. WebSphere transaction timeout    coderanch.com

Hi All, We've been encountering an interesting scenario in WebSphere (WAS 6.1). We know the root cause for the problem in question and fixed it, and things have been working fine since then. But what we don't understand is WebSphere's behavior in the scenario. This is what our process does: 1. It is a stateless session bean that uses bean managed ...

34. Nested Transaction in JTA    coderanch.com

36. JMS and transaction    coderanch.com

37. Distributed transaction or local transaction    coderanch.com

Typically local transaction are used when resources involved in transactions is unique (for instance : a database do persist information). When you need to persist informations in various and differents databases (or other resources used to persist information and involved in transaction), then you must be use distributed transactions (using JTA). JTA specifies ways to manage distributed transaction properly. Best regards, ...

38. How to identify existing Transaction?    coderanch.com

41. how to solve the Transaction.IllegalResourceIn2PCTransactionException    coderanch.com

Hi, Please give the solution to solve the the below error, RegisteredRes E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction LocalTransact E J2CA0030E: Method enlist caught com.ibm.ws.Transaction.IllegalResourceIn2PCTransactionException: Illegal attempt to enlist multiple 1PC XAResources at com.ibm.ws.tx.jta.RegisteredResources.enlistResource(RegisteredResources.java:863) at com.ibm.ws.tx.jta.TransactionImpl.enlistResource(TransactionImpl.java:1688) at com.ibm.ws.tx.jta.TranManagerSet.enlistOnePhase(TranManagerSet.java:578) at com.ibm.ejs.j2c.LocalTransactionWrapper.enlist(LocalTransactionWrapper.java:587) Thanks in Advance.

42. Can not commit a managed transaction    coderanch.com

Hi All, In one of our applications, a session bean whose transactions are container managed invokes a class for handling some database operations purely based on JDBC calls using a datasource. This is working fine in production every day. But some times we observed a phenomenon where in an exception was thrown mentioning that Managed transactions can not be commited explicitly. ...

45. JMS Transaction Issue    coderanch.com

Hi, I want to implement JMS transactions while sending messages to queue. From whatever I information I got on JMS transactions, I could get that JMS transactions can be maintained at the receiving end,say 10 messages have been sent to a queue, so through a transacted session i can guarantee that the transaction will not get commited until i process all ...

46. Container Managed Transaction    coderanch.com

47. Container managed transaction (CMT) doesn't commit transactions    coderanch.com

Hello to the respected community. I'm working with Jboss 4.2.3 GA and Hibernate 3.3.1 GA. The Relevant Hibernate configuration file section is like this: java:toluna_mssql_jdbc com.toluna.common.hibernate.SqlServerDialect org.hibernate.transaction.CMTTransactionFactory org.hibernate.transaction.JBossTransactionManagerLookup true true after_transaction true org.hibernate.cache.EhCacheProvider true true 1 250 thread ...

48. Unable to get Transaction Manager    coderanch.com

Hi volks i want to do a secure lookup from a standalone client Properties env = new Properties(); // Try with a login that should succeed env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.LoginInitialContextFactory"); env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099/"); env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); env.setProperty(Context.SECURITY_CREDENTIALS, password); env.setProperty(Context.SECURITY_PRINCIPAL, username); env.setProperty(Context.SECURITY_PROTOCOL, "stundenplanSecurity"); try { Context ctx = new InitialContext(env); //Here i get the Exception shown below } catch (NamingException e) {} but here i get ...

49. EntityManager Transaction-Scoped/Extended-Scoped behaviour:    coderanch.com

Mikalai Zaikin Notes says "If an entity manager with transaction-scoped persistence context is in use, the resulting entities will be DETACHED; if an entity manager with an extended persistence context is used, they will be MANAGED." Is it a typo "is in use'? Does it wants to says when transaction ends, with transaction-scoped persistence context - the resulting entities will be ...

50. MDB Transaction Propogation.    coderanch.com

Hi Guys ,I am very new to EJB 3.0 I have deployed a EAR in a web logic 10.3 g which have two ejb modules called 1.ServicesDump 2.MessageDump In ServicesDump i have a session bean which doing the database updates,After i have deployed, When i called these remote session-bean from out side of container to test the functionalites it working perfectly(Which ...

51. MDB transaction rollback    coderanch.com

52. Transaction timeout settings - OpenEJB    coderanch.com

53. Transaction Boundary Problem    coderanch.com

54. Transaction rollback    coderanch.com

57. JMS Distributed Transactions    coderanch.com

59. Distributed Transactions    coderanch.com

I need to perform a distributed transaction in My Servlet. My distributed transaction involves Updating to the DB and also publishing a message to a queue. The queue is not present in my app server, where my Servlet is running. It is there on a remote machine. I'm using below code to achieve the same. But I'm not getting the transactional ...

60. Transaction Rollback problem    coderanch.com

61. Transaction - Possible uses    coderanch.com

62. How to rollback a transaction when transaction time out in websphere    coderanch.com

Hi, i have a problem in my websphere environment. I set my websphere transaction timeout to : 300 sec. am locking a record in my data base and try to edit the record from my application(through the browser) browser is hanging for ever, could you please tell me why ejb is not rolling back the transaction even after crossing 300 seconds? ...

63. Transactions    coderanch.com

64. MDBs and Transactions    coderanch.com

65. How I can manage a transaction CMT in the JBoss?    coderanch.com

Hi, I am developing an application that uses JSF and EJB 3,0 and JPA, and have the necessity to manage when commit or rollback occurs one. In this in case that, I wanted to know if some form exists to create something to listener to alert when one of these two action to me to occur. This necessity appeared therefore the ...

66. CMT: Container Management Transaction    coderanch.com

67. Transaction Processing System Design    coderanch.com

I do not know it this is the right forum for two of my questions: 1. What general design/architecture would you recommend using to design a transaction processing system with the highest possible throughput? 2. What externally developed components (i.e., database, messaging systems, caching software) should be used for the design? Thank you.

69. What is scope of JTA transaction    coderanch.com

What I understand is using JTA transaction type, we can manage transactions which may include multiple resource managers, which may be in different VMs. So I guess this statement means that if current JTA transaction is created in some other VM, then this new resource manager needs to join that active transaction. Is this understanding correct?

70. Transaction Attribute for timeout callback method    coderanch.com

Hi all, According to EJB3 specification, @Timeout callback method can have REQUIRED, REQUIRES_NEW or NOT_SUPPORTED transaction attribute. I wonder if there is any case in which Timeout method will be executed with active JTA transaction? According to my understanding about @Timeout callback method, only two REQUIRED & NOT_SUPPORTED transaction attributes are required. It would be great if someone can explain why ...

71. Transaction is alternating Timeouts    coderanch.com

Hi all, I am using jboss 5.1.x, EJB3.0 I have MDB which listens to JMS queue. when the MDB taking a message, it dispatch a msg via TCP to some modem. sometimes that Modem doesnt response when the server is waiting for an answer: byte[] byteData = receive(is); coz I cant set timeout on InputStream. so thanks to the EJB container ...

73. javax.transaction.RollbackException    coderanch.com

76. Calling methods with TransactionAttributeType.REQUIRED --> transaction rolled back?    coderanch.com

Hi! I've got the following problem: (Explanation follows after the example) (Not a quite real example, just wrote it off the top of my head based on the real-world example, but it demonstrates the problem...) class EJB1 { @TransactionAttribute(TransactionAttributeType.REQUIRED) void t1() { throw Exception(); } } class EJB2 { @TransactionAttribute(TransactionAttributeType.REQUIRED) void t2() { } } class Main { @EJB EJB1 e1; ...

77. A question on transactions    coderanch.com

83. Using transaction with JSP    forums.oracle.com

public int insert(){ try{ Class.forName("com.mysql.jdbc.Driver"); Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/db?" + "user=myname&password=12345"); String sSQL = "INSERT INTO tbl"; sSQL += "(fielda,fieldb)"; sSQL += " VALUES (?,?)"; prepStat = conn.prepareStatement(sSQL); prepStat.setString(1,"a"); prepStat.setLong(2,"b"); prepStat.executeUpdate(); String sSQL = "INSERT INTO tblB"; sSQL += "(fielda,fieldb)"; sSQL += " VALUES (?,?)"; prepStat = conn.prepareStatement(sSQL); prepStat.setString(1,"c"); prepStat.setLong(2,"d"); prepStat.executeUpdate(); String sSQL ="SELECT MAX(tblid) FROM tblB"; prepStat = conn.prepareStatement(sSQL); rs=prepStat.executeQuery(); ...