Quantcast
Channel: SCN : Blog List - Java Development
Browsing index pages (50 articles)

HANA Hibernate Exception.

I am trying to connect to HANA via hibernate java, i am using reverse engineering method.First there is no driver in existing drivers for HANA, so i use generic jdbc and set the properties for HANA db,...

View Article


Image may be NSFW.
Clik here to view.

How does @Autowired work in Spring framework

Suppose I have a bean named HelloWorld which has a member attribute points to another bean User. With annotation @Autowired, as long as getBean is called in the runtime, the returned HelloWorld...

View Article


Image may be NSFW.
Clik here to view.

How does component-scan work in Spring Framework

In Spring configuration xml file, we can define a package for tag component-scan, which tells Spring framework to search all classes within this specified package, to look for those classes which are...

View Article

Image may be NSFW.
Clik here to view.

How to find the exact location where bean configuration file is parsed in...

We can define bean configuration in xml and then can get instantiated bean instance with help of all kinds of containers for example ClassPathXmlApplicationContext as displayed below:The content of...

View Article

Image may be NSFW.
Clik here to view.

A real example of using volatile keyword in Java

Consider the following example:  package thread; public class ThreadVerify {  public static boolean  stop = false;  public static void main(String args[]) throws InterruptedException {      Thread...

View Article


Image may be NSFW.
Clik here to view.

An example to explain why we need AOP - Aspect Oriented Programming

Template method patternDecorator patternAOP solutionThe definition of AOP in wikipediaseems a little bit difficult for beginners to understand, so in this blog I use an example to introduce why we need...

View Article

Image may be NSFW.
Clik here to view.

Compare two Business Entities using JPA/Reflection in Java

In this tutorial, java development team experts will share the way to make comparison between two business entities using JPA/ Reflection. You can read the story here and discover how they do it.Use...

View Article

Image may be NSFW.
Clik here to view.

Demo On Configuring Graylog input and get messages

Demo On Configuring Graylog input and get messages:  By using Graylog we can get the whole information(logging information,indexing, collecting information). If we are not sending any data (application...

View Article


Image may be NSFW.
Clik here to view.

Installation Steps of Graylog-Part2

Refer link: Installation Steps of Graylog-Part1Place the hash password.        Do the following changes in the file like server.conf...

View Article


Image may be NSFW.
Clik here to view.

Installation Steps of Graylog-Part1

Graylog Installation:Modern server architectures and configurations are managed in many different ways. Some people still put new software somewhere in opt manually for each server while others have...

View Article

Image may be NSFW.
Clik here to view.

Overview on the Graylog

Introduction:Graylog is a fully integrated open source log management platform for collecting, indexing, and analyzing both structured and unstructured data from almost any source.Overview:If you need...

View Article

Image may be NSFW.
Clik here to view.

Demo on Sending Data to the Graylog by using GELF and get the Logging data on...

Sending Data to the Graylog by using GELF and get the Logging data on Graylog console:As Graylog principle that it get the Logging information by sending the data from our application layer.1.Create...

View Article

Image may be NSFW.
Clik here to view.

An example of Deadlock detection using JDK standard tool: jstack

We can get the concept of deadlock inwikipedia.The picture below gives a common scenario which leads to deadlock.In this blog, I will share how to detect deadlock situation using JDK standard tool...

View Article


Image may be NSFW.
Clik here to view.

Build a Spring Hello world application using Maven

The source code of files used in the projectBased on the learning from An example of building Java project using Mavenwe can now use Maven to do more practical task.I plan to create a Hello World...

View Article

Image may be NSFW.
Clik here to view.

An example of building Java project using Maven

Prerequisite: download and configure Maven in your laptop. Once done, type "mvn" in command line and you should observe the following output by Maven:Suppose I have a simple Java project with following...

View Article


Image may be NSFW.
Clik here to view.

An example of Java Remote debug

1. start Jetty server under debug mode via mvn jetty:run2. In Eclipse, create a new Debug configuration->Remote Java ApplicationSpecify Host as localhost and port 8000:Click debug button:You should...

View Article

Image may be NSFW.
Clik here to view.

Using Optional in Java 8

Example 1Example 2Example 3Example 4Difference between method map and flatMapOptional class is available in Java8. Let's use some examples to understand its logic. Example 1 Optional instance acts as a...

View Article


Image may be NSFW.
Clik here to view.

Step by Step to use VisualVM to do performance measurement

What is VisualVMInstall and configure VisualVM launcherDo performance measurementRecently I am trying to find a handy tool to measure the performance of my Java application and finally I think the...

View Article

Image may be NSFW.
Clik here to view.

Use SourceMonitor to monitor your java code complexity

Today I found a useful free software called "SourceMonitor" which can help to calculate and monitor the java code ( and other programming language like C++, C# etc ) complexity.   For the definition...

View Article

Image may be NSFW.
Clik here to view.

Implementation of Logging and Tracing

The purpose of this document is to provide best practices in order to create useful Logging and Tracing messages.1.    Definitions1.1  LogsLogs are targeting administrators when they encounter some...

View Article
Browsing index pages (50 articles)


Latest Images