Java EE, EJBs File Processing

I am developing a web application in which users are allowed to upload photos, and the system will generate thumbs for them.

My problem is based on the fact that EJBs can be distributed across multiple servers and therefore cannot process files directly. I could store images in databases, but I was hoping to save them as files on one of the servers. How can i do this? Is there a way to centralize file storage? Or any approach to working with files in Java EE with EJB?


I am currently storing files in a database. Therefore, I have centralized access, and I do not need a dedicated file server. I do this because I do not know how to integrate ftp servers and EJB. Is this a good alternative?

What I want is: using stateless EJB, save uploaded images as files and the path to them in the database. Therefore, I can display them using

<h:graphicImage ... />
+3
source share
6 answers

You actually have four aspects,

  • Receive and send files
  • Sketching
  • Storing files somewhere every node can access
  • Saving source objects + thumbnails in a common database

Since you already have a Java EE server, you probably already have an HTTP servlet server (HTTP) that has many ways to balance load and cache , not to mention the beneficial potential for web interaction. Anyway, support for FTP transfer with an observer as a bonus.

, beans, , - buizness . , + , bean (, ). , Linux.

SAN, . - , /.

, .

, ;) Tomcat - , google. , .

+5

() FTP-. EJB beans .

Java FTP-. EJB JCA- FTP-, "" .

+1

. RedHat Global File System Symantec Veritas - , . /. . (SAN Sys Admin), .

:

  • . .
  • , . , , arjan ftp.
  • SAN.
+1

"where" EJB, . ( ), temp .

: http://txconnect.sourceforge.net/ JCA Transaction Adapter, ( ) ftp-. factory xml bean, .

(, Oracle IBM)

+1

. Ftp ( , ), ejb. , , , .

+1

:

+1

All Articles