Saturday, May 31, 2008

Highly Useful JPA-Related Blogs

I stated in a previous blog entry that I had to cut quite a bit of material from my first draft of the article Basic JPA Best Practices. In this blog entry, I want to discuss in more detail some of the blogs I have found that are most useful in my JPA development. While I was able to briefly mention the value of using such blogs in my article, I was not able to coverage them individually as well as I would have liked.

Blogs, by their nature, have certain advantages over other forms of communicating details on a specific technology. First, it is difficult to think of a faster way to communicate new information than a blog. Blog entries typically don't have the review process of a formal article and, in fact, are often even written more quickly by an author than an article would be. That, of course, is also the primary disadvantage of blogs -- they are not reviewed and their quality varies greatly from downright incorrect to highly valuable, informative, and leading edge.

Another advantage of the blog medium of communication is that it allows for highly focused coverage that appeals to a narrow audience that might not justify publication of a book or article. While books can be more detailed than articles, there is typically a significant period of time between a book's initial concept and its publication. In fact, it is this advantage of blogs (the ability to focus on narrow topics) that I am taking advantage of with this particular blog entry. I am focusing on some of the most useful JPA-related blogs I have encountered because I could not spend that much time on them in the article.

A final advantage of blogs over more traditional software development literature mediums is that many highly skilled, highly experienced, and knowledgeable developers may be more willing to write a blog entry or respond to a blog entry than they would be to take the time to write and publish an article or book.

Because of these advantages of the blog as a form of communication, it is useful for a JPA developer to read from and learn from the work of others as covered in JPA-related blogs. With these advantages established, it is time to look at some of the JPA-related blogs that I have found most useful in my own JPA work.

What Michael Bouschen's Blog lacks in terms of number of entries, it makes up for in terms of the unusually high quality of the entries. As of this writing, there are the only two entries as far as I can tell. Still, the two entries are useful enough to JPA developers to warrant this blog getting referenced in the article. The first entry, Using Relationships in the Java Persistence Query Language (July 2006), provides thorough but concise coverage of different types of joins that can be performed in JPA Query Language along with some other useful details about JPA Query Language relationships. I found the next blog entry, Java Persistence Query Return Types (April 2007), to be even more interesting and useful. This entry is also thorough but concise in its coverage of various methods of querying in JPA.

Wonseok Kim's Blog has many blog entries, including a large number on JPA, TopLink Essentials, and other JPA-related themes. There are too many entries to cover them individually here, but a good sample of the value provided in this blog can be found in the blog entry Understanding the Cache of of TopLink Essentials (GlassFish JPA). Of course, this will most interest users of TopLink Essentials as their JPA provider, but I imagine that is a fairly large group considering that it is the JPA 1.0 reference implementation and is bundled with GlassFish.

Sahoo's Blog is another valuable source of detailed JPA information. Sahoo has also posted several JPA-related entities, so I narrow my focus to two closely related examples. In the blog entries A javac Plugin to Manage Your persistence.xml and An annotation processor to update your persistence.xml during javac, Sahoo demonstrates how to use custom annotation processing to generate the persistence.xml file from in-source annotations in the Java code. This is similar to what I demonstrated for generating the orm.xml file (or equivalent multiple files) from in-source annotations in the OTN article Better JPA, Better JAXB, and Better Annotations Processing with Java SE 6.

