publish / subscribe
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   zohar_etzioni
Posted On:   Thursday, June 7, 2001 07:45 AM

1. is it possible to create new topics in runtime?
2. is there a limitiation on the number of topics?
3. is there a limitation on the number of subscribers per topic?

Re: publish / subscribe

Posted By:   sivaram_ponraj  
Posted On:   Monday, June 18, 2001 11:36 PM

hello zohar,
sivaram here .Here i have given the code how to create topic dynamically using webliogic.Have weblogic.jar and jms.jar in the classpath and run the following code u can easily create a topic.There are no limitations for number of Topics.It all depends on the jmsserver(vendor) u r using.

import java.util.*;
import javax.naming.*;
import javax.jms.*;
import weblogic.jms.extensions.*;
import weblogic.common.*;
import weblogic.management.*;
import weblogic.management.configuration.*;
public class jmstopiccreate
{
public static void main(String arg[]) throws Exception
{
Hashtable ht1 = new Hashtable();
ht1.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht1.put(Context.PROVIDER_URL, "t3://127.0.0.1:7001");
InitialContext ic = new InitialContext(ht1);
JMSHelper j1=new JMSHelper();
j1.createPermanentTopicAsync(ic,"MyJMSServer","test","test");
}
}
About | Sitemap | Contact