Hi . I would really appreciate if any one can help me resolve this doubt. I am trying to configure weblogic JMS attributes.
3.Follow the procedures described in the following sections i) Configuring Connection Factories Name : MyJMS Connection Factory JNDIName : example.jms.TopicConnectionFactory all others are default. Target : server. ii) Configuring Stores The backing store consists of a file or database that is used for persistent messaging.
ii) Configuring Servers Name : MyJMSServer Store : default ii) Configuring Destination Name : MyJMSTopic JNDIName : example.jms.exampleTopic
This is fine . and while coding both producer and consumer we get the TopicConnectionFactory (MyJMS Connection Factory) and Topic (MyJMSTopic of the MyJMSServer) and establish a connection and then create a session and create topicPublisher and TopicSubscriber . If there are more than one Servers ( like MyJMSServer) then how do we get the reference of JMSTopic of MYJMSServer. In other way how do we specify what server we want to use. Is there any way where we can configure a server to a particular connection factory? Please let me know Thanks Srinivas.K
Sorrry, I'm not an expert on configuring JMS, but I will share some advise about WebLogic 6.1 & JMS. For WebLogic 6.1, you need to get service pack 2 and configure JMS file paging. JMS uses WebLogic's memory to store messages. If your consumer stops pulling messages from the que (ie, if it is logging to a database & the database goes down), JMS can crash WebLogic when memory gets low. The file paging feature in SP2 (also included with WL 7) allows you to specify a threshold so JMS will start queing messages to disk before it crashes WebLogic. Thanks, Brad...
As far as my knowledge goes you would programtically tie ConnectionFactory with a Destination(in turn Server). For ex: tconFactory = (TopicConnectionFactory) ctx.lookup(MyJMS Connection Factory); tcon = tconFactory.createTopicConnection(); tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); topic = (Topic) ctx.lookup(MyJMSTopic); tsubscriber = tsession.createSubscriber(topic); Not really sure if there is a way to have configurable relation between ConnectionFactory and Destination. If there is a way it would solve some of the programming complexities. -Ashok
Hi Ashok In the code which u gave as an example: For ex: tconFactory = (TopicConnectionFactory) ctx.lookup(MyJMS Connection Factory); tcon = tconFactory.createTopicConnection(); tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); topic = (Topic) ctx.lookup(MyJMSTopic); tsubscriber = tsession.createSubscriber(topic);
you wll definately get a reference of the Topic COnnection Factory . but in the next line u get a connection object saying tconFactory.createTopicCOnnection(); It wll definately get a connection if MyJMS Connection Factory is configured or targeted to one server. But what happens if it is selected more than one server/cluster . to which server does it connect to get the destination.
Hi Here is what I understand after reading bea documentation (wls 6.1 sp2) : you select a server by selecting a destination. indeed, a destination is handled only by one physical server (even in a cluster, note that it has changed with wls 7). You cannot have two different servers with the same destination name in the same cluster. However, ConnectionFactories can be shared in the cluster. That is, if you have server A and server B in the same cluster, you can have the same connectionFactory name on both of them. When you do a jndi lookup, you will get either a reference to the connectionFactory on server A or B (remember there is only ONE jndi tree for the whole cluster). You can use this ConnectionFactory to connect to a destination, either on server A or server B. Maybe a bit long Hope this helps Julien