ConnectionFactory and Queue(Topic)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   danial_lu
Posted On:   Saturday, March 9, 2002 12:13 AM

Here is my confusion (I'm using J2EESDK1.3). On a local server I did the following j2eeadmin -addJmsFactory jms/RemoteTCF topic -props url=corbaname:iiop:mars#mars In the app client running on the local server I had the code ic = new InitialContext(); // JNDI lookup. The resource factory ref points to the // Remote Connection Factory I registered tcf = (TopicConnectionFactory)ic.lookup("java:comp/env/jms/TopicConnectionFactory"); // The env ref points to jms/Topic of the local server pTopic = (Topic)ic.lookup("java:comp/env/jms/PTopic"); So I'm assuming that I'm using a connection factory that connect to mars and a Topic on the local box.    More>>

Here is my confusion (I'm using J2EESDK1.3).

On a local server I did the following

j2eeadmin -addJmsFactory jms/RemoteTCF topic -props url=corbaname:iiop:mars#mars

In the app client running on the local server I had the code
ic = new InitialContext();
// JNDI lookup. The resource factory ref points to the
// Remote Connection Factory I registered
tcf = (TopicConnectionFactory)ic.lookup("java:comp/env/jms/TopicConnectionFactory");
// The env ref points to jms/Topic of the local server
pTopic = (Topic)ic.lookup("java:comp/env/jms/PTopic");

So I'm assuming that I'm using a connection factory that connect to mars and a Topic on the local box.

On remote server mars, I deployed a MDB which use
jms/TopicConnectionFactory and jms/Topic. But I'm thinking this jms/Topic and the one I used on the local box are not the same one. Right? Then how could the app client and the MDB share messages?

Some of my explanation I don't if it makes sense or not.
ConnectionFactory is a way to tell what kind of connection it could generate (Queue, Topic, Durable etc) and Where the connection would go to (local or remote).'
As for as destination, I'm not sure. How could two server share one Topic?

   <<Less
About | Sitemap | Contact