aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes File Operation + JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "File Operation + JDBC" Watch "File Operation + JDBC" New topic
Author

File Operation + JDBC

Sudhakar Namasivayam
Greenhorn

Joined: Sep 09, 2004
Posts: 11
Is it possible to combine JDBC and File operations in a single Transaction using JTA? If so can anyone refer me to a good link to start working on it.....
Any other way to approach this?
javascript: x()
Confused

Thanks in advance,
Sudhakar


Regards,<br />Sudhakar<br /> <br />SCJP 1.4
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

avoid IO operation and database operation in same transactions.


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30749
    
156

Moving to our J2EE forum since it is more about JTA than JDBC.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Is it possible to combine JDBC and File operations in a single Transaction using JTA


No. Files systems are not transactional.


Groovy
Sudhakar Namasivayam
Greenhorn

Joined: Sep 09, 2004
Posts: 11

Is there any other optimal / standard way of doing it...
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Hi,

Create a Java class containing the File IO part and then instantiate this class in one of the business methods of Stateless Session Bean.

Dont use transaction as it might give you unwanted results.

We have implemented in a similar fashion in our project which required to read data from a couple of files (text format) and upload the same to Tables in Oracle Database.

Rgds,

Seetesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Operation + JDBC