четверг, 13 августа 2015 г.

Steps to Configure HermesJMS console to monitor Weblogic JMS resources

HermesJMS is a open-source tool developed by Colin Crist. It is used to interact with JMS providers making it easy to browse or search queues and topics, copy messages and delete them. This tool has ability to work with many JMS Providers like JBoss MQ, Active MQ, OpenJMS, Weblogic JMS, Tibco JMS, WebSphere MQ, WebMethods etc...

This post will demonstrate the detailed step-by-step "How to get HermesJMS installed and configured for use with WebLogic JMS". There is web-recording provided in HermesJMS Website to setup HermesJMS with Weblogic. Please click here to go through the web-recording.

Installation

1. Download and save the HermesJMS installer jar in a commonly used location.
2.  Open a command prompt and navigate to your directory where the installer jar is saved. Run "java -jar hermes-installer-1.13.jar" to begin the installation.
3. In the Installation wizard
    -- Click Next on Welcome Screen
    -- Click Next on Information Screen
    -- Accept the terms of License Agreement and  click Next
    -- Enter the appropriate Installation Path [for ex: C:\Program Files\HermesJMS]and click Next
    -- Select the packs to be installed [Default is HermesJMS] and click Next
    -- In Ready to Install, click Next
    -- In Pack Installation progress, once Finished with installation click Next
    -- In Setup Shortcuts screen, enter appropriate name for your Installation [Default is HermesJMS] and click Next
    -- Click Done
4. Please be sure to use the same JVM with HermesJMS as the WLS you want to connect to. You can approach this by adding the PATH and JAVA_HOME variable in <HERMES_HOME>/bin/hermes.bat or hermes.sh file at the beginning of the file right after the REM comments.
For example: I am trying to connect to Weblogic 9.2 domain with JDK 1.5 so i set as below.
set PATH=C:\oracle\Java\jdk1.5.0_22\jre\bin
set JAVA_HOME=C:\oracle\Java\jdk1.5.0_22\jre

Note: If you are trying to connect to Weblogic 10.3 domain with JDK 1.6 as your JVM to start HermesJMS please make sure that you add -Dsun.lang.ClassLoader.allowArraySyntax=true to the classpath in hermes.bat or hermes.sh. If you don't set this you shall come across below Error. Thanks to James Bayer for this information.

javax.jms.JMSException: Could not create InitialContext: failed to unmarshal class weblogic.security.acl.internal.AuthenticatedUser; nested exception is:
    java.io.StreamCorruptedException: invalid type code: 31 

Steps to configure HermesJMS with Weblogic JMS

1. Launch the HermesJMS
    -- Windows: via <HERMES_HOME>\bin\hermes.bat or Start > Program Files > HermesJMS > Hermes
    -- Unix: via <HERMES_HOME>/bin/hermes.sh

2. Right click on Sessions to create a New session. jms > sessions > New > New session...
3.  On resulting prompt, goto the Providers tab [bottom] and right click to Add Group called "Weblogic" and right click on "Library" to Add JAR(s) and specify your path to <WEBLOGIC_HOME>\server\lib\weblogic.jar. Click "Don’t Scan" when prompted.
 
4. In the same windows, goto Sessions tab [bottom]. 
-- Enter a Session Name "TestSession"
-- In the Connection Factory > Loader section, select "Weblogic" from the drop-down (you may have to save and then edit the session to see the provider you just configured in the drop down for loader
-- In the Connection Factory > Class section, select "hermes.JNDIConnectionFactory". 
-- In the Plug In drop-down select "BEA Weblogic
-- In the Connection Factory add the properties as below. Click OK once done.
Property
Value
binding
javax/jms/QueueConnectionFactory
initialContextFactory
weblogic.jndi.WLInitialContextFactory
providerURL
t3://<managedServer>:<managedPort>
securityCredentials
<adminPassword>
securityPrincipal
<adminUsername>
5. Right click on newly created session TestSession to discover/find all of the available destinations. jms > sessions > TestSession > Discover. Once you click Discover you shall see a message "Getting message stores" at the bottom of the window and a Dialogue box stating Discovered # destinations. Click Yes.

 
6. Right click on one of the discovered Queue/Topic destination under jms > sessions > TestSession > [queueName/topicName] and select Browse to list the contents of the queue/topic on right hand pane as below.

 
Hermes can monitor multiple queues at once, auto-refresh, use selectors, delete messages, etc.. For more information check user guide at http://www.hermesjms.com.

You should be set now to monitor your queues/topics in your organization.  
 
http://weblogicissuesolutions.blogspot.com/2011/06/steps-to-configure-hermesjms-console-to.html

Комментариев нет:

Отправить комментарий

SEO: Эксперимент: как Яндекс и Google учитывают ключевые слова в URL

Эксперимент: как Яндекс и Google учитывают ключевые слова в URL Эксперимент: как Яндекс и Google учитывают ключевые слова в URL Дата пу...