geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Hogstrom (JIRA)" <j...@apache.org>
Subject [jira] Created: (GERONIMO-3306) JMS Objects being bound at an incorrect spot in the JNDI tree.
Date Tue, 10 Jul 2007 16:26:04 GMT
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.


Mime
View raw message