The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::JBoss::Management - Bindings for JBoss Management API

VERSION

Version 0.03

SYNOPSIS

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->get_ds_pool_stats('java:jboss/datasources/jboss_Pool', 'true');
 my $disable_pool_stats = $jboss->get_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();
 

Attributes

 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)

SUBROUTINES/METHODS

BUILD

 The Constructor, build logging, call pass_log_obj method
 Build final url

get_state

 return server state
 my $state = $jboss->state();
    

get_jvm_usage

 return jvm usage
 my $jvm_usage = $jboss->get_jvm_usage();
    

get_runtime_stats

 get HTTP connector runtime statistics
 my $runtime_stats = $jboss->runtime_stats();
    

get_runtime_details

 get JBoss runtime details
 my $runtime_details = $jboss->get_runtime_details();
    

get_app_runtime_stats

 get application runtime statistics
 my $app_runtime_stats = $jboss->get_app_runtime_stats('hawtio.war');
    

get_server_env

 get JBoss server environment
 my $server_env = $jboss->get_server_env();
    

get_datasources

 get data source and driver
 my $datasources = $jboss->get_datasources();
    

get_app_status

 get web application status
 web application name is required
 my $app_status = $jboss->get_app_status('hawtio.war');
    

get_active_sessions

 get web application active sessions
 web application name is required
 my $active_session = $jboss->get_active_sessions('hawtio.war');
    

get_ds_pool_stats

 get usage metric of connection pooling of the data source
 my $pool_stats = $jboss->get_ds_pool_stats('java:jboss/datasources/jboss_Pool');

test_con_pool

 test datasource connection polling
 my $test = $jboss->test_con_pool('ExampleDS');

set_ds_pool_size

 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_ds_pool_stats

 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

 reload jboss only
 my $reload = $jboss->reload();

shutdown

 shutdown jboss
 my $shutdown = $jboss->shutdown();

restart

 restart jboss and jvm
 my $restart = $jboss->restart();

get_deployment_info

 return deployment detail information
 my $deploy_info = $jboss->get_deployment_info();

get_jndi

 return jndi view information
 my $jndi = $jboss->get_jndi();

set_log_level

 my $loglevel = $jboss->set_log_level('CONSOLE', 'ERROR');

get_log_level

 my $loglevel = $jboss->get_log_level('CONSOLE');

AUTHOR

"Heince Kurniawan", <"heince at cpan.org">

BUGS

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.

SUPPORT

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:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.