Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

persistance question

 
Serge Adzinets
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've got a requirement that a user can work with several databases at once. DBs can be attached or detached by the user whenever they wish. But there's some data that should always be available.
What we do is persisting this data in all databases, but this doesn't solve the problem completely.
Ideally, I'd like to store this data on the file system, but EJBs are banned to use java.io directly (by the spec). Is there any way to work it around?
What are other options for persisting data?
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about storing data temporarily as durable jms topics?
[ March 04, 2004: Message edited by: Axel Janssen ]
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not use a small database dedicated specifically for this task? Something like MySQL or even an in-memory database like hsqldb.
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, it is common that many databases will be present for a enterprise; but there are common tables that are shared across different databases.
They are usually names as a reference work in the schema. I can not answer how to setup this mechanism.
This is more of a database question. Please check with a DBA in your work place, if he is experienced and knows stuff; he can sure help you set that up.
(example is employee table in a enterprise database setup).
Dan.
 
Serge Adzinets
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Axel Janssen:
what about storing data temporarily as durable jms topics?

That data should be stored permanently, not temporarily. Anyway, jms topics are stored in the DB as well, so the client would have to set up the JMS in the app server and map it to the DB.
 
Serge Adzinets
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Mathews:
Why not use a small database dedicated specifically for this task? Something like MySQL or even an in-memory database like hsqldb.

OK, there's no need in additional dbms as a client should already have one. The simplest solution would rather be setting up a separate db for this data, which should be always available.
 
shashi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you externalise this data and load it during startup? A helper class can always update this in sync with database..
 
Serge Adzinets
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Daniel:
well, it is common that many databases will be present for a enterprise; but there are common tables that are shared across different databases.
They are usually names as a reference work in the schema. I can not answer how to setup this mechanism.
This is more of a database question. Please check with a DBA in your work place, if he is experienced and knows stuff; he can sure help you set that up.
(example is employee table in a enterprise database setup).
Dan.

This is an interesting idea... I think this could be achieved when defining a table in one db and declaring an alias pointing to it in another.
Thanks, guys, for your help!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shashi",
Welcome to the JavaRanch
We don't have many rules here but one of them is our naming policy, which requires both a first name and a last name for a display name. You can edit your profile via the My Profile link next to the moose head.
Thanks.
 
Viswanatha GB
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, even I/O is not possible thenre is a way to do if you have samll ammount of data. that is Resource Reading..
Java Provides ResuourceBundel API to do so...
just a suggestion..to make simple
Viswa
-------
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!