Net::JBoss::Management - Bindings for JBoss Management API
Version 0.04
use Net::JBoss::Management;
my %con = ( username => 'admin', password => 'password', server => 'jboss1.example.com', port => 9443, #optional, default is 9990 ssl => 'on', #optional, default is 'off' ssl_verify => 'yes', #optional, default is 'no' realm => 'ManagementRealmHTTPS' #optional, default is 'ManagementRealm' ); my $jboss = Net::JBoss::Management->new(%con); my $state = $jboss->get_state(); my $jvm_usage = $jboss->get_jvm_usage(); my $runtime_stats = $jboss->get_runtime_stats(); my $deploy_info = $jboss->get_deployment_info(); my $app_runtime_stats = $jboss->get_app_runtime_stats('hawtio.war'); my $runtime_details = $jboss->get_runtime_details(); my $app_status = $jboss->get_app_status('hawtio.war'); my $active_session = $jboss->get_active_sessions('hawtio.war'); my $server_env = $jboss->get_server_env(); my $datasources = $jboss->get_datasources(); my $test = $jboss->test_con_pool('ExampleDS'); my $pool_stats = $jboss->get_ds_pool_stats('java:jboss/datasources/jboss_Pool'); my $enable_pool_stats = $jboss->set_ds_pool_stats('java:jboss/datasources/jboss_Pool', 'true'); my $disable_pool_stats = $jboss->set_ds_pool_stats('java:jboss/datasources/jboss_Pool', 'false'); my $min_pool_size = $jboss->set_ds_pool_size('min', 'java:jboss/datasources/jboss_Pool', 20); my $max_pool_size = $jboss->set_ds_pool_size('max', 'java:jboss/datasources/jboss_Pool', 50); my $jndi = $jboss->get_jndi(); my $loglevel = $jboss->get_log_level('CONSOLE'); my $loglevel = $jboss->set_log_level('CONSOLE', 'ERROR'); my $reload = $jboss->reload(); my $shutdown = $jboss->shutdown(); my $restart = $jboss->restart();
Other attributes is also inherited from JBoss.pm Check 'perldoc Net::JBoss' for detail notes : ro = read only, can be specified only during initialization rw = read write, user can set this attribute rwp = read write protected, for internal class management_url = (ro) store default management url path reload_time = (rw) set wait time (in seconds) to check the server state after reload is fired (default 10s)
The Constructor, build logging, call pass_log_obj method Build final url
return server state my $state = $jboss->state();
return jvm usage my $jvm_usage = $jboss->get_jvm_usage();
get HTTP connector runtime statistics my $runtime_stats = $jboss->runtime_stats();
get JBoss runtime details my $runtime_details = $jboss->get_runtime_details();
get application runtime statistics my $app_runtime_stats = $jboss->get_app_runtime_stats('hawtio.war');
get JBoss server environment my $server_env = $jboss->get_server_env();
get data source and driver my $datasources = $jboss->get_datasources();
get web application status web application name is required my $app_status = $jboss->get_app_status('hawtio.war');
get web application active sessions web application name is required my $active_session = $jboss->get_active_sessions('hawtio.war');
get usage metric of connection pooling of the data source my $pool_stats = $jboss->get_ds_pool_stats('java:jboss/datasources/jboss_Pool');
test datasource connection polling my $test = $jboss->test_con_pool('ExampleDS');
set data source min/max pool size my $min_pool_size = $jboss->set_ds_pool_size('min', 'java:jboss/datasources/jboss_Pool', 20); my $max_pool_size = $jboss->set_ds_pool_size('max', 'java:jboss/datasources/jboss_Pool', 20);
set enable/disable data source pool statistics my $enable_pool_stats = $jboss->set_ds_pool_stats('java:jboss/datasources/jboss_Pool', 'true'); my $disable_pool_stats = $jboss->set_ds_pool_stats('java:jboss/datasources/jboss_Pool', 'false');
reload jboss only my $reload = $jboss->reload();
shutdown jboss my $shutdown = $jboss->shutdown();
restart jboss and jvm my $restart = $jboss->restart();
return deployment detail information my $deploy_info = $jboss->get_deployment_info();
return jndi view information my $jndi = $jboss->get_jndi();
my $loglevel = $jboss->set_log_level('CONSOLE', 'ERROR');
my $loglevel = $jboss->get_log_level('CONSOLE');
"Heince Kurniawan", <"heince at cpan.org">
<"heince at cpan.org">
Please report any bugs or feature requests to "heince at cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net::JBoss::Management. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Net::JBoss perldoc Net::JBoss::Management
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net::JBoss
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net::JBoss
CPAN Ratings
http://cpanratings.perl.org/d/Net::JBoss
Search CPAN
http://search.cpan.org/dist/Net::JBoss/
Copyright 2015 "Heince Kurniawan".
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
To install Net::JBoss, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::JBoss
CPAN shell
perl -MCPAN -e shell install Net::JBoss
For more information on module installation, please visit the detailed CPAN module installation guide.