wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Load batch of files with EJB3? 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 "Load batch of files with EJB3?" Watch "Load batch of files with EJB3?" New topic
Author

Load batch of files with EJB3?

Dejan Mratinkovic
Ranch Hand

Joined: Nov 20, 2008
Posts: 65
Using files from file system is not recommended by EJB specification.

But, I have scenario where I need to load number of files into database (ie. export from older software version, etc).

One possible "correct" way of dong it is upload files.

But, it seems easier and more practical to just copy all the files into file system and just pick them up from there. This application will not be clustered. At least, will not be clustered at the time of that process. And, as it is "one time thing", it will probably be carried out by data load team, so issues that can become problem in theory (server died, database died, etc.) are not really issues.

Is there someone with similar request? What would be correct solution for the problem?

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10068
    
163

Why EJBs for this? Why not simple java classes which do the same?


[My Blog] [JavaRanch Journal]
Dejan Mratinkovic
Ranch Hand

Joined: Nov 20, 2008
Posts: 65
Jaikiran Pai wrote:Why EJBs for this? Why not simple java classes which do the same?


Because I already have all the code to do some reprocessing and store data to database in ejbs. And because it is easier for users to trigger the action from web page then to start java util from command line of Unix environment.

I agree standalone application could be good solution for this, but there would then be lots of functionality that need to be rewritten.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Load batch of files with EJB3?