0

我在我的 server.xml 中为 tomcat 配置了以下 JNDI 参考到 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"/>           

我不知道如何在用于我的协和测试的 jetty.xml 中定义这些。

有人可以帮我吗?

谢谢杰夫波特

4

2 回答 2

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>  

我还建议您也将“useTestScope”设置为 true。

    <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>
于 2013-06-03T14:10:46.727 回答
0

这里有一堆在码头中配置数据源的例子。

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

于 2013-05-30T13:37:58.613 回答