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