Are You Recruiter/Hiring Manager?
Cloud-based Candidate Screening | Online Tests
PMP 1600 Questions
PMP 1600 Questions
1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)

Tutorial Home

Hibernate

  • Advantage of Hibernate over JDBC
  • Hibernate Setup with an web Application
  • First Hibernate Application
  • Hibernate mapping with Database TABLE
  • Hibernate Data Type-Java Data Type - SQL Data Type mapping
  • One to Many Relation in Hibernate
  • One to Many Relation in Hibernate bi-directional
  • Many to Many Relation in Hibernate
  • HQL: The Hibernate Query Language
  • Criteria Queries
  • Criteria Queries : Equal (eq), Not Equal(ne), Less than (le), greater than (gt),greater than or equal(ge) and Ordering the results
  • Criteria Queries: And OR conditions
  • Hibernate generator to generate id (primary key)
  • prevent concurrent update in Hibernate,slate object updatation in Hibernate,version checking in Hibernate

    Struts


  • Model View Controller (MVC)
  • Model View Controller (MVC)
  • Struts Flow-How Struts Works?
  • Struts Tutorial - Struts Setup- First Struts Action class setup
  • Message Resources
  • Validation Framework
  • Validation Framework-client side
  • ForwardAction
  • IncludeAction
  • DispatchAction
  • LookupDispatchAction
  • DynaActionForm
  • DynaActionForm
  • Struts Tutorial - Mutli-click prevention using struts tokens-Prevent Duplicate Submission
  • Logic Iterate Map and List

    JSP


  • JSP Tutorial
  • Introduction to JSP
  • JSP Comments
  • JSP Syntax
  • JSP Scripting Elements :Scriptlet, expression, declaration
  • JSP Directives
  • implicit objects in JSP
  • JSP Actions
  • Introduction to JSP
  • jsp:useBean
  • The jsp:setProperty Action
  • The jsp:getProperty Action
  • Introduction to JSP

    Spring


  • Spring Tutorial
  • Introduction to Spring
  • Benefits of Using Spring Framework
  • Inversion of Control in Spring
  • Introduction to BeanFactory
  • Dependency Injection in Spring
  • Collections Setter Injection
  • Bean Scopes in Spring
  • Spring IOC Setup Step by Step
  • Bean Lifecycle in Spring
  • ApplicationContext
  • MessageSources in Spring
  • Web Spring MVC framework
  • Developing Your First Spring Web Application
  • Developing Your Second Spring Web Application with Spring Form
  • Developing Your First Spring Web Application with Spring Validation Framework with Code Example
  • Spring integration with Hibernate
  • Chapter 4. JAX-RPC

    Explain the service description model, client connection types, interaction modes, transport mechanisms/protocols, and endpoint types as they relate to JAX-RPC.

    JAX-RPC is for Web services interoperability across heterogeneous platforms and languages. This makes JAX-RPC a key technology for Web services integration.

    You can use the standard JAX-RPC programming model to develop Web service clients and endpoints based on SOAP. A Web service endpoint is described using a Web Services Description Language (WSDL) document. JAX-RPC enables JAX-RPC clients to invoke Web services developed across heterogeneous platforms. In a similar manner, JAX-RPC Web service endpoints can be invoked by heterogeneous clients. JAX-RPC requires SOAP and WSDL standards for this cross-platform interoperability.

    JAX-RPC provides an easy to develop programming model for development of SOAP based Web services. You can use the RPC programming model to develop Web service clients and endpoints. For typical scenarios, you are not exposed to the complexity of the underlying runtime mechanisms (for example, SOAP protocol level mechanisms, marshalling and unmarshalling). A JAX-RPC runtime system (a library) abstracts these runtime mechanisms for the Web services programming model. This simplifies Web service development.

    JAX-RPC provides support for WSDL-to-Java and Java-to-WSDL mapping as part of the development of Web service clients and endpoints. In a typical development environment, tools provide these mapping functionality. This further simplifies the application development.

    JAX-RPC enables a Web service endpoint to be developed using either a Java Servlet or Enterprise JavaBeans (EJB) component model. A Web service endpoint is deployed on either the Web container or EJB container based on the corresponding component model. These endpoints are described using a WSDL document. This WSDL document can be published in public or private registry, though this is not required. A client uses this WSDL document and invokes the Web service endpoint. A JAX-RPC client can use stubs-based, dynamic proxy or dynamic invocation interface (DII) programming models to invoke a heterogeneous Web service endpoint.

    JAX-RPC requires SOAP over HTTP for interoperability. JAX-RPC provides support for SOAP message processing model through the SOAP message handler functionality. This enables developers to build SOAP specific extensions to support security, logging and any other facility based on the SOAP messaging. JAX-RPC uses SAAJ API for SOAP message handlers. SAAJ provides a standard Java API for constructing and manipulating SOAP messages with attachments.

    JAX-RPC provides support for document-based messaging. Using JAX-RPC, any MIME-encoded content can be carried as part of a SOAP message with attachments. This enables exchange of XML documents, images and other MIME types across Web services.

    JAX-RPC supports HTTP level session management and SSL based security mechanisms. This enables you to develop secure Web services. More advanced SOAP message-level security will be addressed in the evolution of JAX-RPC technology.

    Steps for Implementing a Service:

    1. Define Web Service Endpoint Interface

    2. Implement Web Service class and methods

    3. Package and deploy

    Endpoint Interface example:

    package com.example;
    
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    
    public interface HelloIF extends Remote {
    	public String sayHello(String s) throws RemoteException;
    }					
    					

    Service endpoint interface [SEI] MUST extend java.rmi.Remote interface. NOTE: Service implementation class MAY not implement SEI (using implements Java reserved word). But it MUST provide all SEI methods implementations with same signatures.

    Service endpoint interface's methods MUST throw java.rmi.RemoteException exception. NOTE: Service implementation class' methods MUST NOT throw java.rmi.RemoteException.

    Service endpoint interface [SEI] MAY be generated from WSDL (WSDL-to-Java approach).

    Web Service can be implemented in form:

    1. Java class (for servlet-based endpoint)

      package com.example;
      
      public class HelloImpl implements HelloIF {
      	public String message = "Hello ";
      	public String sayHello(String s) {
      		return message + s;
      	}
      }								
      								
      NOTE: Your implementation class does not throw RemoteException. This is the responsibility of the container as this implementation will be deployed in a managed J2EE container.

    2. Stateless session bean (for EJB-based endpoint)

      com.example.Greeting is the bean's Web service endpoint interface. It provides the client's view of the Web service, hiding the stateless session bean from the client. A Web service endpoint interface must conform to the rules of a JAX-RPC service definition interface:

      • It extends the java.rmi.Remote interface.

      • It MUST NOT have constant declarations, such as public final static.

      • The methods MUST throw the java.rmi.RemoteException or one of its subclasses. The methods may also throw service-specific exceptions.

      • Method parameters and return types must be supported JAX-RPC types.

      Here is the source code for the com.example.Greeting endpoint interface:

      package com.example;
      
      public interface Greeting extends Remote {
      	public String sayHello(String name) throws RemoteException;
      }								
      								

      The com.example.GreetingBean class implements the sayHello method defined by the com.example.Greeting interface. The interface decouples the implementation class from the type of client access. For example, if you added remote and home interfaces to com.example.GreetingBean, the methods of the com.example.GreetingBean class could also be accessed by remote clients. No changes to the com.example.GreetingBean class would be necessary.

      The source code for the com.example.GreetingBean Stateless Session Bean Class follows:

      package com.example;
      
      import javax.ejb.SessionBean;
      import javax.ejb.SessionContext;
      import java.rmi.RemoteException;
      								
      public class GreetingBean implements SessionBean {
      	public String sayHello(String name) {
      		return "Hello" + name;
      	}
      	
      	public void ejbCreate() {    
      	}
      	
      	// Standard callback methods  
      	public void ejbActivate() {
      	}
      
      	public void ejbPassivate() {
      	}
      
      	public void ejbRemove() {    
      	}
      
      	public void setSessionContext(SessionContext ctx) {
      	}	
      }								
      								
      Deployment Descriptor:
      
      <?xml version='1.0' encoding='UTF-8'?>
      
      <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee"                        
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                        
      	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee                                            
      			http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"> 
      	
      	<enterprise-beans>
      		<session>
      			<ejb-name>GreetingBean</ejb-name>
      			<service-endpoint>com.example.Greeting</service-endpoint>
      			<ejb-class>com.example.GreetingBean</ejb-class>
      			<session-type>Stateless</session-type>
      			<transaction-type>Container</transaction-type>      
      			<security-identity>        
      				<use-caller-identity/>      
      			</security-identity>
      		</session>
      	</enterprise-beans>
      	
      </ejb-jar>	
      								
      								
      								

    The information you are posting should be related to java and ORACLE technology. Not political.