tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaber C. Mourad" <mja...@centralpay.net>
Subject RE: Tomcat - RMI client
Date Wed, 16 Apr 2003 08:54:04 GMT
Great ! do you change any config file, policy file or smthg else ?
Because it doesn't work at all with servlet...
Thanks

Mourad

Le mer 16/04/2003 à 10:31, Bodycombe, Andrew a écrit :
> 4.1.12, 4.1.18, and 4.1.24 on Windows and Unix
> 
> -----Original Message-----
> From: Jaber C. Mourad [mailto:mjaber@centralpay.net] 
> Sent: 15 April 2003 17:51
> To: Tomcat Users List
> Subject: RE: Tomcat - RMI client
> 
> 
> What is your tomcat version ?
> I'm under linux with tomcat 4.1.24 and the lookup is not transparent at
> all ....
> 
> Mourad
> 
> Le mar 15/04/2003 à 18:07, Bodycombe, Andrew a écrit :
> > I use tomcat as an RMI client all the time.
> > 
> > The only issue I have is on Windows you must make sure tomcat is not
> > installed in a directory containing spaces. I think this is a general RMI
> > issue, not just tomcat.
> > 
> > I use the Naming.lookup() method to retrieve the Remote interface to my
> > object,
> > And then method calls work "transparently". I have no need to play around
> > with codebases or classloaders. Perhaps my configuration very simple
> > compared to yours...
> > 
> > Andy
> > 
> > -----Original Message-----
> > From: Jaber C. Mourad [mailto:mjaber@centralpay.net] 
> > Sent: 15 April 2003 17:00
> > To: Tomcat Users List
> > Subject: RE: Tomcat - RMI client
> > 
> > 
> > Thanks a lot,
> > So, if I understand, rmi will not be supported by futur tomcat server,
> > isn't it ?
> > 
> > Le mar 15/04/2003 à 16:33, Oxley, David a écrit :
> > > Servlets and RMI are not happy at coexisting! If I were you I would
> switch
> > > to using SOAP. But if you insist on using RMI, then you can't use
> > > java.rmi.server.codebase. You need to add a codebase to the Classloader
> > > (WebappClassLoader). Really, when you've loaded the classes you need,
> the
> > > code base should be removed from the Classloader, but I haven't found a
> > way
> > > to do this. Here is the code I use:
> > > 	// This stuff is for Tomcat 4.1.10 and above. (RMI doesn't work with
> > > TC4 before this version).
> > > 	Method m = null;
> > > 	try {
> > > 		ClassLoader cl = StaffPlannerServer.class.getClassLoader();
> > > 		Class clc = cl.getClass();
> > > 		if
> > > (clc.getName().equals("org.apache.catalina.loader.WebappClassLoader")) {
> > > 			Class[] classes = new Class[1];
> > > 			Object[] parms = new Object[1];
> > > 			classes[0] = String.class;
> > > 			parms[0] = codeAddr;
> > > 
> > > 			// Set debug
> > > 			/*Class[] classes2 = new Class[1];
> > > 			Object[] parms2 = new Object[1];
> > > 			classes2[0] = Integer.TYPE;
> > > 			parms2[0] = new Integer(4);
> > > 
> > > 			Method m2 = clc.getMethod("setDebug", classes2);
> > > 			m2.invoke(cl, parms2);*/
> > > 				
> > > 			m = clc.getMethod("addRepository", classes);
> > > 			m.invoke(cl, parms);
> > > 		}
> > > 	}
> > > 	catch (Exception e) {}
> > > 		
> > > 	// And if we're running Tomcat 3.x or a different AppServer
> > > completely. Do it the old way.
> > > 	if (m == null) {
> > > 		Properties p = System.getProperties();
> > > 		p.remove("java.rmi.server.codebase");
> > > 		p.put("java.rmi.server.codebase", codeAddr);
> > > 		System.setProperties(p);
> > > 	}
> > > 
> > > 	// Now load all classes needed to be accessible remotely.
> > > 
> > > Dave.
> > > 
> > > 
> > > > -----Original Message-----
> > > > From: Jaber C. Mourad [mailto:mjaber@centralpay.net]
> > > > Sent: 15 April 2003 15:05
> > > > To: Tomcat Users List
> > > > Subject: Tomcat - RMI client
> > > > 
> > > > Hi,
> > > > I was reading the mailling list archieve and I haven't found info
> about
> > > > that.
> > > > I'm trying to use servlet as RMI client and I can't understand how the
> > > > security manager works into tomcat ( 4.1.24 rpm version ).
> > > > I'm very newbies into tomcat configuration.
> > > > Where can I define environement variables as java.security.policy or
> > > > java.rmi.server.codebase ?
> > > > My rmi server work with a standalone client...
> > > > Thanks a lot fro your help
> > > > 
> > > > --
> > > > Jaber C. Mourad <mjaber@centralpay.net>
> > > > 
> > > > 
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > > 
> > > > 
> > > >
> ________________________________________________________________________
> > > > This e-mail has been scanned for all viruses by Star Internet. The
> > > > service is powered by MessageLabs. For more information on a proactive
> > > > anti-virus service working around the clock, around the globe, visit:
> > > > http://www.star.net.uk
> > > >
> ________________________________________________________________________
> > > 
> > > 
> > > ________________________________________________________________________
> > > This e-mail has been scanned for all viruses by Star Internet. The
> > > service is powered by MessageLabs. For more information on a proactive
> > > anti-virus service working around the clock, around the globe, visit:
> > > http://www.star.net.uk
> > > ________________________________________________________________________
-- 
Jaber C. Mourad <mjaber@centralpay.net>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message