Trouble using genericra to integrate activemq and glassfish when using failover protocol

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2011-01-14T22:50:27Z Indexed on 2011/01/14 22:53 UTC
Read the original article Hit count: 286

Hi, I'm attempting to use activemq in glassfish using the genericra resource adapter provided with glassfish 2.1. I have found a few pages with helpful information including http://activemq.apache.org/sjsas-with-genericjmsra.html.

I have actually had success and been able to get MDBs to use activemq as their JMS provider, but I'm running into an issue as I'm trying to do some more complicated configuration. I want to set up a master-slave configuration, which would require my clients to use a brokerURL of failover:(tcp://broker1:61616,tcp://broker2:61616). In order to do this, I set the following property when calling asadmin create-resource-adapter-config (I have to escape '=' and ':'):

ConnectionFactoryProperties=brokerURL\=failover\:(tcp\://127.0.0.1\:61616,tcp://127.0.0.1\:61617)

However, I am now getting a StringIndexOutOfBoundsException when my application starts up. I suspect the comma in between the two URLs is the culprit, since this works fine:

brokerURL\=failover\:(tcp\://127.0.0.1\:61616)

Just wondering if anyone has dealt with this issue before. Also wondering if there is a better way to integrate with glassfish than using the generic resource adapter.

© Stack Overflow or respective owner

Related posts about glassfish

Related posts about activemq