• No results found

Extend WTP Server Tools for your application server. Tim deboer Gorkem Ercan

N/A
N/A
Protected

Academic year: 2021

Share "Extend WTP Server Tools for your application server. Tim deboer Gorkem Ercan"

Copied!
22
0
0

Loading.... (view fulltext now)

Full text

(1)

Extend WTP Server Tools for your

Extend WTP Server Tools for your

application server

application server

Tim deBoer

[email protected]

Gorkem Ercan

(2)

What is the Eclipse Web Tools Platform?

ƒ Top-level project at www.eclipse.org

ƒ Provides tools to build applications for standards-based Web and Java runtime environments

ƒ Consists of two subprojects:

ƒ Web Standard Tools (WST)

ƒ HTML, XML, …

ƒ J2EE Standard Tools (JST)

ƒ JSP, EJB, …

(3)

Where does Server Tools fit in?

ƒ Sub-component of WTP

ƒ Server Tools provides support for:

ƒ Targeting applications to a specific server

ƒ Adding & removing projects from servers

ƒ Publishing applications to a server

ƒ Starting & stopping servers

ƒ Implementations for specific servers:

(4)

Server Tools Components

ƒ The server tools framework supports any server, not just J2EE

ƒ Support in both of the WTP subprojects:

ƒ wst.server

ƒ Server Tools framework (.server.core)

ƒ Server Tools UI (.server.ui)

ƒ jst.server

ƒ J2EE server tools (.server.*)

ƒ Generic J2EE server framework (.server.generic.*)

(5)

Users of Server Tools APIs

ƒ Server Providers

ƒ Add support for additional servers

ƒ E.g. Tomcat, JBoss

ƒ Module Providers

ƒ Add additional module types and Run on Server support

ƒ E.g. J2EE Tools

ƒ Client App Providers

ƒ Provide clients for Run on Server

ƒ E.g. Web browser

ƒ Client Users

ƒ Use API to configure and launch servers, check runtime target, etc.

(6)

Model Overview

Module 1 Server 1

Module 2

Module 3

Server 2

Runtime 1

(7)

Modules

ƒ A module is content that can be deployed to a server

ƒ Typically a project or folder (e.g. Web module) within the workspace, but can consist of anything

ƒ Extension Points:

ƒ moduleTypes

ƒ Define a new type of module

ƒ moduleFactories

ƒ Provide factory for creating and discovering modules of a specific type

(8)

Runtimes

ƒ A runtime is an installed server on the local hard-drive

ƒ Executables, Jar files, etc.

ƒ Used for build-time compilation, validation

ƒ Extension points:

ƒ runtimeTypes

ƒ Define a new type of runtime and delegate class

ƒ runtimeLocator

ƒ Automatically locate new runtimes on disk

ƒ runtimeTargetHandler

ƒ Change what happens when a project (containing modules) is targeted to a particular runtime

(9)

Servers

ƒ A server is an instance of (handle to) a real server

ƒ Add & remove modules

ƒ Publish modules

ƒ Usually supports starting & stopping

ƒ Often based on a local runtime

ƒ Extension points:

ƒ serverTypes

ƒ Define a new type of server and delegate classes

(10)

Run on Server support

ƒ Run > Run on Server menu item allows users to quickly choose/create a server and run module

ƒ Allows user to choose or create a server

ƒ Starts server, publish

ƒ Launches client application (e.g. Web browser)

ƒ To enable on a selection:

ƒ Adapt object to ILaunchable to make Run menu appear (via Eclipse debug support)

ƒ ModuleArtifactAdapter extension point provides enablement support

ƒ Adapt object to IModuleArtifact

ƒ Each server provides support via launchableAdapter ext. point

(11)

UI Support

ƒ Provided by org.eclipse.wst.server.ui

ƒ Servers view for creating and configuring servers

ƒ Preferences and property pages, etc.

ƒ Extension points:

ƒ images

ƒ Provide images for runtimes, servers, etc.

ƒ editorPages and editorPageSections

ƒ Provide sections and pages for the server editor

