One more thing I forgot to add if we are actually looking for a remote JBOSS MQ
as a naming provider, from 3rd party Application servers, the
org.jnp.interfaces.NamingContext.java would call discoverServer(Hashtable
serverEnv) method, as commented rightly this would do the following
anonymous wrote :
|
| /** This methods sends a broadcast message on the network and asks and
| * HA-JNDI server to sent it the HA-JNDI stub
| */
|
If we were to circumvent this we can replace the code with
| try{
| String serverHost;
| String providerURL = (String)serverEnv.get("PROVIDER_URL");
| log.info("providerURL is"+providerURL);
| if(providerURL != null){
|
| int schemeLength = 0;
| if( providerURL.startsWith ("java:") )
| schemeLength = 7;
| else if( providerURL.startsWith ("jnp:") )
| schemeLength = 6;
| else if( providerURL.startsWith ("jnps:") )
| schemeLength = 7;
| else if( providerURL.startsWith ("jnp-http:") )
| schemeLength = 11;
| else if( providerURL.startsWith ("jnp-https:") )
| schemeLength = 12;
|
| serverHost = providerURL.substring(schemeLength);
| String[] servers = serverHost.split(":");
| log.info("serverhost is:"+servers[0]+"\n serverPort is
"+servers[1]);
| if(servers[0]!= null && servers[1] != null){
| try{
| server = getServer (servers[0],
Integer.parseInt(servers[1]), serverEnv);
| }catch(NumberFormatException ne){
| ne.printStackTrace();
| }
| }else
| server = getServer ("localhost", 1099, serverEnv);
| }
| if(server == null)
| server = getServer ("localhost", 1099, serverEnv);
| //}
| return server;
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870483#3870483
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870483
-------------------------------------------------------
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