SAP BOPF vs J2EE transactional frameworks
BOPF |
Enterprise Java Beans |
|
1 |
SAP’s Business Objects (BO) are modelled and implemented using Business Object Modelling Framework. |
Enterprise Java beans and its runtime framework are J2EE components that are comparable with the SAP BOPF in the world of transactional systems. |
2 |
BOPF controls the application business logic as well as the data retrieval of the buffer and persistency layer. |
The Persistency and Caching layer is maintained by the persistency provider. Example of persistency service providers are: hibernate, toplink etc. |
3 |
BOPF standalone transaction manager is responsible for maintaining consistency of the transaction, by adhering to the principles of ACID properties. |
Transaction manager is responsible for maintaining consistency of the transaction, by adhering to the principles of ACID properties. |
4 |
BOPF transaction manager associates one or more service manager instances with a calling transactional context. |
Transaction manager associated with the persistency service provider associates the newly created transaction object with the current calling thread. |
5 |
Data buffer and persistency are also clearly separated from each other as well as from the business logic. This allows to establish individual buffer and persistency implementations. BOPF provides facility to the user to implement his own buffering logic and mechanism. |
All the persistency service providers work on an intermediate data caching mechanism to synchronize the transactional data between user session and database. The complexity of synchronization is hidden from the user. |
6 |
BO is a coarse grained business object, which consists of fine grained nodes. A Node is a semantically related set of attributes of a business object. Nodes are hierarchically defined and related. Each business object has only one Root Node. Nodes are defined via compositions in a tree, and in addition, linked in an arbitrary structure via associations that can be separate from the tree structure. |
EJB can be designed either as a coarse grained or fine grained entity, depending on the need of the business requirement. Fine grained EJBs could be assembled via spring dependency injection or using object relational mapping – association. Structurally, EJBs could also be grouped via association or composition. |
7 |
Transactional attributes are not defined for (at) the method or actions in a Node. Rather the scope of the transaction is defined and determined by the Transaction Manager and Service Manager of BO. A transaction in BOPF is spawned for a BO, rather than for a transactional method in a node inside it. Due to the coarse grained modelling and runtime handling of the same model, it is in most cases useful to have consistency check of the whole model before saving of the model. BOPF transaction can be chained by using the “Save and Continue” transaction pattern. In this model, every new save happens in a new transaction. BOPF transaction can be terminated by using the “Save and Exit” transaction pattern. By following this pattern no new services could be executed using the same transaction. BOPF transaction could be rolled back by calling the cleanup method of transaction manager. |
Transaction manager can create any number of new transactions, and associate with the calling thread, if necessary configurations are maintained. In an enterprise transactional component like enterprise java beans, new transactions are spawned according to following transactional attributes set at the transactional methods of Bean.
|
8 |
BOPF transaction manager provide services to retrieve information about the changes made during the current transaction. |
Persistency Service Provider provides API to retrieve the information about the current transaction. |
9 |
BOPF service manager provides interfaces to get data about the nodes in following 3 ways.
|
Persistency Service Provider provides API to retrieve bean information via following ways.
|
10 |
BOPF offers two different types of associations between nodes in a BO. The association between nodes in a BO is always unidirectional.
|
Persistency Service Provider could create following types of association.
|
11 |
BOPF abstracts isolation level to the user. But user could set certain transactional characteristics on the transaction manager, via, transaction manager’s set_transaction_context(…) method. |
Using java, you can perform transactions under different isolation levels at connection level.
|
12 |
BOPF transaction manager provide following functionalities.
|
A Transaction manager shall perform following functionalities.
|