| by SuperBonBon |
|
JMX adapters
About > Create your own adapters > Adapter net.sbbi.jafs.management.MX4JHttpConsole settings ( port - allowedUser - locale - JAASRealm - securityProtocol - certsConfName - autoNatMapping - useCache - ni - wantClientAuth - needClientAuth - startBrowser - defaultUserNameAndPass - browserBinaryPath ) > Adapter net.sbbi.jafs.management.MX4JRemoteAdapter settings ( jndiName - connectorType - startNamingService - namingServicePort - remoteObjectPort - autoNatMapping - remoteServerHostName - JAASRealm - allowedUser - securityProtocol - certsConfName - ni - cosNSStartupWait ) > Adapter net.sbbi.jafs.management.MX4JRemoteAdapter restrictions > Adapter net.sbbi.jafs.management.UPNPMBeansAdapter settings ( ni - port - exposeUPNPDevicesAsMBeans - discoveryTimeout ) > Adapter net.sbbi.jafs.management.MX4JWSConnector settings ( ni - port - ni - protocol - path - jettyConfigPath - securityProtocol - storeSettingsName - needCertificate )
About
JAFS provides JMX adapter to manage the server. Those adapters are currently based on MX4J adapters.
These adapters are used to access/communicate with the JMX management beans that the server is exposing for administration.
The first adapter net.sbbi.jafs.management.MX4JHttpConsole can be used to start an small embeded HTTP server and access and administration console to manage the server from a browser.
The second adapter net.sbbi.jafs.management.MX4JRemoteAdapter can be used to start an JRMP (RMI) or IIOP adapter. Such adapter can be used with custom JMX administration console such as MC4J.
The third adapter net.sbbi.jafs.management.UPNPMBeansAdapter allows you to expose the JAFS JMX interface as UPNP devices.
The last adapter net.sbbi.jafs.management.MX4JWSConnector still based on MX4J adapters can be used to communicate with the server using web services oriented technologies such as SOAP, and Caucho Hessian and Burlap protocols.
Create your own adapters
If the provided adapters are not scalable enough for you, you can develop your own adapter and plug it in the service configuration.
First create your adapter, it must implement the interface net.sbbi.jafs.management.JMXAdapter
When the adapter is ready add an adapter config entry in the management config element :
<management locale="en_US" manage-session="true" plug-to-server="false">
...
<adapter name="My very first adapter" class-name="foo.bar.MyAdapter">
<setting name="myFirstSetting">someValue</setting>
<setting name="myOtherSetting">someOtherValue</setting>
</adapter>
...
</management>
You're ready to start the application and pray ;o)
Adapter net.sbbi.jafs.management.MX4JHttpConsole settings
The port to use to connect to the HTTP administraton console. The port 80 will be used by the adapter when the setting is not provided.
The user names that are allowed to access the console within the defined JAAS authentication realm. All users will be accepted ( as long as they provide a valid password.. ) by the adapter when the setting is not provided.
The language of the administration console, french ( fr_FR ) or english (en_US). 'en_US' will be used by the adapter when the setting is not provided.
The JAAS authentication realm name that will be used to authenticate users on the administration console. The setting is required.
The security protocol used to access the http management console. Values can be 'TLS' (https), 'SSL' (https) or 'none' for clear connections. 'none' will be used by the adapter when the setting is not provided.
The server keystore, CA keystore and CRL entry setting name to be used when secure sockets are used by the adapter. 'default' will be used by the connector when the setting is not provided.
true will try to map the console port on the NAT ports mapper defined in the network interface config you use for this adapter (defined by the ni setting). 'false' will be used by the adapter when the setting is not provided.
Setting to enable cache during console operations, true or false. 'false' will be used by the adapter when the setting is not provided.
The network interface identifier that you want to use with this adapter.
When the securityProtocol is set to TLS or SSL, this option will either ask the client that connect to the console an X509 certificate (true) or no certificate (false). The session will be created if no certificate is provided. 'false' will be used by the adapter when the setting is not provided.
When the securityProtocol is set to TLS or SSL, this option will either ask the client that connect to the console an X509 certificate (true) or no certificate (false). The session will not be created if no certificate is provided. 'false' will be used by the adapter when the setting is not provided.
When this setting is set to true, the console will try to open a browser automatically to access the HTTP console after a sucesfull startup. The browserBinaryPath setting will be used to launch the desired process. 'false' will be used by the adapter when the setting is not provided.
The default username and password to be used to log into the console. This avoid to have to enter the username and password during the console startup (only). The username and password must be delimited by a ':' char (username:password).¨ This setting will only have effect when the startBrowser setting is enabled.
This setting defines the desired binary path ( I.E /foo/bar/myBrowser.exe ) to be used to launch the browser to access the console during startup. A default browser will be tried to be used when this setting is not provided.
Adapter net.sbbi.jafs.management.MX4JRemoteAdapter settings
The JNDI name of the connector.
The type of protocol to be used, can be 'JRMP' for RMI based protocol or 'IIOP' for CORBA based protocol. 'JRMP' will be used by the adapter when the setting is not provided.
true to start the naming service that wil be used by JRMP or IIOP, false if you want to use a naming service that has been already started by some other application. 'true' will be used by the adapter when the setting is not provided.
The port of the naming service. The standard ports are 1099 for JRMP and 900 for IIOP. '1099' will be used by the naming service when the setting is not provided.
The connector will be exposed as a remote object, this setting let you define the listenting port of the remote object. '35340' will be used by the adapter when the setting is not provided.
true will try to map the console port on the NAT ports mapper defined in the network interface config you use for this adapter (defined by the ni setting).
If you want to allow WAN access and that you are behind a NAT firewall, you'll need to set this value with an IP or hostname that match your NAT firewall IP address. This IP will be 'localhost' will be used by the adapter when the setting is not provided.
The JAAS authentication realm name that will be used to authenticate users on the remote adapter. If the setting is not provided, no authentication will be needed to access the remote adapter. This could cause potential security issues.. You are now warned.
The user names that are allowed to access the adapter within the defined JAAS authentication realm. All users will be accepted ( as long as they provide a valid password.. ) by the adapter when the setting is not provided.
The security protocol used to access the JRMP (only) remote adapter. Values are usually 'TLS' or 'SSL'. Secure connections will use the configured CRL and keystores defined with the adapter certsConfName setting to check certificates and provide the server certificate. Clear connections will be used by the JRMP adapter when the setting is not provided.
The server keystore, CA keystore and CRL entry setting name to be used when secure sockets are used by the adapter. 'default' will be used by the connector when the setting is not provided.
The network interface identifier that you want to use with this adapter.
This settings is used when the connector is used with IIOP and startNamingService setting is set to true. Basically the IIOP connector must wait for the COS naming service to be started. This setting is used to define how many miliseconds the connector must wait. 2500 ms is the default value when no setting is provided. If you have problems to start the connector try to increase this value.
Adapter net.sbbi.jafs.management.MX4JRemoteAdapter restrictions
The remote adapter can't be used due to JRE restrictions on both LAN and WAN with JRMP mode on the same JVM if you are behind a NAT firewall. If you want to have a LAN and WAN enabled console on the same JVM, you'll have to use the following setup:
- The first adapter for LAN must be of type IIOP and must start its own naming service.
- The second adapter for WAN must be of type JRMP, you must setup correctly the remoteServerHostName setting and make sure that it is starting it's own naming service.
If you do not want to use IIOP but want both adapters LAN and WAN in JRMP, proceed as follows :
- The first adapter for LAN ( WAN won't work ) must be of type JRMP and must use a naming service started externally with the command rmiregistry <registryPort> located in your bin java home directory.
- The second adapter for WAN access must be of type JRMP, you must setup correctly the remoteServerHostName setting and make sure that it is starting it's own naming service.
Adapter net.sbbi.jafs.management.UPNPMBeansAdapter settings
The network interface identifier that you want to use with this adapter.
The port of the web container adapter. 9080 will be used by the adapter when the setting is not provided.
Boolean setting to instruct the adapter to expose UPNP devices found on the network as MBeans, default to false.
Timeout in ms to discover UPNP devices, only usefull when exposeUPNPDevicesAsMBeans is set to true.
Adapter net.sbbi.jafs.management.MX4JWSConnector settings
The network interface identifier that you want to use with this adapter.
The port of the web container adapter. 80 will be used by the adapter when the setting is not provided.
The network interface identifier that you want to use with this adapter.
The protocol to be used by the adapter. 'soap', 'hessian' and 'burlap' are currently the only avaliable protocols. 'soap' will be used by the adapter when the setting is not provided.
The path to access the adapter via HTTP ( I.E if path = /jmxconnector, the url would be http://foo.bar.com/jmxconnector ) '/jmxconnector' will be used by the adapter when the setting is not provided.
The jetty configuration file path. Since this adapter is using jetty as the web container for the adapters you can define a jetty configuration file to fine tune the adapter settings on the web container. When no setting is provided a default jetty instance will be created on the defined port, using the network interface settings defined by the 'ni' setting.
The security protocol used to access the http web service. Value can be 'https' for SSL connections or 'none' for basic http transport. 'none' will be used by the adapter when the setting is not provided.
The name of the key store settings entry defined in your service config that you want to use when https is enabled. This will define the server certificate. 'default' will be used by the adapter when the setting is not provided.
This setting is used to define if the serer will require a valid client certificate for SSL/TLS connections or not. Values can be true or false. 'false' will be used by the adapter when the setting is not provided.








