[jboss-user] [JBoss Messaging] - Re: JBM 1.4.0.SP3 JMSX properties bug

jkwalnutCC do-not-reply at jboss.com
Thu Feb 21 08:34:45 EST 2008


Yes, this is related to the other issue. The Oracle provider is setting the JMSX properties which causes the exception within JBoss.

My workaround was for JBoss is to ignore those properties and NOT throw the exception.

JBossMesage.java:

   public void setObjectProperty(String name, Object value) throws JMSException
  |    {
  | 	  
  |       if (JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME.equals(name) && value instanceof Long)
  |       {         
  |          this.scheduledDeliveryTime = ((Long)value).longValue();
  |          return;
  |       }
  | 
  |       // Ignore JMSX properties. 
  |       // Click Commerce workaround for using bridge with OC4J JMS Provider.
  |       if (isJMSXProperty(name))
  |     	  return;
  | 
  | 
  | 
  |    /**
  |     * Click Commerce workaround for using bridge with OC4J JMS Provider. 
  |     * 
  |     * Check the property name to see if it is a JMXS property. JMSX properties
  |     * should not be propagated. This method is used to determine if the given property
  |     * is eligable to be ignored.
  |     * 
  |     * Note this method was introduced as a work around to JBoss JBM JIRA ticket See:
  |     * http://jira.jboss.org/jira/browse/JBMESSAGING-1224
  |     *   
  |     * Note checkProperty() will throw an exception when a JMSX propery is encountered.   
  |     * 
  |     * @param name the property name
  |     * @return boolean true indicating the property is a JMSX property or 
  |     * false if the property is not a JMSX property.
  |     */
  |    boolean isJMSXProperty(String name)
  |    {
  | 	   if (name.startsWith("JMSX") &&
  | 		         !name.equals("JMSXGroupID") &&
  | 		         !name.equals("JMSXGroupSeq") &&
  | 		         !name.equals("JMSXDeliveryCount"))
  | 		      {
  | 		         return true;
  | 		      }
  | 	   else
  | 	   {
  | 		   return false;
  | 	   }
  |    }
  |    
  | 

This was used with Oracle Application Server 10.1.2


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131060#4131060

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131060



More information about the jboss-user mailing list