Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP persistence questions  RSS feed

 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • 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
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meka,
I'll hit (1) and (4). Yes, my recommendation is to store the large files on the file system and then put the URL's in the database. You can use the operating system file access controls to make sure that no-one other than the ID your system is running under can modify or delete the files.
Yes you can access files in EJB's. The part of the spec that says "you shouldn't" is the part that talks about portability -- for MAXIMUM portability you might not want to because some systems might not allow it. In fact, JBoss and all the big commercial J2EE vendors (Oracle, IBM, and BEA) all allow it, so don't worry about it.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!