For more information about GlassFish Server, samples, documentation, and additional resources, see as-install/docs/about.html, where as-install is the GlassFish Server installation directory.
GlassFish is a complete application server, meaning it implements 100% percent of the Java EE 6 specifications, but it also has additional features that make it a polished product such as its administrative capabilities be it through:
- the admin console;
- or via a powerful asadmin command-line interface;
This 2 admin tool manage the configuration stored in a file called domain.xml (located in domains\domain1\config), which can be useful for troubleshooting, but should not be edited by hand.
1) The admin console: is a browser-based administration user interface for the application server.
With a default installation, the admin console is available at:
- http://localhost:4848
Starting with GlassFish v3, an anonymous user can be set up, removing the need to log in. If this is not the case, a typical installation will have admin as the user name and adminadmin as the default password.
This tool is for both administrators and developers. It provides:
- graphical representation of the objects under management;
- enhanced log file viewing;
- system status and monitoring data;
It can be used, at a minimum,to manage the creation and modification of configurations (JVM tuning, log level, pool and cache tuning, etc.), JDBC, JNDI, JavaMail, JMS, and connector resources, as well as applications (deployment). In the cluster profile of GlassFish, the admin console is enhanced to let the user manage clusters, instances, node agents, and load-balancing configurations. At any time in the navigation of the tool, contextual help is available via the top-right Help button.
2)The asadmin CLI (Command-Line Interface): is quite powerful and often what people use in production, as it can be scripted to create instances and resources, deploy applications, and provide monitoring data on a running system. The command is located under the bin subdirectory of GlassFish and can manage multiple local or remote application server domains.
asadmin offers several hundred commands, but you should get away with using only a small subset of these. If you are curious about the commands, try asadmin help.
Useful commands in a simple developer profile include:
- asadmin start-domain;
- asadmin stop-domain;
- asadmin deploy;
- asadmin deploydir;
- asadmin undeploy;
Testing Web Services on Glassfish
If your service class is called "myClass" Netbeans will deploy the service has "myClassService" in the context path specified on the project (ex. "contextPath") Using glassfish you can test your service acessing the urls:- http://localhost:8080/contextPath/myClassService
- http://localhost:8080/contextPath/myClassService?wsdl
- http://localhost:8080/contextPath/myClassService?tester
Sem comentários:
Enviar um comentário