KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > rmijdbc > RJRMISecurityManager


1
2 /**
3  * RmiJdbc client/server JDBC Driver
4  * (C) GIE Dyade (Groupe BULL / INRIA Research Center) 1997
5  *
6  * @version 1.0
7  * @author Pierre-Yves Gibello (pierreyves.gibello@experlog.com)
8  * @updated Francois Orsini (Cloudscape Inc.)
9  * Removed/relaxed some of the RMI Security Manager restrictions.
10  */

11
12 package org.objectweb.rmijdbc;
13
14 import java.io.FileDescriptor JavaDoc;
15 import java.rmi.*;
16
17 /**
18  * <P>This is a specialized RMI Security Manager for RmiJdbc when _embedded_
19  * applications/components are being accessed through RmiJdbc driver and
20  * run in the same JVM than RmiJdbc.
21  * This is required in order for the RMI threads to perform successfully
22  * when accessing database/local files for instance and performing I/O
23  * operations. The default RMI Security Manager is very restrictive and does
24  * not allow RMI thread to perform some of the I/O operations for instance.
25  *
26  * <P><B>Note:</B> There might be a cleaner solution in a near future, but
27  * right now this one allows embedded applications that does I/O operations
28  * throughout the RMI thread(s) to run inside RmiJdbc server.
29  *
30  * @see RMISecurityManager
31  */

32
33 public class RJRMISecurityManager
34 extends RMISecurityManager {
35
36   /**
37    * We do not restrict anything in particular here
38    */

39   public void checkRead(FileDescriptor JavaDoc fd)
40   throws java.lang.SecurityException JavaDoc {
41     return;
42   }
43
44   /**
45    * We do not restrict anything in particular here
46    */

47   public void checkRead(String JavaDoc file)
48   throws java.lang.SecurityException JavaDoc {
49     return;
50   }
51
52   /**
53    * We do not restrict anything in particular here
54    */

55   public void checkRead(String JavaDoc file, Object JavaDoc context)
56   throws java.lang.SecurityException JavaDoc {
57     return;
58   }
59
60   /**
61    * We do not restrict anything in particular here
62    */

63   public void checkWrite(FileDescriptor JavaDoc fd)
64   throws java.lang.SecurityException JavaDoc {
65     return;
66   }
67
68   /**
69    * We do not restrict anything in particular here
70    */

71   public void checkWrite(String JavaDoc file)
72   throws java.lang.SecurityException JavaDoc {
73     return;
74   }
75
76   /**
77    * We do not restrict anything in particular here
78    */

79   public void checkDelete(String JavaDoc file)
80   throws java.lang.SecurityException JavaDoc {
81     return;
82   }
83
84   /**
85    * We do not restrict anything in particular here
86    */

87   public synchronized void checkCreateClassLoader()
88   throws java.lang.SecurityException JavaDoc {
89     return;
90   }
91
92   /**
93    * We do not restrict anything in particular here
94    */

95   public void checkMemberAccess(Class JavaDoc clazz, int which)
96   {
97     return;
98   }
99
100   /**
101    * We do not restrict anything in particular here
102    */

103   public synchronized void checkExec(String JavaDoc cmd)
104   {
105     return;
106   }
107
108   /**
109    * We do not restrict anything in particular here
110    */

111   public void checkPropertyAccess(String JavaDoc key)
112   {
113     return;
114   }
115
116   /**
117    * We do not restrict anything in particular here
118    */

119   public void checkPropertiesAccess()
120   {
121     return;
122   }
123 }
124
Popular Tags