Using the OJB Console
This section provides additional information about what you see in the console that may
help answer some of your questions about using the console.
Create, Update, Delete, Browse, Search
To perform CRUD operations on an OJB object, click on the Repository
and
then click on the appropriate link for the operation should want to perform.
The following information may be useful:
- All operations by the console are performed via the Persistent Broker.
- The settings in the repository.xml file are honored by the console.
For example, the settings auto-update, auto-retrieve, auto-delete are handled by OJB. The repository.xml dictates whether your nested objects will be created or deleted etc.
- Collection and Reference Descriptiors are supported. They can be nested as deeply as desired. When creating and inserting these objects,
it helps to look at the breadcrumbs to understand the context of your current form.
- BLOB fields are not displayed when browsing data.
- You will be asked to confirm the
Empty
operation. This delets all instances of that object.
- Currently, you are not asked to confirm the delete operation.
- Use the
Cancel
buttons when you intend to cancel operations.
The Left Nav
By default, the Left Navigation bar contains the list of browseable classes. Only classes
that meet the following requirements show up in this list:
- Not Abstract
It does not make sense to browse the classes that can not be instantiated.
- Table Exists
The PB Key is used to get the java.sql.Connection
and query the database's metadata. If the
table is found in the metadata, the class is considered a browseable.
Each class is identified by its unqualified class name. For example, com.foo.Bar
would only be listed as Bar
.
This abbreviation is done to keep the width of the navigation manageable.
The PB Key
When using the console, the console keeps a PB Key in you session. This key is used for ALL operations
in OJB. By default, the default OJB PB Key is used. However, you may change which key is used and switch back
and forth between different PB Keys.
To change the PB Key used by OJB follow these steps:
- Click on the
Configure Settings
- Click on the
JDBC
tab.
- Choose a JCD Alias from the drop down
- Type a user/pass for that alias
- Click
Login
Click on Reset Defaults
to reset the PB Key to the repository's default JCD Alias settings.
If you click on the Session
tab, you can view the PB Key that is currently kept in your session.
The OJB Cache
It is often useful to clear all the objects from the OJB cache, especially when trying out new options in your
repository.xml. To clear the OJB cache follow these steps:
- Click on the
Configure Settings
- Click on the
Cache
tab.
- Click
Clear Cache
Browsing Properties
You can view the various runtime properties the OJB console is currently operating with by clicking on the
links found on the Home
page.
Copyright © 2003 Alexander Bibighaus et al. All rights
Reserved.