Book Image

Java EE 6 Cookbook for Securing, Tuning, and Extending Enterprise Applications

By : Mick Knutson
Book Image

Java EE 6 Cookbook for Securing, Tuning, and Extending Enterprise Applications

By: Mick Knutson

Overview of this book

<p>Java Platform, Enterprise Edition is a widely used platform for enterprise server programming in the Java programming language. <br /><br />This book covers exciting recipes on securing, tuning and extending enterprise applications using a Java EE 6 implementation. <br /><br />The book starts with the essential changes in Java EE 6. Then we will dive into the implementation of some of the new features of the JPA 2.0 specification, and look at implementing auditing for relational data stores. There are several additional sections that describe some of the subtle issues encountered, tips, and extension points for stating your own JPA application, or extending an existing application.<br /><br />We will then look into how we can enable security for our software system using Java EE built-in features as well as using the well-known Spring Security framework. We will then look at recipes on testing various JavaEE technologies including JPA, EJB, JSF, and Web services.<br /><br />Next we will explore various ways to extend a Java EE environment with the use of additional dynamic languages as well as frameworks. <br /><br />The book then covers recipes that touch on the issues, considerations and options related to extending enterprise development efforts into mobile application development.<br /><br />At the end of the book, we will cover managing enterprise application deployment and configuration, and recipes that will help you debug problems and enhance the performance of your applications.</p>
Table of Contents (15 chapters)
Java EE 6 Cookbook for Securing, Tuning, and Extending Enterprise Applications
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Enabling JMX over SSL on GlassFish server


GlassFish has the ability to allow connections to JMX over SSL. This is an easy change to make and it is a great security benefit, so in this recipe we will go through the steps to add SSL support to GlassFish and VisualVM to connect over SSL.

Getting ready

To enable SSL-encrypted connection for JMX, a few configuration items as well as SSL keystore preparation must be completed first.

SSL keystore

The GlassFish server is distributed with a self-signed SSL keystore located at $GLASSFISH_HOME/glassfish/domains/domain1/config/keystore.jks and will be used for this recipe.

SSL JMX configuration

This recipe will configure the JMX connection to leverage GlassFish authentication which will either set the security-enabled attribute in the<jmx-connector> element to"true", or delete the property all together. The following listing is the< jmx-connector> element in %GLASSFISH_HOME%\glassfish\domains\domain1\config\domain.xml, which is set to"false...