Sun GlassFish Enterprise Server v3 Prelude Troubleshooting Guide

Chapter 3 Frequently Asked Questions

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:

Administration FAQs

Which asadmin Commands are Supported?

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.

Application FAQs

How Do I Debug Applications?

See Chapter 3, Debugging Applications, in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.

How Do I Change Application Permissions?

See Changing Permissions for an Application in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.

What Are the Restrictions and Optimizations for Session Beans?

See Session Bean Restrictions and Optimizations in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.

How Do I Move Tomcat Toplink Applications to Enterprise Server v3 Prelude?

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 FAQs

Where Can I Find More Information About Eclipse and Enterprise Server Integration?

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:

Extensibility FAQs

How Do I Develop Add-On Components?

See the Sun GlassFish Enterprise Server v3 Prelude Add-On Component Development Guide for complete details.

How Do I Add Containers?

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.


Note –

Web applications are the only Java EE application type supported by Enterprise Server v3 Prelude.


How Do I Extend the Administration Console?

See Chapter 3, Extending the Administration Console, in Sun GlassFish Enterprise Server v3 Prelude Add-On Component Development Guide.

Java Persistence FAQs

What Are the Restrictions and Optimizations for the Java Persistence API?

See Restrictions and Optimizations in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.

What Java Persistence Support Is Available?

Java Persistence 1.0 support in Enterprise Server v3 Prelude is available as follows:

JDBC FAQs

Is JDBC Support Provided?

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 FAQs

How Do I Use Jersey?

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.

OpenESB FAQs

Does Enterprise Server v3 Prelude Support OpenESB?

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.

Rails and JRuby FAQs

Should I Start an Enterprise Server Domain and Deploy My Application Into It, or Should I Use the glassfish_rails Gem?

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.

If I Deploy an Application Using the glassfish_rails Gem, Can I Still Access the Administration Console?

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.

Where in a Rails Application Structure Does Enterprise Server Look for jar Files to Add to the Classpath for That Application?

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.

Where Can I Find More Information About Rails Applications and Enterprise Server?

See the following:

What Options Are Available for Running JRuby With Enterprise Server?

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.

Security FAQs

What Happens When No Server Side Realm Is Configured?

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.”

Can I See the TLS/SSL Handshake Information for an SSL Client?

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

Can I Change the Keystore Password?

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 FAQs

How Do I Use Update Tool to Extend My Enterprise Server Installation?

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.