Archive | July, 2008

a4j:support – How to use action attribute?

July 18, 2008

0 Comments

a4j:support and action attribute This example program demonstrates how to use action attribute to update the server values and display in the screen. In this example user inputs are passed to update method and processed. The values are updated in the h:panelGrid component. The advantage of using a4j:support tag is it can be updated the [...]

email

a4j:support – Simple Example on onkeyup event

July 18, 2008

1 Comment

a4j:support This example program demonstrates how to get started with a4j:support tag in the RiachFaces tag libraray. This is part of Ajax4jsf libraray. But, from RiachFaces 3.0, Ajax4jsf is merged with RichFaces tag libraray. a4j:support is used inside any component to provide ajax support on that particular field. In our example a4j:support allows user developer [...]

How to write Throws Advice in Spring AOP?

July 15, 2008

0 Comments

Throws Advice Example Throws Advice is used when throwing exception from the business methods. This interceptor will be called when there is any exception, so one can do any logic to candle the exception. For writing the Throws Advice implementation you have to implement ThrowsAdvice interface. This is typed or marker interface. Marker interface doesn’t [...]

How to write Interception Around Advice in Spring AOP?

July 15, 2008

0 Comments

Interception Around Advice Example In this tips we explore how to use the Interception Around Advice in Spring’s Aspect Oriented Programming(AOP). Interception Around Advice is fundamental advice type in the Spring framework. Also this advice type is derived from other frameworks like AspectJ. So it is interoporable with other frameworks, other advices in the Spring [...]

Simple example for Before advice and After Advice in Spring Framework

July 14, 2008

2 Comments

BeforeAdvice and AfterReturningAdvice This tips presents a very simple program for invoking the Before Advice and After Returning Advice in the Spring Framework. Thsese two methods are part of Spring’s AOP implementation and used as interceptor methods. the following program create spring beans using the standalone java program and invokes the business logic method. Business [...]

Editing eclipse classpath file

July 14, 2008

1 Comment

While creating a project in Eclipse, by default it creates a .classpath file in the project directory. That file will be usedfor storing file names and other dependent files needed in the classpath to compile and execute the project successfully. Normally this file will be updated automatically when ever you update the project libraries here [...]

Basic steps to configure Log4j using xml and properties file

July 14, 2008

13 Comments

This example demonstrated how to configure Log4j setup using the Properties file and XML file. These are the two most widely used techniques for configuring the Log4j for your application. But, in the recent days configuring with properties files are considered to be old technique and recommended using XML. This example program uses simple standalone [...]

Batch insert in Hibernate

July 13, 2008

4 Comments

This example program shows how to insert multiple rows using the batch processing in hibernate. when there are thousand of rows to be persisted, everytime iterating and inserting will cause the memory problem. Hibernate stores all the persisted objects in the memory. To avoid this problem use batch processing in the hibernate. To use the [...]

Hibernate basic configuration example

July 13, 2008

5 Comments

Hibernate Configuration This example demonstrates how to configure hibernate framework for running a simple standalone program. Here the sample program uses programmatic configuration to set all the properties required for running hibernate. Also the example uses derby as the database to connect and update the values. This is not the big change, you only have [...]

Accessing Managed Bean methods programmatically in JSF 1.1

July 12, 2008

0 Comments

Access Managed Bean methods As we know JSF managed beans are mostly access only through the JSP pages are faces-config.xml.But, there is some schenarios where you will need information stored in the managed beans for the business logic in some other beans. JSF provides API to access those values where ever you want. Note that [...]