There are, of course, many other blogs covering the Java Persistence API. Some (such as On Persistence [Shaun Smith], Java Persistence [Doug Clarke], and the EclipseLink Team Blog) are pretty much focused on JPA. Others (such as my blog, Chris Maki's blog, and the AMIS Technology Blog) have a more general software development focus, but occasionally feature JPA-specific blog entries.

JPA-related blog entries can provide many advantages such as timeliness, access to authoritative experts that might not wish to write a book or article, greater focus on details that don't warrant a full book or article, and other advantages associated with the so-called Web 2.0 social network. The one caveat is that not all blogs are created equal. The ones I have highlighted here are, in my opinion, of very high value and quality. However, especially with blogs you are not familiar with, it always makes sense to balance what you read in a blog entry with your own experience and with the experience of others as reflected in their blogs, articles, and books.

Friday, May 30, 2008

A First Look at JMX Web Services Connector

JSR 262 ("Web Services Connector for Java Management Extensions (JMX) Agents") holds much promise an an alternative to the standard remote JMX connector. While the only remote JMX connector required by the JMX Specification (RMI) has been satisfactory for many needs, it has its limitations. RMI is commonly associated with firewall concerns and necessarily requires the JMX client to be implemented in Java. Also, being based on web services is advantageous because of the standardization of web services.

Although work on JSR-262 is still underway, there is already a reference implementation that can be used to gain a more practical perspective on how the JSR enables JMX clients to communicate with a JMX agent via web services. In future blog entries, I hope to blog about additional details related to JSR-262 and its reference implementation such as the association of WS-Management ("Web Services for Management") and the Java-based WS-Management implementation called Wiseman. For now, though, I'll concentrate on trying out one of the Web Services Connector for Java Management Extensions (JMXTM) Agents Reference Implementation Project samples.

The Early Access 3 version of ws-jmx-connector can be downloaded as jsr262-ri.jar and this JAR includes libraries needed for client and server side as well as Javadoc documentation and samples that can be run to try out the web services connector. Most of the necessary dependencies are included in the download (such as wiseman-core.jar), but one significant set of dependencies that must be downloaded separately is the unbundled JAX-WS libraries. The ws-jmx-connector sample documentation states that JAX-WS 2.1.3 should be downloaded, but I downloaded 2.1.4 and had no problems with that version. Once downloaded, the jaxws-ri libraries (all the JARs in the lib directory of the jaxws-ri expanded directory should be copied into the lib directory of the directory expanded from the jsr262-ri.jar. In other words, all contents of the jaxws-ri.jar-expanded lib directory should be copied in to the same-named lib directory of the jsr262-ri.jar expanded directory. If these JAX-WS libraries are not copied into the sample's lib directory, the following error will be seen when trying to run the sample's server.



Without the unbundled JAX-WS libraries copied into the lib directory of the JMX-WS RI lib directory, the client side of the sample will have trouble similar to the server. This is shown in the next screen snapshot.



In both cases (server and client sample code), the error messages provided for the client and for the server clearly point out that the JAX-WS 2.1 bundled with Java SE 6 is not sufficient and that the unbundled JAX-WS 2.1 is needed instead.

While on the subject of Java SE 6 and JAX-WS, this is probably a good time to point out that things are easiest if you use a version of Java SE 6 Update 4 or later. This is because the JAX-WS 2.1 API was included in the rt.jar in that update.

The version of Java used affects which additional libraries besides the jaxws-ri.jar lib contents are needed. Likewise, the version of Ant used to run the samples is significant (at least Ant 1.6 is required). The following screen snapshot demonstrates that I am using a new enough version of Java SE 6 to not need to worry about extra handling associated with J2SE 5 or versions of Java SE 6 earlier than Update 4. The same screen snapshot shows that my Ant version is sufficient and that I have JAVA_HOME and ANT_HOME set properly.



The ws-jmx-connector project's download includes samples that can be run with only minor changes to see the JMX web service support in action. I found that I did need to make some minor changes to get it to work on my Windows-based machine. Specifically, I needed to change the classpath entry separators in the common.properties file included with the samples from a Unix/Linux-friendly colon to a Windows-friendly semicolon. No matter which platform you use, you must change the jdk-install-path property to be set to your JDK's installation directory. If you're using Windows, remember to separate each directory with two backslashes. For example, instead of assigning jdk-install-path to be C:\Program Files\Java\jdk1.6.0_06, make sure that it is C:\\Program Files\\Java\\jdk1.6.0_06. The next screen snapshot shows the types of errors you might see if you are using Windows and neglect changing colons to semicolons or don't add a separate backslash to separate directories in your JDK installation specification.



The ws-jmx-connector reference implementation not only includes client and server samples, but include an HTML-based page documenting how to run these examples. That page contains some of the same details I have already mentioned (such as the need for the unbundled JAX-WS libraries and the need for certain versions of Ant and Java) as well as some additional details not mentioned in this blog entry. The last of the examples discussed in this document is one in which JConsole is used on the client side to monitor the server-side agent via Wiseman and the JMX WS Connector.

To run the JConsole example, one simply need ensure that the proper prerequisites (many of which have been discussed here) have been met and then use Ant to run both the server side and the client side. The next screen snapshot shows what a successful server-side run looks like from the console.



I really like the fact that the server side example provides the JMXServiceURL for the client side to use as a part of its standard output. This can then be easily pasted into the Remote field of JConsole to make the connection. This JConsole connection behavior is shown in the next two screen snapshots. The first snapshot shows the client side console view into running JConsole successfully and the second screen snapshot shows the JMXServiceURL entered into the remote field.





Once we're connected with JConsole via the JMX Web Services connector, we can go to the MBeans tab in JConsole and look at the JAX-WS version and at the "Hello World(s)!" string returned by the server-side JMX agent (used in all of the samples). The next two screen snapshots show these two views.





The Ant tasks provided with the samples hid many of the complexities of running the client side. One of the disadvantages of the Web Services JMX connector (at least in its current form) is the large number of classes needed on the classpath. Similarly, having to worry about different versions of JAX-WS than that which is provided with Java SE 6 adds a little extra effort that would be nice not to have to expend.

It sounds like Java SE 7 will likely include JSR-262 and I would hope that this would relieve at least some of the extra effort (especially the JAX-WS mismatch) currently required. For developers needing another standardized remote JMX connector mechanism free of firewall issues and/or needing to develop JMX clients in a language other than Java, the JMX Web Services Connector should be just the thing they're looking for.

Basic JPA Best Practices Article Published

My article Basic Java Persistence API Best Practices was published on Oracle Technology Network (OTN) today. In this blog entry, I intend to provide a little background and extra information that I could not squeeze into the article itself.

As with most "best practices," the items discussed in this article are generally the "best" approach in my experience. That being said, almost nothing is always the better regardless of the circumstances and some practices closer to always being the best than are others. The focus of this article was on "basic" or relatively easy-to-implement practices that typically provide later benefits. In other words, I tried to cover JPA techniques and approaches that provide significant value for little extra effort or cost.

The focus on "basic" also meant that the article is largely targeted at developers just learning or starting to use JPA. More advanced JPA best practices are covered in JPA - Best Practices and Tips (2007 JavaOne Conference presentation referenced in my article), Java Persistence API - Portability Do's and Don'ts (another 2007 JavaOne Conference presentation referenced in my article), Java Persistence API: The Good, the Bad, and the Ugly, and the "under construction" EclipseLink FAQ on JPA Best Practices.

My original draft of this article was over twice as long as the final version. One of the technical editors pointed out (rightly) that the original version was too long. The final version is much easier to read quickly and meets my usual expectation that tighter and more concise articles are preferable to longer-winded articles. The only drawback to removing so much content is that I was forced to remove coverage of some things I thought were useful for developers just learning JPA, but which were not as significant as what did make the cut. I hope in future blog entries to cover some of these details that did not make the final article. In addition, I also plan to use this blog to provide additional background on why certain practices are "best" in my opinion and to provide source code examples to illustrate some of these best practices.

I mentioned/quoted/paraphrased Mike Keith a couple times in this article. His Colorado Software Summit 2007 presentations on JPA are both related to "JPA best practices" and are now available online. They are called JPA Portability: What You Should Know When Writing Portable JPA Applications and EJB 3.0 Puzzlers (focus is on JPA specifically rather than the more general EJB 3).

Two recent and highly detailed blog entries that look at subjects I touched upon in this article are Why Sometimes a Reference to an Entity Manager Inside JPA Entities is Needed and The Tense Relationship Between JPA, Enums, and Generics.

Finally, with JPA 2.0 getting more attention, there is much to look forward to in future Java Persistence API development.

Thursday, May 29, 2008

String, StringBuffer, and StringBuilder: There Is A Performance Difference

A recent posting on the New to Java forum served as a reminder of how the immutable Java String can significantly impact performance when used in a situation where a mutable StringBuffer or StringBuilder would be more appropriate (such as String concatenation inside a loop). The original poster's application that generated a web page from a database query resultset improved from ten minutes to less than three seconds when two strategic uses of String were replaced with StringBuffer. The poster also reported that an application that previously ran for over 30 minutes was running in fewer than 7 seconds with a similar String-to-StringBuffer change.

I have been cognizant of the difference between String and StringBuffer for some time, but it is easy to forget how significant of an impact the incorrect use of the immutable String can have until you use it or see it used incorrectly. I decided to play with String, StringBuffer, and StringBuilder to see how dramatic the difference really is.

The following code listing shows a simple Java class that pits String, StringBuffer, and StringBuilder in a contest that an immutable String really has no business being in.


import java.util.ArrayList;
import java.util.List;

/**
* Simple class testing the rough differences in performance of String,
* StringBuffer, and StringBuilder in repeated (looping) String concatenations.
*
* @see java.lang.String
* @see java.lang.StringBuffer
* @see java.lang.StringBuilder
*/
public class StringPerformanceTester
{
final private String CONSTANT_STRING;

/**
* Constructor accepting the String to be used for appending or concatenating
* to the main String. The ability to specify this String provides additional
* flexibility in the performance testing.
*/
public StringPerformanceTester(final String stringToBeUsed)
{
CONSTANT_STRING = stringToBeUsed;
}

/**
* Concatenate Strings repeatedly the specified number of times.
*
* @param numberOfStrings Number of times to concatenate Strings.
* @return Time in milliseconds required to concatenate Strings.
*/
public long concatenateStrings(final int numberOfStrings)
{
String masterString = "";
final long startTime = System.currentTimeMillis();
for ( int i=0; i < numberOfStrings; ++i )
{
masterString += CONSTANT_STRING;
}
final long endTime = System.currentTimeMillis();
return endTime - startTime;
}

/**
* Concatenate Strings repeatedly the specified number of times using
* StringBuffer.
*
* @param numberOfStrings Number of times to append Strings.
* @return Time in milliseconds required to append Strings.
*/
public long useStringBuffer(final int numberOfStrings)
{
final StringBuffer masterString =
new StringBuffer(CONSTANT_STRING.length()*numberOfStrings);
final long startTime = System.currentTimeMillis();
for ( int i=0; i < numberOfStrings; ++i )
{
masterString.append(CONSTANT_STRING);
}
final long endTime = System.currentTimeMillis();
return endTime - startTime;
}

/**
* Concatenate Strings repeatedly the specified number of times using
* StringBuilder.
*
* @param numberOfStrings Number of times to append Strings.
* @return Time in milliseconds required to append Strings.
*/
public long useStringBuilder(final int numberOfStrings)
{
final StringBuilder masterString =
new StringBuilder(CONSTANT_STRING.length()*numberOfStrings);
final long startTime = System.currentTimeMillis();
for ( int i=0; i < numberOfStrings; ++i )
{
masterString.append(CONSTANT_STRING);
}
final long endTime = System.currentTimeMillis();
return endTime - startTime;
}

/**
* Main method for executing timing tests of different methods of String
* concatenation.
*
* @param numberOfStringsForTest Number of strings to be concatenated or appended.
* @return Results of running all three types of tests against provided
* number of Strings.
*/
public TestResults runTimingTests(final int numberOfStringsForTest)
{
final TestResults testResults =
this.new TestResults(numberOfStringsForTest);
testResults.millisecondsString = concatenateStrings(numberOfStringsForTest);
testResults.millisecondsBuffer = useStringBuffer(numberOfStringsForTest);
testResults.millisecondsBuilder = useStringBuilder(numberOfStringsForTest);
return testResults;
}

/**
* Main executable for testing String performance.
*/
public static void main(final String[] arguments)
{
final StringPerformanceTester me = new StringPerformanceTester("constant");
final List<TestResults> testResults = new ArrayList<TestResults>();

testResults.add( me.runTimingTests(1000) );
testResults.add( me.runTimingTests(10000) );
testResults.add( me.runTimingTests(100000) );
System.out.println(testResults);
}

/**
* Class for easy storage and output of test results.
*/
private class TestResults
{
private int numberOfStrings;
private long millisecondsString;
private long millisecondsBuffer;
private long millisecondsBuilder;

/**
* Constructor accepting the number of String concatenations or appends.
*
* @param numberOfStrings Number of String concatenations or appends.
*/
public TestResults(final int numberOfStrings)
{
this.numberOfStrings = numberOfStrings;
}

/**
* Provide String representation of me.
*
* @return String representation of me.
*/
@Override
public String toString()
{
final StringBuffer sb = new StringBuffer();
sb.append("#: " + numberOfStrings);
sb.append("\tSTRING: " + millisecondsString);
sb.append("\tBUFFER: " + millisecondsBuffer);
sb.append("\tBUILDER: " + millisecondsBuilder + "\n");
return sb.toString();
}
}
}


When the test above is run, the results are dramatic. The largest test run involved concatenating the same String one hundred thousand times using String's += operator and the append method of the StringBuilder and StringBuffer classes. The results are so striking that the String's results for 100,000 concatenations is most easily measured in minutes while the StringBuffer and StringBuffer accomplish the same concatenation in time most easily measured in miliiseconds.

The following screen snapshot shows the results of the run.



For performance tests and benchmark runs to be useful, many runs of the same code under carefully controlled circumstances are often required to get accurate results. However, in this simple case, the sheer magnitude of the performance difference implies that even variables introduced by too few of runs in too loosely controlled environments cannot be explained by these inconsistencies.

There are several things one could try in conjunction with these tests for further measurements. For example, I took advantage of knowing the size of my StringBuffer and StringBuilder at instantiation time. If I started with smaller sizes and forced them to expand as needed, I might see a little worse performance. I could also try running with the -server option and could try different sizes of Strings and different number of Strings.

One lesson I think it pretty clear from this is that when frequent String concatenation is required (especially in loops), StringBuffer is easily preferable to String. I'll generally favor StringBuffer in such situations and only use the unsynchronized StringBuilder if I need to squeeze every last millisecond out and am in a single-thread situation. Otherwise, the synchronized StringBuffer competes well enough with the unsynchronized StringBuilder that I prefer StringBuffer for general String concatenation needs.

There are several good resources that explain the difference between String, StringBuffer, and StringBuilder. A concise overview of the differences and when to use each is provided in Java Tip - Difference Between String, StringBuffer, and StringBuilder. A useful blog comparing these is Difference Between String and StringBuffer/StringBuilder in Java. A satirical look at String versus StringBuffer is available in Maximize Java Performance by Avoiding StringBuffer (some of its feedback comments are interesting as well). Another worthwhile blog entry is StringBuffer/StringBuilder Performance Improvements.




UPDATE (18 August 2008): Another interesting resource on Strings is the PMD (PMD doesn't stand for anything) String and StringBuffer Rules description.

UPDATE (25 August 2008): See the blog entry Don't Use StringBuffer! for a compelling post on why StringBuilder is almost always preferable to StringBuffer.

UPDATE (15 January 2010): See the blog post About String Concatenation in Java or 'don’t fear the +' for additional focus on the differentiation between a single statement and multiple statements using + operator.

Monday, May 26, 2008

OpenLaszlo Conditional Compilation

In a previous blog entry, I talked about Flex 3's support for conditional compilation. In this blog entry, I cover OpenLaszlo's conditional compilation support.

In the OpenLaszlo Application Developer's Guide, Chapter 49 ("Understanding Compilation") discusses two types of condition compilation available in OpenLaszlo (Conditional Compilation of Runtime-Dependent Code and Compile-time Constants). A third specific type of conditional compilation available in OpenLaszlo is discussed in Conditional Compilation of Debugging Code in Chapter 51 ("Debugging") of the same OpenLaszlo Application Developer's Guide.

The OpenLaszlo blog entry Conditional Compilation also discusses all three conditional compilation types, but does not provide examples as thorough as what are in the OpenLaszlo Application Developer's Guide or in my blog entry here.

Here is a code sample that attempts to demonstrate the three primary types of conditional compilation in OpenLaszlo. I'll break this overall code sample down into the individual parts for each of the three types of conditional compilation in OpenLaszlo after the code listing.


<canvas width="750" height="500">
<script>
<![CDATA[
// See http://weblog.openlaszlo.org/archives/2005/11/conditional-compilation/
// for additional details on conditional compilation in OpenLaszlo. See also
// Chapter 49 ("Understanding Compilation") in the OpenLaszlo Application
// developer's guide.
]]>
</script>
<window id="MainWindow"
title="Demonstrate Conditional Compilation">
<simplelayout axis="y" spacing="10" />
<statictext id="mainLabel"
width="500"
height="25">Enter Who To Greet
</statictext>
<edittext id="inputTextArea" width="500"/>
<button>
Click Me to See Greeting
<handler name="onclick">
<![CDATA[
if ($formal)
{
greetingStr = "Good day, ";
}
else
{
greetingStr = "What do you think of this weather?, ";
}
greetingStr += inputTextArea.text;
greeting.setText(greetingStr);
]]>
</handler>
</button>
<statictext id="greeting" width="500" height="25" />
<switch>
<when runtime="dhtml">
<statictext>You specified DHTML runtime.</statictext>
</when>
<when runtime="swf7">
<statictext>You specified Flash 7 runtime.</statictext>
</when>
<when runtime="swf8">
<statictext>You specified Flash 8 runtime.</statictext>
</when>
<otherwise>
<statictext>You didn't specify a runtime explicitly.</statictext>
</otherwise>
</switch>

<text id="debugStatus" width="500" height="25">
<handler name="onconstruct">
<![CDATA[
if ($debug)
{
debugStatus.setText("Debug is turned ON.");
}
else
{
debugStatus.setText("Debug is turned OFF.");
}
]]>
</handler>
</text>
</window>
</canvas>


The code highlighted above in dark green is part of the illustration of compile-time constants conditional compilation. The code highlighted in brown demonstrates use of debugging conditional compilation and the code highlighted in blue illustrates runtime-dependent conditional compilation.

The first compilation with the OpenLaszlo command-line compiler lzc is shown in the next screen snapshot.



The lzc use in this snapshot shows that the code above was compiled to SWF8, was compiled with debug turned on (the -g2 option), and was compiled with a -Dformal=true option.

The next two screen snapshots show the initial OpenLaszlo application rendered when the resultant SWF is run followed by how it appears when a value is submitted in the form. The example shows that the application is able to tell that debugging was set (the -g2 option to the lzc compiler) and that the runtime the application was compiled to was indeed SWF8. However, the compile-time constant did not seem to work. In the next example, we'll add a $ in front of the name passed to the -D option.





The next example compiles the same source code, but this time the source code is compiled without the debug flag (no -g2 option), with the SWF7 runtime, and with an attempt at trying to get the compile-time constant to work by adding a $ to the name passed to the -D option.



When the code is compiled as above, the application looks as follows when the SWF is executed and text is supplied to the input text field.



In the rendered output, we see that the Flash Player is version 7 and we also see that it is not in debug mode both because our conditional told us that and because the OpenLaszlo debugger window is not present. Unfortunately, the presence of the "What do you think of this weather?" in this output indicates that the compile-time constant is still not being recognized even though we added a dollar sign ($) in front of the name passed to the compiler with the lzc compiler.

To this point, I have not been able to get compile-time constants to work correctly with OpenLaszlo. If someone else has, please let me know what I'm doing incorrectly here. However, as the code examples and output examples above demonstrate, the OpenLaszlo runtime conditional compilation and debug conditional compilation are both easy to use.

Saturday, May 24, 2008

DHTML/SWF Differences in OpenLaszlo

OpenLaszlo is well known for supporting the ability to compile the same source code into either Flash Player-ready code (SWF) or into dynamic HTML (DHTML). While significant amounts of code can be written in OpenLaszlo's LZX and JavaScript subset languages that does compile to both runtime platforms, there are certain APIs and libraries that are specific to one runtime or the other.

In this blog entry, I attempt to collect some of these differences for easy future reference. Note that this is a collection based on what the OpenLaszlo documentation says, what others' blogs and articles say, and what I have found in my own OpenLaszlo development. The reason to note this is that things may and probably will change and some things may have already changed since the sources I have used were originally written.

Before diving into the list of items in OpenLaszlo that are specific to either DHTML or to SWF, it is also important to note that, as of this writing, the two production-ready runtime environments for OpenLaszlo appear to be Flash 7 (SWF7) and Flash 8 (SWF8). While OpenLaszlo's DHTML runtime support already covers significant functionality, the OpenLaszlo 4.0.12 Release Notes (currently the latest stable version) states that DHTML support is still in "beta" and that it will move out of beta with the release of OpenLaszlo 4.1. As I blogged about earlier, the 4.1 release will likely be delayed because of renewed emphasis on finishing OpenLaszlo's support for Flash Player 9.


Different Runtime Environment Support

The most obvious differences between OpenLaszlo SWF and DHTML support may be in the classes OpenLaszlo expressly provides for the different runtimes. The advantage of using these runtimes is that doing so is largely transparent to the developer. The three classes are LzBrowser (mentioned in a previous blog entry), LzKeys, and LzHistory. These unique and different versions of the same three classes for the different runtimes appears to be an OpenLaszlo 4.1 feature.


Assets

Chapter 8 ("Introduction to Media and Art Assets") of the OpenLaszlo Application Developer's Guide has a specific section on Runtime Considerations that warns that SWF assets cannot be used in DHTML applications and that formats not available in the Flash runtime are obviously not available to DHTML applications hosted in SOLO mode.

Chapter 18 ("Media Resources") of the OpenLaszlo Application Developer's Guide points out that more image types can be loaded by the Flash Player 8 than by Flash Player 7 in the section Flash 7 and Flash 8 Limitations (applies to SOLO deployments).

Chapter 21 ("Text Views") of the OpenLaszlo Application Developer's Guide reminds the reader that only image formats supported by the Flash Player can be used in an OpenLaszlo application intended for the Flash Player as at least one of its target runtimes.

All of the discussion in Chapter 42 ("Audio and Video") of the OpenLaszlo Application Developer's Guide is devoted to Flash-only runtime.


Text and Fonts

Chapter 9 ("Introduction to Text and Fonts") of the OpenLaszlo Application Developer's Guide also warns about potential use of things (text fonts in this case) that are specific to one runtime or the other. Chapter 23 ("Fonts") of this same document provides greater detail on the SWF-specific font support that is available as well as the difference in rendering of DHTML applications as opposed to SWF applications. An example of differences between the two runtimes' handling is the availability of embedded fonts in Flash runtimes (albeit with larger downloads) that are not available for DHTML (client or system fonts are the only ones available there). The implication of this is that consistency of font appearance cannot be guaranteed for DHTML applications like it can be for SWF if embedded fonts are used in the Flash Player.

Chapter 22 ("Rich Text") of the OpenLaszlo Application Developer's Guide covers the richinputtext LZX tag and states that this is for Flash runtime only.


Browser Integration

Whether compiling one's OpenLaszlo application to Flash (SWF7 or SWF8 as of now) or to DHTML, it is almost certain that the deployed application will be run in a web browser. Chapter 35 ("Browser Integration") of the OpenLaszlo Application Developer's Guide points out differences in browser integration for Flash runtimes versus DHTML runtime. The section Applications Compiled to SWF points out that LzBrowser allows the OpenLaszlo-generated SWF to be visible to the hosting browser's JavaScript and the setCanvasAttribute can be used for the OpenLaszlo application to access hosting JavaScript. For DHTML, as documented in the section Applications Compiled to DHTML, the OpenLaszlo application is an object in the browser's DOM and therefore can directly access and be accessed by that Document Object Model.


Miscellaneous Differences

There are some less significant differences between OpenLaszlo applications compiled to DHTML and those compiled to Flash such as differences in recommended debugging tools (general web development tools useful for DHTML are not useful for Flash in most cases). Perhaps the most common difference I run into when compiling to these different runtimes is in the appearance detail. Often, my OpenLaszlo applications work in both DHTML and Flash at a minimum level, but the appearance can differ greatly between the Flash runtime and the DHTML runtime. While the application does technically "work," the statement the devil is in the details truly applies because it can take a lot of iterative trial-and-error to get layouts, fonts, and other presentation aspects set just right to appear correctly in Flash and in the major browsers' DHTML rendering.


What Does This All Mean?

I have referenced the OpenLaszlo Application Developer's Guide repeatedly in this blog entry because that seems to be the best source of details on which aspects of OpenLaszlo work only in DHTML or only in SWF. A particularly useful overview of the DHTML versus Flash runtime decision also comes from this same document. Chapter 2 ("Language Preliminaries") of this document contains a section called On Runtimes and Deployment Modes and the 'Core' API. This section points out the four major choices an OpenLaszlo developer can make when considering runtimes. Before OpenLaszlo 4 (and really until OpenLaszlo 4.1 is available with DHTML support out of beta), Flash is the safest bet for production runtime and having a Flash-only solution (ensuring no DHTML-only code in the application and leveraging some features provided by the Flash Player) is likely a popular option. On the other hand, if a particular user set does not have access to the Flash Player or the developer has other concerns about the Flash Player, he or she may choose the DHTML-only solution (do not use any Flash-specific features or code and do take advantage of some DHTML-specific features). The developer who wants the freedom to switch between runtimes easily will choose to either use only the "core" APIs that don't have features specific to either runtime or will choose the last option, which is to write the code to conditionally use specific features only when in that particular runtime. An example of this last option, conditionally compiling depending on the runtime, is discussed in the OpenLaszlo Application Developer's Guide in Chapter 49 ("Understanding Compilation") in the section Conditional Compilation of Runtime-Dependent Code.


Conclusion

For the most part OpenLaszlo code can be compiled into either Flash or DHTML runtimes and it is likely that the DHTML support that is now in beta will be much better with the OpenLaszlo 4.1 release. While I currently prefer OpenLaszlo's Flash runtime support, it is an advantage knowing that all or significant portions of my OpenLaszlo applications can likely be readily compiled to DHTML should a situation arise in which use of the Flash Player by clients, customers, and other users is not practical.

Monday, May 19, 2008

Simple Remote JMX with GlassFish

In this blog entry, I attempt to demonstrate how one can connect to GlassFish's exposed administrative MBeans via Remote JMX. I will use JConsole and a simple client built with standard JMX Connector Client APIs to demonstrate this.

It is easy to connect to GlassFish via JConsole in Java SE 6 if you are running GlassFish on the same host that you run JConsole on and if the same username is used to start both GlassFish and JConsole. This is easy because JConsole will automatically listed all JMX-exposed MBeans on the same host and running under the same user as the JConsole itself. In fact, JConsole exposes its own MBeans via itself! For this blog entry, however, I wish to focus on remote JMX access of GlassFish and so will demonstrate that next.

When you start GlassFish up with the command asadmin start-domain, the console prints out the information you need to access GlassFish's administrative MBeans. The next screen snapshot shows this, including the statement highlighted with a yellow box that says it all: "Standard JMX Clients (like JConsole) can connect to JMXServiceURL: [service:jmx:rmi:///jndi/rmi://MARX-PC:8686/jmxrmi] for domain management purposes."



Because GlassFish provides us with the text String for JMXServiceURL, the most difficult part (knowing the JMX Connector URL) is already complete.

If I start up JConsole with the jconsole command from the command prompt, I can select the GlassFish MBean Server locally as shown in the next screen snapshot (the highlighted entry "com.sun.enterprise.server.PELaunch start"). This allows me to connect to GlassFish's MBean server without username, password, or URL if I have GlassFish running on the same host and under the same username.



While the above will work for local JMX connections, the remote case is the focus of this entry. I can paste the URL provided by GlassFish (service:jmx:rmi:///jndi/rmi://MARX-PC:8686/jmxrmi) in the text field below the "Remote Process" label. This is shown in the next screen snapshot.



Unfortunately, when I click the "Connect" button with only the remote JMXServiceURL specified without username or password specified, I get the connection error shown in the next screen snapshot:



So, GlassFish is expecting credentials (username and password) to be specified. If you use the defaults for GlassFish, these will be a username of admin and a password of adminadmin. Specifying JConsole to connect remotely using these credentials is shown in the next screen snapshot.



With credentials specified appropriately, JConsole can remotely connect to the running GlassFish JMX MBean server as shown in the next two screen snapshots. The first screen snapshot shows the successful "Connecting ..." message and the second screen snapshot shows a portion of the "MBeans" tab in JConsole.





So, we have now been able to connect to GlassFish remotely using JConsole. We can use the same JMXServiceURL and connect to GlassFish from our own JMX clients as well. The remainder of this blog entry demonstrates that.

The following code listing shows a simple JMX client that connects to the same running GlassFish domain instance connected to by JConsole above.


package jmx.dustin;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

/**
* Simple example of a JMX client for connecting with GlassFish application
* server.
*/
public class SimpleGlassFishJmxClient
{
/**
* Main executable driver for GlassFish Remote JMX Client. Pass one command
* line parameter to serve as hostname where GlassFish application server
* is running.
*
* @param commandLineArgs Command-line arguments; one expected (host on
* which the GlassFish application server is running).
*/
public static void main(final String[] commandLineArgs)
{
final int port = 8686; // standard GlassFish JMX port.
final String host =
(commandLineArgs.length > 0) ? commandLineArgs[0] : "localhost";
final String jmxGlassFishConnectorString =
"service:jmx:rmi:///jndi/rmi://" + host + ":" + port + "/jmxrmi";
System.out.println( "Using JMXServiceURL string "
+ jmxGlassFishConnectorString);
try
{
final JMXServiceURL jmxUrl =
new JMXServiceURL(jmxGlassFishConnectorString);
final Map jmxEnv = new HashMap();
final String[] credentials = new String[] {"admin", "adminadmin"};
jmxEnv.put( JMXConnector.CREDENTIALS, credentials );
final JMXConnector connector =
JMXConnectorFactory.connect(jmxUrl, jmxEnv);
final MBeanServerConnection mbsc = connector.getMBeanServerConnection();
System.out.println("\nDomains:");
final String domains[] = mbsc.getDomains();
Arrays.sort(domains);
for (String domain : domains)
{
System.out.println("\t" + domain);
}
System.out.println( "\nMBeanServer default domain = "
+ mbsc.getDefaultDomain());
System.out.println("\nMBean count = " + mbsc.getMBeanCount());
System.out.println("\nQuery MBeanServer MBeans:");
@SuppressWarnings("unchecked")
final Set<ObjectName> allObjectNames =
new TreeSet(mbsc.queryNames(null, null));
for (ObjectName objectName : allObjectNames)
{
System.out.println("\t" + objectName);
}
connector.close();
}
catch (MalformedURLException badUrl) // for JMXServiceURL instantiation
{
System.err.println( jmxGlassFishConnectorString
+ " is not a valid JMXServiceURL:\n"
+ badUrl.getMessage() );
}
catch (IOException ioEx) // for JMX/RMI connection
{
System.err.println( "Could not connect to JMX Server using URL "
+ jmxGlassFishConnectorString + ":\n"
+ ioEx.getMessage() );
}
}
}


The code in the example above is adapted from example code available in the highly useful Java Tutorial JMX Trail entry Creating a Custom JMX Client and the Sun Java System Application Server documentation Connecting to the MBean Server entry.

If I had not included the highlighted code above, I would have not been able to connect for the same reason I could not connect with JConsole without specifying a username and password. The next screen snapshot shows the results of trying to connect without username and password.



When I do include username and password as shown in the code above, I achieve success and get the results shown here (WARNING: there is a lot of output here):


Using JMXServiceURL string service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi

Domains:
JMImplementation
amx
amx-support
com.sun.appserv
com.sun.jbi
com.sun.jbi.esb
com.sun.management
java.lang
java.util.logging

MBeanServer default domain = DefaultDomain

MBean count = 495

Query MBeanServer MBeans:
JMImplementation:type=MBeanServerDelegate
amx:J2EEApplication=__JWSappclients,J2EEServer=server,WebModule=//server/__JWSappclients,j2eeType=Servlet,name=JWSSystemServlet
amx:J2EEApplication=__JWSappclients,J2EEServer=server,WebModule=//server/__JWSappclients,j2eeType=Servlet,name=default
amx:J2EEApplication=__JWSappclients,J2EEServer=server,WebModule=//server/__JWSappclients,j2eeType=Servlet,name=jsp
amx:J2EEApplication=__JWSappclients,J2EEServer=server,j2eeType=WebModule,name=//server/__JWSappclients
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/,j2eeType=Servlet,name=DownloadServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/,j2eeType=Servlet,name=FacesServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/,j2eeType=Servlet,name=ThemeServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/,j2eeType=Servlet,name=XmlHttpProxy
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/,j2eeType=Servlet,name=default
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/,j2eeType=Servlet,name=jsp
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=AdminAPIEntryServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=ConnectServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=RemoteJmxConnectorServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=SynchronizationServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=UploadServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=default
amx:J2EEApplication=null,J2EEServer=server,WebModule=//__asadmin/web1,j2eeType=Servlet,name=jsp
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/,j2eeType=Servlet,name=default
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/,j2eeType=Servlet,name=jsp
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=ActivationCoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=ActivationRequesterPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=CompletionCoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=CompletionInitiatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=CoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=ParticipantPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=RegistrationCoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=RegistrationPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=RegistrationRequesterPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=default
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=Servlet,name=jsp
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=ActivationCoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=ActivationRequesterPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=CompletionCoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=CompletionInitiatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=CoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=ParticipantPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=RegistrationCoordinatorPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=RegistrationPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/__wstx-services,j2eeType=WebServiceEndpoint,name=RegistrationRequesterPortTypeImpl
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/laszloExamples,j2eeType=Servlet,name=AuthenticationServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/laszloExamples,j2eeType=Servlet,name=AxisServlet
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/laszloExamples,j2eeType=Servlet,name=LPS
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/laszloExamples,j2eeType=Servlet,name=LZViewer
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/laszloExamples,j2eeType=Servlet,name=default
amx:J2EEApplication=null,J2EEServer=server,WebModule=//server/laszloExamples,j2eeType=Servlet,name=jsp
amx:J2EEApplication=null,J2EEServer=server,j2eeType=WebModule,name=//__asadmin/
amx:J2EEApplication=null,J2EEServer=server,j2eeType=WebModule,name=//__asadmin/web1
amx:J2EEApplication=null,J2EEServer=server,j2eeType=WebModule,name=//server/
amx:J2EEApplication=null,J2EEServer=server,j2eeType=WebModule,name=//server/__wstx-services
amx:J2EEApplication=null,J2EEServer=server,j2eeType=WebModule,name=//server/laszloExamples
amx:J2EEServer=server,j2eeType=J2EEApplication,name=__JWSappclients
amx:J2EEServer=server,j2eeType=JVM,name=server1211253100850
amx:X-AdminServiceConfig=na,X-ConfigConfig=server-config,X-JMXConnectorConfig=system,j2eeType=X-SSLConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-DASConfig,name=na,X-AdminServiceConfig=na
amx:X-AdminServiceConfig=na,X-ConfigConfig=server-config,j2eeType=X-JMXConnectorConfig,name=system
amx:X-ConfigConfig=server-config,j2eeType=X-EJBTimerServiceConfig,name=na,X-EJBContainerConfig=na
amx:X-ConfigConfig=server-config,X-HTTPListenerConfig=http-listener-2,j2eeType=X-SSLConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-AccessLogConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-ConnectionPoolConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-HTTPFileCacheConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-HTTPListenerConfig,name=admin-listener,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-HTTPListenerConfig,name=http-listener-1,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-HTTPListenerConfig,name=http-listener-2,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-HTTPProtocolConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-KeepAliveConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-RequestProcessingConfig,name=na,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-VirtualServerConfig,name=__asadmin,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-VirtualServerConfig,name=server,X-HTTPServiceConfig=na
amx:X-ConfigConfig=server-config,X-IIOPListenerConfig=SSL,j2eeType=X-SSLConfig,name=na,X-IIOPServiceConfig=na
amx:X-ConfigConfig=server-config,X-IIOPListenerConfig=SSL_MUTUALAUTH,j2eeType=X-SSLConfig,name=na,X-IIOPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-IIOPListenerConfig,name=SSL,X-IIOPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-IIOPListenerConfig,name=SSL_MUTUALAUTH,X-IIOPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-IIOPListenerConfig,name=orb-listener-1,X-IIOPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-ORBConfig,name=na,X-IIOPServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-JMSHostConfig,name=default_JMS_host,X-JMSServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-ModuleLogLevelsConfig,name=na,X-LogServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=ClientProvider,j2eeType=X-RequestPolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=ClientProvider,j2eeType=X-ResponsePolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=ServerProvider,j2eeType=X-RequestPolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=ServerProvider,j2eeType=X-ResponsePolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=XWS_ClientProvider,j2eeType=X-RequestPolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=XWS_ClientProvider,j2eeType=X-ResponsePolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=XWS_ServerProvider,j2eeType=X-RequestPolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,X-ProviderConfig=XWS_ServerProvider,j2eeType=X-ResponsePolicyConfig,name=na,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,j2eeType=X-ProviderConfig,name=ClientProvider,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,j2eeType=X-ProviderConfig,name=ServerProvider,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,j2eeType=X-ProviderConfig,name=XWS_ClientProvider,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-MessageSecurityConfig=SOAP,j2eeType=X-ProviderConfig,name=XWS_ServerProvider,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-ModuleMonitoringLevelsConfig,name=na,X-MonitoringServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-AuditModuleConfig,name=default,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,X-SecurityServiceConfig=na,j2eeType=X-AuthRealmConfig,name=admin-realm
amx:X-ConfigConfig=server-config,X-SecurityServiceConfig=na,j2eeType=X-AuthRealmConfig,name=certificate
amx:X-ConfigConfig=server-config,X-SecurityServiceConfig=na,j2eeType=X-AuthRealmConfig,name=file
amx:X-ConfigConfig=server-config,j2eeType=X-JACCProviderConfig,name=default,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-MessageSecurityConfig,name=SOAP,X-SecurityServiceConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-ManagerPropertiesConfig,name=na,X-WebContainerConfig=na,X-SessionConfig=na,X-SessionManagerConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-StorePropertiesConfig,name=na,X-WebContainerConfig=na,X-SessionConfig=na,X-SessionManagerConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-SessionManagerConfig,name=na,X-WebContainerConfig=na,X-SessionConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-SessionPropertiesConfig,name=na,X-WebContainerConfig=na,X-SessionConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-SessionConfig,name=na,X-WebContainerConfig=na
amx:X-ConfigConfig=server-config,j2eeType=X-AdminServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-DiagnosticServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-EJBContainerConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-HTTPServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-IIOPServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-JMSServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-JavaConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-LogServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-MDBContainerConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-ManagementRulesConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-MonitoringServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-SecurityServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-ThreadPoolConfig,name=thread-pool-1
amx:X-ConfigConfig=server-config,j2eeType=X-TransactionServiceConfig,name=na
amx:X-ConfigConfig=server-config,j2eeType=X-WebContainerConfig,name=na
amx:X-ServerRootMonitor=server,j2eeType=X-HTTPServiceVirtualServerMonitor,name=server,X-HTTPServiceMonitor=na
amx:X-ServerRootMonitor=server,j2eeType=X-ApplicationMonitor,name=__JWSappclients
amx:j2eeType=X-CallFlowMonitor,name=server,X-ServerRootMonitor=server
amx:X-ServerRootMonitor=server,j2eeType=X-HTTPServiceMonitor,name=na
amx:X-ServerRootMonitor=server,j2eeType=X-JVMMonitor,name=na
amx:j2eeType=X-Logging,name=server,X-ServerRootMonitor=server
amx:X-ServerRootMonitor=server,j2eeType=X-ServerRootMonitor,name=server
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=JBIFramework
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=MEjbApp
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=WSTCPConnectorLCModule
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=WSTXServices
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=__JWSappclients
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=__ejb_container_timer_app
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=adminapp
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=admingui
amx:X-StandaloneServerConfig=server,j2eeType=X-DeployedItemRefConfig,name=laszloExamples
amx:X-StandaloneServerConfig=server,j2eeType=X-ResourceRefConfig,name=jdbc/__CallFlowPool
amx:X-StandaloneServerConfig=server,j2eeType=X-ResourceRefConfig,name=jdbc/__TimerPool
amx:X-StandaloneServerConfig=server,j2eeType=X-ResourceRefConfig,name=jdbc/__default
amx:X-StandaloneServerConfig=server,j2eeType=X-ResourceRefConfig,name=jdbc/sample
amx:j2eeType=J2EEDomain,name=amx
amx:j2eeType=J2EEServer,name=server
amx:j2eeType=X-BulkAccess,name=na
amx:j2eeType=X-ConfigConfig,name=server-config
amx:j2eeType=X-ConfigDottedNames,name=na
amx:j2eeType=X-DeploymentMgr,name=na
amx:j2eeType=X-DomainConfig,name=na
amx:j2eeType=X-DomainRoot,name=amx
amx:j2eeType=X-J2EEApplicationConfig,name=MEjbApp
amx:j2eeType=X-J2EEApplicationConfig,name=__JWSappclients
amx:j2eeType=X-J2EEApplicationConfig,name=__ejb_container_timer_app
amx:j2eeType=X-JDBCConnectionPoolConfig,name=DerbyPool
amx:j2eeType=X-JDBCConnectionPoolConfig,name=SamplePool
amx:j2eeType=X-JDBCConnectionPoolConfig,name=__CallFlowPool
amx:j2eeType=X-JDBCConnectionPoolConfig,name=__TimerPool
amx:j2eeType=X-JDBCResourceConfig,name=jdbc/__CallFlowPool
amx:j2eeType=X-JDBCResourceConfig,name=jdbc/__TimerPool
amx:j2eeType=X-JDBCResourceConfig,name=jdbc/__default
amx:j2eeType=X-JDBCResourceConfig,name=jdbc/sample
amx:j2eeType=X-JMXMonitorMgr,name=na
amx:j2eeType=X-LifecycleModuleConfig,name=JBIFramework
amx:j2eeType=X-LifecycleModuleConfig,name=WSTCPConnectorLCModule
amx:j2eeType=X-MonitoringDottedNames,name=na
amx:j2eeType=X-MonitoringRoot,name=na
amx:j2eeType=X-NotificationEmitterService,name=DomainNotificationEmitterService
amx:j2eeType=X-NotificationServiceMgr,name=na
amx:j2eeType=X-QueryMgr,name=na
amx:j2eeType=X-Sample,name=na
amx:j2eeType=X-StandaloneServerConfig,name=server
amx:j2eeType=X-SystemInfo,name=na
amx:j2eeType=X-UpdateStatus,name=na
amx:j2eeType=X-UploadDownloadMgr,name=na
amx:j2eeType=X-WebModuleConfig,name=WSTXServices
amx:j2eeType=X-WebModuleConfig,name=adminapp
amx:j2eeType=X-WebModuleConfig,name=admingui
amx:j2eeType=X-WebModuleConfig,name=laszloExamples
amx:j2eeType=X-WebServiceMgr,name=na
amx-support:name=amx-debug
amx-support:name=mbean-loader
com.sun.appserv:j2eeType=Servlet,name=JWSSystemServlet,WebModule=//server/__JWSappclients,J2EEApplication=__JWSappclients,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/__JWSappclients,J2EEApplication=__JWSappclients,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/__JWSappclients,J2EEApplication=__JWSappclients,J2EEServer=server
com.sun.appserv:j2eeType=WebModule,name=//server/__JWSappclients,J2EEApplication=__JWSappclients,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=DownloadServlet,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=FacesServlet,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=ThemeServlet,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=XmlHttpProxy,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=AdminAPIEntryServlet,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=ConnectServlet,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=RemoteJmxConnectorServlet,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=SynchronizationServlet,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=UploadServlet,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=WebServiceEndpoint,name=ActivationCoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=ActivationRequesterPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=CompletionCoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=CompletionInitiatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=CoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=ParticipantPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=RegistrationCoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=RegistrationPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=WebServiceEndpoint,name=RegistrationRequesterPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=Servlet,name=ActivationCoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=ActivationRequesterPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=CompletionCoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=CompletionInitiatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=CoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=ParticipantPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=RegistrationCoordinatorPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=RegistrationPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=RegistrationRequesterPortTypeImpl,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=AuthenticationServlet,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=AxisServlet,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=LPS,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=LZViewer,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=WebModule,name=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=WebModule,name=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=WebModule,name=//server/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=WebModule,name=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=WebModule,name=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:j2eeType=J2EEApplication,name=__JWSappclients,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=JVM,name=server1211253100850,J2EEServer=server,category=runtime
com.sun.appserv:j2eeType=J2EEDomain,name=com.sun.appserv,category=runtime
com.sun.appserv:j2eeType=J2EEServer,name=server,category=runtime
com.sun.appserv:name=logmanager,category=runtime,server=server
com.sun.appserv:name=domain-status
com.sun.appserv:type=Cache,host=__asadmin,path=/
com.sun.appserv:type=Cache,host=__asadmin,path=/web1
com.sun.appserv:type=Cache,host=server,path=/
com.sun.appserv:type=Cache,host=server,path=/__JWSappclients
com.sun.appserv:type=Cache,host=server,path=/__wstx-services
com.sun.appserv:type=Cache,host=server,path=/laszloExamples
com.sun.appserv:type=Connector,port=4848,address=0.0.0.0
com.sun.appserv:type=Connector,port=8080,address=0.0.0.0
com.sun.appserv:type=Connector,port=8181,address=0.0.0.0
com.sun.appserv:type=DomainDiagnostics,name=server,category=monitor
com.sun.appserv:type=Engine
com.sun.appserv:type=GlobalRequestProcessor,name=http4848
com.sun.appserv:type=GlobalRequestProcessor,name=http8080
com.sun.appserv:type=GlobalRequestProcessor,name=http8181
com.sun.appserv:type=Host,host=__asadmin
com.sun.appserv:type=Host,host=server
com.sun.appserv:type=JVMInformation,category=monitor,server=server
com.sun.appserv:type=JVMInformationCollector,category=monitor,server=server
com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/__JWSappclients,J2EEApplication=__JWSappclients,J2EEServer=server
com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//__asadmin/web1,J2EEApplication=null,J2EEServer=server
com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/,J2EEApplication=null,J2EEServer=server
com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/__wstx-services,J2EEApplication=null,J2EEServer=server
com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/laszloExamples,J2EEApplication=null,J2EEServer=server
com.sun.appserv:type=Loader,path=/,host=__asadmin
com.sun.appserv:type=Loader,path=/web1,host=__asadmin
com.sun.appserv:type=Loader,path=/,host=server
com.sun.appserv:type=Loader,path=/__JWSappclients,host=server
com.sun.appserv:type=Loader,path=/__wstx-services,host=server
com.sun.appserv:type=Loader,path=/laszloExamples,host=server
com.sun.appserv:type=Manager,path=/,host=__asadmin
com.sun.appserv:type=Manager,path=/web1,host=__asadmin
com.sun.appserv:type=Manager,path=/,host=server
com.sun.appserv:type=Manager,path=/__JWSappclients,host=server
com.sun.appserv:type=Manager,path=/__wstx-services,host=server
com.sun.appserv:type=Manager,path=/laszloExamples,host=server
com.sun.appserv:type=Mapper
com.sun.appserv:type=PWCConnectionQueue,name=http4848
com.sun.appserv:type=PWCConnectionQueue,name=http8080
com.sun.appserv:type=PWCConnectionQueue,name=http8181
com.sun.appserv:type=PWCFileCache,name=http4848
com.sun.appserv:type=PWCFileCache,name=http8080
com.sun.appserv:type=PWCFileCache,name=http8181
com.sun.appserv:type=PWCKeepAlive,name=http4848
com.sun.appserv:type=PWCKeepAlive,name=http8080
com.sun.appserv:type=PWCKeepAlive,name=http8181
com.sun.appserv:type=Realm,path=/,host=__asadmin
com.sun.appserv:type=Realm,path=/web1,host=__asadmin
com.sun.appserv:type=Realm,path=/,host=server
com.sun.appserv:type=Realm,path=/__JWSappclients,host=server
com.sun.appserv:type=Realm,path=/__wstx-services,host=server
com.sun.appserv:type=Realm,path=/laszloExamples,host=server
com.sun.appserv:type=Selector,name=http4848
com.sun.appserv:type=Selector,name=http8080
com.sun.appserv:type=Selector,name=http8181
com.sun.appserv:type=Service,serviceName=null
com.sun.appserv:type=TransactionService,J2EEServer=server,category=runtime
com.sun.appserv:type=Valve,name=BasicAuthenticator,path=/web1,host=__asadmin
com.sun.appserv:type=Valve,name=FormAuthenticator,path=/,host=__asadmin
com.sun.appserv:type=Valve,name=StandardContextValve,path=/,host=__asadmin
com.sun.appserv:type=Valve,name=StandardContextValve,path=/web1,host=__asadmin
com.sun.appserv:type=Valve,name=StandardHostValve,host=__asadmin
com.sun.appserv:type=Valve,name=NonLoginAuthenticator,path=/,host=server
com.sun.appserv:type=Valve,name=NonLoginAuthenticator,path=/__JWSappclients,host=server
com.sun.appserv:type=Valve,name=NonLoginAuthenticator,path=/__wstx-services,host=server
com.sun.appserv:type=Valve,name=NonLoginAuthenticator,path=/laszloExamples,host=server
com.sun.appserv:type=Valve,name=StandardContextValve,path=/,host=server
com.sun.appserv:type=Valve,name=StandardContextValve,path=/__JWSappclients,host=server
com.sun.appserv:type=Valve,name=StandardContextValve,path=/__wstx-services,host=server
com.sun.appserv:type=Valve,name=StandardContextValve,path=/laszloExamples,host=server
com.sun.appserv:type=Valve,name=StandardHostValve,host=server
com.sun.appserv:type=Valve,name=StandardEngineValve
com.sun.appserv:type=access-log,config=server-config,category=config
com.sun.appserv:type=admin-service,config=server-config,category=config
com.sun.appserv:name=__JWSappclients,type=application,category=monitor,server=server
com.sun.appserv:type=application-ref,ref=JBIFramework,server=server,category=config
com.sun.appserv:type=application-ref,ref=MEjbApp,server=server,category=config
com.sun.appserv:type=application-ref,ref=WSTCPConnectorLCModule,server=server,category=config
com.sun.appserv:type=application-ref,ref=WSTXServices,server=server,category=config
com.sun.appserv:type=application-ref,ref=__JWSappclients,server=server,category=config
com.sun.appserv:type=application-ref,ref=__ejb_container_timer_app,server=server,category=config
com.sun.appserv:type=application-ref,ref=adminapp,server=server,category=config
com.sun.appserv:type=application-ref,ref=admingui,server=server,category=config
com.sun.appserv:type=application-ref,ref=laszloExamples,server=server,category=config
com.sun.appserv:type=applications,category=config
com.sun.appserv:type=applications,category=monitor,server=server
com.sun.appserv:type=audit-module,name=default,config=server-config,category=config
com.sun.appserv:type=auth-realm,name=admin-realm,config=server-config,category=config
com.sun.appserv:type=auth-realm,name=certificate,config=server-config,category=config
com.sun.appserv:type=auth-realm,name=file,config=server-config,category=config
com.sun.appserv:type=config,name=server-config,category=config
com.sun.appserv:type=configs,category=config
com.sun.appserv:type=configurator
com.sun.appserv:type=connection-managers,category=monitor,server=server
com.sun.appserv:type=connection-pool,config=server-config,category=config
com.sun.appserv:type=connector-service,category=monitor,server=server
com.sun.appserv:type=controller
com.sun.appserv:type=das-config,config=server-config,category=config
com.sun.appserv:type=diagnostic-service,config=server-config,category=config
com.sun.appserv:type=domain,category=config
com.sun.appserv:name=dotted-name-get-set,type=dotted-name-support
com.sun.appserv:name=dotted-name-monitoring-registry,type=dotted-name-support
com.sun.appserv:name=dotted-name-registry,type=dotted-name-support
com.sun.appserv:type=ejb-container,config=server-config,category=config
com.sun.appserv:type=ejb-timer-service,config=server-config,category=config
com.sun.appserv:type=http-file-cache,config=server-config,category=config
com.sun.appserv:type=http-listener,id=admin-listener,config=server-config,category=config
com.sun.appserv:type=http-listener,id=http-listener-1,config=server-config,category=config
com.sun.appserv:type=http-listener,id=http-listener-2,config=server-config,category=config
com.sun.appserv:type=http-protocol,config=server-config,category=config
com.sun.appserv:type=http-service,config=server-config,category=config
com.sun.appserv:type=http-service,category=monitor,server=server
com.sun.appserv:type=iiop-listener,id=SSL,config=server-config,category=config
com.sun.appserv:type=iiop-listener,id=SSL_MUTUALAUTH,config=server-config,category=config
com.sun.appserv:type=iiop-listener,id=orb-listener-1,config=server-config,category=config
com.sun.appserv:type=iiop-service,config=server-config,category=config
com.sun.appserv:type=j2ee-application,name=MEjbApp,category=config
com.sun.appserv:type=j2ee-application,name=__JWSappclients,category=config
com.sun.appserv:type=j2ee-application,name=__ejb_container_timer_app,category=config
com.sun.appserv:type=jacc-provider,name=default,config=server-config,category=config
com.sun.appserv:type=java-config,config=server-config,category=config
com.sun.appserv:type=jdbc-connection-pool,name=DerbyPool,category=config
com.sun.appserv:type=jdbc-connection-pool,name=SamplePool,category=config
com.sun.appserv:type=jdbc-connection-pool,name=__CallFlowPool,category=config
com.sun.appserv:type=jdbc-connection-pool,name=__TimerPool,category=config
com.sun.appserv:type=jdbc-resource,jndi-name=jdbc/__CallFlowPool,category=config
com.sun.appserv:type=jdbc-resource,jndi-name=jdbc/__TimerPool,category=config
com.sun.appserv:type=jdbc-resource,jndi-name=jdbc/__default,category=config
com.sun.appserv:type=jdbc-resource,jndi-name=jdbc/sample,category=config
com.sun.appserv:type=jms-host,name=default_JMS_host,config=server-config,category=config
com.sun.appserv:type=jms-service,config=server-config,category=config
com.sun.appserv:type=jms-service,category=monitor,server=server
com.sun.appserv:type=jmx-connector,name=system,config=server-config,category=config
com.sun.appserv:type=jndi,category=monitor,server=server
com.sun.appserv:type=jvm,category=monitor,server=server
com.sun.appserv:type=keep-alive,config=server-config,category=config
com.sun.appserv:type=lifecycle-module,name=JBIFramework,category=config
com.sun.appserv:type=lifecycle-module,name=WSTCPConnectorLCModule,category=config
com.sun.appserv:type=log-service,config=server-config,category=config
com.sun.appserv:type=management-rules,config=server-config,category=config
com.sun.appserv:type=manager-properties,config=server-config,category=config
com.sun.appserv:type=mdb-container,config=server-config,category=config
com.sun.appserv:type=message-security-config,name=SOAP,config=server-config,category=config
com.sun.appserv:type=module-log-levels,config=server-config,category=config
com.sun.appserv:type=module-monitoring-levels,config=server-config,category=config
com.sun.appserv:type=monitoring-service,config=server-config,category=config
com.sun.appserv:type=orb,config=server-config,category=config
com.sun.appserv:type=orb,category=monitor,server=server
com.sun.appserv:type=protocolHandler,className=com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol
com.sun.appserv:type=provider-config,name=ClientProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=provider-config,name=ServerProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=provider-config,name=XWS_ClientProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=provider-config,name=XWS_ServerProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=request-policy,provider-config=ClientProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=request-policy,provider-config=ServerProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=request-policy,provider-config=XWS_ClientProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=request-policy,provider-config=XWS_ServerProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=request-processing,config=server-config,category=config
com.sun.appserv:type=resource-ref,ref=jdbc/__CallFlowPool,server=server,category=config
com.sun.appserv:type=resource-ref,ref=jdbc/__TimerPool,server=server,category=config
com.sun.appserv:type=resource-ref,ref=jdbc/__default,server=server,category=config
com.sun.appserv:type=resource-ref,ref=jdbc/sample,server=server,category=config
com.sun.appserv:type=resources,category=config
com.sun.appserv:type=resources,category=monitor,server=server
com.sun.appserv:type=response-policy,provider-config=ClientProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=response-policy,provider-config=ServerProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=response-policy,provider-config=XWS_ClientProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=response-policy,provider-config=XWS_ServerProvider,message-security-config=SOAP,config=server-config,category=config
com.sun.appserv:type=root,category=monitor,server=server
com.sun.appserv:type=security-service,config=server-config,category=config
com.sun.appserv:type=server,name=server,category=config
com.sun.appserv:type=servers,category=config
com.sun.appserv:type=session-config,config=server-config,category=config
com.sun.appserv:type=session-manager,config=server-config,category=config
com.sun.appserv:type=session-properties,config=server-config,category=config
com.sun.appserv:type=ssl,config=server-config,http-listener=http-listener-2,category=config
com.sun.appserv:type=ssl,config=server-config,iiop-listener=SSL,category=config
com.sun.appserv:type=ssl,config=server-config,iiop-listener=SSL_MUTUALAUTH,category=config
com.sun.appserv:type=ssl,config=server-config,jmx-connector=system,category=config
com.sun.appserv:name=//__asadmin/,type=standalone-web-module,category=monitor,server=server
com.sun.appserv:name=//__asadmin/web1,type=standalone-web-module,category=monitor,server=server
com.sun.appserv:name=//server/,type=standalone-web-module,category=monitor,server=server
com.sun.appserv:name=//server/__wstx-services,type=standalone-web-module,category=monitor,server=server
com.sun.appserv:name=//server/laszloExamples,type=standalone-web-module,category=monitor,server=server
com.sun.appserv:type=store-properties,config=server-config,category=config
com.sun.appserv:type=system-services,server=server
com.sun.appserv:type=thread-pool,thread-pool-id=thread-pool-1,config=server-config,category=config
com.sun.appserv:type=thread-pools,config=server-config,category=config
com.sun.appserv:type=thread-pools,category=monitor,server=server
com.sun.appserv:type=transaction-service,config=server-config,category=config
com.sun.appserv:type=transactions-recovery,category=config
com.sun.appserv:type=virtual-server,id=__asadmin,config=server-config,category=config
com.sun.appserv:type=virtual-server,id=server,config=server-config,category=config
com.sun.appserv:name=server,type=virtual-server,category=monitor,server=server
com.sun.appserv:type=web-container,config=server-config,category=config
com.sun.appserv:application=__JWSappclients,name=//server/__JWSappclients,type=web-module,category=monitor,server=server
com.sun.appserv:type=web-module,name=WSTXServices,category=config
com.sun.appserv:type=web-module,name=adminapp,category=config
com.sun.appserv:type=web-module,name=admingui,category=config
com.sun.appserv:type=web-module,name=laszloExamples,category=config
com.sun.jbi:JbiName=server,ServiceName=AdminService,ControlType=AdministrationService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=ConfigurationService,ComponentType=System
com.sun.jbi:JbiName=domain,ServiceName=ConfigurationService,ControlType=DeploymentService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=DeploymentService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=DeploymentService,ControlType=DeploymentService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=AdminService,ControlType=HeartBeat,ComponentType=System
com.sun.jbi:JbiName=domain,ServiceName=ConfigurationService,ControlType=InstallationService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=InstallationService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=InstallationService,ControlType=InstallationService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=AdminService,ControlType=Lifecycle,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=Lifecycle,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=DeploymentService,ControlType=Lifecycle,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=InstallationService,ControlType=Lifecycle,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=LoggingService,ControlType=Lifecycle,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=MessageService,ControlType=Lifecycle,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=JBI,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi
com.sun.jbi:JbiName=server,ServiceName=Framework,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.framework
com.sun.jbi:JbiName=server,ServiceName=ManagementService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.management
com.sun.jbi:JbiName=server,ServiceName=AdminService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.management.AdminService
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.management.ConfigurationService
com.sun.jbi:JbiName=server,ServiceName=DeploymentService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.management.DeploymentService
com.sun.jbi:JbiName=server,ServiceName=InstallationService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.management.InstallationService
com.sun.jbi:JbiName=server,ServiceName=LoggingService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.management.LoggingService
com.sun.jbi:JbiName=server,ServiceName=MessageService,ControlType=Logger,ComponentType=System,LoggerName=com.sun.jbi.messaging
com.sun.jbi:JbiName=domain,ServiceName=ConfigurationService,ControlType=LoggingService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=LoggingService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=LoggingService,ControlType=LoggingService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=MessageService,ControlType=MessageService,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=Framework,ControlType=Statistics,ComponentType=System
com.sun.jbi:JbiName=domain,ServiceName=ConfigurationService,ControlType=System,ComponentType=System
com.sun.jbi:JbiName=server,ServiceName=ConfigurationService,ControlType=System,ComponentType=System
com.sun.jbi:ServiceName=JbiAdminUiService,ComponentType=System
com.sun.jbi:ServiceName=JbiReferenceAdminUiService,ComponentType=System
com.sun.jbi:Target=domain,ServiceName=AdminService,ServiceType=Admin
com.sun.jbi:Target=server,ServiceName=AdminService,ServiceType=Admin
com.sun.jbi:Target=domain,ServiceName=ConfigurationService,ServiceType=Deployment
com.sun.jbi:Target=server,ServiceName=ConfigurationService,ServiceType=Deployment
com.sun.jbi:Target=domain,ServiceName=ConfigurationService,ServiceType=Installation
com.sun.jbi:Target=server,ServiceName=ConfigurationService,ServiceType=Installation
com.sun.jbi:Target=domain,ServiceName=ConfigurationService,ServiceType=System
com.sun.jbi:Target=server,ServiceName=ConfigurationService,ServiceType=System
com.sun.jbi:Target=domain,ServiceName=DeploymentService,ServiceType=Deployment
com.sun.jbi:Target=server,ServiceName=DeploymentService,ServiceType=Deployment
com.sun.jbi:Target=domain,ServiceName=FileTransferService,ServiceType=Download
com.sun.jbi:Target=domain,ServiceName=FileTransferService,ServiceType=Upload
com.sun.jbi:Target=domain,ServiceName=InstallationService,ServiceType=Installation
com.sun.jbi:Target=server,ServiceName=InstallationService,ServiceType=Installation
com.sun.jbi.esb:ServiceType=ArchiveUpload
com.sun.management:type=HotSpotDiagnostic
java.lang:type=ClassLoading
java.lang:type=Compilation
java.lang:type=GarbageCollector,name=Copy
java.lang:type=GarbageCollector,name=MarkSweepCompact
java.lang:type=Memory
java.lang:type=MemoryManager,name=CodeCacheManager
java.lang:type=MemoryPool,name=Code Cache
java.lang:type=MemoryPool,name=Eden Space
java.lang:type=MemoryPool,name=Perm Gen
java.lang:type=MemoryPool,name=Survivor Space
java.lang:type=MemoryPool,name=Tenured Gen
java.lang:type=OperatingSystem
java.lang:type=Runtime
java.lang:type=Threading
java.util.logging:type=Logging


One final thing to note is that any access of a specific MBean associated with GlassFish would be most easily accomplished using client-side proxies as discussed in the "Performing Operations on Remote MBeans via Proxies" section of the previously mentioned Creating Custom JMX Clients tutorial entry and as recommended in the Standard MBean interfaces section of the JMX Best Practices document.

This blog entry has demonstrated how JConsole or a custom Java JMX client can be written to access the MBeans hosted in GlassFish. While GlassFish provides its own excellent web-based administration console that leverages these same MBeans, there may be situations when custom clients need access to the same administrative MBeans.