[jboss-user] [JBoss Messaging] - Re: JBM Topic Pub-Sub

sanches do-not-reply at jboss.com
Tue Aug 11 06:37:30 EDT 2009


"bdaye42" wrote : 
  | I can dynamically create new topics by using the ServerPeer and MBeans. 
Could you please share the code which injects or lookups ServerPeer please?

I can't inject it
    @EJB(beanName = "jboss.messaging:service=ServerPeer")
  |     ServerPeer serverPeer;
due to "Caused by: javax.management.MalformedObjectNameException: Invalid character ':' in value part of property"

Neither lookup it 
  | 		MBeanServer server = MBeanServerLocator.locate();
  | 		serverPeer = (ServerPeer) MBeanProxyExt.create(
  | 			ServerPeer.class,
  | 		"jboss.messaging:service=ServerPeer",server);	
because of "org.jboss.jms.server.ServerPeer is not an interface"

How to obtain reference which would allow to make:

  | 		serverPeer.deployQueue("q01", "q01");
  | 

Thanks.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248994#4248994

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248994



More information about the jboss-user mailing list