One of our project requires to configure Broker as a JMS provider - this is something abs. new to me. The requirement is to have webLogic clients publishing on and subscribing to the Topics defined on the Broker JMS. I did some reading (BrokerJMS Prog Guide), it is too much to grasp and I am failing to understand all that is required to be done. If someone could guide me through the steps that need to be taken to make this work, Id be extremely grateful. Also, am I correct in my understanding that each webLogic client that needs to publish/subscribe to the Topic on Broker JMS needs to have Broker JMS installed? Does this mean that the clients will need to use Broker JMS API while publishing/subscribing the messages?
Is your requirement to publish JMS to broker direct from a client?
There are very good code samples that come with the webMethods installation. Browse through the examples, and you’ll be all set within no time. The code samples are located at <wmroot>\Broker\samples\BrokerJMS
The clients do not need to have the Broker installed. Broker is the hub to which you’re going to send the JMS messages. You would need to have connectivity to the broker, broker client jars, JMS jar and client jars of any JNDI provider that you would have to use.
Thanks for a response… I kindda figured out the stuff and made it to work. I started by using the samples, but the instructions given in the guide to install and run the samples are short of several steps because of which, I wasted a lot of time.
For anyone who is looking for a similar solution… here’s what you need to do:
Install the Broker JMS Provider (if not already installed) on the machine that hosts your broker.
Install the WmJMSAdmin package (available in webM 6.1 FP 1) on IS. This package provides a GUI to not only create objects (Destinations & Connection Factories) on Broker JMS, but also binds them to the JNDI that you may want to use (the JNDI templates are available in the GUI, however, the webMethods JNDI is not a production version and is not supported by webMethods). Create Connection Factories, and Destinations using this tool.
Besides creating and binding the objects, the WmJMSAdmin tool, also creates appropriate groups on the Broker JMS. These groups are associated with the Connection Factories (CF) and used by the clients to connect and publish messages. Clients don’t have to specify the groups… the groups are used implicitly based on the CF being used.
Once the objects are created and bound verify them in the JNDI.
Now you can use standard JMS Clients to publish/subscribe messages on the Destinations created on Broker JMS by looking up the Connection Factory and Destination in JNDI.
I presume that you have the Broker JMS installed… You are going in the right direction… just a few things to note:
com.sun.jndi.fscontext.RefContextFactory is a file system based JNDI provider ie the JNDI are stored in a file (.bindings), so the provider URL should point to the location of file that contains the JNDI bindings.
** Sun JNDI is not recommended for prod use.
The Queue Connection Factory JNDI Name is the actual name of the QCF that you want to use, the LookUp name is the one that you will use in your java client/JMS adapter to lookup that QCF.
Client Id is the id that you want your clients to use while creating connection from your Connection Factories. Each connection created from your CF will contain a clientId that is derived from the clientId specified by you in the CF settings.
I do not know what is the sequence of steps you followed to set up your Broker JMS provider. First try creating a JMS Broker using the ‘JMS Broker’ link in WmJMSAdmin page. Give the name of the JMS Broker (broker000), Broker Server Name (localhost) and the port number (6489 or whatever it is in your case). Before you proceed to the next step, ensure that a connection has been obtained with this JMS Broker when you click the ‘Add’ button to add the JMS Broker.
Once the JMS Broker is added and connected, add the JNDI Provider. Select the appropriate template… this would give you the sample provider url… ie file:/<path-of-ur-.bindings-file>
When the above is configured, you may proceed to add the CFs and then the Destinations. For the sake of convenience, you may give the same JNDI Name and Lookup Name for the objects (CFs and Destinations) and later when you have gotten ev thing to work, you can rename them appropriately.
Screen shot of webMethods JMS Administrator
=============================================
JMS > Connection Factories > QCF1
Return to Connection Factories
Modify Connection Factory
Information
Lookup Name QCF1
Class com.wm.broker.jms.QueueConnectionFactory
Type QueueConnectionFactory
JMS Broker Name Broker #1@localhost
Connection Client Group QueueConnectionFactory_ConnectionClientGroup
Session Client Group QueueConnectionFactory_SessionClientGroup
Connection Client Id QueueConnection
Shared State false
Shared State Ordering none
TCP Connection Sharing true
Strict Client Id false
SSL Encrypted false
=============================================
Screen shot of webMethods JMS Administrator
=============================================
JMS > Destinations > Q1
Return to Destinations
Modify a Destination
Create queue for Queue Receiver
Remove queue for Queue Receiver
Information
Lookup Name Q1
Queue Name queue1
Class com.wm.broker.jms.Queue
Type Queue
Client Group queue1_ClientGroup
Shared State false
Shared State Ordering none
=============================================
Created JMS connector
Created JMS adapter service for sender
Created JMS adapter service for receiver
Created sender flow service to call adapter sender service
I need to figure out how to send a message (convert string to javax.jms.Message)
Created receiver flow service to call adapter receiver service
I need to figure out how to receive a message
Yes, if you want to receive those messages in webMethods you will need to create JMS Adapter Services to do so. Note, when you configure Broker as a JMS provider, it is no longer just a simple broker. You will need to treat it just as any other JMS Provider - say weblogic.
In the JMSAdapter guide, there is a section on JMS Adapter in a Clustered Environment. You might want to read up this section to get an understanding of the functioning of JMS Adapter in a clustered env. There are a few things that you need to be aware and careful of and this section explains them.
As for the scalablity… uhmm well… not too sure… because I started a project with initial requirement to use Wm Broker as the JMS provider… however, we were still using the weblogic JNDI (webMethods has not released its JNDI service for prod). Thus the client decided to use the weblogic JMS instead of the webMethods and I didn’t get a chance to explore Broker-JMS any further. I guess you would know already that webM broker as a JMS provider can use weblogic/LDAP or a File System (Sun’s) JNDI.
Let me know what other questions you have… I will try wherever I can help.
Hi all,
I don’t have much knowledge about weblogic…i need to communicate with weblogic to Broker JMS Provider,
Mainly project deals:
I will get messages(using Broker as a JMS Provider ) from weblogic client, I need to validate that massages through Modeler and than i need to perform webservices routing to application server.
Q1) what are the steps involved in this case
Q2) how can i perform communication between weblogic to webMethods.
Q3) what type of messages Broker can receive and after how can i process
Please guide me , i am new for this type of task.
It is grate helpful for me if anybody can guide me.
I am also trying to connect to the wm broker jms from weblogic to post and subscribe messages.
I am getting confused trying to read the broker programmers guide.
You had mentioned about using the wmJMSAdmin package to create the necessary jms components on the wm broker.
However, I am stuck at using a JMS template to use. Which one should I use for this purpose?
Can you please provide step by step instructions on how to send an receive messages from WM Broker?