What is Hibernate?
What do you know setting up an application that uses Hibernate (example: what technologies does it depend on, etc)?
How is Hibernate configured?
What is the general structure of Java code that uses Hibernate?

The address-book application in this course is an example of a Java EE Web Application that uses a named managed bean to interact with a JavaServer Faces presentation layer, as well as a stateless session bean faade (EJB) for an entity class. Draw a diagram representing the structure of this type of application and indicate the three tiers.

Describe the mechanisms of the operation of the above type of application, including the interaction between the components.


Each of the questions below is with respect to implementing a distributed Java RMI application: a very simple weather server. The server side will implement remote weather objects on which clients can call a temperature method, which will return a string representing the temperature at the server (always 22 degrees). You may assume any additional needed import statements will be filled in later.

rite the definition of the remote interface called Weather for the remote weather service, with one method, temperature, that returns a String.
Write the class for implementation of the weather service. Assume that the temperature is always 22 degrees.


Complete the following WeatherServer class that makes use of your weather service implementation. Use an RMI service name of WeatherService, a hostname of localhost and use the default Port (1099).
import java.rmi.Naming;

public class WeatherServer {
	public WeatherServer() {
	}
	public void runServer(){
		try{
		//your code goes here
		}catch(Exception e){
		e.printStackTrace();
		}
	}
	public static void main(String args[]){
		new WeatherServer().runServer();
	}
}

Fill in the following WeatherClient application that prints out the temperature provided by the server, (and terminates) making use of the weather service WeatherService on the host, localhost, at the default port.

public class WeatherClient {
	public static void main (String args[]){
		try {
		//your code goes here
		}catch (MalformedURLException e){
		e.printStackTrace();
		}catch (RemoteException e){
		e.printStackTrace();
		}catch (NotBoundException e){
		e.printStackTrace();
		}
	}
}