Ask Questions & Get Answers at ibibo sawaal

ayisha's Questions & Answers

52

Rank

22587

4569

33

50

What are different types of Autowire types?

Asked by Amit Dubey in Computers & Technology at   10:11 PM on December 08, 2008

ayisha's Answer

There are four different types by which autowiring can be done.
1)byName
2)byType
3)constructor
4)autodetect ....

Answered at 11:29 PM on December 08, 2008

Read all answers

What are the different types of events related to Listeners?

Asked by Amit Dubey in Computers & Technology at   10:11 PM on December 08, 2008

ayisha's Answer

There are a lot of events related to ApplicationContext of spring framework. All the events are subclasses of org.springframework.context.Applica tion-Event. They are

ContextClosedEvent – This is fired when the context is closed.

ContextRefreshedEvent – This is fired when the context is initialized or refreshed.

RequestHandledEvent – This is fired when the web context handles any request.

Answered at 11:23 PM on December 08, 2008

Read all answers

What is a Jointpoint? ?

Asked by Amit Dubey in Computers & Technology at   10:11 PM on December 08, 2008

ayisha's Answer

A jointpoint is an indentifiable point in the execution of an application. It can be assimilated to method call or the assignment of an object member. Here is a sample of jointpoint
// The jointpoint here is the method B and the amount assignment
public class A
{
...
public void B(int x)
{
amount += x;
}
}

Answered at 11:19 PM on December 08, 2008

Read all answers

What about an Aspect? ?

Asked by Amit Dubey in Computers & Technology at   10:11 PM on December 08, 2008

ayisha's Answer

Aspects are the AspectJ core units. Pointcuts, advices, and other AspectJ features are contained in an Aspect file. In addition to the AspectJ element, an aspect file can contains method, data, and other element. An aspect behave like a normal Java class.
Here is a complete sample of an aspect file
public aspect SampleAspect
{
pointcut statusTask() : execution(public void com.codesquale.ant.StatusTask.execu te(..));

before() : statusTask()
{
logger.info("Status ok");
}

}

Answered at 11:20 PM on December 08, 2008

Read all answers

What is an Introduction in AOP?

Asked by Amit Dubey in Computers & Technology at   10:15 PM on December 08, 2008

ayisha's Answer

Follow along with Sing Li as he guides you through the basic concepts of aspect-oriented programming (AOP). AOP tools give you a way to separate the code for essential crosscutting concerns, such as logging and security, from your Java™ programs' core application logic cleanly. AOP can make your code more readable, less error-prone, and easier to maintain.

Answered at 11:16 PM on December 08, 2008

Read all answers

What about an Advice?

Asked by Amit Dubey in Computers & Technology at   10:14 PM on December 08, 2008

ayisha's Answer

Written confirmation of payment received, funds transferred, service performed, or payment made. Examples in banking include a credit advice, indicating a debit advice, a withdrawal or transfer, and an account service charge.

Answered at 11:17 PM on December 08, 2008

Read all answers

How JdbcTemplate can be used?

Asked by Amit Dubey in Computers & Technology at   10:22 PM on December 08, 2008

ayisha's Answer

The JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC since it handles the creation and release of resources. This helps to avoid common errors such as forgetting to always close the connection. It executes the core JDBC workflow like statement creation and execution, leaving application code to provide SQL and extract results. This class executes SQL queries, update statements or stored procedure calls, imitating iteration over ResultSets and extraction of returned parameter values. It also catches JDBC exceptions and translates them to the generic, more informative, exception hierarchy defined in the org.springframework.dao package.
Code using the JdbcTemplate only need to implement callback interfaces, giving them a clearly defined contract. The PreparedStatementCreator callback interface creates a prepared statement given a Connection provided by this class, providing SQL and any necessary parameters. The same is true for the CallableStatementCreator interface which creates callable statement. The RowCallbackHandler interface extracts values from each row of a ResultSet.
The JdbcTemplate can be used within a DAO implementation via direct instantiation with a DataSource reference, or be configured in a Spring IOC container and given to DAOs as a bean reference. Note: the DataSource should always be configured as a bean in the Spring IoC container, in the first case given to the service directly, in the second case to the prepared template.
Finally, all of the SQL issued by this class is logged at the 'DEBUG' level under the category corresponding to the fully qualified class name of the template instance (typically JdbcTemplate, but it may be different if a custom subclass of the JdbcTemplate class is being used).

Answered at 11:00 PM on December 08, 2008

Read all answers

What do you mean by Proxy?

Asked by Amit Dubey in Computers & Technology at   10:16 PM on December 08, 2008

ayisha's Answer

A proxy is a web page that provides Internet users with the ability to browse web sites that may be blocked by a content filter, such as WebSense or SmartFilter. By making use of the proxy as the portal to the blocked site, it is possible to circumvent the work of whatever content filter is in place. At the same time, the proxy site also helps to mask the visit to the site, so that there is less evidence that the content filter was not successful in preventing the visit.

Answered at 11:11 PM on December 08, 2008

Read all answers

What is meant by Weaving?

Asked by Amit Dubey in Computers & Technology at   10:16 PM on December 08, 2008

ayisha's Answer

The process of weaving consists in interlacing, at right angles, two or more series of flexible materials, of which the longitudinal are called warp and the transverse weft. Weaving, therefore, only embraces one section of the textile industry, for felted, plaited, netted, hosiery and lace fabrics lie outside this definition. Felting consists in bringing masses of loose fibres, such as wool and hair, under the combined influences of heat, moisture and friction, when they become firmly inter - locked in every direction. Plaited fabrics have only one series of threads interlaced, and those at other than right angles. In nets all threads are held in their appointed places by knots, which are tied wherever one thread intersects another. Hosiery fabrics, whether made from one or many threads, are held together by intersecting a series of loops; while lace fabrics are formed by passing one set of threads between and round small groups of a second set of threads, instead of moving them from side to side. Notwithstanding the foregoing limitations, woven fabrics are varied in texture and have an enormous range of application. The demands made by prehistoric man for fabrics designed for clothing and shelter were few and simple, and these were fashioned by interlacing strips of fibrous material and grasses, which in their natural condition were long enough for the purpose in hand. But, as he passed from a state of savagery into a civilized being, his needs developed with his culture, and those needs are still extending. It no longer suffices to minister to individual necessities; luxury, commerce and numerous industries must also be considered.

Answered at 11:08 PM on December 08, 2008

Read all answers

Explain about PreparedStatementCreator?

Asked by Amit Dubey in Computers & Technology at   10:22 PM on December 08, 2008

ayisha's Answer

One of the two central callback interfaces used by the JdbcTemplate class. This interface creates a PreparedStatement given a connection, provided by the JdbcTemplate class. Implementations are responsible for providing SQL and any necessary parameters.

Implementations do not need to concern themselves with SQLExceptions that may be thrown from operations they attempt. The JdbcTemplate class will catch and handle SQLExceptions appropriately.

A PreparedStatementCreator should also implement the SqlProvider interface if it is able to provide the SQL it uses for PreparedStatement creation. This allows for better contextual information in case of exceptions

Answered at 10:48 PM on December 08, 2008

Read all answers

Editor's Pick

Categories

sawaal signature
sawaal free visiting card