How do I configure Weblogic to use a SonicMQ backup broker (

Posted by appmath on 09-Feb-2012 20:06

This is very similar to a previous question. Now, I would like to know how to configure a weblogic-ra.xml file to add the backup broker:

name>FactoryProperties</name>
<value>java.naming.factory.initial=com.sonicsw.jndi.mfcontext.MFContextFactory;java.naming.provider.url=tcp://somehost:someport;com.sonicsw.jndi.mfcontext.domain=SomeDomain</value>
Thanks,
Aziz

All Replies

Posted by pmeadows on 10-Feb-2012 04:23

I'm not entirely clear what you're asking here.  The term 'backup broker' implies you have a CAA (replicated) broker pair.  If so, then these will not be the management brokers so you should not be making a JNDI connection to either of these brokers.  Rather, you make a JNDI connection to the management broker(s), then the connection details (ConnectionFactory) for the primary and backup messaging brokers are acquired from the JNDI store.  If this is what you're trying to achieve then you don't need to change any of the values you show above in your 'FactoryProperties'.  Instead you'd connect to the JNDI store (e.g. using the JMS Administered Objects tool in the Sonic Management Console) and modify the properties of the appropriate ConnectionFactory, adding the backup broker's URL to the 'Connection URL(s)' field - this field takes a comma-separated list of urls.

If, on the other hand, you have CAA management configured, this means you have a primary and secondary management container respectively hosting the primary and backup management services (Agent Manager and Directory Service).  Each of these management containers will have a broker, but these brokers will typically be standalone (non-CAA) brokers, configured in a cluster.  In this case there are two management brokers through which the JNDI store is accessible, but neither of these is a 'backup broker' as such.  Nonetheless, in this case you'd want to include the URLs for both management brokers in the java.naming.provider.url component within the 'FactoryProperties' you show, e.g.:

  java.naming.provider.url=tcp://mgmthost1:mgmbroker1port,tcp://mgmthost2:mgmbroker2port

Here's an example showing containers in a simple setup with a CAA management configuration and a single CAA broker pair for messaging:

Mgmt Container (Primary)

  Agent Manager - Primary

  Directory Service - Primary

  Mgmt Broker 1 - non-CAA, in MgmtCluster (URL-A)

Mgmt Container (Secondary)

  Agent Manager - Backup

  Directory Service - Backup

  Mgmt Broker 2 - non-CAA, in MgmtCluster (URL-B)

Messaging Container (Primary)

  Msg Broker - CAA, Primary (URL-C)

Messaging Container (Backup)

  Msg Broker - CAA, Backup (URL-D)

In this case java.naming.provider.url should reference URL-A and URL-B in order to access the JNDI store.  Within the JNDI store there'd be a ConnectionFactory which references URL-C and URL-D.  Weblogic would first connect to the JNDI store using java.naming.provider.url, then lookup the ConnectionFactory and use this to connect to the messaging broker pair.

It's also perfectly possible to have a CAA broker pair for messaging but run just a single (non-CAA) management container.  In this case java.naming.provider.url would reference only URL-A - essentially what you have currently, but inside the JNDI store the ConnectionFactory would still reference URL-C and URL-D.

Hopefully at least some of this answers the question you were asking!

Thanks, Paul.

Posted by appmath on 10-Feb-2012 14:17

It makes sense (first scenario/topology you have described). I had already asked a simliar question and I was expecting a similar answer, and that made me blind to the fact that...yes, the management broker should take care of everything.

Thanks

This thread is closed