Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBs, Webcontainer and *Images*...

 
V. Rentschler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

This is the situation: I am developing a business application with EJB3 and Glassfish as server. There will be a webshop communicating with EJBs, furthermore a Java desktop client which will be used for inserting products etc... (i.e.: the web-tier should only be used to view and order products). The database (MySQL) connection is realised via iBatis.
So far, so good, so simple. Now I have one problem: storing images.

Any suggestions how to do this properly? Storing blobs into the database will not be allowed to me by the guys who develop and run the database. (But I would be thankful for comments on that account, too).

Thanks in advance,
Val
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Val,
There are two logical places to store images - on the file system or in the database. It sounds like your database team already made the decision for you. You might want to ask them why - just to be sure.
 
V. Rentschler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Val,
There are two logical places to store images - on the file system or in the database. It sounds like your database team already made the decision for you. You might want to ask them why - just to be sure.


"Scalability"... I'm not really sure about the pros and cons of it really...
File system does sound logical, I know you can technically do it (because I actually just tried), but it's disencouraged by the specification for good reasons... so just what is the "way to go"?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The spec says EJBs shouldn't access the file system. Which you wouldn't. You would pass back the absolute path and the servlet would access the file system.
 
V. Rentschler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what If I want to read and write files from the server, to display them over a desktop client..?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic