JMS transactional and non-transactional connection factory
mikeg123 Nov 15, 2005 1:14 PMHello,
ok I know this has been discussed, but here is what is not clear, and may be possibly there is doc somewhere that explains it all, but I have not found one:
working with JBoss 3.2.6 cluster
Server_1: is a master node for JMS
Server_2: is a participant using server_1 for all JMS processing for MDBs and EJBs
Running code on Server_2:
1. if I want to get a non transactional ConnectionFactory it seems like I
have to go through HAJNDI and with this code
?topicConnectionFactory= (TopicConnectionFactory)
nonLocalInitialContext.lookup("java:/ConnectionFactory");?
by nonLocalInitialContext I mean it has to go through HAJNDI because
it retrieves the ?ConnectionFactory? running and define in
?deploy-hasingleton/jms/uil2-service.xml? on Server_1
2. now, if I want to get access to the transaction JMS, I can reference
?JmsXA? on Server_2 in "deploy/ hajndi-jms-ds.xml? file which will
use ?JMSProviderLoader? to get right ?ConnectionFactory? on the
master server, and to get access to ?JmsXA? I can go through a
local ?InitialContext?.
Questions:
A. I understand that it makes sense to use ?XA? reference here for
transaction because it is distributed, and it?s nice to go through a
local ?InitialContext? (although I assume I still can not cache reference
to the ?ConnectionFactory? I get back fail over is not supported), but
should not there be a way to do the same thing for a non
transaction ?ConnectionFactory? instead of using two
different ?InitialContext? and in order to look up the Queue, I still have
to use
non local InitialContext ?(Queue)nonLocalInitialContext.lookup(name);?
B. if I?m running everything on one server (not in clustered env), I found
that it?s still recommended to use ?JmsXA?, but I don?t understand why
because you are not running in a distributed environment, so why would
you need an overhead of distributed transaction vs a local one?
C. If I?m running in a non clustered env. should not I be using
configuration in ?jvm-il-service.xml? for both transaction and
non-transactional stuff. or I should still use ?ConnectioFactory? defined
in ?uil-service.xml? and from what I have seen in other topics I can not
use ?XAConnectionFactory? defined in
?uil-service.xml? (back to question 2, sorry), I have to use ?JmsXA?
Thank you