Frequently Asked Questions
What does JSO do?Text
supplied with JSO?
Why can't I simply use a String
?
What does JSO do?
JSO works as a persitence layer, mapping your object model to a relational
database transparently, through runtime class inspection.
Learn more »
Can I access legacy databases?
No. You can not.
Learn more »
Can I use JSO in a J2EE container?
We believe so. But we have not tested yet. Most important, JSO is not yet
integrated to J2EE environments, so you will not be able to use features
provided by them, like data sources or transaction management.
How can I store objects of my classes?
Your classes should respect some rules, like implementing the
Storable
(marker) interface.
Learn more »
Can I define indices for attibutes of my classes? How?
Yes. Through class metadata declaration.
Learn more »
What is object metadata?
Object metadata is information about the storage process of an object, like
object's identification (OID).
Learn more »
What is class metadata?
Class metadata contains "storable" characteristics that can not be obtained
by JSO through class inspection but may be informed by the developer, like
indices.
Learn more »
What is a summary object? What is a summary field?
A summary object is one that has been retrieved from the database only with
the values of summary fields. A summary field is one that, along with other
summary fields, summarizes an object's value, as defined by the storable class
developer.
Learn more »
How does garbage collection work? Does it prevent me from accessing stored
objects?
The garbage collector divides the database in partitions and makes an
incremental collection. When collecting a partition, the garbage collector
locks the partition exclusively. While the partition is being traced, objects
from this partition become inaccessible. Objects from any other partitions
are not affected. After tracing all partitions the collector sleeps for a
while (can be configured) and then starts over again. The collector can also
be turned off. However, turning off the collector does not avoid the creation
and management of partitions.
Which privileges should I grant the database user JSO will use?
JSO must perform many database operations, like reading and writing data and
creating and droping tables, indices and constraints. If it doesn't hurt make
JSO use the database owner.
Which databases JSO currently supports?
MySQL 4.x (with InnoDB) and MS SQL Server 2000.
Learn more »
What should I do to test JSO with an "unsupported" database?
You should map JDBC types to database data types and create a property file,
like those supplied in net.sf.jso.database
package. Soon enough
we will provide more documentation about this and also some JUnit test cases.
What is the "storage environment"?
Is the set of all storage managers and storage controller used by an
application. Many configurations can be made.
Learn more »
Can two (or more) programs access the same database concurrently?
Yes. You just need to configure your storage environment properly.
Learn more »
What happens if I need to modify a class that has objects stored?
Depends on the modification. If your modification concerns only to methods
(adding, removing or modifying) there should be no problem, unless you modify
jsoClassMetadata()
method. Any other modifications may provoke
mismatch with stored classes. A schema evolution tool/API should be used along
such modifications, however none is available for the moment. Providing such
features shall be a priority for the project.
What is a container class?
Is a collection (Collection
, List
or
Set
) or a map (Map
). Arrays are not supported by
JSO, but could also be considered as such.
My object model has a one-to-many relationship with a very large number of
objects. Does JSO handle this well?
Suppose you were working exclusively in main memory, how many objects would
you keep in a container object? Even using lazy loading techniques, retrieving
too many objects from the database to memory may not be handled efficiently.
We have no data or criteria about that yet.
Does JSO support crash recovery?
Depends on the underlying database. Storage operations (including metadata
management and garbage collection) are done under transactions. If the
database supports JSO will support too.
Why must I use the class Text
supplied with JSO?
Why can't I simply use a String
?
Storing short or long strings in a database have different costs. For that
reason JSO is forced to make some distinguishment between them. For short
strings the String
class should be used and for long strings
the Text
class should be used instead.
Learn more »
What happens if I'm working on a distributed configuration, with many managers
registered on the controller, and I stop the controller?
The controller asks the managers to unregister themselves and stop their
activities. The managers, when requested to stop, wait until all threads and
transactions have finished. Controller and managers have a limited period of
time to stop gracefully. If that does not happen they halt.
Learn more »