[jboss-user] [Beginners Corner] - Transactions in JBoss

rohit.macherla do-not-reply at jboss.com
Tue Sep 9 02:34:22 EDT 2008


I am using a JBoss 4.2.2.GA server using WebServices. In my WebService, I am required to connect to a relational Database (Oracle 9i), get some data, change some of the existing data in the Database and then invoke another WebService. A failure to do any of these things implies that the entire thing should be rolled back i.e., this whole thing is one atomic transaction. 

Since I am a newbie to the server management, I have used JDBC to connect to a database using :

  | Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
  |             connection=DriverManager.getConnection("jdbc:oracle:thin:@STD43S28:1521:cdot1","user","pwd");
  | 
and I am 'COMMIT'ing the transaction only when I get a successful response from the WebService I invoke.
This approach works but I would like to delegate the responsibility of getting a connection to the JBoss server and also would like to know if my transaction can be demarcated by using any JBoss specific feature (like JCA or something) or actually any server level thing that I have to activate.

I've just found the use of Connection pooling and started to read about the JCA but was confused when I read that anonymous wrote : JCA is a resource manager integration API whose goal is to standardize access to non-relational resources 
Please inform me of what all I need to know i.e., if JCA will actually help me out in my quest or is there something else, some MBean that I need to know about. It would be great if you can suggest a possible framework for my WebService.

Thank you.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175210#4175210

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175210



More information about the jboss-user mailing list