• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Load batch of files with EJB3?

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Onion rings are vegetable donuts. Taste this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic