Top
Interstage Studio User's Guide
FUJITSU Software

9.6.1 Preparing to Create Applications

In order to create the application, projects must be created to suit the modules being developed.
If an application is to comprise multiple modules, these can be grouped together as an enterprise application.

9.6.1.1 Preparing to Operate Servers

To perform operations such as starting or stopping the server in the Java EE 6 workbench, add the server to be operated to the Servers view. The runtime specified when adding the server to the Servers view is also specified as the target runtime in the wizard when the Java EE 6 application is developed. Add the server before developing Java EE 6 applications.

Adding Servers

Add to the Servers view the server that is the application deployment destination for checking the application behavior. Use the New Server wizard to add the server. Right-click the Servers view, then select [New] > [Server] from the context menu. For wizard setup items, refer to the following:

If the server is an Interstage Application Server, the following setup items are also displayed:

After the port number is specified, click [Login] to confirm that the server can be logged into. Specify the same administrator name and password as those in the Interstage Java EE 6 operating environment. [Next] is enabled after the server can be logged into.

Point

  • Servers can also be added from the New wizard.

  • Refer to "Interstage Application Server Java EE Operator's Guide (Java EE 6 Edition)" for details on the Interstage Application Server Java EE 6 operating environment, such as administrator name and password.

  • The added server information can be changed in the server page (double-click the target server in [Servers] view).

Note

  • When the host name of a server is set to a value other than "localhost", it is deemed a remote server. The remote server is connected using https communication.

  • The wizard input items will vary depending on the content that is specified for the host.

  • When the server operation used in the Server view and the server operation used from the command are used together, an error may sometimes occur at the time of the deployment, for example.

9.6.1.2 Creating a New Project

To launch the [New project] wizard, select [File] > [New] > [Project] from the menu. Select the project wizard that is appropriate for the module, as shown below.

Category

Project

Explanation

EJB

EJB Project

Used to create an EJB module.

Java EE

Application Client Project

Used to create an application client module.

Enterprise Application Project

Used to create an EAR file. EAR files can group together EJB, Web applications, and libraries.

Utility Project

Used to create libraries that are shared by multiple modules.

JPA

JPA Project

Used to create libraries that use JPA.

Web

Dynamic Web Project

Used to create Web application modules.

For the contents to specify in the project wizard, refer to the following:

Note

  • When an EJB project is created without [Add project to an EAR] being selected under [EAR membership], the Session Bean wizard business interface is created in the EJB project.

  • When an EJB project is created with [Add project to an EAR] selected under [EAR membership], the Session Bean wizard business interface is created in an EJB client project.

  • When an EJB project is created with [Add project to an EAR] selected under [EAR membership] and without [Create an EJB Client JAR module to hold the client interfaces and classes] being selected, the Session Bean wizard business interface is created in the EJB project.

9.6.1.3 Creating Enterprise Applications

The enterprise application project can group together modules and libraries and create an EAR file.

Refer below for specifying contents specific to the enterprise application project wizard:

To change the Java EE module that will be added to the EAR file after the enterprise application project has been created, edit using the project [Deployment Assembly] property.

Point

  • If an EAR file is used, in addition to enabling applications to be deployed as a group, the dependency relationship between the Java EE modules in the EAR file can be defined and the work involved in setting classpaths and other tasks at the operating environment can be reduced.

  • Modules or libraries contained in enterprise applications can be downloaded as client stubs by including application clients in the enterprise applications. Refer to "Download the Client Stub JAR File" in "Java EE Application Client Operation" in the "Interstage Application Server Java EE Operator's Guide (Java EE 6 Edition)" for details.

9.6.1.4 Setting a Classpath

In order to perform build for the Java application, set the build path (classpath) in the project. Use any of the following methods to set the build path for Java EE modules and libraries:

Targeted Runtimes

When the runtime that runs the Java EE 6 application is selected, that library is added to the build path. This can be set in the [Targeted Runtimes] property of the project.
The library is added by the runtime name in the build path.

Enterprise application Deployment Assembly

The modules and libraries in the packages (EAR/WAR files) can reference the classes in the package. This is specified in the EAR project [Deployment Assembly] property. This can also be set in the [Deployment Assembly] property [Deployment Assembly] tab of dynamic Web projects and EJB projects.

Java build path

The build path can be set using the project [Java Build Path] property. A library added using this setting is not reflected in the operating environment. Therefore, before deployment to the application server, classpath settings may be required at the operating environment.

9.6.1.5 Development using a Java EE 6 Module that is not a Development Resource

A Java EE 6 application may be developed using a Java EE 6 module that was developed by another person.
If an EAR file is to be created by an enterprise application project, the Java EE 6 module must be imported and a Java EE 6 module project must be created.
Select [File] > [Import] from the workbench menu, then select the file format to be imported from the [Import] wizard.

Point

If a source file is included in the imported Java EE 6 module, the source file is stored in the project source folder created by the Import wizard. If a source file is not included in the imported Java EE 6 module, an ImportedClasses folder is created in the project created by the Import wizard and the class file is stored in the ImportedClasses folder.