Java Blend provides a mapping between application classes and databases; Java Blend includes a runtime system and was developed jointly among three vendors.
Twenty percent of development time typically goes into SQL mapping for software.
Java Blend provides a mapping tool between Java classes and RDBs; you can map in either direction. The runtime system includes:
The assumption is that the mapping individual will not be the person building and using the Java classes; I thought this was a good idea on their part.
PersistanceCapable objects are either persistent or transcient. Persistent objects have transactoin semantics, transcient objects do not. As expected, you start a transaction using the begin() method, commit with commit(), and abort with abort(). Java Blend maintains referential integrity.
Java Blend sits on top of JDBC for database access (full meta-data access is required for JDBC drivers to use Java Blend - luckily, Sybase drivers support this already).
Java Blend uses optimistic concurrency control by default - you can specify more conservative approaches if you need or want them. With the default mode, no database locks are held. Modifications are done to the runtime cache. Checks for conflicts are done at commit time. The Java classes control what to do in cases of conflict using exceptions. Pessimistic locking is available. The RetryExceptionis used to retry if you still want to commit your changes when there is a conflict. The locking type can be selected on a per-transaction basis.
Queries create Java instances that match the query criteria; remember, you use OQL for retrieving information in Java Blend, so your queries are made in terms of Java class members not database table entries. You can parameterize precompiled queries (performance is improved) or you can use true dynamic queries. OQL is a standard query language.