Home » Annotation

Tag Archives: Annotation

Hibernate Example Code Using Annotations

Hibernate annotations is the powerful way to provide the metadata for the Object and Relational Table mapping. All the metadata is clubbed into the POJO Java file along with the code which helps the user to understand the table structure and POJO simultaneously during the development. In this tutorial, we will explain how to configure Hibernate annotations to define mapping ...

Read More »

JAX-WS Annotations Example

In this example we shall learn some important JAX-WS annotations provided by Java. To understand this tutorial, following is the prerequisite knowledge required: Basic knowledge of how to use annotations Basic SOAP Architecture Table Of Contents 1. JAX-WS annotations 1.1 @WebService 1.2 @SoapBinding 1.3 @WebMethod 1.4 @WebResult 1.5 @WebServiceClient 1.6 @RequestWrapper 1.7 @ResponseWrapper 1.8 @Oneway 1.9 @HandlerChain 2. Directory structure ...

Read More »

Java Annotations Example

1. Introduction Java Annotations are special metadata instructions included in the source code of a program which starts with the @ symbol and can be applied to a class, method, field, parameter, variable, constructor, and package. They were introduced in Java 5 under JSR-175 to reduce the XML usage for metadata, which tends to become complicated and cumbersome. It was ...

Read More »

JUnit Using Assertions and Annotations Example

In this example we are going to create test cases so as to understand the use of assertions and annotations in JUnit testing framework. Also, we will see how to run these test cases from the command line by using the org.junit.runner.JUnitCore. If you prefer running your test cases via Eclipse, you can have a look at JUnit Getting Started ...

Read More »