line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
package JMX::Jmx4Perl::Product::Glassfish; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
33
|
use JMX::Jmx4Perl::Product::BaseHandler; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
153
|
|
5
|
4
|
|
|
4
|
|
25
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
88
|
|
6
|
4
|
|
|
4
|
|
31
|
use base "JMX::Jmx4Perl::Product::BaseHandler"; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
340
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
34
|
use Carp qw(croak); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1319
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
JMX::Jmx4Perl::Product::Glassfish - Handler for Glassfish |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
This handler supports glassfish up to version 3.1 |
17
|
|
|
|
|
|
|
(L) |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub id { |
22
|
4
|
|
|
4
|
1
|
29
|
return "glassfish"; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub name { |
26
|
0
|
|
|
0
|
1
|
|
return "Glassfish"; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub version { |
30
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
31
|
0
|
|
|
|
|
|
my $version = $self->_version_or_vendor("version",qr/([\d\.]+)/m); |
32
|
0
|
0
|
|
|
|
|
return $version if $version; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Try for Glassfish V3 |
35
|
0
|
|
|
|
|
|
my $jmx = $self->{jmx4perl}; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $servers = $jmx->search("com.sun.appserv:type=Host,*"); |
38
|
0
|
0
|
|
|
|
|
if ($servers) { |
39
|
0
|
|
|
|
|
|
$self->{"original_version"} = "GlassFish V3"; |
40
|
0
|
|
|
|
|
|
$self->{"version"} = "3"; |
41
|
0
|
|
|
|
|
|
return "3"; |
42
|
|
|
|
|
|
|
} |
43
|
0
|
|
|
|
|
|
return undef; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub vendor { |
47
|
0
|
|
|
0
|
1
|
|
return "Oracle"; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub autodetect_pattern { |
51
|
0
|
|
|
0
|
1
|
|
return (shift->original_version_sub,qr/GlassFish/i); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub jsr77 { |
55
|
0
|
|
|
0
|
1
|
|
return 1; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub init_aliases { |
59
|
|
|
|
|
|
|
return |
60
|
|
|
|
|
|
|
{ |
61
|
0
|
|
|
0
|
1
|
|
attributes => |
62
|
|
|
|
|
|
|
{ |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
operations => |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
THREAD_DUMP => [ "com.sun.appserv:category=monitor,server=server,type=JVMInformation", "getThreadDump"] |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
# Alias => [ "mbean", "attribute", "path" ] |
69
|
|
|
|
|
|
|
}; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 LICENSE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This file is part of jmx4perl. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Jmx4perl is free software: you can redistribute it and/or modify |
78
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
79
|
|
|
|
|
|
|
the Free Software Foundation, either version 2 of the License, or |
80
|
|
|
|
|
|
|
(at your option) any later version. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
jmx4perl is distributed in the hope that it will be useful, |
83
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
84
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
85
|
|
|
|
|
|
|
GNU General Public License for more details. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
88
|
|
|
|
|
|
|
along with jmx4perl. If not, see . |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
A commercial license is available as well. Please contact roland@cpan.org for |
91
|
|
|
|
|
|
|
further details. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 AUTHOR |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
roland@cpan.org |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=cut |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
1; |