The GlassFish V3 plugin qa-functional test is running a little bit different than its previous GlassFish V2.x version which uses XTest for the harness.
Below is the procedure to check out the Netbean web-main, build and run the GlassFish V3 plugin qa-functional test.
Software requirements:
%hg, ant1.7.1, jdk1.5.0_17, jdk1.6.0_13. GlassFish V3 promoted build
Checkout, build and run-test
%hg clone http://hg.netbeans.org/web-main
%cd web-main; ant
%ant -f glassfish.javaee/build.xml -Dtest-qa-functional-sys-prop.v3.server.path=/root/V3-B51-SDK/glassfish -Dtest-qa-functional-sys-prop.v3.server.javaExe=/usr/jdk/jdk1.6.0_12/bin/java test-qa-functional
Where: /root/V3-B51-SDK/glassfish is GlassFish V3 Server installed location
Generate report
%cd glassfish.javaee; ant test-generate-report
Note:
If you encounter problem when building the web-main, go to the blog "
29 Jun · Mon 2009
18 Mar · Wed 2009
04 Sep · Thu 2008
Today I try configure and run PHP files with Glassfish V3 for both Quercus and Joomla (JavaBridge), and here is how I see.
1. Joomla (JavaBridge) PHP
The simplest way for Joomla (JavaBridge) is just deploy the JavaBridege.war file to V3 server after unzip the php-java-bridge_5.5.5_j2ee.zip file as shown in figure below:

Then, click launch to execute the JavaBridge PHP Sample index file as shown in the figurre below

Click the 1st link to execute test PHP info file, please see the result figure below:

