From: Scott M S. <st...@us...> - 2002-08-21 22:58:15
|
User: starksm Date: 02/08/21 15:58:14 Modified: src/main/org/jboss/naming Tag: Branch_3_0 HttpNamingContextFactory.java Log: Map the jnp urls to the corresponding http or https url Revision Changes Path No revision No revision 1.1.4.2 +10 -1 jboss/src/main/org/jboss/naming/Attic/HttpNamingContextFactory.java Index: HttpNamingContextFactory.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/Attic/HttpNamingContextFactory.java,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -u -r1.1.4.1 -r1.1.4.2 --- HttpNamingContextFactory.java 15 Aug 2002 21:18:53 -0000 1.1.4.1 +++ HttpNamingContextFactory.java 21 Aug 2002 22:58:13 -0000 1.1.4.2 @@ -36,7 +36,7 @@ @see javax.naming.spi.InitialContextFactory @author Sco...@jb... - @version $Revision: 1.1.4.1 $ + @version $Revision: 1.1.4.2 $ */ public class HttpNamingContextFactory implements InitialContextFactory, ObjectFactory @@ -49,6 +49,15 @@ { // Parse the Context.PROVIDER_URL String provider = (String) env.get(Context.PROVIDER_URL); + if( provider.startsWith("jnp:") == true ) + provider = "http:" + provider.substring(4); + else if( provider.startsWith("jnps:") == true ) + provider = "https:" + provider.substring(5); + else if( provider.startsWith("jnp-http:") == true ) + provider = "https:" + provider.substring(9); + else if( provider.startsWith("jnp-https:") == true ) + provider = "https:" + provider.substring(10); + URL providerURL = null; Naming namingServer = null; try |