History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: EJBTHREE-975
Type: Bug Bug
Status: Closed Closed
Resolution: Done
Priority: Major Major
Assignee: William DeCoste
Reporter: Ana Holzbach
Votes: 3
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
EJB 3.0

HA-JNDI InitialContext for @Resource annotation

Created: 30/May/07 12:18 PM   Updated: 09/Oct/07 05:17 AM
Component/s: Clustering
Affects Version/s: AS 4.2.0 GA
Fix Version/s: AS 4.2.2.GA

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Related
This issue related:
JBAS-4805 InitialContextFactory.getHAContext() ... Major Closed
 
Superset
 
This issue is incorporated by:
JBPAPP-260 EJBTHREE-975 - HA-JNDI InitialContext... Major Closed

JBoss Forum Reference: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049784#4049784


 Description  « Hide

 We're deploying ejbs in a clustered environment that access JMS topics with @Resource annotation as follows:

        @Resource(mappedName = "TopicConnectionFactory")
private ConnectionFactory mJmsConnectionFactory;

@Resource(mappedName = "topic/RoomService/BedStaffUpdate")
private Topic mStaffUpdateTopic;

 The topics are deployed in deploy-hasingleton and are available to the singleton master in the cluster only. The remaining nodes get the following error:

 javax.naming.NameNotFoundException: topic not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at flex.messaging.services.messaging.adapters.JMSProxy.getDestination(JMSProxy.java:186)
at flex.messaging.services.messaging.adapters.JMSTopicConsumer.start(JMSTopicConsumer.java:59)
at flex.messaging.services.messaging.adapters.JMSAdapter.manage(JMSAdapter.java:345)
at flex.messaging.services.MessageService.manageSubscriptions(MessageService.java:571)
at flex.messaging.services.MessageService.serviceCommand(MessageService.java:152)
at flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java:622)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:298)
at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682)
at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:643)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:668)
at java.lang.Thread.run(Thread.java:595)

 See also http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049784#4049784

 According to Brian Stansberry the @Resource annotations are resolved relative to a default initial context, which will not work for the clustered environment, since we need access to the HA-JNDI context for these. Also according to Brian, getJndiProperties() in DeploymentUnit should be responsible for reading jndi properties defined at deployment through which we might be able to define an HA-JNDI context, but this method returns null in jboss 4.x and also in "2 out of the 3 impls in the AS 5 codebase". See also http://www.jboss.com/index.html?module=bb&op=viewtopic&t=109219

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order:
Shelly McGowan [28/Aug/07 11:33 AM]
intended to reassign the JBPAPP related issue