• 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

EJBs, Webcontainer and *Images*...

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic