Professional Documents
Culture Documents
Deployment and
Integration Guide
Next Generation Distributed Messaging
Version 2.0 (DOC 2.0.0.)
Coridan Inc.
Copyright Notice 11 May 2006
Copyright Notice
Copyright © 2006 Coridan Inc.
All rights reserved.
This document contains proprietary information of Coridan Inc., and is provided under a
license agreement containing restrictions on use and disclosure and is also protected by
copyright law.
Due to continued product development this information may change without notice. The
information and intellectual property contained herein is confidential between Coridan
Inc. and the client and remains the exclusive property of Coridan Inc. If you find any
problems in the documentation, please report them to us in writing. Coridan does not
warrant that this document is error-free.
No part of this publication may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise without the prior written permission of Coridan.
Microsoft Word, Microsoft Office, Windows® and Windows XP® are trademarks of the
Microsoft Corporation. Java® is a trademark of the Sun Corporation. MantaRay® is a
registered trademark of Coridan Inc.
Coridan Inc.
Boston, MA, USA
+(866) 808-0322
Support E-Mail: (mailto:support@coridan.com)
Website: (http://www.coridan.com)
MantaRay Deployment and Integration Guide Version 2.0 (DOC 2.0.0) iii
11 May 2006
Table of Contents
Copyright Notice iii
Table of Contents iv
Preface v
About this Manual ........................................................................................................................................v
Audience............................................................................................................................................v
MantaRay Documentation.................................................................................................................v
Document Conventions ....................................................................................................................vi
About Coridan ........................................................................................................................................... vii
Worldwide Technical Support ................................................................................................................... vii
Feature Requests............................................................................................................................ viii
Bug Reports................................................................................................................................... viii
JBoss Versions 3.x and 4.x 1
JBoss Configuration Process ........................................................................................................................1
Specifying the Location of MantaRay Files ......................................................................................2
Registering MantaRay JMS objects in the JNDI Tree.......................................................................3
Configuring MantaRay as a Foreign JMS Provider...........................................................................4
Code Samples ...............................................................................................................................................6
Servlet Context Listener Class Sample Code ....................................................................................6
Web.xml Sample File ........................................................................................................................7
JBoss Startup Destination MBean Interface ......................................................................................7
JBoss Startup Destination MBean Implementation ...........................................................................8
WebLogic 8.1 11
WebLogic 8.1 Configuration Process .........................................................................................................11
Specifying the Location of MantaRay Files ....................................................................................11
Registering MantaRay JMS objects in the JNDI Tree.....................................................................13
Running the WebLogic Server ........................................................................................................14
Verifying the JNDI Tree..................................................................................................................14
Configuring MantaRay as a Foreign JMS Provider.........................................................................15
Code Samples .............................................................................................................................................19
Servlet Context Listener Class Sample Code ..................................................................................19
Web.xml Sample File ......................................................................................................................19
Config.xml Sample File...................................................................................................................20
Startup Class Sample Code..............................................................................................................21
WebLogic 9.x 23
WebLogic 9.x Configuration Process .........................................................................................................24
Specifying the Location of MantaRay Files ....................................................................................24
Running the WebLogic Server ........................................................................................................25
Registering MantaRay JMS objects in the JNDI Tree.....................................................................25
Configuring MantaRay as a Foreign JMS Provider.........................................................................30
Code Samples .............................................................................................................................................40
Servlet Context Listener Class Sample Code ..................................................................................40
Web.xml Sample File ......................................................................................................................41
Startup Class Sample Code..............................................................................................................42
Preface
In This Chapter
About this Manual .......................................................v
About Coridan .............................................................vii
Worldwide Technical Support .....................................vii
Audience
The Deployment and Integration guide is intended for use by developers, system
architects and integrators involved in the process of deploying enterprise infrastructure
solutions. The reader is expected to be familiar with Java programming, JMS and the
concepts of distributed enterprise environments.
MantaRay Documentation
Documentation for the MantaRay solutions consists of several user guides available in
PDF format. The Coridan web site (http://www.coridan.com) contains application
samples and a variety of other useful information.
Reference Guide
The Reference Guide contains a technical overview together with detailed
instructions and explanations regarding configuration parameters, options, advanced
features, and API documentation. This information is presented in a handy tabular
format designed for easy reference without the necessity of paging through a lengthy
book.
Document Conventions
The following table shows the typographic conventions used for this book.
Typeface Description
Terms Emphasizes specific terms and concepts, generally
when first introduced
Code Sample Code samples and configuration file text
Icon Description
Tips - Tips, tricks, work-arounds and other good ideas to
help you work more efficiently
About Coridan
Coridan is a leading provider of peer-to-peer messaging middleware products that
provide cutting-edge alternatives to traditional messaging solutions. Located in Boston,
Massachusetts, USA and Herzliya, Israel, Coridan was founded in 2003.
The Coridan team includes high tech veterans with many years of experience in
developing world-class software products. Coridan is backed by leading institutional
venture capital firms that take a hands-on approach in nurturing promising high-tech
companies.
MantaRay Deployment and Integration Guide Version 2.0 (DOC 2.0.0) vii
11 May 2006 Worldwide Technical Support
Feature Requests
If you have a feature request, please submit it at
MantaRay: Feature Requests: Submit Tracker Item
(https://sourceforge.net/tracker/?func=add&group_id=112623&atid=663826).
Bug Reports
Submit a bug report on the
MantaRay: Bugs: Submit Tracker Item
(http://sourceforge.net/tracker/?func=add&group_id=112623&atid=663823)
page at SourceForge.net.
When submitting a bug report, please supply the information requested above for
technical support.
viii Version 2.0 (DOC 2.0.0) MantaRay Deployment and Integration Guide
JBoss Versions 3.x and 4.x 11 May 2006
1
JBoss Versions 3.x and 4.x
In This Chapter
JBoss Configuration Process .......................................1
Code Samples ..............................................................6
This chapter presents the procedures for configuring JBoss Application Server versions
3.x and 4.x.so that MantaRay functions as a foreign JMS provider in this environment.
The explanations and procedures contained in this chapter assume that you have
successfully installed, configured and integrated JBoss Application Server into your IT
environment and that you are familiar with its operational concepts and procedures. For
further information, please refer to the JBoss documentation.
This chapter further assumes that you have successfully installed and configured
MantaRay on the Application Server peer(s) and any client peers requiring MantaRay
messaging capability. For details and instructions regarding installing and configuring
MantaRay, please refer to the MantaRay Getting Started and Reference Guides.
Notes: The following text expressions, appearing in this chapter, refer to specific file
locations in instructions and code samples as specified below. When following the
instructions or writing code, you should substitute the actual locations for these
expressions.
JBOSS_HOME refers to the fully qualified path to the folder in which the JBoss Server
files are located.
MANTA_HOME refers to the fully qualified path to the MantaRay installation folder.
MANTA_PATH
set JBOSS_CLASSPATH = %JBOSS_CLASSPATH%;%MANTA_PATH%
c Pack the compiled class and interface with the jboss-service.xml file into
a JAR file (for example, manta-startup.jar) with the following basic
structure:
META-INF
jboss-service.xml
MantaStartupMBean.class
MantaStartup.class
d Change the file extension from .jar to.sar (for example, manta-
startup.sar).
3 Move the SAR file to the JBOSS_HOME\server\default\deploy folder.
2 Insert the following code into the < invoker-proxy-bindings> tag in the
jboss-service.xml file:
<invoker-proxy-binding>
<name>Manta-message-driven-bean</name>
<invoker-mbean>
JBoss.mq:service=JMSProviderLoader,name=MantaJMSProvider
</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker
</proxy-factory>
<proxy-factory-config>
<JMSProviderAdapterJNDI>MantaMQ</JMSProviderAdapterJNDI>
<ServerSessionPoolFactoryJNDI>StdJMSPool
</ServerSessionPoolFactoryJNDI>
<MinimumSize>1</MinimumSize>
<KeepAliveMillis>30000</KeepAliveMillis>
<MaximumSize>15</MaximumSize>
<MaxMessages>1</MaxMessages>
<MDBConfig>
<ReconnectIntervalSec>10</ReconnectIntervalSec>
<DLQConfig>
<DestinationQueue>queue/DLQ</DestinationQueue>
<MaxTimesRedelivered>10</MaxTimesRedelivered>
<TimeToLive>0</TimeToLive>
</DLQConfig>
</MDBConfig>
</proxy-factory-config>
</invoker-proxy-binding>
<container-configuration>
<container-name>Manta MDB support</container-name>
<call-logging>true</call-logging>
<invoker-proxy-binding-name>Manta-message-driven-bean
</invoker-proxy-binding-name>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
</interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor
</interceptor>
<!-- CMT -->
<interceptor transaction="Container">
org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor transaction="Container" metricsEnabled="true">
org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
<interceptor transaction="Container">
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
</interceptor>
<!-- BMT -->
<interceptor transaction="Bean">
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
</interceptor>
<interceptor transaction="Bean">
org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
</interceptor>
<interceptor transaction="Bean" metricsEnabled="true">
org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
<interceptor>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor
</interceptor>
</container-interceptors>
<instance-pool>
org.jboss.ejb.plugins.MessageDrivenInstancePool
</instance-pool>
<instance-cache></instance-cache>
<persistence-manager></persistence-manager>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
</container-pool-conf>
</container-configuration>
4 Add the following MBean descriptor to the jms-ds.xml file, located in the
JBOSS_HOME\server\default\deploy\jms folder. This code should be
nested in the <connection-factories> tag.
<!-- The JMS provider loader -->
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="JBoss.mq:service=JMSProviderLoader,name=MantaJMSProvider">
<attribute name="ProviderName">MantaMQ</attribute>
<attribute name="ProviderAdapterClass">
org.jboss.jms.jndi.JNDIProviderAdapter
</attribute>
<attribute name="QueueFactoryRef">mantaQCF</attribute>
<attribute name="TopicFactoryRef">mantaTCF</attribute>
</mbean>
Code Samples
This section presents several examples of code that illustrate the concepts and
configuration procedures. Explanatory notes are appended to some of the samples.
import org.mr.api.jms.*;
import javax.jms.*;
import javax.naming.InitialContext;
import javax.naming.InitialContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
2
WebLogic 8.1
In This Chapter
WebLogic 8.1 Configuration Process..........................11
Code Samples ..............................................................19
This chapter presents the procedures for configuring WebLogic version 8.1 so that
MantaRay functions as a foreign JMS provider in this environment. The explanations
and procedures contained in this chapter assume that you have successfully installed,
configured and integrated WebLogic into your IT environment and that you are familiar
with its operational concepts and procedures. For further information, please refer to the
WebLogic documentation.
The data displayed in the screen captures is for example purposes only. You should
define object names and attributes for your environment according to your specific
requirements.
This chapter further assumes that you have successfully installed and configured
MantaRay on the server peer(s) and any client peers requiring MantaRay messaging
capability. For details and instructions regarding installing and configuring MantaRay,
please refer to the MantaRay Getting Started and Reference Guides.
Notes: The following text expression, appearing in this chapter, refers to a specific file
location in instructions and code samples as specified below. When following the
instructions or writing code, you should substitute the actual location for this expression.
MANTA_HOME refers to the fully qualified path to the MantaRay installation folder.
set MANTA_PATH="%MANTA_HOME%\ext\antlr.jar;
%MANTA_HOME%\manta.jar;
%MANTA_HOME%\ext\clink-1.5.0.jar;
%MANTA_HOME%\ext\commons-logging.jar;
%MANTA_HOME%\ext\jms.jar;
%MANTA_HOME%\ext\log4j-1.2.8.jar;
%MANTA_HOME%\ext\jmxri.jar;
%MANTA_HOME%\ext\jmxremote-jmx.jar;
%MANTA_HOME%\ext\jmxtools.jar;"
3 From the shortcut menu, select View JNDI tree. The JNDI Tree window
appears in a separate window.
3 Click the Configure a new Foreign JMS Server link. The definition
console page appears in the right-hand pane.
4 Enter a name for the foreign JMS server in the Name field (for example,
'm a nt aF o rei gn ').
5 Enter the class that must be instantiated to access the JNDI provider in the JNDI
Initial Context Factory field. The default value
'w ebl ogi c.jn di. WL In it ialC ont ext F act ory ' appears automatically.
6 Enter a URL in the JNDI Connection URL field (for example,
t 3: //l ocalh ost: 7001 ).
7 Click the Create button to finish. The newly created foreign JMS server appears as
a node in the Navigation Tree.
2 Enter the name that the remote object is bound to in the local server JNDI directory
in the Local JNDI Name field.
3 Enter the name of the remote object that will be looked up in the remote JNDI
directory in the Remote JNDI Name field.
4 Enter a user name and password in the appropriate fields as required.
5 Click Create to complete the definition. The new ConnectionFactory appears as a
node under the Foreign JMS ConnectionFactories node in the
Navigation Tree.
2 Enter the name that the remote object is bound to in the local server JNDI directory
in the Local JNDI Name field.
3 Enter the name of the remote object that will be looked up in the remote JNDI
directory in the Remote JNDI Name field.
4 Click Create to complete the definition. The new destination appears as a node
under the Foreign JMS Destination node in the Navigation Tree.
Once deployed, foreign JMS MBeans create objects in the local server JNDI tree, which
then performs a lookup of the referenced JMS objects whenever the foreign MBeans are
looked up. This means that the local server and the remote JNDI folder are always
synchronized.
Code Samples
This section presents several examples of code that illustrate the concepts and
configuration procedures. Explanatory notes are appended to some of the samples.
import org.mr.api.jms.*;
import javax.jms.*;
import javax.naming.InitialContext;
import javax.naming.InitialContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
Note: We recommend that you do not change the above config.xml file unless you know
what you are doing.
3
WebLogic 9.x
In This Chapter
WebLogic 9.x Configuration Process..........................24
Code Samples ..............................................................40
This chapter presents the procedures for configuring WebLogic version 9.x so that
MantaRay functions as a foreign JMS provider in this environment. The explanations
and procedures contained in this chapter assume that you have successfully installed,
configured and integrated WebLogic into your IT environment and that you are familiar
with its operational concepts and procedures. For further information, please refer to the
WebLogic documentation.
The data displayed in the screen captures is for example purposes only. You should
define object names and attributes for your environment according to your specific
requirements.
This chapter further assumes that you have successfully installed and configured
MantaRay on the server peer(s) and any client peers requiring MantaRay messaging
capability. For details and instructions regarding installing and configuring MantaRay,
please refer to the MantaRay Getting Started and Reference Guides.
Note: Whenever you make changes to the WebLogic configuration using the WebLogic
console, you must click Lock & Edit before you begin, and Activate Changes after all
changes have been made.
Notes: The following text expressions, appearing in this chapter, refer to specific file
locations in instructions and code samples as specified below. When following the
instructions or writing code, you should substitute the actual locations for these
expressions.
MANTA_HOME refers to the fully qualified path to the MantaRay installation folder.
2 Click Lock & Edit in the Change Center section, located in the upper left-
hand side of the window.
3 In the Domain Structure tree (located in the center left-hand pane in the above
screen capture), open the Environment node and then click on the Startup &
Shutdown Classes node. The Summary of Startup and Shutdown
Classes console page appears in the right-hand pane.
4 Click the New button in the lower left-hand corner of the page.
5 Select the Startup Class option button in the console page that appears, and
then click Next to continue.
Note: Make certain that the startup class is added to the WebLogic class The Configure
a New Startup or Shutdown Class console page appears. Select Startup
Class and then click Next.
8 Click the Activate Changes button in the upper-left hand corner of the browser
window.
9 Restart WebLogic Server.
3 Click to the name of the desired server. Do not select the check box. The
Settings for AdminServer console page appears.
4 Click the View JNDI Tree link, located in the upper left-hand corner of this
page. A new browser window opens, showing the domain structure.
5 Navigate the Domain Structure tree to display details of the JNDI structure, as
shown in the following sample screen capture. Verify that the JNDI information is
correct.
4 Enter a name for the JMS provider in the Name field (for example: 'm an t a ra y ').
The remaining two fields are optional. Click Next to continue.
5 Select the check box for the desired target server in the Targets section. Click
Next to continue.
6 Select the Would you like to add resources? check box and then click
Finish.
2 Select Foreign Server from the option button group (WebLogic 9.1 as shown
below) or from the Type drop-down list (WebLogic 9.0 - not shown). Click Next
to continue.
3 Enter a name for the foreign server (e.g., mantaray) in the Name field, and then click
Finish.
4 The Create a Mew JMS System Resource Module console page appears.
Click Finish to continue.
Configuring ConnectionFactories
This procedure assumes that you are continuing immediately following completion of
the Adding Resources to the JMS Module steps as described in the previous
section.
1 Click on the name of the new resource (the foreign server that you have just created)
that appears in the Summary of Resources table at the bottom of the
Settings For... console page. You do not need to select the check box.
2 Enter the name of the class that must be instantiated to access the JNDI provider in
the JNDI Initial Context Factory field. The default value,
'w ebl ogi c.jn di. WL In it ialC ont ext F act ory ', appears automatically.
3 Enter a value for the JNDI Connection URL field, enter the URL of the JNDI
(e.g. t 3:/ /local host :7001 ). The JNDI Properties field is optional.
Once deployed, foreign JMS MBeans create objects in the local server JNDI tree, which
then performs a lookup of the referenced JMS objects whenever the foreign MBeans are
looked up. This means that the local server and the remote JNDI folder are always
synchronized.
Code Samples
This section presents several examples of code that illustrate the concepts and
configuration procedures. Explanatory notes are appended to some of the samples.
import org.mr.api.jms.*;
import javax.jms.*;
import javax.naming.InitialContext;
import javax.naming.InitialContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;