Suggestion reqd for replacing EJB


EJB design: Suggestion reqd for replacing EJB

  1. Suggestion reqd for replacing EJB (2 messages)

    Hello All,
    I have a typical problem, for which I don't know which design pattern to implement and why??
    I have a process which contain the following steps::

    1) I need to create a row in the database.
    2) On the basis of the new Id in the database I need to create a folder in the HDD and copy the file which was uploaded by the user to this folder.
    3) After saving the file in the particular location I need to update the database with the URL of the file.


    I cannot use an EJB to do File I/O so please suggest me some design patterns that will help me solve the above problem.
    I donot want to break the specs and at the same time want to achive the above using any J2EE architecture.

  2. Suggestion reqd for replacing EJB[ Go to top ]

    You need a File System Connector to access File System with EJB. Check BEA Site for JCA Connectors.

  3. Suggestion reqd for replacing EJB[ Go to top ]

    Alok :
      I think u just want to upload some file and store some file information into DB,there are many ways to do that,but
    first of all u must know that EJB DO NOT support the file managment ,bc the file place can not be distrubited,
    I had every done in that situation by following ways the file into db using blob type;
    2.upload the file to the jsp container directory by servlet,but must using the single jsp server (maybe we can extend it to muti-server),so the file path is sure the only one we could get and set,by this way maybe we should write some tran by ourself---file and the db must be the same