HibernateORM
ORM- object relationship mapping is a technology whihc manages persistence of objects by converting the object fields to db fields.
Hibernate is a ORM implementation whihc is now part of the apache project. There are other implementations that exist and each app server hjas adopted one of their own. Oracle app serer uses inhouse developed technology.
How to use: There is a main service class factory which needs to be mapped to a datasource name
Passing DTO/entities across containers
An often bad design is that the servlet objects use their own data model (fields) while beans use their own, thus requiring transitional message objects to be created which are often called DTO's. A better option is to align the DTO's to the entities (beans) themselves and populate them from teh servlet layer.
Transaction Control
The concept of transaction control is simple, essentially to identify a block as an atomic transaction and if any operation fails then to roll back the whole
The same can logically be achieved using multiple try catch blocks and maintaining a central global shared varible to maintain thr transaction. However there are two diadvantages compared to use of a container managerd transaction control.
1. Multithreaded bcoz prob
2. In case of a complete system crash there is no form of recovery
On ther other hand the container manages a log of these transaction and on sys crash it ffirst rolls back the old transactions with support of the db transaction manager. Ie it essentially requests the db to rollback.
How to use:
Define a transaction object=t1
set t1.begin
try{
//do transactions
t1.commit
}catch ()
{ t1.rollback}
Corba
Corba is like DCOM. And although a language idependent protocol, needs to be supported by languages.
For any method/class to be exposed as a corba call, we have to create a stub and a skelton of it using a CORBA compiler. This essentially understand the binary format of the compiled code and creates a skeleton which can call the method appropriately.
IOR: this is a an xml format descriptor for the method call, specifying the machine name, port, class name etc and all details required to identify the object and method. This is normally stored in a centralized corba registry on the server machine (which can be anywhere)
IIOP:this is the base oprotocol which is like soap and is used to marshat and transport objects.
Simple Design:
Lets take a simple scenario:1. SImple website Ui 2. Calculation intensive insuarance policy app
For both the recommended way is to use a heavier servlet layer (as control logic is more) and only a session facade for the Bean layer. For the insurance one, if transaction control is required then doing it at the bean layer may be more useful. Note hibernate comes with its own low level transaction contorl mechanism and sometimes use of it is enough.
Subscribe to:
Post Comments (Atom)
1 comment:
Dead-Yahoo (www.dead-yahoo.com) is the leading provider of digital asset management, online storage and file sharing services. Dead-Yahoo provides its patented Storage Software Platform through hosted, free services and is an easy, powerful and cost-effective way for individuals and businesses to store, backup, share, access and organize files. Dead-Yahoo provides data storage with all of the benefits of a networked environment - anytime, anywhere access to data that is easily shared and carefully protected. Thousands of individuals, small businesses and corporations use Dead-Yahoo. Dead-Yahoo is a Verisign Secure Service with password protections and built-in security. Dead-Yahoo offers free file sharing, secure online storage. By using Dead-Yahoo You can share files online with amazing download and upload speeds, you can even upload a file upto 2gb. We want you to sleep soundly at night, knowing that no matter what happens to your computer, your files will always be safe. We want you to be able to travel across the globe on a whim without having to worry about taking cumbersome storage devices with you. We want you to be able to easily and instantly share files that are important to you with others who feel the same way. And we don't want you to have to rack your brain or break the bank to do so. So you can lose the disk. You'll be glad you did. Dead-Yahoo is your globally-accessible, totally secure "internet disk drive". By using our website you can safely store, access, share and backup your data from anywhere in the world.
Post a Comment