Saturday, November 16, 2013
Monday, November 11, 2013
Spring and Drools
Let us assume that we have dozens of rules that we have to implement, divide into some classes, subclasses, abstractions and of course unit test. This can be difficult and time consuming to both write and support. There are many ways of dealing with this problem and following example leverages one of them - JBoss Drools.
Drools is a library specifically created for such purposes like implementing rules. It contains a rule engine that can process rules written using the Drools language (you can also provide rules in Excel spreadsheets! - perfect for Business side to support and management).
Here, we will take a look at the way one can integrate JBoss Drools with Spring.
(Reference: http://java.dzone.com/articles/drools-integration-spring-vs)
Saturday, June 22, 2013
Velocity Template with Spring
Spring Configuration:
Friday, May 3, 2013
XML to Java Conversion with Smooks
Here is a simple example of XML to Java Conversion with Smooks.
Enjoy!!
input-message.xml
Enjoy!!
input-message.xml
Wednesday, May 1, 2013
Login page for ActiveMQ using Tomcat and LDAP
ActiveMQ doesnot come with login page.But for security issues some users might want to have login page to access.
So for this I have tried to create a simple login page for ActiveMQ using Tomcat and LDAP.
You can use Database or Tomcat instead of LDAP.
Sunday, March 31, 2013
Spring Data Support
Introduction to Spring Data and Setting Up
This tutorial serves as an introduction to Spring Data support. We'll also install a lightweight database Apache Derby that we'll use in subsequent tutorials. We'll learn how to start Derby in Network server mode, and how to connect and run SQL queries using the ij client tool.
Tuesday, January 31, 2012
Read from JSON file and persist into MySQL
Here is a simple example where we are reading contents of a JSON file and inserting into MySQL database. The code is dynamic so it can handle any number of columns no matter what the column name is. All you have to do is match the database column names with JSON content.
Saturday, October 29, 2011
Monday, October 17, 2011
Hibernate Tutorial [Java Brains]
Hibernate is a popular open source object relational mapping tool for Java platform. It provides powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds.
Spring Tutorial[Java Brains]
Spring is a light weight, non-invasive IoC Container and AOP framework. It provides support for JPA, Hibernate, Web services, Schedulers, Ajax, Struts, JSF and many other frameworks. The Spring MVC components can be used to develop MVC based web applications. Spring framework provides many features that makes the development of enterprise application easy.
Wednesday, October 12, 2011
Spring 3 Hello World...
Download Spring 3.1 from here.
Once you extract, create a user library named Spring3 and include all the jars from spring-framework-3.1.0.M2\dist directory. Add one more jar(commons-logging.jar) that you can find in spring-framework-3.1.0.M2\projects\spring-build\lib\ivy directory.
Once you extract, create a user library named Spring3 and include all the jars from spring-framework-3.1.0.M2\dist directory. Add one more jar(commons-logging.jar) that you can find in spring-framework-3.1.0.M2\projects\spring-build\lib\ivy directory.
Friday, March 18, 2011
Android Development Tutorial
Summary of Tutorial:
1. Install JDK/Eclipse/Android SDK.
Android SDK:
http://dl.google.com/android/installer_r10-windows.exe
2. Set JAVA path. (To verify, go to command prompt and enter javac.)
1. Install JDK/Eclipse/Android SDK.
Android SDK:
http://dl.google.com/android/installer_r10-windows.exe
2. Set JAVA path. (To verify, go to command prompt and enter javac.)
Tuesday, December 7, 2010
Spring Framework Tutorial (www.java9s.com)
Spring Framework Tutorial Session 1
This is an introduction to spring framework. Spring framework was introduced by Rod Johnson. Spring offers Dependency Injection and Aspect-oriented Programming. Spring framework contributes to loose coupling and Inversion of Control. This session gives an overview of how spring framework contributes to loose coupling. Spring has modules like Spring jdbc, spring JMS which reduces the complexity in implementing those APIs.
Tuesday, July 21, 2009
Email in GWT
Here is a simple code to send mail in GWT.
Write this code in servletImpl class
String host = "xxx.com.xx";//use your own host
String from = "..........";// email id
String to = ".............";//email id
Write this code in servletImpl class
String host = "xxx.com.xx";//use your own host
String from = "..........";// email id
String to = ".............";//email id
Tuesday, June 23, 2009
Simple Menubar in GWT
This is just a simple example of menubar for GWT beginners.
Code:
Code:
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.MenuBar;
public class Menubar extends MenuBar{
MenuBar menu = new MenuBar();//main menubar
public Menubar() {Monday, June 22, 2009
Calculating Sum in Each Group in iReport
To calculate the sum in each group in iReport, just do as shown in previous post Grouping in iReport. Now add in query, another field of which you want to take out the sum. For example see in figure below.
More...
Now create a new variable named SUM as shown in figure.
Now select and write the fields as shown in figure for variable SUM.
Now arrange all the fields as shown in figure and run the file.
Output:
Sunday, June 21, 2009
Grouping in iReport
Here is a simple example on grouping in iReport. Its steps are as follows:
1. Create a new document as shown in figure.
More...
2. Now go to the Data option and select Report Query and write query in the window that appears as shown below.
3. Now go to View option and select Report Groups and name the group and give the expression of the field by which you want to group as shown in figure.
4.Now put the info required in the bands as shown in figure.
5. Now right click on field and edit the properties as shown in figure.
6. Delete the unnecessary bands and make report clear and keep only necessary bands as shown below.
7.Now run the report and the result will be shown as in figure.
Subscribe to:
Posts (Atom)
