This chapter lists Frequently Asked Questions (FAQs) related to Sun GlassFish Enterprise Server v3 Prelude. This list is certain to grow. For the latest FAQs, also see the GlassFish wiki at http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishFAQIndex.
This chapter contains the following:
Use asadmin list-commands to determine which commands are supported and available for use. For related information, see Appendix A, The asadmin Utility Commands, in Sun GlassFish Enterprise Server v3 Prelude Administration Guide.
See Chapter 3, Debugging Applications, in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.
Enterprise Server v3 Prelude and NetBeans 6.5 enable you to move applications that run on Tomcat using TopLink/EclipseLink to Enterprise Server. As a start, see “Moving Tomcat Toplink Apps to GlassFish v3 Prelude” (http://blogs.sun.com/Lance/entry/moving_tomcat_toplink_apps_to).
Eclipse is a development environment that provides a framework, tools, and runtime for deploying and managing software. The GlassFish plugin for Eclipse provides important changes to better support Enterprise Server v3 Prelude and to provide optimal redeployment of web applications. For more information, see the following:
Download: Download the plugin from within Eclipse using the Download Additional Server Adapters link on the New Server Wizard. See the Downloads page for additional information (https://glassfishplugins.dev.java.net/download/index.html). If you have difficulty downloading the plugin from within Eclipse, you could be experiencing an Eclipse update center network problem. Try again at another time.
Release Notes: https://ajax.dev.java.net/eclipse/releasenotes.html
Documentation: https://glassfishplugins.dev.java.net/eclipse34
See the Sun GlassFish Enterprise Server v3 Prelude Add-On Component Development Guide for complete details.
Enterprise Server has a highly modular architecture that enables you to add new types of containers that handle many application types, not just Java EE. Enterprise Server defines a service provider interface (SPI), which container developers implement. The Enterprise Server framework then invokes the container's implementation of the SPI to detect, deploy, and manage applications of the new type.
For more information, see Chapter 6, Adding Container Capabilities, in Sun GlassFish Enterprise Server v3 Prelude Add-On Component Development Guide.
Web applications are the only Java EE application type supported by Enterprise Server v3 Prelude.
See Restrictions and Optimizations in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.
Java Persistence 1.0 support in Enterprise Server v3 Prelude is available as follows:
EclipseLink 1.0
Hibernate EntityManager
OpenJPA
Yes, Enterprise Server v3 Prelude includes JDBC support. The JDBC connection pooling infrastructure is the same as that of Sun Java System Application Server 9.1 (GlassFish v2). See “JDBC support in v3 Prelude” (http://blogs.sun.com/technical) for more information.
Jersey 1.0 is the production-quality Reference Implementation of JAX-RS. It is part of Enterprise Server v3 Prelude and is available from Update Tool. For additional details, including installation instructions, see the RESTful Web Services Developer’s Guide.
No, OpenESB v2 runs on Sun Java System Application Server 9.1 (GlassFish v2). For more information about OpenESB, see https://open-esb.dev.java.net.
To continue the question: I'm not sure what the second option does, or why I might choose one over the other.
Response: In a nutshell, a gem is an application runner. It can run your Rails application but nothing else. If you use the Enterprise Server v3 Prelude installation, start the domain and deploy. You can deploy several Rails applications (or Java EE applications even) concurrently with a different context root. This gives you access to different containers such as web and EJB and also to the Update Tool. Enterprise Server enables you to host not only multiple Rails applications, but also any other Java EE application.
No, the gem only runs Rails applications with no extensions or extra features. You must have Enterprise Server v3 Prelude with a web container to access the Administration Console.
To continue the question: WAR files and exploded Java webapp directories have a WEB-INF/lib directory. Rails applications also have a lib directory, but this is for Ruby libraries. Where in a Rails application can I put application-specific jar files? Is there such a place, or must I place them in the domain/lib directory?
Response: Place them in the domain/lib directory, or in glassfish/lib. If those bundles are OSGi bundles, you should place them in the glassfish/modules directory. If you want to package your own set of jar files with the Rails application, instead of copying the jars in the glassfish/lib or glassfish/modules directory, you might want to use Warbler. The Warbler gem lets you package your own jars and creates a WAR file from your Rails applications.
See the following:
Related documentation: Getting Started With JRuby on Rails for Sun GlassFish Enterprise Server v3 Prelude
Blog post: “New and Improved GlassFish Gem” (http://weblogs.java.net/blog/vivekp/archive/2008/11/new_and_improve_1.html)
Getting Started Guide: http://wiki.glassfish.java.net/Wiki.jsp?page=GettingStartedGuide
Gem documentation: http://glassfishgem.rubyforge.org
Warbler information: http://caldersphere.rubyforge.org/warbler/
Related screencasts: http://wiki.glassfish.java.net/Wiki.jsp?page=Screencasts
JRuby applications can be deployed natively, without the use of the servlet container. Enterprise Server v3 Prelude can run JRuby applications directly on top of the servlet container. Warbler can also be used to deploy JRuby applications to the servlet container.
For screencasts related to JRuby and Enterprise Server, see the GlassFish screencasts page at http://wiki.glassfish.java.net/Wiki.jsp?page=Screencasts. Also see Getting Started With JRuby on Rails for Sun GlassFish Enterprise Server v3 Prelude.
When the application is configured (within XML files), but no server side realm is configured, the application is authenticated in the default realm. No error is thrown that indicates “No such realm.”
Yes. Set the Java debugging property on the JVM. To see the handshake information from the application client, append the following to the VMARGS variable:
-Djavax.net.debug=ssl,handshake
Yes. Use the following Java 2 Platform, Standard Edition (J2SETM) properties to change the keystore password:
-Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=password
Note that the keystore password must match the individual key passwords to perform operations on the keys, so you must change the keystore password with the property mentioned above, and then change the password to each key to match that password.
Update Tool enables you to extend your Enterprise Server v3 Prelude installation by adding add-on components such as JRuby and Groovy, Jersey, and Metro web services. Update Tool can be accessed from within the Administration Console or on the command line.
After you start your Enterprise Server instance, the default location for the Administration Console is http://localhost:4848/ (at least one Enterprise Server domain must be started before you can launch the Administration Console). Unless you declined to check for updates during installation, you will be notified of available updates in the message area. Update Tool can also be accessed on the command line by running the updatetool command in the as-install/bin directory. Extensive online help is provided for both versions.
For more information about Update Tool, see Chapter 3, Extending Enterprise Server, in Sun GlassFish Enterprise Server v3 Prelude Administration Guide. Also see the Administration Console online help.