• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic