Wednesday, July 25, 2012

Hibernate Interview Questions - PART-II


HIBERNATE



16. What’s the difference between load() and get()?

                                load()                             get()
Only use the load() method if you are sure that the object exists.Only use the load() method if you are sure that the object exists.
load() method will throw an exception if the unique id is not found in the database.
get() method will return null if the unique id is not found in the database.
load() just returns a proxy by default and database won’t be hit until the proxy is first invoked.  get() will hit the database immediately.


17.What is the difference between and merge and update ?

Use update() if you are sure that the session does not contain an already persistent instance with the same identifier, and merge() if you want to merge your modifications at any time without consideration of the state of the session.



18.How do you define sequence generated primary key in hibernate?

Using <generator> tag.

Example:-

<id column="ACC_ID" name="id" type="java.lang.Long"> 

   <generator class="sequence">

     <param name="table">SEQUENCE_NAME</param>

   <generator>

</id>


Hibernate Interview Questions - PART-I

Hibernate Interview Questions - PART-I


HIBERNATE


Hibernate is an object-relational mapping (ORM) library/tool for the Java/J2ee platform, which provides a framework for mapping an existing object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions.

Hibernate is free software that is distributed under the GNU Lesser General Public License.

Here are some interview questions which are asked frequently.....

read more.......














Configuring a WebLogic Domain and Server

Configuring a WebLogic Domain and Server

A domain is an interrelated set of WebLogic Server resources managed as a unit. A domain includes one or more administration servers and managed servers. Various clients use the administration server to configure the system. The managed server is used to run actual applications.
We will use the Domain Configuration wizard to create a new domain called mydomain.
What You Should Be Able to Do

Following this setup, you should be able to configure a new domain using the Configuration Wizard.



Read more .......