Announcement Announcement Module
Collapse
No announcement yet.
Connection Properties for the Sun Java System Message Queue, v3.7? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connection Properties for the Sun Java System Message Queue, v3.7?

    Hi,

    I am trying to use the Sun Java System Message Queue v3.7 (JMS) with Spring 2.0.5. I am having issues with guessing what the property names are for assigning the 'imqAddressList' for use with the ConnectionFactory.

    Here is a sample of the XML:

    <!-- Sun JMS Connection Configuration -->
    <bean id="connectionConfig" class="com.sun.messaging.ConnectionConfiguration">
    <property name="imqAddressList" value="mq://localhost:7676/jms"/>
    </bean>

    <!-- Sun JMS Provider -->
    <bean id="jmsFactory" class="com.sun.messaging.QueueConnectionFactory">
    <constructor-arg ref="connectionConfig"/>
    </bean>

    I keep receiving a run-time error of:

    Exception in thread "pool-1-thread-2" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'connectionConfig' defined in class path resource [springBeans/shared-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'imqAddressList' of bean class [com.sun.messaging.ConnectionConfiguration]: No property 'imqAddressList' found
    Caused by: org.springframework.beans.InvalidPropertyException : Invalid property 'imqAddressList' of bean class [com.sun.messaging.ConnectionConfiguration]: No property 'imqAddressList' found
    at org.springframework.beans.BeanWrapperImpl.convertF orProperty(BeanWrapperImpl.java:376)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1112)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:862)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:424)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:156)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)

    Any suggestions as to the property name's available for a specified vendor is related to their classes, like (com.sun.messaging.ConnectionConfiguration)? I have tried the usual suspects without success...

    Thanks in advance!


  • #2
    Hi,

    as far as i can see from this document, you can't use setter injection to instanciate the connectionfactory. (But i am not sure because i couldn't find the javadocs for the classes)

    Normally i would go for an factorybean which takes the argument for the factory and builds up the sun connectionfactory.

    Here is a small example from the referenced document

    Code:
    ConnectionFactory myFctry = new com.sun.messaging.ConnectionFactory();
    
    myFctry.setProperty(ConnectionConfiguration.imqAddressList,
    "localhost:7676, broker2:5000, broker3:9999");
    myFctry.setProperty(ConnectionConfiguration.imqReconnectEnabled, "true");

    Best regards
    agim

    Comment


    • #3
      Hi Turret,
      I know its been more than a year since you faced the problem in integrating OpenMq with Spring. Still I thought to take a chance and ask you if you were able to fix the issue.
      I am trying to do the same thing and as expected am getting the same error as you got.

      Any help or pointers will be appruciable.

      Thanks,
      Rajat

      Comment

      Working...
      X