You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

To facilitate the creation of deployment plans there is a new portlet now available. The plan creator wizard available from the Geronimo Administration Console makes deployment easier by asking you some questions and proposing default values when providing a web application WAR file.

Supported features

The plan creator wizard will help you generate the appropriate deployment plan for the application you are deploying. The wizard currently works for web apps and supports the following features.

  • EJB
  • EJB Local
  • JDBC Connection Pool
  • JMS Connection Factory
  • JMS Destination
  • JavaMail Session & Web Service References declared in the web-apps are auto discovered and users are asked to resolve them by listing Available Resources in the server environment to which they can be linked.
  • Above type of references declared inside the Java classes through Annotations are also auto discovered.
  • Simplified configuration of Security.

The plan creator wizard will behave differently depending on the type of application you are installing. The following sections provide sample applications with different features so you can better appreciate the wizard behavior.

Sample with annotations

There are three simple applications attached to give you a better idea how the plan creator wizard would work when deploying applications using annotations.

JDBC access

This sample is a very simple database access application that uses annotations. For this example we have created a sample BankDB database on the embedded Derby as well as a database connection pool. Although we will not be covering in this section how to create a database or a connection pool we still provide in the #Attachments section some SQL sample to generate the required sample database.

The Annotations-TestJDBCAccess.zip file provides a BankDB.sql, WebAppJDBCAccessAnnotations.war which is the WAS we will be deploying and a sample of the generated deployment plan WebAppJDBCAccessAnnotations_generatedPlan.xml. Download and extract the zip file to a directory of your convenience.

WebAppJDBCAccessAnnotations.war includes a Servlet and a JSP. The following excerpt shows the annotation part the wizard has identified and will likely be prompting for additional information while deploying the application.

Excerpt from ListCustomers.java
...
import javax.annotation.Resource;
...

/**
 * Servlet implementation class for Servlet: ListCustomers
 *
 */
 public class ListCustomers extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	@Resource(name = "jdbc/MyDataSource")
	private DataSource dataSource;
...

With the server up and running access the Geronimo Administration Console with a web browser and click on Plan Creator on the left menu.

Browse to the WebAppJDBCAccessAnnotations.war you just extracted and click on Configure. In the resulting screen you will be configuring the web application identity. You may want to change the default proposed values however, for this example, we will be accepting the defaults. Click Next.

In the following screen, the wizard have identified some WAR references that need to be resolved. The references listed on this screen are specific to this application. The JDBCRef column is showing the resource name defined in ListCustomers.java; see *@Resource(name = "jdbc/MyDataSource") from the excerpt above.

As mentioned earlier, for this example we created a database connection pool we called BankDB_Pool. From the JDBC Pools puul-down menu you can now select the appropriate connection pool and click Next.

EJB access

JMS access

Sample without annotations

Attachments

No files shared here yet.
  • No labels