users@glassfish.java.net

How do I programmatically access the Glassfish domain from a webapplication?

From: <forums_at_java.net>
Date: Fri, 25 Mar 2011 07:27:40 -0500 (CDT)

I do a bit of logging in a ServletFilter to log which web services are being
called, response times, etc, and I would ideallly like to log the domain name
of the running Glassfish server. But so far I have not been able to come up
with any way of programmatically access this info.

Do any of you know of a way to access this info from the currently running
web application?

org.glassfish.admin.amx.base.DomainRoot [1] seems to have some methods that
might give some info, but I have no idea on what classes implement these
interfaces. And I have no experience with AMX what so ever, so for all I
know these methods might not even exist for end-user usage.


[1]
http://javadoc.glassfish.org/v3/apidoc/org/glassfish/admin/amx/base/DomainRoot.html

--
[Message sent by forum member '8086']
View Post: http://forums.java.net/node/785169