Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 6342 invoked from network); 11 Jul 2007 21:50:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jul 2007 21:50:27 -0000 Received: (qmail 20405 invoked by uid 500); 11 Jul 2007 21:50:30 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 19855 invoked by uid 500); 11 Jul 2007 21:50:28 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 19844 invoked by uid 99); 11 Jul 2007 21:50:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 14:50:28 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 14:50:24 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 77AC5714201 for ; Wed, 11 Jul 2007 14:50:04 -0700 (PDT) Message-ID: <190029.1184190604470.JavaMail.jira@brutus> Date: Wed, 11 Jul 2007 14:50:04 -0700 (PDT) From: "David Jencks (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-3306) JMS Objects being bound at an incorrect spot in the JNDI tree. In-Reply-To: <4381620.1184084764460.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-3306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511882 ] David Jencks commented on GERONIMO-3306: ---------------------------------------- Dain and I had a big discussion and think we fixed it in openejb rev 555412. The problem was that -openejb generates a "geronimo mapped name" for everything when in geronimo, that points to the correct item in the geronimo generated jndi tree. This would have ended up with a link to java:comp/geronimo/env/jms/QueueConnectionFactory which as Matt found out, works. - openejb was then overwriting this with a generated openejb resource-link for every message-destination-ref, pointing to an openejb part of the jndi tree such as java:openejb/Resource/jms/TradeStreamerTopic The solution was to have the code doing the overwriting to check for a set mapped name before changing anything. Now the link into the geronimo tree is sticking around and getting used and working. > JMS Objects being bound at an incorrect spot in the JNDI tree. > -------------------------------------------------------------- > > Key: GERONIMO-3306 > URL: https://issues.apache.org/jira/browse/GERONIMO-3306 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Affects Versions: 2.0-M7 > Environment: All > Reporter: Matt Hogstrom > Assignee: Tim McConnell > > DayTrader 2.0 uses a Session Bean that acts as a focal point for many application operations. This bean does a lookup of several resources in the setSessionContext method. This method looks up the following resources. The first line is line 1034 from TradeBean.java. Note that the jms/ resource are successfully looked up but that the items on line 1056 and 1057 needs to have geronimo inserted into the name in order for the resolution to be successful. > {code} > *1034* public void ejbCreate() throws CreateException { > *1035* try { > *1036* > *1037* if (Log.doTrace()) > *1038* Log.trace("TradeBean:ejbCreate -- JNDI lookups of EJB and JMS resources"); > *1039* > *1040* InitialContext ic = new InitialContext(); > *1041* quoteHome = (LocalQuoteHome) ic.lookup("java:comp/env/ejb/Quote"); > *1042* accountHome = (LocalAccountHome) ic.lookup("java:comp/env/ejb/Account"); > *1043* profileHome = (LocalAccountProfileHome) ic.lookup("java:comp/env/ejb/AccountProfile"); > *1044* holdingHome = (LocalHoldingHome) ic.lookup("java:comp/env/ejb/Holding"); > *1045* orderHome = (LocalOrderHome) ic.lookup("java:comp/env/ejb/Order"); > *1046* keySequenceHome = (LocalKeySequenceHome) ic.lookup("java:comp/env/ejb/KeySequence"); > *1047* > *1048* orderBySQLSupported = ( (Boolean) ic.lookup("java:comp/env/orderBySQLSupported") ).booleanValue(); > *1049* updateQuotePrices = ( (Boolean) ic.lookup("java:comp/env/updateQuotePrices") ).booleanValue(); > *1050* TradeConfig.setUpdateQuotePrices(updateQuotePrices); > *1051* > *1052* try > *1053* { > *1054* qConnFactory = (ConnectionFactory) ic.lookup("java:comp/env/jms/QueueConnectionFactory"); > *1055* tConnFactory = (ConnectionFactory) ic.lookup("java:comp/env/jms/TopicConnectionFactory"); > *1056* streamerTopic = (Topic) ic.lookup("java:comp/geronimo/env/jms/TradeStreamerTopic"); > *1057* brokerQueue = (Queue) ic.lookup("java:comp/geronimo/env/jms/TradeBrokerQueue"); > {code} > Now, looking at the streamerTopic and brokerQueue definitions we also have annotations which have the desired (correct?) names defined. However, when the bean is initialized we receive the following warnings: > {code} > *46* @Resource(name = "jms/TradeBrokerQueue") > *47* private Queue brokerQueue = null; > *48* > *49* private ConnectionFactory tConnFactory = null; > *50* > *51* @Resource(name = "jms/TradeStreamerTopic") > *52* private Topic streamerTopic = null; > {code} > 12:24:37,117 WARN [OpenEJB] Injection data not found in enc: jndiName='jms/TradeBrokerQueue', target=class org.apache.geronimo.samples.daytrader.ejb.TradeBean/brokerQueue > 12:24:37,118 WARN [OpenEJB] Injection data not found in enc: jndiName='jms/TradeStreamerTopic', target=class org.apache.geronimo.samples.daytrader.ejb.TradeBean/streamerTopic > So, the other resources outlined above (like the ConnectionFactories) seem to be bound correctly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.