commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinaysahil chandran <sahilvi...@yahoo.com>
Subject [ALTRMI]-PATCH JNDI interface for Altrmi clients
Date Sun, 10 Mar 2002 02:46:40 GMT
Paul,
Did some prelim' JNDI bridge work for client-side
lookup's and listing.

The Client code now would do something like :

		Hashtable env = new Hashtable(); 
	
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.commons.altrmi.client.impl.naming.AltrmiInitialContextFactory");
	
env.put(Context.PROVIDER_URL,"altrmi://localhost:1235/SocketCustomStream");
		env.put("proxy.type","C");
		env.put("bean.type","NBO");
	    Context ctx = new InitialContext(env);
	    //list
        System.out.println("Listing Published Objects
At Server...");

        NamingEnumeration
listOfPublishedObjectsOnServer = ctx.list("all");
		int i=0;
       
while(listOfPublishedObjectsOnServer.hasMore())
        {
            System.out.println("..[" + i + "]:" +
listOfPublishedObjectsOnServer.next());
            ++i;
        }

        TestInterface ti = (TestInterface)
ctx.lookup("Hello");

        new TestClient(ti);
        ctx.close();



Comments ??



Regards,
V i n a y

++++++++++++++++++++++++++++++++++++++++++++
Patches follows 
DefaultInterfaceLookupFactory: added supported stream
types are an array for check's done with
InitialContextFactory

++++++++++++++++++++++++++++++++++++++++++++


cvs -q diff DefaultInterfaceLookupFactory.java (in
directory
C:\jcommons\cvs\jakarta-commons-sandbox\altrmi\src\java\org\apache\commons\altrmi\client\impl)
Index: DefaultInterfaceLookupFactory.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/DefaultInterfaceLookupFactory.java,v
retrieving revision 1.2
diff -r1.2 DefaultInterfaceLookupFactory.java
26a27,31
> 	public static String[] supportedStreams=new
String[]
> 												{"SocketObjectStream",
> 												 "SocketCustomStream",
> 												  "RMI"
> 												};




__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
Mime
View raw message