Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Operation + JDBC

 
Sudhakar Namasivayam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
avoid IO operation and database operation in same transactions.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our J2EE forum since it is more about JTA than JDBC.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to combine JDBC and File operations in a single Transaction using JTA


No. Files systems are not transactional.
 
Sudhakar Namasivayam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is there any other optimal / standard way of doing it...
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic