heartin's blog

[Example-Lab] Eager and Lazy Fetch Types in Hibernate 4.3

We will see a simple example to illustrate the LAZY and EAGER Fetch in Hibernate.

[Example-Lab] Embedding Value Types Within an Entity Class in Hibernate 4.3

A value type is a type which doesn't have existence of its own, but belongs to an entity, like an user and his address. Value types are always completely owned by their containing entity.

We will embed an Address class inside a User class. The simplest way to embed a value type in an entity class is to treat the member variables of the embedded class (e.g. Address), the same way as we treat the member variables of the embedding class (e.g. User) by adding more columns to the entity table one column each for the value type class members

[Lab-Analysis] Creating a Soap Web Service Bottoms Up Using Java SE Endpoint Publisher

We will further analyze the lab excercise done @ http://javajee.com/lab-creating-a-soap-web-service-bottoms-up-using-endp....

 

Service Endpoint Interface (SEI)

We had used the below SEI for creating the web service:

package com.javajee.ws.tsexample1;

@WebService
public interface TimeService
{
         @WebMethod
         String getTimeFromServer();
}

 

[Resources] Useful Resources for Learning About Web Services

Knowledge of HTTP, Servlets and Servers

We will be focussing on learning about web services with HTTP as the transport protocol and will be deploying web services on web containers as well as application servers . So a decent knowledge about these are good to have.

You can learn more about these @ http://javajee.com/java-ee-web-components-part1-http-and-servlets.

 

Important Annotations for Developing SOAP Web Services

While creating a web service bottom up, we can configure the SEI and SIB to act as a web service using annotations. In case of bottom up web service, the binding properties in a WSDL can be specified using these annotations.

 

Summary of common annotations used to create web services

 

@WebService annotation 

  • May be used on:

    • SEI to denote that it is a Web Service interface

[Coming Soon] Upcoming Topics in the Note Book: Introduction to Web Services

  1. Installing and configuring Glassfish application server

  2. Deploying web services in Glassfish application server.

  3. Top down web service development example.

  4. Examples for other Message Exchange Patterns.

  5. Examples for different ways to import or link XSD to WSDL.

  6. Notes on simple types and complex types in XSDs

  7. Notes in content type headers.

  8. Examples for DOM, SAX and StaX parsing

  9. More about webservices.xml

Deploying a Bottom-Up Web Service in Tomcat Web Container

A web container like tomcat can deploy servlets, jsps and web services.

 

Important points about deploying bottum up web services in Tomcat

  • Web components are generally deployed in the web container as war files.

    • These war files might contain standard configuration files such as web.xml and vendor specific configuration files such as sun-jaxws.xml.

SOA and SOAP Based Web Services

Introduction to SOA

Wikipedia defines SOA as "Service-oriented architecture (SOA) is a software design and software architecture design pattern based on discrete pieces of software providing application functionality as services to other applications. This is known as Service-orientation. It is independent of any vendor, product or technology.".

 

Overview of Top-down and Bottom-up SOAP Web Service Development

Web services can be created using two ways: top-down development and bottom-up development.

 

Top-down web services development

  • Top-down Web services development involves creating a WSDL and then creating the Web service using the WSDL file. 

    • In top-down approach, first you design the implementation of the Web service by creating a WSDL file. You can then create the Web service skeleton Java classes from the wsdl, and add the required code. 

Object States in Hibernate 4.3

 A java object within a hibernate application can be in one of the three states:

  1. New/transient

  2. Attached/persistent

  3. Detached

 

Important points about object states in Hibernate

  • When an object is created, it will be in the new/transient state.

    • Hibernate will not save any updates to the transient objects.

Pages

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!