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:
Server type
Select the server type. For an Interstage Java EE 6 operating environment, select [FUJITSU LIMITED] > [Interstage Application Server V11.1 (Java EE 6)].
Server's host name
Set the name of the host where the server exists. For a local machine, specify "localhost".
Server name
Specify the server name. The name that is specified here is displayed in the Server view.
Server runtime environment
Specify the runtime setting that corresponds to the server type. In the Interstage Java EE 6 operating environment, select [Interstage Application Server V11.1 IJServer Cluster (Java EE)].
If the server is an Interstage Application Server, the following setup items are also displayed:
PreserveSessions Across Redeployment
Specify to continue sessions when redeploying.
HTTP listener port for operation management
Specify the HTTP listener port for operation management. The default port number is 12011. Set it based on the server setting.
HTTP listener port
The default port number is 28282. Set it based on the server setting. When connecting to a remote server, specify the HTTPS listener port of the server.
Debugging port number
The default number is displayed. Change it if necessary.
HTTP port number
Specify the port number of the HTTP Server used during connection confirmation. The default number is displayed. Change it based on the server setting.
When the Web Server connector (used in Interstage HTTP Server 2.2) is used
Specify the port number of the Web Server (Interstage HTTP Server 2.2).
When the Web Server connector (used in Interstage HTTP Server 2.2) is not used
When Interstage Java EE 6 DAS service is specified as the deployment target, set its value to be the same as the HTTP listener port number or HTTPS listener port number in the Java EE 6 operating environment.
When IJServer cluster is specified as the deployment target, set its value to be the same as the HTTP listener port number or HTTPS listener port number of the IJServer cluster.
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.
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:
Project name
Specify the project name to be generated.
Project location
Specify the storage destination of the project resources. The default location is under the workspace folder.
Target runtime
Select the runtime that runs the Java EE 6 application. This sets the runtime library in the classpath. For an Interstage Application Server Java EE 6 operating environment, select [Interstage Application Server V11.1 (Java EE 6)].
Module version
For an EJB or Web application, etc., specify the module version.
Configuration
Set the conventions and versions that the created modules and libraries conform to. Operate the support functions such as the wizard and editor, so that they conform to the conventions and versions. For an Interstage Application Server Java EE 6 container, select [Default Configuration for Interstage Application Server V11.1 (Java EE 6)].
EAR membership
If the modules and libraries are grouped together in an EAR file, select the enterprise application project. If the enterprise application is to be created later, it need not be selected here.
Working sets
To add a working set to the project, select the working set.
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.
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:
Content directory
Specify the name of the folder used to store files, apart from the Java EE module created as the project, that you want to include in the EAR file.
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.
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:
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.
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.
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.