To compile and connect an NFM-P JMS client

Steps
 

Open a console window on the JMS client station.


Copy the following file from an NFM-P main server station to the current working directory on the JMS client station:

  • /opt/nsp/nfmp/server/nms/integration/SAM_O/jmsexample/JmsTest.java


Copy the samOss.jar file from the main server to the client station:

  • file system location:

    /opt/nsp/nfmp/server/nms/integration/SAM_O/samOss.jar

  • URL:

    TLS enabled—https://server_address:8443/integration/samOss.jar

    TLS disabled—http://server_address:8080/integration/samOss.jar

    where server_address is the main server IP address or hostname


Enter the following to compile the JmsTest.java file:

javac -classpath .:samOss.jar JmsTest.java


Enter one of the following to open a JMS connection to the NFM-P system:

Note: The connection is made to the standalone main server, or to the current primary main server in a redundant system. The server addresses are specified in the initial JMS context.

The -persistent parameter specifies a durable subscription, and is optional.

  • If TLS is not enabled on the NFM-P XML API:

java -classpath path:samOss.jar JmsTest -t topic -u user -p pass -f "filter" -persistent -c ID

  • If TLS is enabled on the NFM-P XML API:

java -classpath path:samOss.jar -Djavax.net.ssl.trustStore=truststore JmsTest -t topic -u user -p pass -f "filter" -persistent -c ID

where

path is the relative path to the samOss.jar file on the client station, such as ./ or .\

truststore is the absolute path and name of the TLS truststore file on the client station

topic is the JMS subscription topic

user is the NFM-P user name

pass is the NFM-P user password

filter is a JMS filter; see Filters in JMS message filtering

ID is a JMS client ID that you provide

End of steps

© 2024 Nokia. Nokia Confidential Information

Use subject to agreed restrictions on disclosure and use.