0

I have this configured in my server.xml for tomcat the following JNDI ref's to OpenMQ...

<Resource ackTimeout="-t 30000" auth="Container" 
  description="OpenMQ Queue Connection Factory" 
  factory="com.sun.messaging.naming.QCFObjectFactory" 
  host="-s localhost" 
  name="jms/FACTORY" 
  parm="--" 
  securityPort="7676" 
  subnet="0" 
  type="com.sun.messaging.QueueConnectionFactory" version="1.1"/>

<Resource auth="Container" 
  description="OpenMQ Queue" 
  destName="ESI_AUDIT" 
  factory="com.sun.messaging.naming.QObjectFactory" 
  name="jms/ESI_AUDIT" 
  type="com.sun.messaging.Queue" version="1.1"/>           

I have no idea how to define these in jetty.xml that is used for my concordian tests though.

Can someone please help me out?

Thanks Jeff Porter

jeff porter
  • 6,560
  • 13
  • 65
  • 123

2 Answers2

1
    <New id="FACTORYjndi" class="org.eclipse.jetty.plus.jndi.Resource">
            <Arg></Arg>
            <Arg>jms/FACTORY</Arg>
            <Arg>
                    <New class="com.sun.messaging.QueueConnectionFactory"></New>
            </Arg>
    </New>  



    <New id="ESI_AUDITjndi" class="org.eclipse.jetty.plus.jndi.Resource">
            <Arg></Arg>
            <Arg>jms/ESI_AUDIT</Arg>
            <Arg>
                    <New class="com.sun.messaging.Queue"></New>
            </Arg>
    </New>  

I would also suggest you set the "useTestScope" to true as well.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>2.12.4</version>
    <configuration>
    <useTestScope>true</useTestScope>
    <includes>
            <include>**/*Fixture.java</include>
    </includes>
    <systemProperties>
    <property>
            <name>concordion.output.dir</name>
        <value>target/concordion</value>
    </property>
    </systemProperties>
    </configuration>
    <executions>
    <execution>
            <id>integration-test</id>
                <goals>
                    <goal>integration-test</goal>
            </goals>
    </execution>
    <execution>
            <id>verify</id>
        <goals>
                <goal>verify</goal>
        </goals>
    </execution>
    </executions>
    </plugin>
jeff porter
  • 6,560
  • 13
  • 65
  • 123
0

Here are a mess of examples for configuring datasources in jetty.

http://www.eclipse.org/jetty/documentation/current/jndi-datasource-examples.html

jesse mcconnell
  • 7,102
  • 1
  • 22
  • 33
  • I've read the datasources section, but it doesn't give examples of JMS references. The closest I've got is JNDI for ActiveMQ (http://www.eclipse.org/jetty/documentation/current/using-jetty-jndi.html), but again, this isn't openMQ. – jeff porter May 30 '13 at 13:46
  • same principles should apply, when you get it working you can fork the documentation and add your example, or just paste the example into an issue and I'll update it. – jesse mcconnell May 30 '13 at 13:50