2009-07-23 40 views
2

這是第一次我在這個論壇的問題.. :)如何在JBossAS5上配置ConnectionFactory JMS?

請幫助我瞭解如何配置JMS連接上JBossAS5 .. 我創建了一個簡單的MDB應用:

@MessageDriven(name = "MessageMDBSample", activationConfig = { 
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), 
    @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/MyQueue"), 
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") }) 

公共類DummyMDBeanBean實現消息監聽{

public void onMessage(Message message) { 
    System.out.println("Hello"); 
} 

}

如何事先在JBossAS5配置隊列和連接工廠,在這種情況下隊列/ myQueue中..

謝謝.. :)

回答

0

您可以在這些文件中配置連接工廠和目標(隊列或主題):

messaging/connection-factories-service.xml messaging/destinations-service.xml

並驗證任何核心配置的消息傳遞/ messaging-service.xml。

順便說一下,默認情況下,您可以修改Jboss AS附帶的Hypersonic嵌入式數據庫的配置。您可以在hsqldb-ds.xml中修改/創建連接工廠。

在這些文件中,您可以輕鬆使用這些文件創建新文件。

相關問題