| 发表于:2008-01-08 14:34:142楼 得分:0 |
可以用jboss的invoke方法,我写了一个,你看看能不能用 private void deletetopicinjboss(string topicname) throws exception { hashtable <string, string> jndi = new hashtable <string, string> (); jndi.put(context.initial_context_factory, "org.jnp.interfaces.namingcontextfactory"); jndi.put(context.url_pkg_prefixes, "org.jboss.naming:org.jnp.interfaces"); jndi.put(context.provider_url, "localhost:1099"); context context = new initialcontext(jndi); mbeanserverconnection server = (mbeanserverconnection) context.lookup("jmx/invoker/rmiadaptor"); server.invoke(new objectname("jboss.mq:service=destinationmanager"), "destroytopic", new object[] {"topic/" + topicname}, new string[] {"java.lang.string"}); } | | |
|