JavaBeat Certifications Certifications Kits Articles Interview Questions OCAJP 7 OCPJP 5 OCPJP 6 OCEJWCD 6 SCBCD 5.0 SCEA SCJA
1000 Interview Questions - JUST Rs.400 or 25 USD
Send us mail to sales@javabeat.net
Do you have paypal account (or) creditcard? Click Here to pay now and get the questions.
contact our sales support team at 91-9500035455
contact us at sales@javabeat.net

1) What is AOP module?

The AOP module is used for developing aspects for our Spring-enabled application. Much of the support has been provided by the AOP Alliance in order to ensure the interoperability between Spring and other AOP frameworks. This module also introduces metadata programming to Spring. Using Spring’s metadata support, we will be able to add annotations to our source code that instruct Spring on where and how to apply aspects.

2) What is JDBC abstraction and DAO module?

Using this module we can keep up the database code clean and simple, and prevent problems that result from a failure to close database resources. A new layer of meaningful exceptions on top of the error messages given by several database servers is bought in this module. In addition, this module uses Spring’s AOP module to provide transaction management services for objects in a Spring application.

3) What is XMLBeanFactory?

BeanFactory has many implementations in Spring. But one of the most useful one is org.springframework.beans.factory.xml.XmlBeanFactory, which loads its beans based on the definitions contained in an XML file. To create an XmlBeanFactory, pass a java.io.InputStream to the constructor. The InputStream will provide the XML to the factory. For example, the following code snippet uses a java.io.FileInputStream to provide a bean definition XML file to XmlBeanFactory.

BeanFactory factory = new XmlBeanFactory(new FileInputStream("beans.xml"));

To retrieve the bean from a BeanFactory, call the getBean() method by passing the name of the bean you want to retrieve.

MyBean myBean = (MyBean) factory.getBean("myBean");

4) How can you create a DataSource connection pool?


<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
   <property name="driver">
		   <value>${db.driver}</value>
	   </property>
	   <property name="url">
		  <value>${db.url}</value>
	   </property>
	   <property name="username">
		 <value>${db.username}</value>
	   </property>
	   <property name="password">
		<value>${db.password}</value>
	   </property>
</bean>
1000 Interview Questions - JUST Rs.400 or 25 USD
Send us mail to sales@javabeat.net
Do you have paypal account (or) creditcard? Click Here to pay now and get the questions.
contact our sales support team at 91-9500035455
contact us at sales@javabeat.net