Hi,

I believe that the problem I am experiencing is due to a bug in the JBossAS JMX 
implementation.  To summarize my earlier posting, I am able to access a topic 
from JBossAS server "topichost" with the http il using JNDI over HTTP from a 
stand-alone client but not using a message-driven bean on JBossAS server 
"mdbhost".

I am runnign JBossAS 4.0.1sp1

Steps to reproduce:

1. Deploy a simple MDB on mdbhost such as SimpleMessageBean from the 
ejb/simplemessage section of the J2EE tutorial.

2. Deploy the HttpProxyFactory on both topichost and mdbhost by including the 
http-invoker.sar in the deploy directory of the default server on each host.

3. On both hosts the HTTPProxyFactory binds the value of the JMX ObjectName of 
"jboss:service=Naming" in the org.jboss.system.Registry under the hash of that 
ObjectName (line 188 of org.jboss.invocation.http.server.HttpProxyFactory).

4. On mdbhost, create a remote JMSProviderLoader to access the JNDI of the 
topichost by adding the following to jms-ds.xml (I can't seeem to get the xml 
here to render correctly but basically this matches the example on the Wiki 
except I am using the HTTP JNDI provider):

 
    RemoteJMSProvider
    org.jboss.jms.jndi.JNDIProviderAdapter
    HTTPConnectionFactory
    HTTPConnectionFactory
    
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces 
java.naming.provider.url=https://topichost:8443/invoker/JNDIFactorySSL
    
  

5. The JNDIProviderAdapter creates an InitialContext which defers to the 
HttpNamingContextFactory.  This context factory connects to topichost and 
retrieves a context with the HTTPInvoker wrapped in a ClientContainer.  

6. The JMSContainerInvoker on mdbhost looks up the TopicConnectinFactory.  It 
eventually gets to the last Invoker in the ClientConnector chain which is the 
InvokerInterceptor that wraps the HTTPInvoker.  

7. The InvokerInterceptor first must determine if the invoker is local using 
its isLocal(Invocation invocation) method.  

8. Because both topichost and mdbhost have an entry in the Registry for 
ObjectName "jboss:service=Naming" the InvokerInterceptor finds a value for the 
ObjectName and mistakenly decides that the local JNDI server on mdbhost should 
be used instead of the remote JNDI server on topichost.  The InvokerInterceptor 
uses the local JNDI server and returns 
a Naming Exception indicating the TopicConnectionFactory is not bound.

9. Remove the HttpProxyFactory from mdbhost by deleting the entire 
http-invoker.sar directory.  

10. Restart mdbhost

11. Now nothing is bound in the Registry of mdbhost for ObjectName 
"jboss:service=Naming" (i.e. there is no proxy naming service with an 
"InvokerName" attribue set to "jboss:service=Naming"). 

12. The InvokerInterceptor executes its isLocal() method, does not find a 
binding in the Registry and it returns false.

13. The marshalled remote JNDI proxy is used intead.  

14. The MDB on mdbhost can successfully access the topic and receive messages 
from the topic on topichost.

Due to this bug there is not way to use the HttpProxyFactory on a remote 
JBossAS with the JNDIProviderAdapter unless the local JBossAS does NOT have the 
HttpProxyFactory deployed. 

I will be happy to enter this bug in JIRA if you can tell me the correct 
project.  If I am mistaken about this bug somewhow then please let me know that 
as well.

Thanks,
Mark

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872957#3872957

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872957


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to