• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Load batch of files with EJB3?

 
Dejan Mratinkovic
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why EJBs for this? Why not simple java classes which do the same?
 
Dejan Mratinkovic
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic