• 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

CMP persistence questions

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using JBoss 3.0.6, CMP 2.0, default HyperSonic database.
I wanted to know a few things
(1) If i have to store big sized objects, what is a better idea
-> to store on to the file system and enter the file URL's into the database OR try to store the objects into the database as BLOBS
(2) If we start storing the objects into the filesystem I feel that there is always a risk of someone tampering the data, and i dont want the data to be visible. In such a case what can we do ?
(3) If i choose to store these huge objects into the database ... particularly Hypersonic, what are its limitations ? How big objects can i store in it, and do i need to make any changes in any of the jboss xml files ?
(4) I also read in some forums that storing the data into files is away from the EJB spec .. is it right ?
Any hints or pointers to places that explain these are very much appreciated
Regards
Meka Toka
 
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> (1) If i have to store big sized objects, what
> is a better idea
> -> to store on to the file system and enter the
> file URL's into the database OR try to store
> the objects into the database as BLOBS
Hi there. I don't think there's one simple answer here as a large part of your solution depends on your requirements and the strategy you adopt to deal with them. But having said that, i think you'll get very poor performance from Hypersonic if you try to store 50MB files in it and, conversely, much better performance from the file system.

> (2) If we start storing the objects into the
> filesystem I feel that there is always a risk
> of someone tampering the data, and i dont want
> the data to be visible. In such a case what can
> we do ?
There's a security risk in any sort of data storage. In file systems, people can access data if you don't have the appropriate file permissions, etc. In databases, people can check your data if you don't have the appropriate database permissions. I think you have to identify the security needs that are specific to the application you are developing and see what options given your environment, skills, etc. can best meet them.

> (3) If i choose to store these huge objects
> into the database ... particularly Hypersonic,
> what are its limitations ? How big objects can
> i store in it, and do i need to make any
> changes in any of the jboss xml files ?
I recommend going to Hypersonic's website and downloading the specs for the version of the database you are using.
> (4) I also read in some forums that storing the
> data into files is away from the EJB spec .. is
> it right ?
I am not sure what you mean. If you want to represent your data as an entity bean, I guess it might be. But you can always manage the data with session or message driven beans, or you can delegate responsibility to regular Java classes. I don't think the EJB specification should be viewed as locking you into some sort of storage system. It's strengths and weaknesses should be weighed against your needs and used or not used accordingly.

Cheers,
Darryl
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks alot for the views Darryl
Regards
Meka Toka
 
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

the specs do not allow you to use classes from java.io.* package.
read this thread.
why cant you transfer the files to DB ?
k
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic