Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

User upload files in to a cluster application

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi people,

I�m facing a real problem here. I need users to upload files (images, album photos and other types) into a application deployed into a clustered server (Weblogic Server - Portal 8.1.6).

The thing is that I want to save the files directly into the file system. But if I am in a cluster, the user is uploading the file(s) into one physical machine. Is that a decent way of replicating the files uploaded? Maybe Weblogic itself has a way, but I can�t seem to figure it out by it�s documentation.

Thank�s for any replies.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could persist them in a database. Alternatively, you could hunt for a JCA adapter to give you access to the file system from an EJB container.
 
bengt hammarlund
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there is a way to share a storage device. Any ideias?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Writing anything to the File System is prohibited by the EJB specification. YOu can only safely write to a managed resource, such as a database.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do file upload in servlets. As a matter of fact, Struts provides support for file uploading and it's very easy to use.

As for shared storage device, my company's web server cluster (running Gentoo linux) is using one: all the user uploaded images are stored in that shared directory and if one web server goes down, the other server kicks in and takes over the shared folder. But unfortunately, I didn't set it up, so can't provide you with any more info.
 
And inside of my fortune cookie was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic