[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
i am using JBOSS 3.2.3 (please dont rush me to upgrade, we are using this in operational mode, so huge testing to be done for migration) Am confused by the same issue. Would the following code do in order for the publish of message to Topic to be part of transaction. - try{ TopicConnectionFactory qcf = (TopicConnectionFactory) (new InitialContext().lookup("java:/JmsXA")); TopicConnection conn; conn = qcf.createTopicConnection(); Topic queue = (Topic) (new InitialContext().lookup("topic/"+topicName)); TopicSession session = (TopicSession) conn.createTopicSession(true, TopicSession.AUTO_ACKNOWLEDGE); TopicPublisher send = session.createPublisher(queue); MapMessage message = session.createMapMessage(); message.setString("action", action); Enumeration keys = param.keys(); while(keys.hasMoreElements()){ String key = (String) keys.nextElement(); message.setObject(key, param.get(key)); } send.publish(message); send.close(); session.close(); conn.close(); }catch(JMSException e1){ StringBuffer log = new StringBuffer(); log.append("Error during publishing of message to Topic: "); log.append(topicName); log.append(", for action: "); log.append(action); logger.error(log.toString(), e1); } catch (NamingException e) { StringBuffer log = new StringBuffer(); log.append("Error during publishing of message to Topic: "); log.append(topicName); log.append(", for action: "); log.append(action); logger.error(log.toString(), e); } -- The whole process i would like to achieve is as follows: 1. Servlet to Call on SessionBean to perform operations including database write. 2. SessionBean call on utility class to publish Message to a Topic. Utility class is normal bean. And the above contain in utility class. 3. MDB used as listener to the Topic. MDB will perform operations including retrieval of data written in Step 1. I've initially use 'ConnectionFactory' instead of 'java:/JmsXA'. It caused problem because occasionally, during Step 3, the data retrieved wasnt the most up-to-date that has been commited in Step 1. After much ploughing through the forum, i've change the codes to the above. Would anyone mind to shed some light whether the above would solve my problem? It's a little hard to replicate the problem due to the random nature. Thus am not completely sure whether i've fixed the error. Thanks much. Veny View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912013#3912013 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912013 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
the jvm-il donÂt use the global namespace. to use jvm-il "java:/ConnectionFactory" not "ConnectionFactory" View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845176#3845176 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845176 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
Anyone? Adrian? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840950#3840950 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840950 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
So the question was asked wrong? Assumption: All the ConnectionFactories we are talking about are dishing out javax.jms.Connection objects. Perhaps my confusion is related to the fact that we have Connections and Connection factories in both JCA and JMS worlds? ok, so you are saying (trying to answer the questions in the original post) A1) If you want the benefits that come from using a ResourceAdaptor (xa, security, pooling) use java:/JmsXA to obtain a jms connection object. If not, use java:/XAConnectionFactory (defined in jvm-il-service.xml) to obtain a "plain" jms connection object. Q3) This won't do xa because we're not using the ResourceAdaptor??? A2) The differences between the connection factories defined/declared in jms-ds.xml and jvm-il-service.xml still remain unclear. For example they both contain the JNDI name java:/XAConnectionFactory. Q4) Who is binding what into JNDI? jms-ds.xml docu p359 "The JNDI name under which the provider javax.jms.QueueConnectionFactory will be bound." | [JMSProviderLoader]java:/XAConnectionFactory | jvm-il-service.xml docu p337 "The JNDI location that this IL will bind a ConnectionFactory setup to use this IL." | [JVMServerILService] | | | +---ConnectionFactoryJNDIRef> java:/ConnectionFactory | | | +---XAConnectionFactoryJNDIRef> java:/XAConnectionFactory | They can't both bind something to the same name, so one of them must be referencing the other. My guess is that the [JMSProviderLoader] is referencing the ConnectionFactory defined by the [JVMServerILService] who is responsible for binding it into JNDI. Q5)Is this correct? If the relationship between the RA and IL is perfectly clear then it should be pretty simple to explain. Please. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840318#3840318 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840318 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
Your question is should you use the resource adaptor or a plain connection: http://www.jboss.org/wiki/Wiki.jsp?page=IWantToConnectToXYZShouldIUseJCA JMS like databases are "legacy" systems. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840296#3840296 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840296 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
Thanks for the response. I assume it is only refering to my very last question relating to the type of connections the dishes out. I found the reference in the faq. That question should not have slipped out. However, the original questions (Q1 & Q2) and the followup question regarding the use of java:/XAConnectionFactory still remain unanswered. I would be very grateful if you could shed some light on them. I've tried to be as clear as possible about where i've looked and what i understand and what my question is...i have no stack trace. I'm trying to understand. I'll happily contribute to the wiki/faq once i do. I went through the faq & wikis again. Here is what i found: Main FAQ (http://www.jboss.org/wiki/Wiki.jsp?page=JBossFrequentlyAskedQuestions) -nothing related FAQJBossMQ (http://www.jboss.org/wiki/Wiki.jsp?page=FAQJBossMQ) HowDoIMakeJMSWorkInJTATransaction - http://www.jboss.org/wiki/Wiki.jsp?page=HowDoIMakeJMSWorkInJTATransaction - just says use java:/JmsXA HowDoIConfigureTheJMSResourceAdapterToUseARemoteConnectionFactory - http://www.jboss.org/wiki/Wiki.jsp?page=HowDoIConfigureTheJMSResourceAdapterToUseARemoteConnectionFactory - I assume this is what you were referring to : (link between and | java:/WhateverJMSProvider | This only answers my question "the (in jms-ds.xml) does not seem to define what type of connections it is handing out?" Wiki - JBossMQ (http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQ) JBossMQXA - http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQXA - ? JBossJMSRA - http://www.jboss.org/wiki/Wiki.jsp?page=JBossJMSRA - referenced in original post JBossMQIL - http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQIL - just tells me what the docu says ConfigJBossMQIL - http://www.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQIL - referenced in original post View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840242#3840242 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840242 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
The jms-ds.xml shipped with 3.2.4+ makes the relationship explicit as does the FAQ and WIKI. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840215#3840215 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840215 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
Thanks for the tips. I'm also aware of Adrian suggesting "java:/JmsXA". I just can't seem to find any reasons. anonymous wrote : | java:/XAConnectionFactory might also work... I really am trying to find out if it is: - meant to work - does actually work - how and when it should be used anonymous wrote : java:/JmsXA I believe you get java:/XAConnectionFactory connections That would mean there is a link between the files: - jms-ds.xml and - jvm-il-service.xml jvm-il-service.xml | ... | java:/ConnectionFactory | java:/XAConnectionFactory | ... | jms-ds.xml | | ... | java:/XAConnectionFactory | java:/XAConnectionFactory | | Is this how they are related? the "" (in jms-ds.xml) does not seem to define what type of connections it is handing out? I would be very grateful for any insights into these and the original questions. Should i reformulate my questions? I am still searching FAQ, Wiki, Docu cheers View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840096#3840096 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840096 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Use JCA or IL? (java:/JmsXA or java:/XAConnectionFactory
Adrian always suggests using "java:/JmsXA" which is the pooled connection factory provider. java:/XAConnectionFactory might also work, but I think the JmsXA is definitely going to work with your transaction. JCA is a connection interface and IL is the invocation layer, the transport mechanism. With java:/JmsXA I believe you get java:/XAConnectionFactory connections, but they are going to be pooled for you. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840009#3840009 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840009 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user