MyEclipse Enterprise Workbench provides developers the ability to seamlessly deploy, execute, and test MyEclipse JEE applications to dozens of versions of different application servers through server connectors including:
Not only does MyEclipse provide many server connectors out of the box, you also have the ability to download and install third-party server connectors, which will work with your projects just as if it were included with the MyEclipse IDE.
For quick deployment and testing, MyEclipse includes a special installation of Tomcat 7 and a MyEclipse Derby database as part of the integrated sandbox.
MyEclipse interacts with local application server instances through application server connectors using the Web Tools Project (WTP) framework. MyEclipse provides a Server Manager for central server operation and integrated controls on the MyEclipse workbench toolbar and context-menus that allow you to:
Servers view showing deployed applications
When you instruct a connector to launch its application server, the connector creates a launch configuration using the server’s configuration information and then uses the connector to start an external JVM in which the application server executes. The figure below depicts the interaction between a connector and an application server.
Note: Connectors are able to launch and interact only with servers installed on a locally accessible file system. WebSphere server connectors are available in MyEclipse with WebSphere support
You can configure as many supported server instances as you want; however a typical environment requires only a small set of connectors to be enabled. You can configure multiple server instances if you need to test with various configurations.
Connectors are configured using the New Server wizard accessed from the Servers view or from the Run on Server window. The configuration process is straight forward, but you must be familiar with the installation and startup details of your server.
Note: A common mistake made during the configuration process is to specify a Java JRE instead of a full JDK as the JVM in which the server will be launched. The issue is that a JEE application server requires access to a JDK compiler to support dynamically processing of JSPs and EJB proxies. The JDK includes the required compiler; the JRE does not.
The requirements for MyEclipse application server support are:
Only MyEclipse JEE project types (Enterprise, EJB, and Web) can be deployed with the MyEclipse Deployment Service. MyEclipse does not support direct deployment of basic Java projects. Please see the Web Project Tutorial for more information on the use of basic Java projects in conjunction with MyEclipse Web projects and their deployment.
If you have an application server that is not controlled within MyEclipse (i.e. you start and stop the server using external tooling or the server's own shortcuts), you can deploy and hot sync resources to it using the Custom Deployment Server configuration.
On the Define a New Server window, expand Basic, and select Custom Deployment Server. You set up the connector like any other, but in addition, you specify the deployment location for your MyEclipse resources.
The Servers view provides a comprehensive view of the state of configured application server connectors. This view is a standard part of the MyEclipse default perspective. To open the Servers view, select Window>Show View>Servers.
Note: If you have a perspective open that causes the Servers view to be absent from the menu, select Other, expand MyEclipse Java Enterprise, and select Servers.
The Servers view toolbar and the right-click context menu contain server controls. The table below provides a description of the function of each tool.
|Collapses/expands all servers in the view|
|Configures a new server|
|Removes the selected deployed JEE project|
|Launches the selected application server in Debug mode - supports hot-swap debugging|
|Launches the selected application server in Run mode|
|Launches the selected application server in Profiling mode|
|Stops the selected application server|
|Publishes the selected application server, sync'ing all deployed applications|
The Servers view indicates when a server is out of sync. The states and statuses indicate whether the server is stopped or running and whether or not projects are in sync, respectively. You can sync up apps on the server with the server running or stopped:
After you configure a server, you can access the configuration by double-clicking the server in the Servers view, or right-clicking the server, and selecting Open from the menu. This opens the Server Configuration editor. You can access settings configured when you added the server, and you can adjust the publishing settings and timeouts.
The default publishing setting is to automatically publish when resources change. This is also called hot-sync'ing. The publishing interval indicates the amount of time the server waits after resources change or a build event occurs. Timeouts indicate the maximum time allowed for completion of server operations.
It's possible to store Tomcat configuration data in your workspace, so multiple developers using the same server can each configure Tomcat differently. To do this, remove all Tomcat deployments in the workspace, and then Publish by right-clicking Tomcat in the Servers view and selecting Publish.
Double-click the Tomcat server to open the server connector configuration editor. In the Server Location Settings section, select the Store server configuration files in the workspace checkbox.
You also have options on exactly where the server configuration files are stored. Select either workspace metadata or custom location to avoid changing the configuration in the Tomcat installation location itself. To view server metadata for Tomcat (or possibly third-party servers), open the Configuration files node in the Servers view. Each developer can configure the server.xml file to use different ports, for example. Double-click a configuration file to open it in an editor.
MyEclipse can deploy Web, EJB, and Enterprise Application projects to any MyEclipse-enabled application server. Two deployment modes are supported by MyEclipse: exploded archive deployment and packaged archive deployment.
Consult your application server vendor for the modes supported by your application server.
For a project, you can specify the server on which you always want the project to run, preventing you from having to select the server each time you select Run As>MyEclipse Server Application. You can also set a project's default deployment mode.
To specify a project's server, right-click the project, and select Properties. Expand MyEclipse, and select Server Deployment. Specify the server and the deployment mode, when applicable, to always use when running the project.
Flexible deployment support allows you to deploy only a subset of your source folders, deploy to paths that don't exist within your workspace project, and generally deviate from a fixed project structure where everything had to reside under your project's WebRoot folder. For enterprise projects, you can also control archive names and utility project deployment.
To configure the deployment assembly, right-click a project, and select Properties from the menu. Expand MyEclipse, and select Deployment Assembly. See MyEclipse Deployment Assembly for more information.
Deploying a project to a server is as simple as adding a project to the server.
When supported by the server connectors, at deployment you have the option to change the default deployment mode using the drop-down list beside the module once you've moved it to the Configured column. The icon beside the module indicates the deployment mode. For example, the icon indicates an exploded web module, and the icon indicates a packaged web module.
After a project is added to a server, it appears in the Servers view below the server name.
Servers view showing deployed applications