|
How to improve GlassFish easily -- using NetBeans 5.5
GlassFish build with NetBeans 5.5 Preview
How
to improve GlassFish easily
-- using NetBeans 5.5
Contents
Get NetBeans 5.5
Checkout GlassFish Project, and configure
Server Image
Add & Start GlassFish Server in NetBeans
Modify the Source Code and Build GlassFish
Project using NetBeans
Verify the changes Quickly in GlassFish Server
Following are the detailed steps to develope GlassFish with NetBeans
IDE.
- Get
NetBeans 5.5 : Download Netbeans
5.5 and install it to develope GlassFish Application Server.
Netbeans installation process is pretty easy and straight forward, just
follow the installer.
- Checkout
GlassFish Project, and configure Server Image
Checkout Glassfish bootstrap module as
below:
% cvs -d
<java.net-ID>@cvc.dev.java.net:/cvs glassfish/bootstrap
% cd glassfish/bootstrap
Checkout project: appserv-core and install/configure GlassFish Server
image by
running following command, more details on GlassFish
builds.
% maven -Dmodules=appserv-core checkout bootstrap configure-runtime
- Add
& Start GlassFish Server in NetBeans
Now we have GlassFish Application
Server image, called as
${glassfish.home} in this document later as GlassFish documents. We
have checked out appserv-core module in GlassFish, so we will modify
the code and build the workspace using NetBeans IDE.
Open the IDE by running
<ws>/netbeans-5.5preview/bin/netbeans command. In the "Runtime"
tab, you
will see Tomcat and Sun Java System Application Server in the "Servers"
tree, add "GlassFish" Server to test your newly installed GlassFish
server from ${glassfish.home} and start the server by right clicking
GlassFish Server name and select "Start" menu. You will see the server
log messages in the bottom of the IDE window.
- Modify
the Source Code and Build GlassFish Project using NetBeans
Now open project appserv-core using
NetBeans 5.5 IDE from the GlassFish
Workspace, in Netbeans "File" menu, go to "Open Project.." and
select
"appserv-core" directory from GlassFish workspace that we checked out
earlier.
Goto "src\java" source tree and select package
"com.sun.enterprise.server" and double click on PEMain.java and goto
line at the log message string variable: "pemain.startup.complete" (for
message "Application server startup complete"). Add few messages using
System.out.println statements
so that it will be displayed on the output or log file.
Now right click on "Sun... glassfisher core" project and select "Build
Project" from the menu, you will be able to build appserv-core project
as below.
- Verify
the changes Quickly in GlassFish Server
Now you can start the GlassFish Server,
you should be able to see the new
added output lines around the "Application server startup complete"
message in PEMain.java which is the main launcher java program for
GlassFish Server.
This
illustrates the full IDE support of NetBeans 5.5 to improve GlassFish
Server in your developement environment which provides:
- Administration - Add,
Stop, Start Server Instance.
- Ease of Development - Write
source code, Compile, Build, Install, Configure GlassFish workspace.
Posted by dpatil
( Feb 28 2006, 02:13:09 PM PST / Feb 28 2006, 02:10:00 PM PST )
Permalink
Trackback: http://blogs.sun.com/dpatil/entry/how_to_improve_glassfish_easily
|