How to do File I/O without using EJB's

Discussions

EJB design: How to do File I/O without using EJB's

  1. How to do File I/O without using EJB's (4 messages)

    Hello All,
    I have typical Project requirement.
    1) I want to update a Database.
    2) I need to write a file to a Disk.
    The above should happen in one transaction.
    The real problem is that I cannot use any EJB's to write a file to a disk, the other problem is that I have to use a servlet which I need to keep with my other EJB's so that my file is saved to one place where all the Data transaction is taking place I cannot pass this Servlet in webContainer.

    Can anybody help me with the above problem and if you can suggest me a good soild design pattern it would be helpful

    Alok Garg
  2. How to do File I/O without using EJB's[ Go to top ]

    One option could be implementing a JCA-connector for the filesystem, which implements the transaction requirements (optional requirement according to the spec). There are probably JCAs for the most popular filesystems, but I really don't know whether they support transactions.
  3. How to do File I/O without using EJB's[ Go to top ]

    One option could be implementing a JCA-connector for the filesystem, which implements the transaction requirements (optional requirement according to the spec). There are probably JCAs for the most popular filesystems, but I really don't know whether they support transactions.
  4. How to do File I/O without using EJB's[ Go to top ]

    The JCA that connects to a File system can never
    be a "transactional" since the underly file i/o
    does not support concept of "commit" and "rollback".

    Kelly Peng
  5. "Never" is a pretty strong word.
    <sarcasm>
    I wonder what kind of magic databases use to store data since they clearly can't use a file system....
    </sarcasm>