简体   繁体   English

如何在JMS中以编程方式创建主题?

[英]How to create a topic programmatically in JMS?

Currently i use the glassfish admin utility to create my topic and its connection factory. 目前,我使用glassfish管理实用程序来创建主题及其连接工厂。 And then I can get the topic by Context.lookup() method given the already created topic in glassfish. 然后,鉴于给定的glassfish主题,我可以通过Context.lookup()方法获取主题。 But now I want to create a topic programmatically according to user input, which means I don't need to first create a topic using the glassfish admin. 但是,现在我想根据用户输入以编程方式创建主题,这意味着我不需要先使用glassfish管理员来创建主题。 Anyone can help? 有人可以帮忙吗? Thanks. 谢谢。

该链接有一些建议-http: //www.java.net/node/700368

Quoting method to programatically create jms , there is essentially two ways: 引用方法以编程方式创建jms ,基本上有两种方法:

  1. Use the MBean API to create the queue/topic. 使用MBean API创建队列/主题。
  2. Use weblogic.jms.extensions.JMSHelper 使用weblogic.jms.extensions.JMSHelper

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM