geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-3306) JMS Objects being bound at an incorrect spot in the JNDI tree.
Date Wed, 11 Jul 2007 21:50:04 GMT

    [ 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.


Mime
View raw message