ƒ wizardFragments

(12)

Generic Server Introduction

ƒ Extension to WTP server tools

ƒ RuntimeTypes

ƒ ServerTypes

ƒ Design has its roots from Lomboz

ƒ Community already familiar with its use

ƒ A special server and runtime that can adjust behavior

(13)

Server type definiton file

ƒ XML based meta information

ƒ Validated against an XSD

ƒ Introduced using “org.eclipse.jst.server.generic.core.serverdefinition” extension

ƒ Virtually two parts

ƒ Properties

ƒ Derived information

ƒ Properties are variables that users provide values using server tooling UI

ƒ Derived info is information used by the generic server to perform server tooling functionality

(14)

Server type definition file example

. .

<property id="serverRootDirectory" label="Application Server Directory:" type="directory" context="runtime" default="/your_server_root/appservers/jboss-3.2.3" /> . . <start> <class>org.jboss.Main</class> <workingDirectory>${serverRootDirectory}/bin</workingDirectory> <programArguments>-c ${serverConfig}</programArguments> <vmParameters></vmParameters> <classpathReference>jboss</classpathReference> </start>

(15)

Making sense of server type definition files

ƒ <classpath> : define a classpath used by other elements

ƒ <start>: information for starting a

server(classpath,class,vmarguments, etc.)

ƒ <stop>: information used for stopping a server

ƒ <port>:port(s) to start server on

ƒ <project>: classpath to provide when creating a project for this runtime

ƒ <module>: information for each supported modules, such as publisher and type

ƒ <publisher>: data used by different publishers when publishing to this server

(16)

Using metadata for UI

ƒ Property type determines the type of widget used

ƒ Context determines whether this is a server or runtime property

ƒ Currently 4 types are supported

ƒ Directory

ƒ String

ƒ Boolean

(17)

UI example

<property id="jonasRoot"

label="JonAS Installation Directory:" type="directory"

context="runtime"

default="/your_server_root/JOnAS-4.1.4" />

<property id="jonasBase"

label="JonAS Configuration Directory:" type="directory" context="runtime" default="/your_server_root/JOnAS-4.1.4" /> <property id="classPath" label="Classpath Variable:" type="directory" context="runtime" default="/your_server_root/JOnAS-4.1.4" />

(18)

Generic publishers

ƒ Handles publishing modules to servers

ƒ Only part where you may need to code

ƒ Introduced using org.eclipse.jst.server.generic.antpublisher

extension point

ƒ Extend GenericPublisher class

ƒ It is optional you may choose to use an existing publisher

ƒ ANT build file based publisher is available part of the core package

(19)

Shortcomings

ƒ Server runtime discovery is not supported

ƒ Runtime validation is limited

ƒ No remote server support

(20)

Demo

Introducing an application server using

Generic server tooling

(21)

Help Needed

ƒ We’re not done yet!

ƒ If you are planning on using or building on WTP, we can use your help

ƒ Support for new server types

ƒ Defining and refining API

ƒ Testing

ƒ JUnit tests

(22)

Thank you

Questions

Questions

&

&

Comments

Comments

References

Related documents

Vacon produces high performance quality inverters, drives and power converter solutions for wind energy applications. Our comprehensive offering is easily tailored to suit your

This clearly reveals that the growth in the dematerialization process was not keeping pace with the growth in the total turn over of shares in the Indian capital

and normative relations with the United States and leery of Soviet ambitions, China sought to carve out a space for itself in the international sphere at the Geneva Conference of

We create tailored solutions to meet your needs; driving down costs, improving the day to day management of cash and maximizing cash availability for your customers.. We have

The Peer Outreach Worker is responsible for the support of individuals living with mental illness to improve the quality of their lives through the provision of community-based,

It is based on three steps: a splitting step which splits events in order to allow the incremental and local resolution of non-determinism, a mapping step which introduces

• Procurement; The procurement activity refers to the function of purchasing items that are used in the organization’s value chain.. to spread throughout the organization,

The paper first explained the research background and significance, summarized the related research at home and abroad, put forward the research target, contents, idea and