From jbosstools-commits at lists.jboss.org Wed Feb 17 13:48:36 2010
Content-Type: multipart/mixed; boundary="===============1868609490722839260=="
MIME-Version: 1.0
From: jbosstools-commits at lists.jboss.org
To: jbosstools-commits at lists.jboss.org
Subject: [jbosstools-commits] JBoss Tools SVN: r20328 -
trunk/as/docs/reference/en.
Date: Wed, 17 Feb 2010 13:48:36 -0500
Message-ID: <201002171848.o1HIma2S006395@svn01.web.mwc.hst.phx2.redhat.com>
--===============1868609490722839260==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ochikvina
Date: 2010-02-17 13:48:36 -0500 (Wed, 17 Feb 2010)
New Revision: 20328
Modified:
trunk/as/docs/reference/en/master.xml
trunk/as/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1104 - Updated versions,correcte=
d master_output file
Modified: trunk/as/docs/reference/en/master.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/as/docs/reference/en/master.xml 2010-02-17 18:47:13 UTC (rev 2032=
7)
+++ trunk/as/docs/reference/en/master.xml 2010-02-17 18:48:36 UTC (rev 2032=
8)
@@ -45,14 +45,14 @@
SvetlanaMukhinasmukhina(a)exadel.com =
=
- 2007
- 2008
- 2009
+ 2007
+ 2008
+ 20092010JBoss by Red Hat
- Version: 2.1.0.CR1
+ Version: 2.1.0.CR2
Modified: trunk/as/docs/reference/en/master_output.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/as/docs/reference/en/master_output.xml 2010-02-17 18:47:13 UTC (r=
ev 20327)
+++ trunk/as/docs/reference/en/master_output.xml 2010-02-17 18:48:36 UTC (r=
ev 20328)
@@ -22,2329 +22,2336 @@
=
=
=
-]>
- =
-
- JBoss Server Manager Reference Guide
-
-
-
-
- =
-
-
- =
- =
-
- =
- AnatolyFedosik
- OlgaChikvina=
- RobStrykerrob.stryker(a)jboss.com
- SvetlanaMukhinasmukhina(a)exadel.com =
- =
- April 2008
-
- 2007
- 2009
- JBoss by Red Hat
-
-
- Version: 2.1.0.CR1
-
-
-
-
- PDF version
-
-
-
-
- =
- =
- =
- =
-
- Quick Start with JBoss Server
-
- This chapter covers the basics of working with the JBoss Server.
- =
-
- Key Features of JBoss Server
- For a start, we propose you to look through the table of main fe=
atures of JBoss Server:
- =
-
- =
- Key Functionality fo=
r JBoss AS and Archive Tools
-
- =
-
-
-
- =
-
-
- Feature
- Benefit
- Chapter
-
-
-
-
- JBoss AS plugin
- Using WTP, JBoss AS plugin allows working with th=
e server in run or debug mode. You can easily install runtimes and servers,=
copy the existing runtime configuration or configure it up to your needs.<=
/para>
-
- runtimes and servers
-
-
- =
-
- JBoss AS Perspective
- It makes managing installed JBoss Server quite ea=
sy and includes the standard Console and Properties views, and specially a=
dded Project archives View and JBoss Server View for that purpose. <=
/entry>
-
- JBoss AS perspective
-
-
- =
-
- Modules Deployment
- A number of ways, provided by WTP and JBoss Tools=
, to deploy either a project or a single file on the server.
-
- deploying modules
-
-
- =
-
- TPTP Support
- Test and Performance Tools Platform (TPTP) profi=
ling.
-
- TPTP support
-
-
- =
-
- =
-
-
- =
- If you
- already have installed JBoss server and runtime you can quickly learn =
how to configure, start,
- stop the server, to know deployment and archiving processes. How to in=
stall runtimes and servers
- read in the Runtim=
es and Servers in the JBoss AS plugin
- chapter.
- =
- To start working with JBoss AS, select a JBoss AS Perspective via
- Window > Open Perspective > Other > JBo=
ss
- AS.
-
-
-
- Starting JBoss Server
-
- Starting JBoss Server is =
quite simple. You can control the server
- behaviour with the help of a special toolbar in the JBoss Server View
- where you could
- start
- it in a regular or debug mode,
- stop
- it or
- restart
- it and
- publish
- to the server.
-
-
- JBoss Server Toolbar
-
-
-
-
-
-
-
- To launch the server click the green-with-white-arrow icon on th=
e JBoss Server
- View or right click server name in this view and select=
- Start. If this =
view is not open, select
- Window > Show View >=
Other > Server >
- JBoss Server View.
-
-
- Start JBoss Server
-
-
-
-
-
-
-
-
-
-
- Stopping JBoss Server
-
- To stop the server, click the
- Stop
- icon in the JBoss Server Vie=
w or right click the server name
- and press Stop.
-
-
- Stop JBoss Server
-
-
-
-
-
-
-
- When the server is stopped you will see
- Stopped
- state next to its name in the square brackets.
- Learn more about the JBoss Server Vi=
ew
- here.
-
-
-
-
- Project Archiving
-
- JBoss Tools comes with ou=
r own archives tool. The Project Archives
- plugin consists primarily of a view to set up each packaging configu=
ration (
- Window > Show View > Other >=
; JBoss Tools > Project archives).
-
- Right clicking in the Project archiv=
es view you can create War,
- EJB War, EAR or JAR archive.
-
-
- Archive Creating
-
-
-
-
-
-
-
- Using the context menu on the item you can initiate a =
full build on
- archive, edit, delete or
- publish =
it.
-
-
- Context Menu on the Item
-
-
-
-
-
-
- =
- If you wish, you can assign a hotkey for the Build Project Archiv=
e action. A key binding can be added =
- by navigating to
- Window > Preferences > General >=
Keys.
- =
-
- Setting the Hotkey for Build Project Archive Action
-
-
- <=
/imagedata>
-
-
-
- =
- To perform the building of the project archives, select the proje=
ct in the Package Explorer view and =
execute the hotkey combination =
- you assigned for this action.
- =
- Learn more about the Project Archives=
View
- here.
-
- =
-
- Deploying an Application to a Server
-
- There are two times to deploy your application:
-
-
- While creating it
-
-
- After it already exists
-
-
-
- When you create a new project (Seam, JSF or Struts) with the New=
Project or Import Project
- wizards, the one of wizards steps has a
- Target Runtime
- and
- Target Server
- sections. You can deploy the application through the app=
ropriate selection in
- these sections.
-
-
- Runtime and Server Sections in the New Project Wizard
-
-
-
-
-
-
-
-
- Runtime and Server Sections in the Import Project Wizard
-
-
-
-
-
-
-
- You can deploy an existing application to a server by right-clic=
king the target defined
- server in the JBoss Servers View and then selecting Add and
- Remove Projects from the context menu.
-
-
- Add and Remove Projects From the Context Menu.
-
-
-
-
-
-
-
- If this application is not assigned to a server, it will be in t=
he left-hand available
- projects list. Clicking on the Add ><=
/property> button will add it to the right-hand
- configured projects list and deploy the application to this server.<=
/para>
-
-
- Modifying The Projects that are Configured on the Server
-
-
-
-
-
-
-
- =
-
- P=
ublishing to JBoss Server
- Th=
e publishing of all the modules added to a Server is performed automaticall=
y when starting a Server.
- Th=
e automatic publish of the changes made to the workspace is turned on by de=
fault in order to permanently keep =
- the workspace in sync with the publish folder. If you need to control w=
hen to publish the changes, =
- just disable the automatic publish in the Server Editor and use the
- Publish to Server ( =
-
-
-
- ) button w=
hich initiates an incremental publish.
-
- =
- He=
re, we have just performed the basic steps you should know to quick start w=
ith JBoss
- server. In fact, there are more functionalities which you can make use =
of. Further we will
- talk about them in detail.
-
-
-
- Other relevant resources on the topic
-
- All JBoss Developer Studio/JBoss Tools documentation you can fin=
d on JBoss Tools releas=
e documentation page.
- The latest documentation builds are available JBoss Tools nightly builds=
documentation page.
-
- Find out the answers on the frequently asked questions about JBos=
s AS 5 usage in the =
- JBoss5FAQ=
.
-
- =
- The information on how to monitor a remote JBoss Server from Ecli=
pse you can find in the following
- wiki article.
-
-
-
-
- =
-
-
-
-
- JBoss Developer Studio
- Eclipse
- Deploy
- Deployment
- JBoss
-
-
- Runtimes and Servers in the JBoss AS plugin
-
- In this chapter we will discuss how to install runtimes and server=
s.
-
- First of all it's necessary to mention that the JBoss AS plugin ma=
kes use of WTP.
- This includes starting and stopping servers in run or debug mode. It a=
lso includes targeting WTP
- projects, such as Dynamic Web Projects, to certain server runtimes in =
order to ensure that the
- proper jars from a specific server are added to the project's classpath
- properly.
- In order to get started creating, running, and debugging J2EE appl=
ications, we should create
- our runtime and server instances.
-
-
- Runtimes
- In JBoss Tools, the main =
purpose of Server Runtimes is to point to a
- server installation somewhere on disk. In our case, this will be a J=
Boss installation, and it
- can then be used for two primary purposes:
-
-
- it provides classpath additions to WTP projects that require=
them.
-
-
- for JBoss server at l=
east, it provides information necessary for
- the starting and stopping of the server, it tells which jars to =
run and which
- configuration to use.
-
-
-
-
- Installing a New Runtime
- You can install runtimes into eclipse from the
- Window > Preferences
- menu, and then select
- Server > Runtime Environments
- from the categories available on the left.
-
- Installed Runtimes
-
-
-
-
-
-
- From this preference page you can see all declared runtimes an=
d their types as well.
- Here, it's possible to edit or remove existing runtimes as well as=
add a new
- one.
-
- To create a JBoss runtime click
- Add
- button and choose a necessary type of runtime from the=
- JBoss Community
- category.
-
-
- Adding a Runtime
-
-
-
-
-
-
-
-
- Note:
-
- Now there is a separation between .org servers (the
- JBoss Community
- category) and product server that comes with JBoss E=
AP in JBDS ( the
- JBoss Enterprise Middleware
- category).
-
-
- As you can see, JBoss Tools provide its own adapters such as JBoss
- 3.2, 4.0, 4.2 and 5.0 as well. The last one comes with its own new=
feature, that is a safer
- incremental deployment, which prevents partial deployments to be p=
icked up by the server. It
- means that scanning for auto-deployment is suspended while files a=
re being copied to the
- deployment location and resumed when the copy is completed.
-
-
- Note:
- Currently we recommend you to use a fully supported JBoss 4.=
2 server adapter.
-
-
- You'll also note a Deploy-Only Runtime type. This type provide=
s no classpath
- for WTP projects. It is used solely by its server type for the pur=
pose of setting up a
- deploy directory for users who don't wish to make use of starting,=
stopping, or
- debugging their projects inside eclipse.
-
-
- Adding a JBoss 4.2 Runtime
-
-
-
-
-
-
-
- The following table describes all the available options of the=
currant wizard
- page.
-
- Server Runtime Wizard Parameters
-
-
-
-
-
-
-
- Name
-
-
-
- Description
-
-
-
-
-
-
-
- Name
-
-
- The name of a new Runtime for a chosen server. We su=
ggest that you
- don't leave a default value. It's better to give descrip=
tive
- names that will help to distinguish one runtime from ano=
ther.
-
-
-
-
-
- Home directory
-
-
- The path to a directory where the runtime is install=
ed.
-
-
-
-
-
- JRE
-
-
- The proper Java Runtime Environment. Because of the =
open-source nature of
- JBoss, a user is likely to want to modify and repackage =
some of the
- configuration-specific jboss jars and create their own c=
onfiguration. Thus, rather
- than forcing you to copy his entire JBoss installation, =
the structure of the
- wizard allows to create only a new configuration instead=
.
-
-
- =
-
-
- Directory
-
-
- The path to a directory where the configurations are=
installed.
-
-
-
-
- Configuration
-
-
- The list of configurations (all, default, minimal) t=
hat is updated as soon as
- you browse to a valid runtime installation folder.
-
-
-
-
-
-
-
- As a result of having each runtime represent a specific config=
uration rather than the
- server installation as a whole, it is very likely you'll create se=
veral different
- runtimes to test each of your configurations. It becomes important=
to ensure your runtimes,
- and later your servers, are given descriptive names that help you =
to remember which is
- which.
-
- Press
- Finish
- to see your new runtime in the list.
-
- Note:
- If you edit the configuration of a runtime, the changes don=
't affect the settings of the servers that currently use the runtime.
- To apply the changes to them also,you should double right click =
the server,
- Overview>Runtime Environment
- ,make sure that necessary configuration is chosen,click Finish and then Save button.
-
-
-
- Copying the existing runtime configuration
- While installing a new runtime you can copy the configuration =
from the existing one.
- To do this you should perform all the steps in the previous section except pressing
- Finish
- in the New Server Runtime Environment menu .
-
- Make sure that you browse to a valid runtime folder and can se=
e the list of configurations (all, default, minimal) in the Configuration s=
ection .
- Then choose necessary Configuration from the list and click
- Copy.The next =
dialog should appear.
-
-
- Copy the existing configuration
-
-
-
-
-
-
- Change the name Click on
- Browse and selec=
t your configuration location or leave as it's if you want it to be locate=
d together with other runtime configurations.
-
-
- Copy the existing configuration
-
-
-
-
-
- =
- =
- Click
- Ok and you should=
see the next wizard with the just added copied configuration.
- =
-
-
- Runtime with copied configuration
-
-
-
-
-
- =
- Press
- Finish
- and you will see your new runtime in the list.
-
- You can also change a configuration of existing runtime to a cop=
ied one in the same way from the
- Window > Preferences
- menu
- Server > Runtime Environments
- and clicking
- Edit.
-
-
-
-
- Servers
- WTP servers are eclipse-representations of a backing server inst=
allation. They are used to
- start or stop servers, deploy to servers, or debug code that will ru=
n on the server. They keep
- track of the modules (jars, wars, etc) you deploy to the server and =
also allow you to undeploy
- those modules (see Deploying =
with Run On Server
- Wizard section).
- Servers can be started or stopped with different command-line
- arguments. They are often backed by a runtime object repres=
enting that server's
- location.
-
-
- Creating a New Server
-
- There are many ways to get to the new server wizard. One way i=
s to use the old standard
- File > New > Other...
- and then
- Server
- . This should show the wizard like below.
-
- Adding a JBoss Server
-
-
-
-
-
-
- A server object is that keeps track of things like command lin=
e arguments when starting
- or stopping, and runtimes keep track of the location of the instal=
lation. Thus, each server
- instance must be backed by an appropriate runtime.
-
- New server wizard allows to name the server appropriately in the Server name field or you=
can use a generated default name.If it's nessecary to restore the default =
name,after you defined yours, click the Reset default button(
-
- ).
- From the list of already declared runtimes in the combo box below =
the view it's
- possible to select which runtime you want your server to be backed=
by. If there is no
- runtime that matches your needs just press the
- Add...
- link nearby to bring up the wizard for creating a new =
runtime (see the Installing a New Runt=
ime section). To configure the already installed
- runtimes you should go to server preferences that you can easily d=
o by pressing the
- Configure runtime environments... link.
-
- If the server you want to create doesn't have any installed ru=
ntime yet, the combo box
- and the links are absent.
-
-
- Installed Server Runtime Environments
-
-
-
-
-
-
-
- In this case the next page in the wizard which has the same fo=
rm as in the previous section w=
ill ask you to create the
- associated runtime.
- Either way, after targeting your server to a runtime, the fina=
l screen in this wizard is
- largely confirmational, giving you a chance to verify that you've =
selected the
- appropriate runtime.
-
-
- Installed Server Runtime Environments
-
-
-
-
-
-
-
- Press
- Finish
- to complete the process of the server creation.
- Now that we've created our runtimes and servers, we can dwell =
on all services
- and tools that JBoss Server Manager provides.
- =
- We hope, this guide helped you to get started with the JBoss T=
ools server manager. Besides, for additional information you are welcome on=
JBoss forum.
-
-
- =
-
-
-
- =
-
-
-
-
- JBoss Developer Studio
- Eclipse
- Deploy
- Deployment
- JBoss
-
-
-
- JBoss AS Perspective
-
- This chapter tells how to manage installed JBoss Server via
- JBoss AS perspective.=
para>
-
- The JBoss AS perspective =
is similar to the Java
- perspective, but it contains a few additional views=
. Two of the additional
- views are standard views, specifically the Console view and the
- Properties view. The ot=
her two views that are added are the
- Project archives view a=
nd the JBoss Server
- View.
-
-
-
- The JBoss Server View
-
- The JBoss Server View=
is built on Common Navigator Framework
- allowing extensions and is using label decorators what makes t=
he UI enough compact
- without loosing the vital information.
-
- Let's have a look at the JBoss S=
erver View and inspect
- in detail all parts it consists of.
-
- The JBoss Server View
-
-
-
-
-
-
-
-
- JBoss Server View Toolbar
- In the right top corner of the JBoss Server View there is a
- special toolbar which provides a quick access to starting =
a server (in the debug
- mode, run mode, or profile mode), restarting a server, sto=
pping a server and a
- possibility to publish to a server.
-
-
- The JBoss Server View Toolbar
-
-
-
-
-
-
-
- In order to debug your applications or EJB's that are de=
ployed to the server, you
- must start the server in debug mode. By starting the serve=
r in debug mode, eclipse
- will allow you to set breakpoints on code in your workspac=
e and step through the
- code.
-
-
- Start the server in profil=
ing mode
- button allows to enable profiling actions for =
your application. For more
- details on how to start using TPTP profiling with JBoss Tools
- refer to TPTP Support chapter.
-
-
- Publish to the server
- button will republish any modules where it has=
determined the workspace
- is out of sync with the server. It will attempt to do an i=
ncremental publish if it
- turns out that the module in question is capable of doing =
one.
-
-
-
-
- JBoss Server View Structure
- The JBoss Server View displays all declared servers as well
- as their current states (that is whether they are started =
or stopped) and statuses
- in the square brackets next to a server name.
-
-
- The JBoss Server View
-
-
-
-
-
-
-
- The following table lists possible server statuses.
-
-
- Server Publish Status
-
- <=
/colspec>
-
-
-
-
-
- Status
-
- Description
-
-
-
-
-
-
- Republish
-
-
-
- The status which allows you to see i=
f changes are
- awaiting
-
-
-
-
- Publishing...
-
-
-
- The status which shows if changes ar=
e being updated
-
-
-
-
- Synchronized
-
-
-
- The status which allows you to see i=
f changes are
- in-sync
-
-
-
-
-
-
- You can control a server behavior as well as adjust some=
server preferences with
- the help of the context menu commands.
-
-
- Context Menu Commands
-
-
-
-
-
-
-
- All available context menu commands are described in the=
following table.
-
- Server Properties through the Context Menu
-
- <=
/colspec>
-
-
-
-
-
- Name
-
-
-
- Description
-
-
-
-
-
-
-
- New Server
-
-
- The option allows to define a new se=
rver
-
-
-
-
-
- Open
-
-
- The option opens the Server editor=
para>
-
-
-
-
-
- Show in
-
-
- This option gives an easy access to =
the next views: Console,
- Debug view, Server Log or MBean Explor=
er
-
-
-
-
-
- Delete
-
-
- Standard option that allows to delet=
e the chosen server
-
-
-
-
-
- Start
-
-
- The action for stating a server in a=
run mode
-
-
-
-
-
- Debug
-
-
- The action for stating a server in a=
debug mode
-
-
-
-
-
- Stop
-
-
- The action for stopping a declared s=
erver
-
-
-
-
-
- Publish
-
-
- The action for synchronizing the pub=
lish information between
- the server and workspace
-
-
-
-
-
- Explore
-
-
- This action uses the native OS file =
explorer to browse the
- deploy destination. Note: The option i=
s also available for
- deployed resources/projects (see the f=
igure below).
-
-
-
-
-
- Add and Remove Projects
-
-
- The option allows to publish a new p=
roject to the server (if
- its type is supported)
-
-
-
-
-
- Monitoring
-
-
- Possibility to add ports to be monit=
ored on the current
- server
-
-
-
-
-
- Properties
-
-
- Opens the window to adjust the curre=
nt server
- preferences
-
-
-
-
-
-
-
- Under the server element in the JBoss Server View, you can
- see currently deployed to the server modules and some serv=
er extensions which
- provide the additional information on the server.
-
- The context menu for any module allows you to remove it =
from the server, force a
- full or incremental republish upon it.
-
-
- Modules Action
-
-
-
-
-
-
-
-
- Filesets
-
- The
- Filesets
- category in the JBoss Server View is intended
- for files filtering.
-
- To add a new file filter, right-click the
- Filesets
- category and select
- Create File Filter.
- The New File
- Filter wizard should appear.
-
-
- Creating a New File Filter
-
-
-
-
-
-
-
- The wizard asks you to enter the filter name and add=
includes and excludes
- patterns. The preview box underneath gives a list of f=
iles matched to the
- defined patterns (see the figures bellow).
- In order to set up a default fileset relative to the co=
ncrete configuration of the server runtime, use the following variable: =
- ${jboss_config}, i. e. =
you should type in the
- Root Directory something like server/${jboss_config}/.
- This is implemented in order you can modify the runtime's co=
nfiguration and not have to manually update paths.
-
- New File Filter Wizard
-
-
- =
-
-
-
- =
- Notice, that the
- Browse but=
ton still returns an absolute path:
- =
-
- New File Filter Wizard
-
-
- =
imagedata>
-
-
-
- =
- After the filter is created, you can observe it by e=
xpanding the
- Filesets
- category in the JBoss Server View.
-
- It's possible now to edit files directly from the
- Filesets
- category. Double clicking on a file from <=
emphasis>
- Filesets
- opens up the editor automatically or you c=
an use the
- Edit File
- context menu command.
-
-
- Direct Editing from the Filesets
-
-
-
-
-
-
-
- To delete a file filter (or just a file) from the
- Filesets,=
emphasis> right-click a file filter (or the
- unnecessary file) and select the
- Delete File Filter
-
- (Delete File) command.
-
-
- Deleting the File from the Filesets
-
-
-
-
-
-
- If you want to set filesets for some server types, y=
ou should open =
- Window>Prefer=
ences =
- and then select Server > Default Filesets =
- from the categories available on the left.
- =
-
- Deleting the File from the Filesets
-
-
-
-
-
-
- On this preference page you can add a fileset =
- to any server type or to all servers at once.To do thi=
s you should select the server type in the combo box and click
Add fileset...
button. =
- In the opened New File
- Filter wizard follow the steps describe=
d before and finally click Apply button on the pref=
erence page.
- The defined file filter will be automaticall=
y added to new servers during creation.
- =
- =
-
-
-
- XML Configuration
- The
- XML Configuration
- category allows you to quickly browse to d=
escriptor files in your
- server's deploy directory and check or change the valu=
es. Basically,
- XML Configuration
- includes XML XPaths where an xpath is a pa=
th used to access some
- specific part of an xml document.
-
-
- Note:
- You are assumed to be familiar with XPath. If no=
t, we highly suggested
- that you look through an appropriate manual or tut=
orial on the topic.
-
-
- The
- XML Configuration
- category itself contains only a list of ca=
tegories.
- Ports
- are provided by default and is filled with=
many of the most commonly
- used ports in the JBoss Se=
rver.
-
-
- XML Configuration
-
-
-
-
-
-
-
-
-
-
- By right-clicking on
- XML Configuration, you can create a new
- category. Besides, context menu for
- XML Configuration
- category makes possible to disable it. You=
can disable any category
- in the bottom part of the
- JBoss Server View. Look for them in the
- Inactive Categories
- afterwards to re-enable.
-
-
- Adding New Category
-
-
-
-
-
-
-
- By right-clicking on
- Ports
- or any other category in
- XML Configuration
- , you can create a new xpath.
-
-
- Adding New XPath
-
-
-
-
-
-
-
- After that, the dialog shown below will appear.
-
-
- Adding New XPath
-
-
-
-
-
-
-
- The goal here is to get an end result where the XPat=
h matches up with a
- necessary property. With that in mind, let's look how =
it works. If the
- property you want to reach is the value of the name
- attribute in the element <mbean>, t=
hen your
- XPath Patten
- should end with mbean =
and your
- Attribute Name
- should be name like o=
n the next figure.
-
-
-...
-
- =
-
-
-
- The EJBDeployer responsible for ejb jar deployment =
- ...
-
-
-
-]]>
-
-
- XPath Preview
-
-
-
-
-
-
-
-
- Tip:
- Notice, when you type the fields autocomplete to=
help you locate exactly
- what xpath you're looking for.
-
-
- Then, on the other hand, if your desired field is th=
e text of an element
- <description>, your
- XPath Patten
- should end with description and
- Attribute Name
- field should be left blank. When finished,=
click
- Preview
- to see how many matches you have for that =
particular XPath.
-
-
- XPath Preview
-
-
-
-
-
-
-
-
-
-
-
- Drag-n-Drop to JBoss Server View
-
- Starting from 2.0.0.CR2 version of JBoss AS Tools the
- JBoss Server View supports drag-n-drop of deployable and
- runnable projects/resources.
-
-
- Dragging to the JBoss Server View
-
-
-
-
-
-
-
- With drag-n-drop the following actions can be performed:=
-
-
-
- dragging a project to a server will deploy it to=
the server and run it by
- showing the main page in a browser
-
-
-
- dragging an
- .xhtml
- file from
- WebContent
- will do the same and show the correspo=
nding page in a
- browser
-
-
-
- dragging a deployable resource (i.e. a datasourc=
e (
- -ds.xml
- ) file that has been made deployable) w=
ill simply deploy that
- resource directly to the server
-
-
-
- In short, the feature does the same thing as if you used=
the
- Run On Server
- option or
- Add and Remove Projects
- option in the context menu of the server.
-
-
-
- Server Log View
-
- You can monitor the current server behavior with the hel=
p of the Server
- Log. To open a server in the Server Log view you
- should right-click on the server and follow to
- Open in > Server Log.
-
- The
- Server Log
- shows relevant information to your server's st=
artup, shutdown,
- and publish processes. This allows you to keep an eye on w=
hat's going on
- (such as automatic incremental deployment if you have it e=
nabled).
-
-
- Event Log Actions
-
-
-
-
-
-
-
- The Server Log to=
olbar contains several icons that perform
- the following actions:
-
-
- Server Log Toolbar Icons
-
- <=
/colspec>
-
-
-
-
-
- Name
-
-
-
- Description
-
-
-
-
-
-
-
- Export Log
-
-
- Possibility to export the log into a=
text file
-
-
-
-
-
- Clear Log Viewer
-
-
- The option clears the current server=
log
-
-
-
-
-
- Delete Log
-
-
- Click to delete the server log
-
-
-
-
-
- Open Log
-
-
- Click to open the server log text fi=
le
-
-
-
-
-
- Restore Log
-
-
- Click to restore the server log
-
-
-
-
-
-
-
-
-
-
- Server Editor
- By double-clicking on any server, an editor window will =
appear allowing you to
- edit parts of that server.
-
-
- Preferences Page for the Chosen Server
-
-
-
-
-
-
-
-
- Tip:
- On the figure you can see that a username/password i=
s available in the UI when
- configuring the server. If you get a SecurityException=
when trying to launch the
- server, it is most likely because your server is prote=
cted and hence you need to
- fill the username/password fields with appropriate val=
ues.
-
- =
- Under the
- Publishing section it' possible to disable/=
inable the automatic publishing of the changes in the workspace.
- =
- It should be pointed out that our server adapter by defa=
ult tries to automatically
- detect the ports it needs for integrating with a JBoss Server.
- Sometimes it can though be relevant to override this autom=
atic detection if you are
- using some custom configuration. For this purposes the
- Server Ports
- section in the Ser=
ver editor is provided where the
- port settings are configurable. Click the
- Configure...
- link to bring up the wizard for adjusting the =
settings for the
- ports.
-
-
- Server Ports Preferences
-
-
-
-
-
-
-
- Press
- Edit XPath
- button for the chosen port to configure its XP=
ath's values.
-
-
- XPath Pattern for a Server Port
-
-
-
-
-
-
-
- In the Server editor you are able to edit the timeouts and the server pollers to use.
- =
-
- Note:
- By default, the Startup poller is set to JMX Pol=
ler (see the
- Server Polling<=
/emphasis> section). If you change the Startup poller
- to Timeout Poller (it may need in case, for example, you'r=
e using the minimal configuration for your server), this will do no polling=
at all and will only set the server
- state to
- "Started" after your startup timeout is reached.
-
-
- Server e=
ditor makes it also possible to
- modify the server's launch configuration. It's just after =
clicking
- Open launch configuration<=
/property>
- link. In the open window there are the tabs fo=
r setting command line
- arguments, classpaths and other things that are relevant t=
o launching the
- server.
-
-
- Launch Configuration Properties
-
-
-
-
-
-
-
- Look up AS Installation Guide =
to find parameters which can be specified for J=
Boss
- Server.
-
-
- Note:
- Please note, that the Launch Configurations for JBos=
s Servers are enough
- strict in enforcing the configured values in the serve=
r in order to avoid
- inconsistencies between server's and their configured =
runtime.
-
- For example, if you change the launch configuration =
program arguments to
- "-c myConfig" but do not chan=
ge the
- targeted runtime configuration, then your program argu=
ments will be ignored. The
- server runtime "wins" so to speak. This ensures consis=
tency
- and if you change the location of the runtime, your la=
unch configurations will
- automatically pick that up.
-
- Values are not controlled by the server and its runt=
ime setup will be passed
- on unaltered.
-
-
- Until 3.0.0.GA release of JB=
oss Tools, the servers classpath
- was readonly, but that caused problems for users wanting t=
o add their own jars in
- the startup classpath. That is relevant if you need to pat=
ch the server, add a
- custom charset or other tweaks that require early access t=
o the classpath.
-
- Now all servers have a custom 'server runtime classpath
- container', which is there by default and point to the def=
ault jars in
- JBoss. You can now adjust the classpath. Then just make su=
re this container is there
- if you want the classpath to be picked up.
-
-
- Server Classpaths
-
-
-
-
-
-
-
- If for some reason you have a launch configuration witho=
ut this container,
- Restore Default Entries
- should add it properly. Also,
- Restore Default Entries
- will also remove any extra entries you added y=
ourself.
-
-
-
- Relevant Resources Links
- Find more about XPath in the XPath
- Documentation.
-
-
-
-
- Project Archives View
- Every application, whether Plain Old Java, J2EE, or some oth=
er language altogether,
- needs to be packaged in some way. In Java-related projects, ma=
ny people use ANT.
-
- Note:
- Those who use ANT will appreciate how the Project Archiv=
es Ant task is now
- improved: it supports variables and gives more informative=
error/logging messages
- when something goes wrong.
-
-
- But JBoss Tools come =
with our own Archives tool with a bit easier
- and less-verbose XML and a handy user interface. The Project A=
rchives plugin consists
- primarily of a view, that is Proje=
ct Archives view, to set up each
- packaging configuration.
- So far, let's look through all functionality that the Project
- Archives view provides.
-
-
- Overview
-
- The packaging configuration for each project is stored i=
n the project's root
- folder, and is in a file named
- .packages
- , which has a fairly simple XML structure. Modi=
fying the file by hand is
- neither required nor recommended, and using the UI is the =
official way of modifying
- your packaging structure.
-
-
- Archives View
-
-
-
-
-
-
-
- A project's configuration contains archives. As you can =
see on the image
- above a project can contain more than one archive. Interna=
l archives and filesets
- can be directly inside of an archive, or in some sub-folde=
r of that archive.
-
- In the upper right corner of the view you can see an ico=
n which, when clicked,
- will build the selected top-level archive. Additionally, y=
ou can select
- Project > Build Package=
s
- when a project is selected in the Packages View to
- build all declared packages in that project's
- .packages
- file. This will execute a full build on all de=
clared archives.
-
-
-
- Creating an Archive
-
- When you open the Project ar=
chives view for the first time,
- it asks you to select the project for what you want to cre=
ate an archive.
-
-
- Archives View
-
-
-
-
-
-
-
- When creating a new archive for selected project, you ha=
ve some different options
- at your disposal. You need right-click inside the view and=
select
- New Archive
- to see your archive type options.
-
-
- Create an Archive
-
-
-
-
-
-
-
-
- Note:
- If you see only JAR from the list of available archi=
ve types, you should
- verify whether AS Tools plugins/features are in place.=
EAR, EJB JAR and WAR
- options are contributed by the AS Tools independently =
from webtools and the
- virtual project model. Thus, without them only JAR wil=
l show up.
-
-
- JAR is the standa=
rd archive type, and does very little
- configuration, leaving most of the work up to you. You can=
customize the name, add
- folders, filesets, and inner jars to it.
-
- The other types, for the most part, simply start off wit=
h a default setting,
- usually the jar with some specific children based on an ex=
pected structure of the
- project. For example, if the project is a Dynamic Web Proj=
ect, and you create a
- WAR archive, th=
e archive will be created with a few
- filesets relevant to the known structure of the project.=
para>
-
- Here is the first page of all New archive wizards. It is=
the same for any archive
- type and the only page in the =
New Jar wizard.
-
- New WAR Wizard
-
-
-
-
-
-
-
- The page is pretty simple. First it asks to set the name=
of your new archive and a
- destination.
-
- The destination of an archive can be anywhere on the fil=
e system, anywhere in the
- workspace, inside some other archive, or inside a folder d=
eclared inside an archive.
- Select the necessary checkbox (either
- workspace
- or
- file system
- ) for marking the destination as related to eit=
her workspace or file
- system. You can browse to workspace or filesystem destinat=
ions by clicking on their
- respective buttons. To select a destination inside some ot=
her archive, you'll need
- to press the
- Workspace
- button. At the bottom of the list, you'll see =
archives that
- have been declared in the workspace.
-
-
- Selecting the destination in the workspace
-
-
-
-
-
-
-
- Also in the wizard for creating a new archive you can ch=
oose whether an archive to
- be compressed or exploded into a folder (without compressi=
on). You need just select
- proper chechbox in the
- Archive type
- section.
- If a build or incremental update fails Project Archives =
will show an error
- dialog:
-
- Selecting the destination in the workspace
-
-
-
-
-
-
- Click in
- Details
- to see detailed information about what caused =
the error.
-
- In the Package Explorer you can observe the created
- archive.
-
- The Archive in the Package Explorer
-
-
-
-
-
-
-
- If you use the exploded type of archiving, instead of a =
single file archive the
- result put into a folder is displayed in the Package
- Explorer.
-
- The Exploded Archive in the Package Explorer
-
-
-
-
-
-
-
-
- Creating a Folder
- Creating a folder is much easier. You simply right-c=
lick on an archive or
- folder you want your new folder to be a child under. T=
he only piece of required
- information is naming the file.
-
-
- Creating a FileSet
- To create a new fileset, you click on an available t=
arget location such as an
- archive, a nested archive, or a folder within an archi=
ve, and select
- New Fileset=
.
- The New Fileset wizard=
property> requires a destination (where the
- files will go), and a root directory (or where the fil=
es are coming from). The
- source can be anywhere in the workspace or from the fi=
lesystem at large.
-
-
- Adding a New FileSet
-
-
-
-
-
-
-
- Below that, the fileset requires only an includes pa=
ttern and an excludes
- pattern. As you type in either of these fields, the pr=
eview viewer should update
- itself with which files are matched.
-
- You can create a Fileset with flattening or without =
it. Look at the difference
- on the figure below.
-
-
- The FileSet with flattening and without it
-
-
-
-
-
-
-
-
- =
-
- Creating User Library FileSet
- =
- If you use user libraries in your projects you can also refer t=
o these from project archives and have all the .jar/.zip files they refer i=
ncluded into the archive.
- To add a new user libraries file set, call the right-click menu=
on the necessary archive and choose " New User Libraries FileSet" item
- =
-
- Adding New User Library Fileset
-
-
-
-
-
-
- =
- You can edit the existing user libraries as well using "User Li=
braries Fileset Wizard". Call the right-click menu on the library fileset a=
nd choose "Edit Fileset " item
- =
-
- Editing User Library Fileset
-
-
-
-
-
-
- =
-
- =
-
-
-
- Archive Actions
-
- Context Menu on the Item
-
-
-
-
-
-
- The context menu on the items in the view is extendable,=
but there are several
- that come standard.
-
-
- Context Menu on the Item
-
- <=
/colspec>
-
-
-
-
-
-
- Name
-
-
-
- Description
-
-
-
-
-
-
-
-
- Build Archive (Full)
-
-
-
- The action enabled only on top-level=
archives, which initiates
- a full build on that archive
-
-
-
-
-
- Edit Archive
-
-
-
- Standard action that brings up the w=
izard associated with that
- particular node type and allows the de=
tails to be changed
-
-
-
-
-
- Delete Archive
-
-
-
- Deleting node is standard action wit=
h deletion not needing an
- explanation
-
-
-
-
-
- Publish To Server
-
-
-
- The action means the ability to publ=
ish to a declared
- server
-
-
-
-
-
- Edit publish settings
-
-
-
- Gives possibility to edit an archive=
publish settings
-
-
-
-
-
-
-
-
-
- Publishing to Server
- Finally, you'll need to publish your application to a se=
rver. Here, we
- show you how to do it with the help of
- Archives View. =
-
-
- Context Menu on the Item
-
-
-
-
-
-
- The dialog above appears after selecting
- Publish To Server. To simply publish once, you
- just select the server(s) that you want, and finish. If yo=
u want the
- Publish to Server
- action on that particular Archive to publish a=
lways to that set of
- servers, then check the appropriate checkbox. And finally,=
to enable automatic
- publishing upon build events, check the last checkbox.
- The automatic publishing feature is nice if, for example=
, your package's
- destination (where it is built) is a temporary folder and =
you want the archive
- published to several servers. If you only really want your=
archive published to one
- server, it might be easier to have the archive's destinati=
on folder be the deploy
- folder of the server.
-
-
- Relevant Resources Links
- Refer to Ant manual
- to find more on how to build your applications with help o=
f Ant.
-
- We also recommend you to watch the movie wh=
ich demonstrates a powerful archiving functionality in
- JBoss Tools.
-
- At this point, you are guessed to be familiar with JBoss AS
- perspective and your next step now is to ex=
plore how to work with
- different kinds of projects.
-
-
-
-
-
-
-
- =
-
- Projects
- The most popular of the projects we deal with are the J2EE ones, su=
ch as Dynamic Web
- Project, EJB Project, or EAR project. Web projects of JBoss Tools are
- Struts, JSF and Seam projects. All of them are called faceted projects. =
Thus, in this
- chapter we are going to tell you about facets the main benefit of which =
to provide proper
- structuring and packaging for any type of project.
-
-
- Faceted Projects Overview
- The idea behind faceted projects is that each project can accept u=
nits of
- functionality, or facets, which can be added or removed by the user. Mo=
st often, these
- facets either add to the project's classpath, enable a builder, or watc=
h the project in
- some other fashion. Generally, every project concerned has at least one=
facet when
- it's created. As an example, a Web project has a WebDoclet facet, or an=
EJB
- Project has an EJB Module facet as prerequisites.
-
- WTP projects have undergone some criticism as being
- over-engineered or too restrictive in their design=
. WTP projects
- are set up in a tree-relationship to each other, where one project can =
be a child of
- another. For example, an EAR project may have a Web Project child, an E=
JB project child,
- or other types.
-
- However, the benefit of this is that the structure of your projec=
ts is then known,
- and packaging it up *should* be trivial. Apparently, if your project is=
non-standard, or
- you feel too confined by such rigid structural requirements, you can st=
ill choose to
- package your project using the A=
rchives
- plugin.
-
-
-
-
- Adding Facets to a Project
-
- In this section we're going to consider the facets added by JBoss
- Tools and show how you can configure them in a project: add=
new ones or
- modify already existing configuration of the facets.
-
- One way to configure the facets is doing it while organizing a new=
project. To
- demonstrate this let's create a new Dynamic=
Web Project by
- selecting
- File > New > Other...
- and then
- Web > Dynamic Web Project. <=
/emphasis>
-
- New Dynamic Web Project
-
-
-
-
-
-
- Click
- Next
- and you will see Dynamic Web Project page like on the figur=
e below.
-
- The first page of most WTP projects allows you to target a specif=
ic runtime,
- representing a server's library location. It will also provide you the =
ability to add
- this project to an EAR project, and select a preselected default set of=
facets, called
- a configuration, rather than manually select each facet you might want.=
- Selecting the runtime, again, allows the project to install the p=
roper classpaths to
- the project so it knows what code to compile against.
-
-
- New Dynamic Web Project
-
-
-
-
-
-
- Click on the
- Modify
- button next to Configuration section in order to open
- the wizard which allows you to modify a chosen configuration. The wizar=
d looks as
- follows.
-
-
- Project Facets Wizard
-
-
-
-
-
-
-
- Here part of the listed facets are those which are provided by WTP=
. Some of them are
- added by JBoss Tools. They are:<=
/para>
-
-
- BIRT Charting Runtime Component
-
-
- BIRT Reporting Runtime Component
-
-
- JBoss ESB
-
-
- JBoss Portlets
-
-
- JBoss Web Services
-
-
- Seam
-
-
-
- On this wizard page you can enable or disable any facet as well as=
change it version.
- What you should note here is that some facets or facets versions may co=
nflict with each
- other. In case of incompatibility you'll be prompted about this in the =
combo
- box underneath.
-
- Facet Constraints
-
-
-
-
-
-
- When switching on the
- Runtimes
- tab on the right you'll see the current server Runtime.
-
- Runtimes on the Project Facets Wizard
-
-
-
-
-
-
- On this tab you can also create a new Server Runtime and make it p=
rimary by pressing
- Make Primary
- button after enabling it.
-
- Clicking on
- OK
- will save the chosen configuration of the facets and return=
you to the Dynamic Web Project wizard. Further pages in the
- wizard are specific to either the project type or the facets selected.<=
/para>
-
-
- If you need to configure the facets for the existing project, you =
should bring up the
- context menu for selected project and click
- Properties
- and then
- Project Facets. Thi=
s will bring up the familiar
- Project Facets wizard, where y=
ou can create
- your own custom facets configuration.
-
-
-
-
-
- Relevant Resources Links
-
- More on the WTP facets you can read in the eclipse help.
-
-
-
- =
-
- Deploying Modules
-
- In this chapter it will be described how to deploy modules onto the=
server.
- First of all it is necessary to say that deploying to a server is =
mostly painless. There
- are several ways to do it provided by WTP, and some additional methods p=
rovided by JBoss
- Tools. These methods are described further in this chapter.
-
-
- Deploying on the Package Explorer
-
- On the package explorer it is possible to publish either a project=
to a server or just
- a single file. Let's look at how to do this.
-
- Deploying with Run On Server Wizard
- The first WTP method is to right-click on a project, such as a D=
ynamic Web
- project, EJB project, or EAR project and then select
- Run As > Run on Server
- . The resulting dialog allows you to select which supportin=
g server the
- project can be published to.
-
- Define a New Server
-
-
-
-
-
-
- Click
- Next
- button to see add or remove projects page where you can ch=
oose projects
- to configure them on server.
-
- Add or Remove Projects
-
-
-
-
-
-
- This page of the wizard also allows to undeploy modules from the =
server. For that
- choose proper module(s) from the right and click
- < Remove
- . The modules will be completely undeployed after restartin=
g your server
- or republishing.
- Generally, for the JBoss AS Server Adapters, publishing using thi=
s method will
- force a default, best-guess, packaging configuration for your project.=
This
- best-guess does not publish incrementally, but instead repackages your=
entire
- project into a
- .war
- ,
- .jar
- , or
- .ear
- as appropriate, and then copies that file into the proper =
deploy
- directory. For quicker smarter deployment, you will need to create arc=
hives using
- the Project Archives view and customize
- packaging yourself.
- =
- =
- =
-
-
-
-
- Deploying single files
-
- Sometimes it becomes necessary to deploy one or more files to a s=
erver. For
- that in order not to do a full republish in the context menu of files =
a Deploy To Server
- option is provided that allows a single file deployment. To deploy the=
se non-WTP files/projects
- right click on the file (
- -ds.xml,
- .ear,
- .jar etc.) and se=
lect
- Deploy To Server
- and it will be automatically deployed.
-
- Deploy to Sever
-
-
-
-
-
-
- The deployed files are listed side-by-side with other modules tha=
t are deployed to
- the server.
- =
-
- Deployed files on the Server
-
-
-
-
-
-
-
-
-
-
-
- Deploying with JBoss Server View
- As it has been already mentioned JBoss=
Server View contains two
- parts: the top part that displays all defined servers and the bottom pa=
rt which provides
- categories with additional information. Thus, in this section we sugges=
t two more ways
- to deploy resources onto the server.
-
- Top part of JBoss Server View
- In the top part of the JBoss Servers =
View like in the Servers
- View you should right click on a server and select the
- Add and Remove Projects
- menu item.
-
- Add and Remove Projects
-
-
-
-
-
-
-
- This will bring up a familiar dial=
og allowing
- you to either publish projects or modules to a server, or remove them =
from the
- server. If the selected module is a project like a Dynamic Web project=
, EJB project,
- or EAR project, it will be published as through
- Run on Server
- wizard, with a best-guess full package. If, however, the s=
elected
- element is an archive from the =
Project Archives
- view, it will be published according to the rules of that modu=
le
- type.
-
-
-
- Bottom part of JBoss Server View
- In the bottom part of
- JBoss Server View
- there is a category called
- Modules
- which should display all currently-published modules on th=
e server.
- Right-clicking on the desired module and selecting
- Full Publish
- will force a full rebuild of the entire module.
-
- Full Publish
-
-
-
-
-
-
-
- Here,
- Incremental Publish
- is meant to enable publishing of only those parts where ch=
anges have
- been made.
-
-
-
- Deploying with Project Archives View
- In the Project Archives View you can right-click on any declared
- archive and select the
- Publish To Server
- element. For more on this subject, see Publishing to Server in the Project Archives View sect=
ion.
-
- Publish to Server
-
-
-
-
-
-
- The only way to ensure an
- Incremental Build
- , such as changes to one
- .jsp,
-
- .html, or
- .class
- file, is to enable the builder for that project. This is do=
ne by either
- changing the global preferences for the Arc=
hives View, or by
- enabling project-specific preferences and ensuring the builder is on.=
para>
- =
- You can also use the "Finger touch" button for a quick restart of =
the project without restarting the server:
-
- Finger Touch button
-
-
-
-
-
- =
- The "Finger" touches descriptors dependent on project (i.e. web.xm=
l for WAR, application.xml for EAR, jboss-esb.xml in ESB projects).
- =
- =
- The last chapter covers a variety of methods on how you can deploy=
needed modules onto a
- server.
-
-
-
- =
-
- TPTP Support
- This chapter provides an overview on how to enable TPTP Profilin=
g for JBoss
- AS adapters in JBoss Tools<=
/property>.
-
-
- TPTP Profiling
-
- To get TPTP profiling work on JB=
oss Application Server you should
- first download TPT=
P 4.5.0 Runtime and install it, i. e. just add the content of
- plugins/features
- folders from downloaded directory to the same fold=
ers in your eclipse
- installation directory.
-
- And now all profile actions should work for you. To start
JBoss
- AS in profiling mode use
- Start the server in profiling =
mode
- button or
- Profile As > Profile on Ser=
ver
- option in the context menu of the project.
-
-
- Start the Server in Profiling mode
-
-
-
-
-
-
-
- To enable TPTP features in your workbench use Profiling and Logging
- Perspective that you can find in the list of pr=
oposed perspectives:
- Window > Open Perspective &=
gt; Other=E2=80=A6
-
-
-
-
- Profiling and Logging Perspective
-
-
-
-
-
-
-
-
-
- Relevant Resources Links
- All additional information on TPTP(Test and Performance Tool=
s Platform) you can find
- in eclipse documentation.
- In summary, this reference should help you to start with
JBoss AS and get to know w=
ith functionality
- for work with it.
-
-
-
- =
-
+]>
+ =
+
+ JBoss Server Manager Reference Guide
+
+
+
+
+ =
+
+
+ =
+ =
+
+ =
+ AnatolyFedosik
+ OlgaChikvina=
+ RobStrykerrob.stryker(a)jboss.com
+ SvetlanaMukhinasmukhina(a)exadel.com =
+ =
+
+ 2007
+ 2008
+ 2009
+ 2010
+ JBoss by Red Hat
+
+
+ Version: 2.1.0.CR2
+
+
+
+
+ PDF version
+
+
+
+
+ =
+ =
+ =
+ =
+
+ Quick Start with JBoss Server
+
+ This chapter covers the basics of working with the JBoss Server.
+ =
+
+ Key Features of JBoss Server
+ For a start, we propose you to look through the table of main fe=
atures of JBoss Server:
+ =
+
+ =
+ Key Functionality for JBoss AS and Archive Tools
+
+ =
+
+
+
+ =
+
+
+ Feature
+ Benefit
+ Chapter
+
+
+
+
+ JBoss AS plugin
+ Using WTP, JBoss AS plugin allows working with th=
e server in run or debug mode. You can easily install runtimes and servers,=
copy the existing runtime configuration or configure it up to your needs.<=
/para>
+
+ runtimes and servers
+
+
+ =
+
+ JBoss AS Perspective
+ It makes managing installed JBoss Server quite ea=
sy and includes the standard Console and Properties views, and specially a=
dded Project archives View and JBoss Server View for that purpose. <=
/entry>
+
+ JBoss AS perspective
+
+
+ =
+
+ Modules Deployment
+ A number of ways, provided by WTP and JBoss Tools=
, to deploy either a project or a single file on the server.
+
+ deploying modules
+
+
+ =
+
+ TPTP Support
+ Test and Performance Tools Platform (TPTP) profi=
ling.
+
+ TPTP support
+
+
+ =
+
+ =
+
+
+ =
+ If you
+ already have installed JBoss server and runtime you can quickly learn =
how to configure, start,
+ stop the server, to know deployment and archiving processes. How to in=
stall runtimes and servers
+ read in the Runtimes and Servers in=
the JBoss AS plugin
+ chapter.
+ =
+ To start working with JBoss AS, select a JBoss AS Perspective via
+ Window > Open Perspective >=
; Other > JBoss
+ AS.
+
+
+
+ Starting JBoss Server
+
+ Starting JBoss Server is =
quite simple. You can control the server
+ behaviour with the help of a special toolbar in the JBoss Server View
+ where you could
+ start
+ it in a regular or debug mode,
+ stop
+ it or
+ restart
+ it and
+ publish
+ to the server.
+
+
+ JBoss Server Toolbar
+
+
+
+
+
+
+
+ To launch the server click the green-with-white-arrow icon on th=
e JBoss Server
+ View or right click server name in this view and select=
+ Start. If this =
view is not open, select
+ Window > Show View >=
Other > Server >
+ JBoss Server View.
+
+
+ Start JBoss Server
+
+
+
+
+
+
+
+
+
+
+ Stopping JBoss Server
+
+ To stop the server, click the
+ Stop
+ icon in the JBoss Server Vie=
w or right click the server name
+ and press Stop.
+
+
+ Stop JBoss Server
+
+
+
+
+
+
+
+ When the server is stopped you will see
+ Stopped
+ state next to its name in the square brackets.
+ Learn more about the JBoss Server Vi=
ew
+ here.
+
+
+
+
+ Project Archiving
+
+ JBoss Tools comes with ou=
r own archives tool. The Project Archives
+ plugin consists primarily of a view to set up each packaging configu=
ration (
+ Window > Show View > Other >=
; JBoss Tools > Project archives).
+
+ Right clicking in the Project archiv=
es view you can create War,
+ EJB War, EAR or JAR archive.
+
+
+ Archive Creating
+
+
+
+
+
+
+
+ Using the context menu on the item you can initiate a =
full build on
+ archive, edit, delete or
+ publish =
it.
+
+
+ Context Menu on the Item
+
+
+
+
+
+
+ =
+ If you wish, you can assign a hotkey for the Build Project Archiv=
e action. A key binding can be added =
+ by navigating to
+ Window > Preferences > General >=
Keys.
+ =
+
+ Setting the Hotkey for Build Project Archive Action
+
+
+ <=
/imagedata>
+
+
+
+ =
+ To perform the building of the project archives, select the proje=
ct in the Package Explorer view and =
execute the hotkey combination =
+ you assigned for this action.
+ =
+ Learn more about the Project Archives=
View
+ here.
+
+ =
+
+ Deploying an Application to a Server
+
+ There are two times to deploy your application:
+
+
+ While creating it
+
+
+ After it already exists
+
+
+
+ When you create a new project (Seam, JSF or Struts) with the New=
Project or Import Project
+ wizards, the one of wizards steps has a
+ Target Runtime
+ and
+ Target Server
+ sections. You can deploy the application through the app=
ropriate selection in
+ these sections.
+
+
+ Runtime and Server Sections in the New Project Wizard
+
+
+
+
+
+
+
+
+ Runtime and Server Sections in the Import Project Wizard
+
+
+
+
+
+
+
+ You can deploy an existing application to a server by right-clic=
king the target defined
+ server in the JBoss Servers View and then selecting Add and
+ Remove Projects from the context menu.
+
+
+ Add and Remove Projects From the Context Menu.
+
+
+
+
+
+
+
+ If this application is not assigned to a server, it will be in t=
he left-hand available
+ projects list. Clicking on the Add ><=
/property> button will add it to the right-hand
+ configured projects list and deploy the application to this server.<=
/para>
+
+
+ Modifying The Projects that are Configured on the Server
+
+
+
+
+
+
+
+ =
+
+ Publishing to JBoss Server
+ The publishing of all the modules added to a Server is performed a=
utomatically when starting a Server.
+ The automatic publish of the changes made to the workspace is turn=
ed on by default in order to permanently keep =
+ the workspace in sync with the publish folder. If you need to control w=
hen to publish the changes, =
+ just disable the automatic publish in the Server Editor and use the
+ Publish to Server (<=
inlinemediaobject> =
+
+
+
+ ) button which initiates an incremental publish.
+
+ =
+ Here, we have just performed the basic steps you should know to qu=
ick start with JBoss
+ server. In fact, there are more functionalities which you can make use =
of. Further we will
+ talk about them in detail.
+
+
+
+ Other relevant resources on the topic
+
+ All JBoss Developer Studio/JBoss Tools documentation you can fin=
d on JBoss Tools releas=
e documentation page.
+ The latest documentation builds are available JBoss Tools nightly builds=
documentation page.
+
+ Find out the answers on the frequently asked questions about JBos=
s AS 5 usage in the =
+ JBoss5FAQ=
.
+
+ =
+ The information on how to monitor a remote JBoss Server from Ecli=
pse you can find in the following
+ wiki article.
+
+
+
+
+ =
+
+
+
+
+ JBoss Developer Studio
+ Eclipse
+ Deploy
+ Deployment
+ JBoss
+
+
+ Runtimes and Servers in the JBoss AS plugin
+
+ In this chapter we will discuss how to install runtimes and server=
s.
+
+ First of all it's necessary to mention that the JBoss AS plugin ma=
kes use of WTP.
+ This includes starting and stopping servers in run or debug mode. It a=
lso includes targeting WTP
+ projects, such as Dynamic Web Projects, to certain server runtimes in =
order to ensure that the
+ proper jars from a specific server are added to the project's classpath
+ properly.
+ In order to get started creating, running, and debugging J2EE appl=
ications, we should create
+ our runtime and server instances.
+
+
+ Runtimes
+ In JBoss Tools, the main =
purpose of Server Runtimes is to point to a
+ server installation somewhere on disk. In our case, this will be a J=
Boss installation, and it
+ can then be used for two primary purposes:
+
+
+ it provides classpath additions to WTP projects that require=
them.
+
+
+ for JBoss server at l=
east, it provides information necessary for
+ the starting and stopping of the server, it tells which jars to =
run and which
+ configuration to use.
+
+
+
+
+ Installing a New Runtime
+ You can install runtimes into eclipse from the
+ Window > Preferences
+ menu, and then select
+ Server > Runtime Environments
+ from the categories available on the left.
+
+ Installed Runtimes
+
+
+
+
+
+
+ From this preference page you can see all declared runtimes an=
d their types as well.
+ Here, it's possible to edit or remove existing runtimes as well as=
add a new
+ one.
+
+ To create a JBoss runtime click
+ Add
+ button and choose a necessary type of runtime from the=
+ JBoss Community
+ category.
+
+
+ Adding a Runtime
+
+
+
+
+
+
+
+
+ Note:
+
+ Now there is a separation between .org servers (the
+ JBoss Community
+ category) and product server that comes with JBoss E=
AP in JBDS ( the
+ JBoss Enterprise Middleware
+ category).
+
+
+ As you can see, JBoss Tools provide its own adapters such as JBoss
+ 3.2, 4.0, 4.2 and 5.0 as well. The last one comes with its own new=
feature, that is a safer
+ incremental deployment, which prevents partial deployments to be p=
icked up by the server. It
+ means that scanning for auto-deployment is suspended while files a=
re being copied to the
+ deployment location and resumed when the copy is completed.
+
+
+ Note:
+ Currently we recommend you to use a fully supported JBoss 4.=
2 server adapter.
+
+
+ You'll also note a Deploy-Only Runtime type. This type provide=
s no classpath
+ for WTP projects. It is used solely by its server type for the pur=
pose of setting up a
+ deploy directory for users who don't wish to make use of starting,=
stopping, or
+ debugging their projects inside eclipse.
+
+
+ Adding a JBoss 4.2 Runtime
+
+
+
+
+
+
+
+ The following table describes all the available options of the=
currant wizard
+ page.
+
+ Server Runtime Wizard Parameters
+
+
+
+
+
+
+
+ Name
+
+
+
+ Description
+
+
+
+
+
+
+
+ Name
+
+
+ The name of a new Runtime for a chosen server. We su=
ggest that you
+ don't leave a default value. It's better to give descrip=
tive
+ names that will help to distinguish one runtime from ano=
ther.
+
+
+
+
+
+ Home directory
+
+
+ The path to a directory where the runtime is install=
ed.
+
+
+
+
+
+ JRE
+
+
+ The proper Java Runtime Environment. Because of the =
open-source nature of
+ JBoss, a user is likely to want to modify and repackage =
some of the
+ configuration-specific jboss jars and create their own c=
onfiguration. Thus, rather
+ than forcing you to copy his entire JBoss installation, =
the structure of the
+ wizard allows to create only a new configuration instead=
.
+
+
+ =
+
+
+ Directory
+
+
+ The path to a directory where the configurations are=
installed.
+
+
+
+
+ Configuration
+
+
+ The list of configurations (all, default, minimal) t=
hat is updated as soon as
+ you browse to a valid runtime installation folder.
+
+
+
+
+
+
+
+ As a result of having each runtime represent a specific config=
uration rather than the
+ server installation as a whole, it is very likely you'll create se=
veral different
+ runtimes to test each of your configurations. It becomes important=
to ensure your runtimes,
+ and later your servers, are given descriptive names that help you =
to remember which is
+ which.
+
+ Press
+ Finish
+ to see your new runtime in the list.
+
+ Note:
+ If you edit the configuration of a runtime, the changes don=
't affect the settings of the servers that currently use the runtime.
+ To apply the changes to them also,you should double right click =
the server,
+ Overview>Runtime Environment
+ ,make sure that necessary configuration is chosen,click Finish and then Save button.
+
+
+
+ Copying the existing runtime configuration
+ While installing a new runtime you can copy the configuration =
from the existing one.
+ To do this you should perform all the steps in the previous section except pressing
+ Finish
+ in the New Server Runtime Environment menu .
+
+ Make sure that you browse to a valid runtime folder and can se=
e the list of configurations (all, default, minimal) in the Configuration s=
ection .
+ Then choose necessary Configuration from the list and click
+ Copy.The next =
dialog should appear.
+
+
+ Copy the existing configuration
+
+
+
+
+
+
+ Change the name Click on
+ Browse and selec=
t your configuration location or leave as it's if you want it to be locate=
d together with other runtime configurations.
+
+
+ Copy the existing configuration
+
+
+
+
+
+ =
+ =
+ Click
+ Ok and you should=
see the next wizard with the just added copied configuration.
+ =
+
+
+ Runtime with copied configuration
+
+
+
+
+
+ =
+ Press
+ Finish
+ and you will see your new runtime in the list.
+
+ You can also change a configuration of existing runtime to a cop=
ied one in the same way from the
+ Window > Preferences
+ menu
+ Server > Runtime Environments
+ and clicking
+ Edit.
+
+
+
+
+ Servers
+ WTP servers are eclipse-representations of a backing server inst=
allation. They are used to
+ start or stop servers, deploy to servers, or debug code that will ru=
n on the server. They keep
+ track of the modules (jars, wars, etc) you deploy to the server and =
also allow you to undeploy
+ those modules (see Deploying =
with Run On Server
+ Wizard section).
+ Servers can be started or stopped with different command-line
+ arguments. They are often backed by a runtime object repres=
enting that server's
+ location.
+
+
+ Creating a New Server
+
+ There are many ways to get to the new server wizard. One way i=
s to use the old standard
+ File > New > Other...
+ and then
+ Server
+ . This should show the wizard like below.
+
+ Adding a JBoss Server
+
+
+
+
+
+
+ A server object is that keeps track of things like command lin=
e arguments when starting
+ or stopping, and runtimes keep track of the location of the instal=
lation. Thus, each server
+ instance must be backed by an appropriate runtime.
+
+ New server wizard allows to name the server appropriately in the Server name field or you=
can use a generated default name.If it's nessecary to restore the default =
name,after you defined yours, click the Reset default button(
+
+ ).
+ From the list of already declared runtimes in the combo box below =
the view it's
+ possible to select which runtime you want your server to be backed=
by. If there is no
+ runtime that matches your needs just press the
+ Add...
+ link nearby to bring up the wizard for creating a new =
runtime (see the Installing a New Runt=
ime section). To configure the already installed
+ runtimes you should go to server preferences that you can easily d=
o by pressing the
+ Configure runtime environments... link.
+
+ If the server you want to create doesn't have any installed ru=
ntime yet, the combo box
+ and the links are absent.
+
+
+ Installed Server Runtime Environments
+
+
+
+
+
+
+
+ In this case the next page in the wizard which has the same fo=
rm as in the previous section w=
ill ask you to create the
+ associated runtime.
+ Either way, after targeting your server to a runtime, the fina=
l screen in this wizard is
+ largely confirmational, giving you a chance to verify that you've =
selected the
+ appropriate runtime.
+
+
+ Installed Server Runtime Environments
+
+
+
+
+
+
+
+ Press
+ Finish
+ to complete the process of the server creation.
+ Now that we've created our runtimes and servers, we can dwell =
on all services
+ and tools that JBoss Server Manager provides.
+ =
+ We hope, this guide helped you to get started with the JBoss=
Tools server manager.
+ Besides, for additional information you are welcome on =
+ JBoss forum.
+
+
+ =
+
+
+
+ =
+
+
+
+
+ JBoss Developer Studio
+ Eclipse
+ Deploy
+ Deployment
+ JBoss
+
+
+
+ JBoss AS Perspective
+
+ This chapter tells how to manage installed JBoss Server via
+ JBoss AS perspective.=
para>
+
+ The JBoss AS perspective =
is similar to the Java
+ perspective, but it contains a few additional views=
. Two of the additional
+ views are standard views, specifically the Console view and the
+ Properties view. The ot=
her two views that are added are the
+ Project archives view a=
nd the JBoss Server
+ View.
+
+
+
+ The JBoss Server View
+
+ The JBoss Server View=
is built on Common Navigator Framework
+ allowing extensions and is using label decorators what makes t=
he UI enough compact
+ without loosing the vital information.
+
+ Let's have a look at the JBoss S=
erver View and inspect
+ in detail all parts it consists of.
+
+ The JBoss Server View
+
+
+
+
+
+
+
+
+ JBoss Server View Toolbar
+ In the right top corner of the JBoss Server View there is a
+ special toolbar which provides a quick access to starting =
a server (in the debug
+ mode, run mode, or profile mode), restarting a server, sto=
pping a server and a
+ possibility to publish to a server.
+
+
+ The JBoss Server View Toolbar
+
+
+
+
+
+
+
+ In order to debug your applications or EJB's that are de=
ployed to the server, you
+ must start the server in debug mode. By starting the serve=
r in debug mode, eclipse
+ will allow you to set breakpoints on code in your workspac=
e and step through the
+ code.
+
+
+ Start the server in profil=
ing mode
+ button allows to enable profiling actions for =
your application. For more
+ details on how to start using TPTP profiling with JBoss Tools
+ refer to TPTP Support chapter.
+
+
+ Publish to the server
+ button will republish any modules where it has=
determined the workspace
+ is out of sync with the server. It will attempt to do an i=
ncremental publish if it
+ turns out that the module in question is capable of doing =
one.
+
+
+
+
+ JBoss Server View Structure
+ The JBoss Server View displays all declared servers as well
+ as their current states (that is whether they are started =
or stopped) and statuses
+ in the square brackets next to a server name.
+
+
+ The JBoss Server View
+
+
+
+
+
+
+
+ The following table lists possible server statuses.
+
+
+ Server Publish Status
+
+ <=
/colspec>
+
+
+
+
+
+ Status
+
+ Description
+
+
+
+
+
+
+ Republish
+
+
+
+ The status which allows you to see i=
f changes are
+ awaiting
+
+
+
+
+ Publishing...
+
+
+
+ The status which shows if changes ar=
e being updated
+
+
+
+
+ Synchronized
+
+
+
+ The status which allows you to see i=
f changes are
+ in-sync
+
+
+
+
+
+
+ You can control a server behavior as well as adjust some=
server preferences with
+ the help of the context menu commands.
+
+
+ Context Menu Commands
+
+
+
+
+
+
+
+ All available context menu commands are described in the=
following table.
+
+ Server Properties through the Context Menu
+
+ <=
/colspec>
+
+
+
+
+
+ Name
+
+
+
+ Description
+
+
+
+
+
+
+
+ New Server
+
+
+ The option allows to define a new se=
rver
+
+
+
+
+
+ Open
+
+
+ The option opens the Server editor=
para>
+
+
+
+
+
+ Show in
+
+
+ This option gives an easy access to =
the next views: Console,
+ Debug view, Server Log or MBean Explor=
er
+
+
+
+
+
+ Delete
+
+
+ Standard option that allows to delet=
e the chosen server
+
+
+
+
+
+ Start
+
+
+ The action for stating a server in a=
run mode
+
+
+
+
+
+ Debug
+
+
+ The action for stating a server in a=
debug mode
+
+
+
+
+
+ Stop
+
+
+ The action for stopping a declared s=
erver
+
+
+
+
+
+ Publish
+
+
+ The action for synchronizing the pub=
lish information between
+ the server and workspace
+
+
+
+
+
+ Explore
+
+
+ This action uses the native OS file =
explorer to browse the
+ deploy destination. Note: The option i=
s also available for
+ deployed resources/projects (see the f=
igure below).
+
+
+
+
+
+ Add and Remove Projects
+
+
+ The option allows to publish a new p=
roject to the server (if
+ its type is supported)
+
+
+
+
+
+ Monitoring
+
+
+ Possibility to add ports to be monit=
ored on the current
+ server
+
+
+
+
+
+ Properties
+
+
+ Opens the window to adjust the curre=
nt server
+ preferences
+
+
+
+
+
+
+
+ Under the server element in the JBoss Server View, you can
+ see currently deployed to the server modules and some serv=
er extensions which
+ provide the additional information on the server.
+
+ The context menu for any module allows you to remove it =
from the server, force a
+ full or incremental republish upon it.
+
+
+ Modules Action
+
+
+
+
+
+
+
+
+ Filesets
+
+ The
+ Filesets
+ category in the JBoss Server View is intended
+ for files filtering.
+
+ To add a new file filter, right-click the
+ Filesets
+ category and select
+ Create File Filter.
+ The New File
+ Filter wizard should appear.
+
+
+ Creating a New File Filter
+
+
+
+
+
+
+
+ The wizard asks you to enter the filter name and add=
includes and excludes
+ patterns. The preview box underneath gives a list of f=
iles matched to the
+ defined patterns (see the figures bellow).
+ In order to set up a default fileset relative to the co=
ncrete configuration of the server runtime, use the following variable: =
+ ${jboss_config}, i. e. =
you should type in the
+ Root Directory something like server/${jboss_config}/.
+ This is implemented in order you can modify the runtime's co=
nfiguration and not have to manually update paths.
+
+ New File Filter Wizard
+
+
+ =
+
+
+
+ =
+ Notice, that the
+ Browse but=
ton still returns an absolute path:
+ =
+
+ New File Filter Wizard
+
+
+ =
imagedata>
+
+
+
+ =
+ After the filter is created, you can observe it by e=
xpanding the
+ Filesets
+ category in the JBoss Server View.
+
+ It's possible now to edit files directly from the
+ Filesets
+ category. Double clicking on a file from <=
emphasis>
+ Filesets
+ opens up the editor automatically or you c=
an use the
+ Edit File
+ context menu command.
+
+
+ Direct Editing from the Filesets
+
+
+
+
+
+
+
+ To delete a file filter (or just a file) from the
+ Filesets,=
emphasis> right-click a file filter (or the
+ unnecessary file) and select the
+ Delete File Filter
+
+ (Delete File) command.
+
+
+ Deleting the File from the Filesets
+
+
+
+
+
+
+ If you want to set filesets for some server types, y=
ou should open =
+ Window>Prefer=
ences =
+ and then select Server > Default Filesets =
+ from the categories available on the left.
+ =
+
+ Deleting the File from the Filesets
+
+
+
+
+
+
+ On this preference page you can add a fileset =
+ to any server type or to all servers at once.To do thi=
s you should select the server type in the combo box and click
Add fileset...
button. =
+ In the opened New File
+ Filter wizard follow the steps describe=
d before and finally click Apply button on the pref=
erence page.
+ The defined file filter will be automaticall=
y added to new servers during creation.
+ =
+ =
+
+
+
+ XML Configuration
+ The
+ XML Configuration
+ category allows you to quickly browse to d=
escriptor files in your
+ server's deploy directory and check or change the valu=
es. Basically,
+ XML Configuration
+ includes XML XPaths where an xpath is a pa=
th used to access some
+ specific part of an xml document.
+
+
+ Note:
+ You are assumed to be familiar with XPath. If no=
t, we highly suggested
+ that you look through an appropriate manual or tut=
orial on the topic.
+
+
+ The
+ XML Configuration
+ category itself contains only a list of ca=
tegories.
+ Ports
+ are provided by default and is filled with=
many of the most commonly
+ used ports in the JBoss Se=
rver.
+
+
+ XML Configuration
+
+
+
+
+
+
+
+
+
+
+ By right-clicking on
+ XML Configuration, you can create a new
+ category. Besides, context menu for
+ XML Configuration
+ category makes possible to disable it. You=
can disable any category
+ in the bottom part of the
+ JBoss Server View. Look for them in the
+ Inactive Categories
+ afterwards to re-enable.
+
+
+ Adding New Category
+
+
+
+
+
+
+
+ By right-clicking on
+ Ports
+ or any other category in
+ XML Configuration
+ , you can create a new xpath.
+
+
+ Adding New XPath
+
+
+
+
+
+
+
+ After that, the dialog shown below will appear.
+
+
+ Adding New XPath
+
+
+
+
+
+
+
+ The goal here is to get an end result where the XPat=
h matches up with a
+ necessary property. With that in mind, let's look how =
it works. If the
+ property you want to reach is the value of the name
+ attribute in the element <mbean>, t=
hen your
+ XPath Patten
+ should end with mbean =
and your
+ Attribute Name
+ should be name like o=
n the next figure.
+
+
+...
+
+ =
+
+
+
+ The EJBDeployer responsible for ejb jar deployment =
+ ...
+
+
+
+]]>
+
+
+ XPath Preview
+
+
+
+
+
+
+
+
+ Tip:
+ Notice, when you type the fields autocomplete to=
help you locate exactly
+ what xpath you're looking for.
+
+
+ Then, on the other hand, if your desired field is th=
e text of an element
+ <description>, your
+ XPath Patten
+ should end with description and
+ Attribute Name
+ field should be left blank. When finished,=
click
+ Preview
+ to see how many matches you have for that =
particular XPath.
+
+
+ XPath Preview
+
+
+
+
+
+
+
+
+
+
+
+ Drag-n-Drop to JBoss Server View
+
+ Starting from 2.0.0.CR2 version of JBoss AS Tools the
+ JBoss Server View supports drag-n-drop of deployable and
+ runnable projects/resources.
+
+
+ Dragging to the JBoss Server View
+
+
+
+
+
+
+
+ With drag-n-drop the following actions can be performed:=
+
+
+
+ dragging a project to a server will deploy it to=
the server and run it by
+ showing the main page in a browser
+
+
+
+ dragging an
+ .xhtml
+ file from
+ WebContent
+ will do the same and show the correspo=
nding page in a
+ browser
+
+
+
+ dragging a deployable resource (i.e. a datasourc=
e (
+ -ds.xml
+ ) file that has been made deployable) w=
ill simply deploy that
+ resource directly to the server
+
+
+
+ In short, the feature does the same thing as if you used=
the
+ Run On Server
+ option or
+ Add and Remove Projects
+ option in the context menu of the server.
+
+
+
+ Server Log View
+
+ You can monitor the current server behavior with the hel=
p of the Server
+ Log. To open a server in the Server Log view you
+ should right-click on the server and follow to
+ Open in > Server Log.
+
+ The
+ Server Log
+ shows relevant information to your server's st=
artup, shutdown,
+ and publish processes. This allows you to keep an eye on w=
hat's going on
+ (such as automatic incremental deployment if you have it e=
nabled).
+
+
+ Event Log Actions
+
+
+
+
+
+
+
+ The Server Log to=
olbar contains several icons that perform
+ the following actions:
+
+
+ Server Log Toolbar Icons
+
+ <=
/colspec>
+
+
+
+
+
+ Name
+
+
+
+ Description
+
+
+
+
+
+
+
+ Export Log
+
+
+ Possibility to export the log into a=
text file
+
+
+
+
+
+ Clear Log Viewer
+
+
+ The option clears the current server=
log
+
+
+
+
+
+ Delete Log
+
+
+ Click to delete the server log
+
+
+
+
+
+ Open Log
+
+
+ Click to open the server log text fi=
le
+
+
+
+
+
+ Restore Log
+
+
+ Click to restore the server log
+
+
+
+
+
+
+
+
+
+
+ Server Editor
+ By double-clicking on any server, an editor window will =
appear allowing you to
+ edit parts of that server.
+
+
+ Preferences Page for the Chosen Server
+
+
+
+
+
+
+
+
+ Tip:
+ On the figure you can see that a username/password i=
s available in the UI when
+ configuring the server. If you get a SecurityException=
when trying to launch the
+ server, it is most likely because your server is prote=
cted and hence you need to
+ fill the username/password fields with appropriate val=
ues.
+
+ =
+ Under the
+ Publishing sec=
tion it' possible to disable/inable the automatic publishing of the changes=
in the workspace.
+ =
+ It should be pointed out that our server adapter by defa=
ult tries to automatically
+ detect the ports it needs for integrating with a JBoss Server.
+ Sometimes it can though be relevant to override this autom=
atic detection if you are
+ using some custom configuration. For this purposes the
+ Server Ports
+ section in the Ser=
ver editor is provided where the
+ port settings are configurable. Click the
+ Configure...
+ link to bring up the wizard for adjusting the =
settings for the
+ ports.
+
+
+ Server Ports Preferences
+
+
+
+
+
+
+
+ Press
+ Edit XPath
+ button for the chosen port to configure its XP=
ath's values.
+
+
+ XPath Pattern for a Server Port
+
+
+
+
+
+
+
+ In the Server editor you are able to edit the timeouts and the server pollers to use.
+ =
+
+ Note:
+ By default, the Startup poller is set to JMX Pol=
ler (see the
+ Server Polling<=
/emphasis> section). If you change the Startup poller
+ to Timeout Poller (it may need in case, for example, you'r=
e using the minimal configuration for your server), this will do no polling=
at all and will only set the server
+ state to
+ "Started" after your startup timeout is reached.
+
+
+ Server e=
ditor makes it also possible to
+ modify the server's launch configuration. It's just after =
clicking
+ Open launch configuration<=
/property>
+ link=
. In the open window there are the tabs for setting command line
+ arguments, main, classpaths and other things that are rele=
vant to launching the
+ server.
+
+
+ Launch Configuration Properties
+
+
+
+
+
+
+ =
+ =
+ The first tab shows the Jboss server arguments
+ Look up AS Installation Guide =
to find parameters which can be specified for J=
Boss
+ Server.
+
+
+ Note:
+ Please note, that the Launch Configurations for JBos=
s Servers are enough
+ strict in enforcing the configured values in the serve=
r in order to avoid
+ inconsistencies between server's and their configured =
runtime.
+
+ For example, if you change the launch configuration =
program arguments to
+ "-c myConfig" but do not chan=
ge the
+ targeted runtime configuration, then your program argu=
ments will be ignored. The
+ server runtime "wins" so to speak. This ensures consis=
tency
+ and if you change the location of the runtime, your la=
unch configurations will
+ automatically pick that up.
+
+ Values are not controlled by the server and its runt=
ime setup will be passed
+ on unaltered.
+
+ =
+ On the second tab you find the main class used for launching JBoss =
AS (default is org.jboss.Main), you can change it, if necessary.
+
+ Until 3.0.0.GA release of JB=
oss Tools, the servers classpath
+ was readonly, but that caused problems for users wanting t=
o add their own jars in
+ the startup classpath. That is relevant if you need to pat=
ch the server, add a
+ custom charset or other tweaks that require early access t=
o the classpath.
+
+ Now all servers have a custom 'server runtime classpath
+ container', which is there by default and point to the def=
ault jars in
+ JBoss. You can now adjust the classpath. Then just make su=
re this container is there
+ if you want the classpath to be picked up.
+
+
+ Server Classpaths
+
+
+
+
+
+
+
+ If for some reason you have a launch configuration witho=
ut this container,
+ Restore Default Entries
+ should add it properly. Also,
+ Restore Default Entries
+ will also remove any extra entries you added y=
ourself.
+
+
+
+ Relevant Resources Links
+ Find more about XPath in the XPath
+ Documentation.
+
+
+
+
+ Project Archives View
+ Every application, whether Plain Old Java, J2EE, or some oth=
er language altogether,
+ needs to be packaged in some way. In Java-related projects, ma=
ny people use ANT.
+
+ Note:
+ Those who use ANT will appreciate how the Project Archiv=
es Ant task is now
+ improved: it supports variables and gives more informative=
error/logging messages
+ when something goes wrong.
+
+
+ But JBoss Tools come =
with our own Archives tool with a bit easier
+ and less-verbose XML and a handy user interface. The Project A=
rchives plugin consists
+ primarily of a view, that is Proje=
ct Archives view, to set up each
+ packaging configuration.
+ So far, let's look through all functionality that the Project
+ Archives view provides.
+
+
+ Overview
+
+ The packaging configuration for each project is stored i=
n the project's root
+ folder, and is in a file named
+ .packages
+ , which has a fairly simple XML structure. Modi=
fying the file by hand is
+ neither required nor recommended, and using the UI is the =
official way of modifying
+ your packaging structure.
+
+
+ Archives View
+
+
+
+
+
+
+
+ A project's configuration contains archives. As you can =
see on the image
+ above a project can contain more than one archive. Interna=
l archives and filesets
+ can be directly inside of an archive, or in some sub-folde=
r of that archive.
+
+ In the upper right corner of the view you can see an ico=
n which, when clicked,
+ will build the selected top-level archive. Additionally, y=
ou can select
+ Project > Build Package=
s
+ when a project is selected in the Packages View to
+ build all declared packages in that project's
+ .packages
+ file. This will execute a full build on all de=
clared archives.
+
+
+
+ Creating an Archive
+
+ When you open the Project ar=
chives view for the first time,
+ it asks you to select the project for what you want to cre=
ate an archive.
+
+
+ Archives View
+
+
+
+
+
+
+
+ When creating a new archive for selected project, you ha=
ve some different options
+ at your disposal. You need right-click inside the view and=
select
+ New Archive
+ to see your archive type options.
+
+
+ Create an Archive
+
+
+
+
+
+
+
+
+ Note:
+ If you see only JAR from the list of available archi=
ve types, you should
+ verify whether AS Tools plugins/features are in place.=
EAR, EJB JAR and WAR
+ options are contributed by the AS Tools independently =
from webtools and the
+ virtual project model. Thus, without them only JAR wil=
l show up.
+
+
+ JAR is the standa=
rd archive type, and does very little
+ configuration, leaving most of the work up to you. You can=
customize the name, add
+ folders, filesets, and inner jars to it.
+
+ The other types, for the most part, simply start off wit=
h a default setting,
+ usually the jar with some specific children based on an ex=
pected structure of the
+ project. For example, if the project is a Dynamic Web Proj=
ect, and you create a
+ WAR archive, th=
e archive will be created with a few
+ filesets relevant to the known structure of the project.=
para>
+
+ Here is the first page of all New archive wizards. It is=
the same for any archive
+ type and the only page in the =
New Jar wizard.
+
+ New WAR Wizard
+
+
+
+
+
+
+
+ The page is pretty simple. First it asks to set the name=
of your new archive and a
+ destination.
+
+ The destination of an archive can be anywhere on the fil=
e system, anywhere in the
+ workspace, inside some other archive, or inside a folder d=
eclared inside an archive.
+ Select the necessary checkbox (either
+ workspace
+ or
+ file system
+ ) for marking the destination as related to eit=
her workspace or file
+ system. You can browse to workspace or filesystem destinat=
ions by clicking on their
+ respective buttons. To select a destination inside some ot=
her archive, you'll need
+ to press the
+ Workspace
+ button. At the bottom of the list, you'll see =
archives that
+ have been declared in the workspace.
+
+
+ Selecting the destination in the workspace
+
+
+
+
+
+
+
+ Also in the wizard for creating a new archive you can ch=
oose whether an archive to
+ be compressed or exploded into a folder (without compressi=
on). You need just select
+ proper chechbox in the
+ Archive type
+ section.
+ If a build or incremental update fails Project Archives =
will show an error
+ dialog:
+
+ Selecting the destination in the workspace
+
+
+
+
+
+
+ Click in
+ Details
+ to see detailed information about what caused =
the error.
+
+ In the Package Explorer you can observe the created
+ archive.
+
+ The Archive in the Package Explorer
+
+
+
+
+
+
+
+ If you use the exploded type of archiving, instead of a =
single file archive the
+ result put into a folder is displayed in the Package
+ Explorer.
+
+ The Exploded Archive in the Package Explorer
+
+
+
+
+
+
+
+
+ Creating a Folder
+ Creating a folder is much easier. You simply right-c=
lick on an archive or
+ folder you want your new folder to be a child under. T=
he only piece of required
+ information is naming the file.
+
+
+ Creating a FileSet
+ To create a new fileset, you click on an available t=
arget location such as an
+ archive, a nested archive, or a folder within an archi=
ve, and select
+ New Fileset=
.
+ The New Fileset wizard=
property> requires a destination (where the
+ files will go), and a root directory (or where the fil=
es are coming from). The
+ source can be anywhere in the workspace or from the fi=
lesystem at large.
+
+
+ Adding a New FileSet
+
+
+
+
+
+
+
+ Below that, the fileset requires only an includes pa=
ttern and an excludes
+ pattern. As you type in either of these fields, the pr=
eview viewer should update
+ itself with which files are matched.
+
+ You can create a Fileset with flattening or without =
it. Look at the difference
+ on the figure below.
+
+
+ The FileSet with flattening and without it
+
+
+
+
+
+
+
+
+ =
+
+ Creating User Library FileSet
+ =
+ If you use user libraries in your projects you can a=
lso refer to these from project archives and have all the .jar/.zip files t=
hey refer included into the archive.
+ To add a new user libraries file set, call the right=
-click menu on the necessary archive and choose " New User Libraries FileSe=
t" item
+ =
+
+ Adding New User Library Fileset
+
+
+
+
+
+
+ =
+ You can edit the existing user libraries as well usi=
ng "User Libraries Fileset Wizard". Call the right-click menu on the librar=
y fileset and choose "Edit Fileset " item
+ =
+
+ Editing User Library Fileset
+
+
+
+
+
+
+ =
+
+ =
+
+
+
+ Archive Actions
+
+ Context Menu on the Item
+
+
+
+
+
+
+ The context menu on the items in the view is extendable,=
but there are several
+ that come standard.
+
+
+ Context Menu on the Item
+
+ <=
/colspec>
+
+
+
+
+
+
+ Name
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ Build Archive (Full)
+
+
+
+ The action enabled only on top-level=
archives, which initiates
+ a full build on that archive
+
+
+
+
+
+ Edit Archive
+
+
+
+ Standard action that brings up the w=
izard associated with that
+ particular node type and allows the de=
tails to be changed
+
+
+
+
+
+ Delete Archive
+
+
+
+ Deleting node is standard action wit=
h deletion not needing an
+ explanation
+
+
+
+
+
+ Publish To Server
+
+
+
+ The action means the ability to publ=
ish to a declared
+ server
+
+
+
+
+
+ Edit publish settings
+
+
+
+ Gives possibility to edit an archive=
publish settings
+
+
+
+
+
+
+
+
+
+ Publishing to Server
+ Finally, you'll need to publish your application to a se=
rver. Here, we
+ show you how to do it with the help of
+ Archives View. =
+
+
+ Context Menu on the Item
+
+
+
+
+
+
+ The dialog above appears after selecting
+ Publish To Server. To simply publish once, you
+ just select the server(s) that you want, and finish. If yo=
u want the
+ Publish to Server
+ action on that particular Archive to publish a=
lways to that set of
+ servers, then check the appropriate checkbox. And finally,=
to enable automatic
+ publishing upon build events, check the last checkbox.
+ The automatic publishing feature is nice if, for example=
, your package's
+ destination (where it is built) is a temporary folder and =
you want the archive
+ published to several servers. If you only really want your=
archive published to one
+ server, it might be easier to have the archive's destinati=
on folder be the deploy
+ folder of the server.
+
+
+ Relevant Resources Links
+ Refer to Ant manual
+ to find more on how to build your applications with help o=
f Ant.
+
+ We also recommend you to watch the movie wh=
ich demonstrates a powerful archiving functionality in
+ JBoss Tools.
+
+ At this point, you are guessed to be familiar with JBoss AS
+ perspective and your next step now is to ex=
plore how to work with
+ different kinds of projects.
+
+
+
+
+
+
+
+ =
+
+ Projects
+ The most popular of the projects we deal with are the J2EE ones, su=
ch as Dynamic Web
+ Project, EJB Project, or EAR project. Web projects of JBoss Tools are
+ Struts, JSF and Seam projects. All of them are called faceted projects. =
Thus, in this
+ chapter we are going to tell you about facets the main benefit of which =
to provide proper
+ structuring and packaging for any type of project.
+
+
+ Faceted Projects Overview
+ The idea behind faceted projects is that each project can accept u=
nits of
+ functionality, or facets, which can be added or removed by the user. Mo=
st often, these
+ facets either add to the project's classpath, enable a builder, or watc=
h the project in
+ some other fashion. Generally, every project concerned has at least one=
facet when
+ it's created. As an example, a Web project has a WebDoclet facet, or an=
EJB
+ Project has an EJB Module facet as prerequisites.
+
+ WTP projects have undergone some criticism as being
+ over-engineered or too restrictive in their design=
. WTP projects
+ are set up in a tree-relationship to each other, where one project can =
be a child of
+ another. For example, an EAR project may have a Web Project child, an E=
JB project child,
+ or other types.
+
+ However, the benefit of this is that the structure of your projec=
ts is then known,
+ and packaging it up *should* be trivial. Apparently, if your project is=
non-standard, or
+ you feel too confined by such rigid structural requirements, you can st=
ill choose to
+ package your project using the A=
rchives
+ plugin.
+
+
+
+
+ Adding Facets to a Project
+
+ In this section we're going to consider the facets added by JBoss
+ Tools and show how you can configure them in a project: add=
new ones or
+ modify already existing configuration of the facets.
+
+ One way to configure the facets is doing it while organizing a new=
project. To
+ demonstrate this let's create a new Dynamic=
Web Project by
+ selecting
+ File > New > Other...
+ and then
+ Web > Dynamic Web Project. <=
/emphasis>
+
+ New Dynamic Web Project
+
+
+
+
+
+
+ Click
+ Next
+ and you will see Dynamic Web Project page like on the figur=
e below.
+
+ The first page of most WTP projects allows you to target a specif=
ic runtime,
+ representing a server's library location. It will also provide you the =
ability to add
+ this project to an EAR project, and select a preselected default set of=
facets, called
+ a configuration, rather than manually select each facet you might want.=
+ Selecting the runtime, again, allows the project to install the p=
roper classpaths to
+ the project so it knows what code to compile against.
+
+
+ New Dynamic Web Project
+
+
+
+
+
+
+ Click on the
+ Modify
+ button next to Configuration section in order to open
+ the wizard which allows you to modify a chosen configuration. The wizar=
d looks as
+ follows.
+
+
+ Project Facets Wizard
+
+
+
+
+
+
+
+ Here part of the listed facets are those which are provided by WTP=
. Some of them are
+ added by JBoss Tools. They are:<=
/para>
+
+
+ BIRT Charting Runtime Component
+
+
+ BIRT Reporting Runtime Component
+
+
+ JBoss ESB
+
+
+ JBoss Portlets
+
+
+ JBoss Web Services
+
+
+ Seam
+
+
+
+ On this wizard page you can enable or disable any facet as well as=
change it version.
+ What you should note here is that some facets or facets versions may co=
nflict with each
+ other. In case of incompatibility you'll be prompted about this in the =
combo
+ box underneath.
+
+ Facet Constraints
+
+
+
+
+
+
+ When switching on the
+ Runtimes
+ tab on the right you'll see the current server Runtime.
+
+ Runtimes on the Project Facets Wizard
+
+
+
+
+
+
+ On this tab you can also create a new Server Runtime and make it p=
rimary by pressing
+ Make Primary
+ button after enabling it.
+
+ Clicking on
+ OK
+ will save the chosen configuration of the facets and return=
you to the Dynamic Web Project wizard. Further pages in the
+ wizard are specific to either the project type or the facets selected.<=
/para>
+
+
+ If you need to configure the facets for the existing project, you =
should bring up the
+ context menu for selected project and click
+ Properties
+ and then
+ Project Facets. Thi=
s will bring up the familiar
+ Project Facets wizard, where y=
ou can create
+ your own custom facets configuration.
+
+
+
+
+
+ Relevant Resources Links
+
+ More on the WTP facets you can read in the eclipse help.
+
+
+
+ =
+
+ Deploying Modules
+
+ In this chapter it will be described how to deploy modules onto the=
server.
+ First of all it is necessary to say that deploying to a server is =
mostly painless. There
+ are several ways to do it provided by WTP, and some additional methods p=
rovided by JBoss
+ Tools. These methods are described further in this chapter.
+
+
+ Deploying on the Package Explorer
+
+ On the package explorer it is possible to publish either a project=
to a server or just
+ a single file. Let's look at how to do this.
+
+ Deploying with Run On Server Wizard
+ The first WTP method is to right-click on a project, such as a D=
ynamic Web
+ project, EJB project, or EAR project and then select
+ Run As > Run on Server
+ . The resulting dialog allows you to select which supportin=
g server the
+ project can be published to.
+
+ Define a New Server
+
+
+
+
+
+
+ Click
+ Next
+ button to see add or remove projects page where you can ch=
oose projects
+ to configure them on server.
+
+ Add or Remove Projects
+
+
+
+
+
+
+ This page of the wizard also allows to undeploy modules from the =
server. For that
+ choose proper module(s) from the right and click
+ < Remove
+ . The modules will be completely undeployed after restartin=
g your server
+ or republishing.
+ Generally, for the JBoss AS Server Adapters, publishing using thi=
s method will
+ force a default, best-guess, packaging configuration for your project.=
This
+ best-guess does not publish incrementally, but instead repackages your=
entire
+ project into a
+ .war
+ ,
+ .jar
+ , or
+ .ear
+ as appropriate, and then copies that file into the proper =
deploy
+ directory. For quicker smarter deployment, you will need to create arc=
hives using
+ the Project Archives view and customize
+ packaging yourself.
+ =
+ =
+ =
+
+
+
+
+ Deploying single files
+
+ Sometimes it becomes necessary to deploy one or more files to a s=
erver. For
+ that in order not to do a full republish in the context menu of files =
a Deploy To Server
+ option is provided that allows a single file deployment. To deploy the=
se non-WTP files/projects
+ right click on the file (
+ -ds.xml,
+ .ear,
+ .jar etc.) and se=
lect
+ Deploy To Server
+ and it will be automatically deployed.
+
+ Deploy to Sever
+
+
+
+
+
+
+ The deployed files are listed side-by-side with other modules tha=
t are deployed to
+ the server.
+ =
+
+ Deployed files on the Server
+
+
+
+
+
+
+
+
+
+
+
+ Deploying with JBoss Server View
+ As it has been already mentioned JBoss=
Server View contains two
+ parts: the top part that displays all defined servers and the bottom pa=
rt which provides
+ categories with additional information. Thus, in this section we sugges=
t two more ways
+ to deploy resources onto the server.
+
+ Top part of JBoss Server View
+ In the top part of the JBoss Servers =
View like in the Servers
+ View you should right click on a server and select the
+ Add and Remove Projects
+ menu item.
+
+ Add and Remove Projects
+
+
+
+
+
+
+
+ This will bring up a familiar dial=
og allowing
+ you to either publish projects or modules to a server, or remove them =
from the
+ server. If the selected module is a project like a Dynamic Web project=
, EJB project,
+ or EAR project, it will be published as through
+ Run on Server
+ wizard, with a best-guess full package. If, however, the s=
elected
+ element is an archive from the =
Project Archives
+ view, it will be published according to the rules of that modu=
le
+ type.
+
+
+
+ Bottom part of JBoss Server View
+ In the bottom part of
+ JBoss Server View
+ there is a category called
+ Modules
+ which should display all currently-published modules on th=
e server.
+ Right-clicking on the desired module and selecting
+ Full Publish
+ will force a full rebuild of the entire module.
+
+ Full Publish
+
+
+
+
+
+
+
+ Here,
+ Incremental Publish
+ is meant to enable publishing of only those parts where ch=
anges have
+ been made.
+
+
+
+ Deploying with Project Archives View
+ In the Project Archives View you can right-click on any declared
+ archive and select the
+ Publish To Server
+ element. For more on this subject, see Publishing to Server in the Project Archives View sect=
ion.
+
+ Publish to Server
+
+
+
+
+
+
+ The only way to ensure an
+ Incremental Build
+ , such as changes to one
+ .jsp,
+
+ .html, or
+ .class
+ file, is to enable the builder for that project. This is do=
ne by either
+ changing the global preferences for the Arc=
hives View, or by
+ enabling project-specific preferences and ensuring the builder is on.=
para>
+ =
+ You can also use the "Finger touch" button for a quick restart of =
the project without restarting the server:
+
+ Finger Touch button
+
+
+
+
+
+ =
+ The "Finger" touches descriptors dependent on project (i.e. web.xm=
l for WAR, application.xml for EAR, jboss-esb.xml in ESB projects).
+ =
+ =
+ The last chapter covers a variety of methods on how you can deploy=
needed modules onto a
+ server.
+
+
+
+ =
+
+ TPTP Support
+ This chapter provides an overview on how to enable TPTP Profilin=
g for JBoss
+ AS adapters in JBoss Tools<=
/property>.
+
+
+ TPTP Profiling
+
+ To get TPTP profiling work on JB=
oss Application Server you should
+ first download TPT=
P 4.5.0 Runtime and install it, i. e. just add the content of
+ plugins/features
+ folders from downloaded directory to the same fold=
ers in your eclipse
+ installation directory.
+
+ And now all profile actions should work for you. To start
JBoss
+ AS in profiling mode use
+ Start the server in profiling =
mode
+ button or
+ Profile As > Profile on Ser=
ver
+ option in the context menu of the project.
+
+
+ Start the Server in Profiling mode
+
+
+
+
+
+
+
+ To enable TPTP features in your workbench use Profiling and Logging
+ Perspective that you can find in the list of pr=
oposed perspectives:
+ Window > Open Perspective &=
gt; Other=E2=80=A6
+
+
+
+
+ Profiling and Logging Perspective
+
+
+
+
+
+
+
+
+
+ Relevant Resources Links
+ All additional information on TPTP(Test and Performance Tool=
s Platform) you can find
+ in eclipse documentation.
+ In summary, this reference should help you to start with
JBoss AS and get to know w=
ith functionality
+ for work with it.