Consultor Eletrônico



Kbase 22115: SonicMQ: Using Borland AppServer's JNDI store
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/1/2002
SUMMARY:
This solution applies to SonicMQ version 4.x and Borland Application Server 4.5.1. It explains how to configure SonicMQ and Borland Application Server so that JMS destinations can be propagated to Borland's JNDI Naming Service.

SOLUTION:

Configuration that must be done on the BAS side:

1. Add sonic_Client.jar and sonic_XA.jar to the BAS classpath in the following way:
a. Start the app server, start the Borland console.
b. Using the console, right click on the name of your application server (top left hand side of screen). Click on Edit Properties. c. Click on the Configuration tab.
d. Add two lines to the Config file in the area above the words:
END OF MODIFIABLE SECTION.
The two lines should point to the sonic_Client.jar and the sonic_XA.jar. Here's an example:
addpath c:/SonicSoftware/SonicMQ/lib/sonic_Client.jar
addpath c:/SonicSoftware/SonicMQ/lib/sonic_XA.jar

2. Save the config file and restart the Application Server.

Configuration that must be done on the Sonic side:

1. Modify Admin.bat/Admin.sh and Explorer.bat/Explorer.sh to pass the following parameter to the JVM:
-Dvbroker.agent.port=<osagentportnumber>
The osagentportnumber is the port number of the JNDI service, which can be found in the config file for the Borland App Server. The information is kept in a line that looks like this:
vmprop vbroker.agent.port=14000
This is the default port number.

2. Modify Admin.bat/Admin.sh and Explorer.bat/Explorer.sh to add two Borland jars, asrt.jar and vbjorb.jar to the SonicMQ classpath. Here's an example:
SONICMQ_CLASSPATH=%SONICMQ_LIB%\tools.jar;%SONICMQ_SSL_LIB%;%SMQ_CLASSPATH_EXT%;c:\Borland\AppServer\lib\asrt.jar;c:\Borland\AppServer\lib\vbjorb.jar

3. Start the Sonic Explorer and click on JMS Administered Object Store. Click on JNDI naming service and paste the following into the properties box without any spaces:
admin.lookupContext=serial://,java.naming.factory.initial=com.inprise.j2ee.jndi.CtxFactory,java.naming.factory.url.pkgs=com.inprise.j2ee.jndi

Note: if you wish to use subcontexts for your administered objects, you must first create them on the Borland App Server. For instance, if you want to store the objects at: serial://jms/MyObjects you would first need to create the context by going to the BAS Console, clicking on Enterprise Services, then JNDI Name Services, then serial:// then right clicking serial and choosing new/context and entering jms into the text box. Repeat for MyObjects. Then, your properties in the Explorer would read: admin.lookupContext=serial://jms/MyObjects. But the context needs to be created on the Borland App Server first.

4. Once connected to the store, you can create new JMS Destinations and verify that they are propagated to the BAS Console.