1 Reply Latest reply on Sep 21, 2005 2:21 PM by Elias Ross

    Custom BaseGlobalId needs trailing slash

    lordcoven Newbie


      I set up a cluster with two nodes - as I was intending to add more nodes on the same machines later I added the BaseGlobalId to the XidFactory configuration in my jboss-service.xml. When I then tried to access an HA JMS queue it bombed out with an ArrayIndexOutOfBounds exception in the XidFactory (method extractLocalIdFrom). This turned out to be because the code is hard coded to expect a slash in the global ID for a message, but I hadn't added one in my BaseGlobalId.

      The BaseGlobalId defaults to hostname/ ... but when you customise the id, you aren't forced to add a slash and the slash is not added for you. I'd consider this a bug (not in JMS, but in XidFactory), but perhaps I just missed the part in the documentation where it said you had to add a slash to the end of your custom BaseGlobalId ;)

      BTW - I know this isn't a problem in JMS code per se, but the problem only seemed to occur when accessing a queue - hence I posted it here.