If you want to customize the PHP application, unwar the JavaBridge.war file, do some cleanup then war the file back. For more instruction, please visist Sébastien Dionne's article
2. For Quercus PHP
The same procedure applies to Quercus. Download Quercus zip file, unzip the file then war it. Use Glassfish Admin GUI console to deploy the app (in my case, I named it as Quercus.war). Please see figure below
3. If you want to use Netbean 6.5 IDE to write PHP files for mutiple applications, you can visit Arun Gupta's Blog for configuration steps. EXCEPT, copy all jars files to "GLASSFISH_HOME/glassfish/lib" directory" instead of "GLASSFISH_HOME/domains/domain/lib" likes in V2.
29 Aug · Fri 2008
Below is the simple steps to create and execute a sample Servlet Web Module with NB 6.5 for Glasfish V3 Server.
1. Go to http://bits.netbeans.org/download/trunk/nightly/latest/ download the latest 6.5 bits
2. Install the Netbean IDE - by default Glassfish V2 and V3 sevrers were bunbdled with NB 6.5 as described in the figure below:
3. Start Netbean IDE (you can start from command line or from the Desktop icon)
-If you click at Services tab > expand the Servers node, you should see Glassfish V3 prelude server listed there
-Right-click at Glassfish V3 node should allow you to start the server or view the server log or launch the admin GUI console as described in the figure below:
4. To deploy a simple Servlet Web Project, click Project Tab > from File menu, select New Project > expand Samples > Java Web > select Servlets Example > click Next > choose a location for the project > click Finish button
5. Change server run time to Glassfish V3 Prelude (by default it's set to V2), right-click at ServletsExample project > select Run > change server from Glassfish V2 to Glassfish V3 > click OK

6. Right-click at ServletExamples project > select Run menu
Glassfish V3 Server will be started (if not) > ServletExamples project is deployed and executed as shown in the figure below
09 Jul · Wed 2008
The Plugin was published yesterday (July 08, 2008)
Release note and bugs fixed in this release.
https://ajax.dev.java.net/eclipse/releasenotes.html
The GF Plugin can be downloaded from within the Eclipse for Java EE Developers using the download additional server adapters link on the New Server Wizard.
Download Eclipse 3.4 Ganymede version
http://www.eclipse.org/downloads/packages
To Configure Eclipse 3.4 with Glassfish, please follow the instruction from Arun's Blog http://blogs.sun.com/arungupta/entry/glassfish_on_eclipse_ganymede
For questions and comments:
user-AT-glassfishplugins.dev.java-DOT-net
dev-AT-glassfishplugins.dev.java.net
quality-AT-glassfish.dev.java-DOT-net
For issues:
https://glassfishplugins.dev.java.net/issues
12 Jun · Thu 2008
Below is the steps to connect Glassfish V2 "sun-appserv-samples" Derby database from Eclipse JEE 3.3 version: (Please, use Eclipse IDE for Java EE Developer version and the instruction from this document to have GF server setup)
From IDE Window menu, select Open Perspective > Other > choose Database Development
On the Database Development panel (figure below), righ-click Databases > select New from the menu
to create a New Connection Profile and choose 'Generic JDBC Conenction' from the list.
Click Next to enter a name for the
connection profile, name it as 'TestDerbyPool' > click Next and click ...

From Driver Definition panel, select Derby > 10.2 > click Add to add a new driver
From the New Driver Definition panel, select Derby > 10.2 > Derby Client JDBC Driver > click OK
From Edit Driver Denifition panel, remove the default derbyclient.jar file > click Add Jar/Zip to add the derbyclient.jar file from Glassfish directory > edit the properties as described in the following figure:
Connection URL: jdbc:derby://localhost:1527/sample;create=true
Database Name: sun-appserv-samples
Driver Class: org.apache.derby.jdbc.ClientDriver
Password: APP
User ID: APP
Click OK > OK button to go back to the New JDBC Connection Profile panel. Now you should have all the fields values configured
Start the Derby database and click Test Connection button. You should receive the Success and tables dialogs below:
For information to connect to Derby by using DTP please, click here
04 Jun · Wed 2008
Last week, I have a chance to test the N1SPS6.x Application Server Plugin. The steps to config and setup N1 system is more complicated than I thought since it requires a comprehensive software preparation. Please, see the figure below for the software components requirement
Howerver, after the system was setup and ready to use, I was thrilled to learn that N1 can easily handle many different tasks that would require extremely amount of time to perform. Some of the main tasks that N1 can help users to do is including installation of Application Server package base, installation of load balancer plug-in on a remote machine, installation of HADB server, creation of node agent management, creation of clustermanagement, application deployment and much more. Please, visit the N1 article to learn more about the N1 system.
This is one of the examples I think first patient will pay off. After onetime patient setup, everything would become much easier.
17 Apr · Thu 2008
Today, I just download Netbean 6.1 RC and try to see if it works with Glassfish V3 server. I'm impressed. It took me <5 minutes to have Glassfish V3 installed and configured with Netbean IDE. The procedure is so much simple and fast now.
It's required only 2 steps to configure Glassfish V3 with Netbean IDE. The Glassfish server was installed during the adding server process. View the screencast below to see how simple it is.
Steps to add Glassfish V3 to Netbean 6.x IDE
20 Mar · Thu 2008
To create a mySQL dbc connection pool from Glassfish V2 Admin GUI console, please follow 2 steps below
1. Create a new mysql test account
2. Create jdbc connection pool
1. Create a new mysql user account
a. Start database from a command prompt
$../<GlassFish-Installed>/mysql/bin/mysqld-nt.exe --defaults-file=../<GlassFish-Installed>/mysql/mysql.ini
(For Solaris machine replace mysqld-nt.exe by mysqld_safe)
b. Login as database admin to create a testUser account
$../<GlassFish-Installed>/mysql/bin/mysql -u root
mysql> grant all privileges on *.* to 'testUser'@'localhost' identified by 'testPassword';
2. Create jdbc connection pool and test the connection
a. Start domain1
../<GlassFish-Installed>bin/asadmin start-domain
b. Create jdbc connection pool for mySQL
-From Admin GUI Console > expand Resources node > JDBC > Connection Pools > click New button and enter information below:
Name: testMYSQL
Resources Type: javax.sql.DataSource
Database Vendor: MySQL
Click Next to proceed to the next panel
Go to Additional Properties and enter:
databaseName: test
User: testUser
Password: testPassword
ServerName: localhost
Click Finish button
Click testMYSQL > select ping to test the connection
19 Mar · Wed 2008
1. Requirements
a. Software: Glassfish V2, Python 2.2.4 or later version and Mercurial 0.9.5
Note: for Mercurial if you need to build it, please click here
b. Netbean account (userID/password)
2. Getting a Copy of Netbean Repository
a. Create a template working directory (nb_all)
$mkdir nb_all
$cd nb_all
b. Run the mercurial command below to check out all netbean modules
$hg clone http://hg.netbeans-DOT-org/main
c. Configure your user name and write access to configuration files
Edit ../main/.hg/hgrc and add lines
[ui]
username = jhacker-AT-netbeans.org
host = webcache.sfbay.sun.com:8080
[paths]
default = http://hg.netbeans.org/main
default-push = https://jhacker:secretpass-AT-hg.netbeans.org/main
(Replace jhacker with your netbeans.org username. Replace secretpass with your password and wecache.sfbay.sun.com with your proxy server if you have one)
For full mercurial instruction please visit http://wiki.netbeans.org/HgHowTos
3. Build Netbean j2ee and xtest Modules
To build j2ee module
$cd main
$ant -f nbbuild/build.xml -Dcluster.config=j2ee
$cd xtest
$ant
Note: to fix the outOfMemory problem, for bash/ksh shell set (export ANT_OPTS="-Xms256m -Xmx256m"blogs.sun.com/images/smileys/wink.gif" class="smiley" alt=";)" title=";)" />
fix PermGen OutOfMemory problem (export ANT_OPTS="-Xmx512m -XX:MaxPermSize=128m"
4. Execute Test (resources, webapp and ejb/jfs) Module
$cd /opt/SUNWappserver/bin (assume you installed Glassfish server at that directory)
$./asadmin start-domain domain1
$copy cfg-qa-functional.xml.cfg-res to cfg-qa-functional.xml (to run only resources and configuration test suite)
$cd ../main/j2ee.sun.appsrv81/test
$ant -Dsjsas.server.path=/opt/SUNWappserver
19 Feb · Tue 2008
This screencast shows you steps to record a simple glassfish deployment test case with selenium.
After click Play, please wait for the screencast to load
11 Feb · Mon 2008
Want to try Glassfish Admin GUI with Selenium and experience the differences between SilkTest and Selenium tools
1. Run Selenium from the build
If you build admin-gui module you can find the README.SeleniumRC file under the ../glassfish/admin-gui/tests directory. Just follow the instruction from the file, you should be able to setup and run Selenium JBI tests with Glassfish Admin GUI. If you encounter a failure from your browser, open selenium test case files under java directory and replace statement
selenium.waitForCondition("Selenium.browserbot.isNewPageLoaded()", TIMEOUT_PERIOD) by
selenium.waitForPageToLoad( TIMEOUT_PERIOD)
2. Run Selenium with Glassfish V2 binary bit
1. You must setup the environment by installing Selenium IDE on your Firefox browser
2. Having ant 1.6.5 and jdk1.5.0_11 or latest version installed on your system
3. Create a AdminGUITest directory on your system and copy the following 4 files to the ../AdminGUITest/lib directory
selenium-server.jar , selenium-java-client.jar, selenium-java-client-driver-tests.jar and testng-5.5-jdk15.jar and junit.jar
4. Copy the simple test harness (AdminGUITest.jar file) to your AdminGUI directory and unjar the file
5. Update build.properties file with your setup environment
6. Start the selenium remote server (assume you're using a window system)
cd %AdminGUITest.home%
java -jar selenium-server.jar
7. Start glassfish domain1
8. Run the first AdminGUI test case
cd %AdminGUITest.home%
ant run-test
3. Differences between SilkTest and Selenium
| Features | Selenium | SilkTest |
| HTLM Web Object Support | Yes | Yes |
| Easy Creation Object Scripts (Record and Playback) | Yes | Yes |
| Scripting in variety languages (Java, Perl, C#, PHP, ..) | Yes | No (Only 4test language) |
| Ability to run test with build scripts (maven, ant,..) | Yes | No |
| Support Different Browsers | Yes | Yes |
| Reusability of Scripts | Yes | Yes |
| Commercial Support | Yes | Yes |
| Test Debugging | Yes | Yes |
| Result Reporting | Fair | Yes |
| Exception Handling | Fair | Yes |
| Java Objects (beyond the browsers) | No | Yes |
| Https protocol support | Yes (some configuration required) | Yes |
| Capable of record exactly same as end-user desire | Fair | Yes |
| Organize tests according to the manual Test Plan | No | Yes |
| Data Driven Test Framework | No | Yes |
| Mechanism to create test independently (one test should not depend on other) | No | Yes |
| Support Multiple OS | Yes | Yes |
| Comprehesive Test (run for > 8 hrs) | Weak | Yes |
20 Dec · Thu 2007
Why SilkTest / Selenium
If you want to automate your applications with Glassfish Admin GUI. There are few software tools that you can use such as: SilkTest, Selenium, Httpunit, WinRunner, Among those tools I found SilkTest and Selenium work best to automate Glassfish Admin GUI test cases. This blog shows you the steps to setup and configure SilkTest for Glassfish Admin GUI. For selenium, please click this link
SilkTest 2006 R2 and SilkTest 7.6 are the two versions we are currently using for Glassfish V2. Since SilkTest is mainly installed and executed on a Window machine, you should write your test to run with IE browser. It doesn't matter if Glassfish installed on a Solaris, a Linux or a MacOS machine; you will not find any problem to run SilkTest on a client window machine.
The browser we've been testing is IE 6/7, but Silktest can also run with FireFox or Mozilla browsers. If you have Glassfish installed on a machine which is different than SilkTest automation suites installed, please do the extra step (1 or 2) below:
1. For Solaris
-Login the Solaris machine as root
-Edit /etc/hosts.equiv file > add + + line in the file.
-Go to root directory > edit file .rhosts > add a line + + in the file.
On the window where SilkTest installed, put rsh.exe name in the machine PATH. rsh.exe file should be located under c:\windows\system32 directory
2. For Linux:
-Login the Linux machine as root.
-Edit /etc/pam.d/rsh file > change all “required” to “sufficient”
-Edit /etc/securetty file > add “rsh” at the bottom
-To check if rsh working, on window, type: rsh <LinixHostname> -l root ls. You should see all files under Linux root machine listed.
Config SilkTest:
-From window, click Start menu->Programs->SilkTest->Extension Enabler.
-Select to enable extension by selecting “IE DOM” from Primary Extension of the correct IE version. Remeber to disable all extensions for all other browsers and java application. > click “OK” button when done. (Please see the picture below)
-Again click Start menu->Programs->SilkTest->SilkTest to bring up SilkTest > click Options menu > Extensions > enable only IE version to test and disable all other extensions > click “OK” button when done.
-Click Options menu > Agent > click Timing tab > give 60 in the “Window timeout” field > Uncheck all check boxes in verification click “OK” button when done. (Please, see the figure below)
-Click Options menu > Runtime and remove all content in Use Path field > make sure only “extend\explorer.inc” appears in the “Use Files” field and the correct IE browser version in the “Default browser” field. (click here for the runtime option picture)
19 Dec · Wed 2007
I encountered question how to view the Webservice Monitoring Realtime
Statistic for Glassfish V2 project. This blog lists the steps to configure Webservice Monitoring Realtime Statistic.
-First, please follow the instruction from the technical article Managing and Monitoring Web Services in Project GlassFish to configure your Web service monitoring managing level.
-From admin GUI console, click Common Tasks menu > View Monitoring Data > Call Flow > select to enable Call Flow Monitoring > click to save the changes
For EE version, in addition to the steps above, please start the Derby database.
27 Jun · Wed 2007
Today I try to install the roller with glassfish Beta build by using the asadmin install-addon command. The installation went smoothly. The procedure is much simpler than installed with Tomcat server which I did sometime ago. The database configuration and setup is straight forward since it was done by the installer. It took me ~5 minutes to have the roller setup and ready to use in AppServer 9.1 while it took me ~3 hours to install and configure for tomcat container!
17 May · Thu 2007
Steps Sharing NFS directories
I have a hard time remembering steps to configure an NFS sharing directory. Every time having a new machine, I have to go back to my note and search for the page which lists the steps below:
1. cd /etc/dfs
2. vi dfstab file and add the sharing directory (eg sharing NFS directory is /export/home1 then the syntax would be)
share -F nfs /export/home1
3. Execute command /usr/sbin/shareall
4. cd /etc/init.d and execute command
./nfs.server stop/start
--------------------------------------------------------------------------------------------------------------
Many thanks to Sean who just told me that all the commands above are being replaced with just one command:
sharemgr share -F nfs -p /export/home1
01 Jun · Thu 2006
Writing a Simple XSLT Transformation Rule File
XSLT transformation rule can be applied to a Web Service endpoint. The transformation rule will enable fine-grained control of web service requests and responses. To config, please use the following document http://docs.sun.com/app/docs/doc/819-3658/6n5s5nko6?a=view
For a simple web service application, down load the template files below. Replace the bold text in the template files with your appropriate web service method name and its result data. For example, if your web service application has a method named myMethod and the method returns a string "Hello World" then just replace sayHello by myMethod and the return string "This is ...TEST" by "Hello World"
For JAX-WS application, replace http://service/ with your targetNamespace value. For JAX-RPC, replace http://hello.org/wsdl/HelloWorld by wsdl-port xmlns:wsdl-port_ns_ value from webservices.xml file






