2013-03-12 1 views
1

Мне нужно настроить тему JMS при развертывании моего веб-приложения. Для этого мне пришлось использовать дескриптор развертывания. hornetq-jms.xmlJBoss 7 - Не удалось разобрать файл META-INF/hornetq-jms.xml

<?xml version="1.0" encoding="UTF-8"?> 
<configuration xmlns="urn:hornetq" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="urn:hornetq /schemas/hornetq-jms.xsd "> 

<connection-factory name="InVmConnectionFactory"> 
    <connectors> 
     <connector-ref connector-name="in-vm"/> 
    </connectors> 
    <entries> 
     <entry name="InVmConnectionFactory"/> 
    </entries> 
</connection-factory> 

<queue name="OrderQueue"> 
    <entry name="queues/beanQueue"/> 
</queue> 

</configuration> 

Но во время I`ve развертывания получил ошибки, как это:

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1] 
Message: Unexpected element '{urn:hornetq}configuration' 
+0

Может быть, я ошибаюсь, но я не думаю, что вы можете иметь hornetq-JMS на мета-инф с JBoss 7 вы должны для использования автономного full.xml для этих вещей сейчас. –

+0

@Clebert Я не могу изменять параметры в конфигурации серверов. Мне нужно создать тему во время развертывания приложения или, возможно, в приложении, но я не могу найти, как это сделать из запущенного приложения. Это так легко в стеклянную рыбку и такая боль в jBoss 7 :( – Zur13

+0

На форуме пользователя JBoss вам, вероятно, стоит спросить. Они лучше отвечают на это. Как только вы это сделаете, вы можете задать вопрос здесь. –

ответ

3

Как ответил here я использовал старый синтаксис hornetq-jms.xml. Это пример правильного файла hornetq-jms.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<!-- JBoss, Home of Professional Open Source Copyright 2012, Red Hat, Inc. 
and/or its affiliates, and individual contributors by the @authors tag. See 
the copyright.txt in the distribution for a full listing of individual contributors. 
Licensed under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance with the License. You may obtain a copy 
of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
by applicable law or agreed to in writing, software distributed under the 
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
OF ANY KIND, either express or implied. See the License for the specific 
language governing permissions and limitations under the License. --> 
<messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0"> 
    <hornetq-server> 
     <jms-destinations> 
      <jms-queue name="HELLOWORLDMDBQueue"> 
       <entry name="/queue/HELLOWORLDMDBQueue"/> 
      </jms-queue> 
      <jms-topic name="HELLOWORLDMDBTopic"> 
       <entry name="/topic/HELLOWORLDMDBTopic"/> 
      </jms-topic> 
     </jms-destinations> 
    </hornetq-server> 
</messaging-deployment> 
Смежные вопросы