The following sections give an overview of the mechanisms available for controlling WebLogic Network Gatekeeper.
Network Gatekeeper Administration Console provides a graphical user interface for configuring, managing, and provisioning Network Gatekeeper. The console is an extension to the console available in WebLogic Server.
At least one Network Tier server must be started prior to logging in to WebLogic Server Administration Console. Network Gatekeeper servers started after logging in to the WebLogic Server Administration Console are not displayed in Network Gatekeeper console. To see them, you must login again.
Use a supported web browser to go to http://<server>:<port>/console
where <server> is the instance you have set up as your Administration Server.
Login using your log-in credentials.
Note: | If it is the first time Network Gatekeeper is started, use the username weblogic and password weblogic which is what is recommended when the domain is configured. Once you have logged in, create an administrative user using the instructions given in Managing Management Users and Management User Groups, and remove the user weblogic . Either remove or change password for the WebLogic Server user: see
http://download.oracle.com/docs/cd/E13222_01/wls/docs100/secwlres/secroles.html. |
All Network Gatekeeper configuration and monitoring is provided via the following nodes in the left pane of the console, in the Domain Structure group:
The MBeans pane contains a tree-structure of all management objects applicable for the selected Network Gatekeeper server.
By clicking on a management object, the corresponding Configuration and Provisioning page for the management object is displayed: see Configuration and Provisioning.
It is possible to expand and collapse this pane by clicking or
The Configuration and Provisioning pane contains two tabs:
The Attributes tab displays a list of Attributes, either read-only or read-write for the managed object.
Note: | In this document, read-only attributes are indicated by (r) after the name. |
Read-write attributes have a check-box next to them.
The Operations tab contains a drop-down list with the operations for the managed object.
Operations either display data, set data, or perform an actual task.
The WebLogic Network Gatekeeper Alarms pane displays alarms emitted.
It is possible to filter the output to the page on a set of criteria, see Table 3-1.
The list is returned by clicking Get Alarms.
See
Handling Alarms for alarm codes. Use 0 (zero) to wildcard.
|
|||
|
|||
The WebLogic Network Gatekeeper CDRs pane displays CDRs that have been generated.
It is possible to filter the output to the page on a set of criteria, see Table 3-1.
The list is returned by clicking Get CDRs.
|
|||
|
|||
Network Gatekeeper also has an Administration Console for Network Gatekeeper related configuration in WebLogic SIP Server. This is only relevant for the SIP Server parts of Network Gatekeeper communication services, and handles settings for the modules deployed in WebLogic SIP server.
Use a Web browser to go to http://<server>:<port>/console
on the WebLogic SIP Server Administration server.
Login using your log-in credentials.
The Administration Console is similar to the core console available in WebLogic Server. All Network Gatekeeper specific configuration is done via the WLNG Integration node in the left pane of the console, in the Domain Structure group.
The Network Gatekeeper Integration Configuration page contains a set of tabs that contain general integration configuration attributes and communication service specific configuration attributes.
These attributes use the Lock and Edit functionality provided by WebLogic Server Administration console.
Network Gatekeeper exposes its management interfaces as JMX MBeans.
These MBeans come in two flavours:
Note: | A link to JavaDoc for OAM can be found in the Reference topic page in the Network Gatekeeper documentation set on http://www.oracle.com/technology/documentation/index.html. See the reference section for each OAM service for the fully qualified MBean names and how they map to managed objects in Network Gatekeeper Administration Console |
Below is an example of connecting to the MBean server and performing an operation on the JMX interfaces.
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Hashtable;
import javax.management.MBeanServerConnection;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;
public class TestMgmt {
private static MBeanServerConnection connection;
private static JMXConnector connector;
/*
* Initialize connection to the Domain Runtime MBean Server
*/
public static void initConnection(String hostname, String portString,
String username, String password) throws IOException,
MalformedURLException {
String protocol = "t3";
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String jndiroot = "/jndi/";
String mserver = "weblogic.management.mbeanservers.domainruntime";
JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname,
port, jndiroot + mserver);
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, username);
h.put(Context.SECURITY_CREDENTIALS, password);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
"weblogic.management.remote");
connector = JMXConnectorFactory.connect(serviceURL, h);
connection = connector.getMBeanServerConnection();
}
public static void main(String[] args) throws Exception {
String hostname = args[0]; //hostname of the admin server
String portString = args[1]; //port of the admin server
String username = args[2];
String password = args[3];
String mbserverName = args[4]; //NT server name
String operationName = "addRoute";
String id = "Plugin_px21_multimedia_messaging_mm7";
String addressExpression = ".*";
String[] params = new String[]{id, addressExpression};
String[] signature = new String[]{"java.lang.String", "java.lang.String"};
ObjectName on;
try {
on = new ObjectName("com.bea.wlcp.wlng:Name=wlng,InstanceName=PluginManager,Type= com.bea.wlcp.wlng.plugin.PluginManagerMBean,Location=" + mbserverName);
} catch (MalformedObjectNameException e) {
throw new AssertionError(e.getMessage());
}
initConnection(hostname, portString, username, password);
//invoke the operation
Object result = connection.invoke(on, operationName, params, signature);
System.out.println(result.toString()); //displays the result
connector.close();
}
}
If setting an attribute or calling an operation fails a com.bea.wlcp.wlng.api.management.ManagementException
, or a subclass of this exception is thrown. The following subclasses are defined:
DuplicateKeyException
- Thrown when the operation results in creating a duplicate key
InputManagementException
- Thrown for invalid user input
KeyNotFoundException
- Thrown when the operation cannot find the specified key
A JMX client must have the same version of exception classes available; otherwise the client will throw ClassNotFoundException.
$BEA_Home/wlng_et400/lib/wlng/oam.jar
contains custom classes for OAM and return types.
$BEA_Home/wlng_et400/doc/javadoc_oam
contains JavDoc for OAM.
The following section gives examples of how to use the WebLogic Scripting Tool (WLST) in both interactive and script mode when configuring and managing Network Gatekeeper.
For information about Weblogic Server and WLST, see http://download.oracle.com/docs/cd/E13222_01/wls/docs100/config_scripting/using_WLST.html
The following topics are covered:
Note: | A link to JavaDoc for OAM can be found on the Reference topic page in the Network Gatekeeper documentation set on http://www.oracle.com/technology/documentation/index.html. |
UNIX: $Domain_Home/bin/setDomainEnv.sh
Windows: $Domain_Home\bin\setDomainEnv.cmd
java weblogic.WLST
connect('<username>','<password>', 't3://<host>:<port>')
ls()
The MBean names are also displayed in each Configuration and Provisioning page for the management objects in the Network Gatekeeper Management Console.
cd('com.bea.wlcp.wlng:Name=wlng_nt,Type=<MBean name>')
For example, to select the MBean for the EDRService, use:
cd('com.bea.wlcp.wlng:Name=wlng,InstanceName=EdrService,Type=com.bea.wlcp.wlng.edr.management.EdrServiceMBean')
For example, to invoke the displayStatistics
method in the EDRService MBean:
cd('com.bea.wlcp.wlng:Name=wlng,InstanceName=EdrService,Type=com.bea.wlcp.wlng.edr.management.EdrServiceMBean')
objs = jarray.array([],java.lang.Object)
strs = jarray.array([],java.lang.String)
print(invoke('displayStatistics',objs,strs))
This operation has no arguments.
Another example: to add a route using the MBean for the Plug-in Manager:
cd(‘com.bea.wlcp.wlng:Name=wlng,InstanceName=PluginManager,Type=com.bea.wlcp.wlng.plugin.PluginManagerMBean ‘)
objs=jarray.array(['Plugin_px21_multimedia_messaging_mm7','.*'],Object)
strs=jarray.array(['java.lang.String', 'java.lang.String'],String)
invoke('addRoute', objs, strs)
The method addRoute
takes two arguments, and the values of the parameters are stated in the same order as the parameters are defined in the signature of the method.
Note: | For a method that has input parameters and a string return value, the invoke command can be executed as follows: |
objs = jarray.array([java.lang.String('stringInput1'),java.lang.String(‘stringInput2’), java.lang.String(‘StringInput3’)],java.lang.Object)
strs = jarray.array(['java.lang.String', 'java.lang.String’, 'java.lang.String’],java.lang.String)
invoke('methodName',objs,strs)
When using WLST together with scripts, WLST is invoked as follows:
java weblogic.WLST <script name>.py <argument 1> <argument 2> ...<argument n>
The arguments can be retrieved from within the scripts in the array sys.argv[]
, where sys.argv[0]
is the script name, sys.argv[1]
is the second argument and so on. It may be useful to specify login information and connection information as arguments to the scripts.
Below is a script that connects to Network Gatekeeper and changes to an MBean defined by argument.
userName = sys.argv[1]
passWord = sys.argv[2]
url="t3://"+sys.argv[3]+":"+sys.argv[4]
objectName = sys.argv[5]
objectName = "com.bea.wlcp.wlng:Name=wlng_nt,Type=" + sys.argv[5]
print objectName
connect(userName, passWord, url)
custom()
cd('com.bea.wlcp.wlng')
cd(objectName)
For example: To invoke the script:
java weblogic.WLST script1.py weblogic weblogic localhost 7001 com.bea.wlcp.wlng:Name=wlng,InstanceName=PluginManager,Type=com.bea.wlcp.wlng.plugin.PluginManagerMBean