> Is it possible to return a java.sql.ResultSet object via RMI?
Not with the JDBC stuff that is shipped with the latest version of
Java (JDK 1.3) because ResultSet is not serializable and that is one of
the requirements for passing an object via RMI.
>but I keep getting a security violation =
> when the client calls the method to return the ResultSet.
> I am using Java 2 and get the following exception.
> Caught exception =3D java.security.AccessControlException: access
denied =
This is unrelated to your ResultSet problem. You are running up
against the new Java2 security system. Your client is running with an
RMISecurityManager set and the current security policy (most likely the
default) does not allow the operation you were trying to perform
(reading a property value). All RMI clients run under a security
manager to protect them from any mobile code they might download. The
security defaults are very restrictive -- pretty much the same
restrictions that a browser would place on an applet. Read this to
learn how to set a security policy:
http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBo
ok/appA.html.
The usual practice would be for you to create a ".java.policy" file in
your "java.home" directory to grant the necessary permissions. Sun
provides a "policytool" for editing these files, but I don't know much
about its use.
Sent via Deja.com http://www.deja.com/
Before you buy.