14
Index Symbols != operator 27 == operator 27, 138 @serial tag 43 @serialData tag 43 @serialField tag 44 A abstract remote, design pattern 162–164 AccessControlException 124 AccessException 57, 201, 243 Activatable 80, 117–119, 121–122, 161, 182, 185 exportObject method 114, 118, 132, 157 with socket factories 118, 136 extending 114, 117–118, 133, 157 getID method 122, 133 inactive method 126 register method 114, 121, 133, 252 remote object semantics of 80 unexportObject method 126, 248 see also activatable remote objects activatable proxy, design pattern 157–158 activatable remote objects 82, 87, 113–134, 157–158, 228 and security manager 87 as singletons 161 building 123 clients of 129–130 codebase 115, 123 construction of 132 by activation system 114–115, 117–118 with socket factories 136 constructor required for 114, 117 exporting 118 with socket factories 136 initialization argument of 115 references to, are persistent 82, 113 registration of 114, 117, 119–123 run-time setup for 123–125 secure 212–213 simultaneous registration and export 132 unregistration of 122 writing of 117–119 see also Activatable activatable servers see activatable remote objects ActivateFailedException 116, 130, 243, 250 activation 5, 32, 51, 61, 63, 82, 113–134, 200 critique of 131 exceptions in 129 not supported by RMI/IIOP 185 activation daemon see rmid activation group 74, 114, 119, 124, 126, 128–129, 132 creation of 132 in Win32 129 registration of 114, 117, 120–121 activation system, as a registry 127–128 ActivationDesc 121, 132, 161, 253 ActivationException 128–129, 132, 243 ActivationGroup 116, 133, 164 activeObject method 133 createGroup method 121, 132 getSystem method 115, 128 inactiveGroup method 133 inactiveObject method 133 newInstance method 133 ActivationGroupDesc 120, 124, 133 CommandEnvironment static inner class 120 ActivationGroupID 120–121, 132–133, 253 ActivationID 115–116, 121, 133, 161, 254 activate method 115, 133 ActivationInstantiator 133 ActivationMonitor 133 ActivationSystem 115, 128, 133 getActivationDesc method 115, 133 getActivationGroupDesc method 133 registerGroup method 120, 133

java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

Index

Symbols

!= operator 27== operator 27, 138@serial tag 43@serialData tag 43@serialField tag 44

A

abstract remote, design pattern 162–164AccessControlException 124AccessException 57, 201, 243Activatable 80, 117–119, 121–122, 161,

182, 185exportObject method 114, 118, 132,

157with socket factories 118, 136

extending 114, 117–118, 133, 157getID method 122, 133inactive method 126register method 114, 121, 133, 252remote object semantics of 80unexportObject method 126, 248see also activatable remote objects

activatable proxy, design pattern 157–158activatable remote objects 82, 87, 113–134,

157–158, 228and security manager 87as singletons 161building 123clients of 129–130codebase 115, 123construction of 132

by activation system 114–115, 117–118

with socket factories 136constructor required for 114, 117exporting 118

with socket factories 136initialization argument of 115references to, are persistent 82, 113registration of 114, 117, 119–123

run-time setup for 123–125secure 212–213simultaneous registration and export 132unregistration of 122writing of 117–119see also Activatable

activatable serverssee activatable remote objects

ActivateFailedException 116, 130, 243, 250

activation 5, 32, 51, 61, 63, 82, 113–134, 200critique of 131exceptions in 129not supported by RMI/IIOP 185

activation daemon see rmidactivation group 74, 114, 119, 124, 126,

128–129, 132creation of 132in Win32 129registration of 114, 117, 120–121

activation system, as a registry 127–128ActivationDesc 121, 132, 161, 253ActivationException 128–129, 132, 243ActivationGroup 116, 133, 164

activeObject method 133createGroup method 121, 132getSystem method 115, 128inactiveGroup method 133inactiveObject method 133newInstance method 133

ActivationGroupDesc 120, 124, 133CommandEnvironment static inner

class 120ActivationGroupID 120–121, 132–133,

253ActivationID 115–116, 121, 133, 161, 254

activate method 115, 133ActivationInstantiator 133ActivationMonitor 133ActivationSystem 115, 128, 133

getActivationDesc method 115, 133getActivationGroupDesc method 133registerGroup method 120, 133

Page 2: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

B–C Index java.rmi

registerObject method 121, 133setActivationDesc method 115, 133setActivationGroupDesc method 133unregisterGroup method 133unregisterObject method 133

Activator 133, 214, 257activate method 115

adapter, design pattern 148–150, 209serializable 149–150

agents in RMI 143–148callback (immobile agent) 145mobile 144mobile server (call-forward) 147

AllPermission 94AlreadyBoundException 58, 244Applet

init method 88start method 88stop method 88

applets 51–52, 86–88, 90–91, 93–94, 109, 202

application firewalls 191, 199application logging 227–228architecture of RMI systems 4–5argument-passing 15–16“at least zero” semantics 217, 220, 222“at most once’ semantics 15–16, 217,

245–247authentication 106, 173, 197, 205–206,

210, 213Authenticator 106, 197authorization 206, 210

B

backlog, in listen 74BAD_PARAM exception (CORBA) 34bind operation

of JNDI 170of registry 55

bootstrapping 8, 53, 57, 108–109, 111, 115, 169, 218via an RMI method 110via MarshalledObject 111via RMIClassLoader 109

broadcast 66, 220, 222–223BufferedInputStream 149BufferedOutputStream 153

C

callback, design pattern 75, 106, 125–126, 145–147, 159, 227and firewalls 202

limitation 147and GIOP proxy 199and HTTP tunnelling, limitation 194,

198and RMI Proxy 201and SOCKS, limitation 193as security risk 202deadlock in 146installation/distribution of 79

CGI script 195–199cipher suites 209–210Class

getDeclaredFields method 43getName method 56, 121getResource method 104getResourceAsStream method 104

class versioning 31–35alternative approaches to 39automatic, limitations of 33

in RMI/IIOP 35, 185by derivation 39–40examples of 37

ClassCastException 46, 243–244ClassNotFoundException 26, 97,

101–102, 243–244, 247, 254CLASSPATH 60–61, 96, 101–103, 108,

244–245, 258–259and registry 244–245

client socket factories 51, 73, 75, 136–137, 194, 198–199, 235and stubs 136must be serializable 137

client sockets 51, 57, 75, 135–136, 194sharing of 75, 231

client subject, security 212–213client threads 73client-dispatcher-server, design pattern 159clients 5, 7, 45, 49–52

and security managers 87downloading of 108exceptions in 14, 17, 242installation of 32, 103of activatables 129–130of portable remote objects 186

non-Java 187

272

Page 3: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

java.rmi Index D–E

client-serverapplications 3communications 215debugging 229design pattern 159

Cloneable 67–68, 71cloning 67–69, 71, 119, 249code mobility 39–40, 60–61, 79, 82,

86–111, 162, 244and registry 101–102and security 99uses of 97–99

code source 89–90codebase feature 32, 39, 59–60, 64, 86, 89,

95, 97–98, 108–109, 201, 239, 245, 253and activation 114–115, 123and security 87, 93, 99–100, 106, 208deployment with 107format of 96–97in activation 115, 123protocols for 105–106servers 5, 99, 102, 104setup 100

Common Data Representation (CDR) 179Common Object Request Broker Architec-

ture see CORBAConnectException

java.net 202–203, 245java.rmi 245, 250, 254

ConnectIOException 245, 250ContextFactory 172CORBA 23, 34, 82, 169, 179–188,

199–200, 267Object By Value, feature of 2.3 183

COS Naming service 5, 169, 173, 183–184JNDI provider 173

credentials, in security 206cryptography see also encryption 206cyclic redundancy check (CRC) 207

D

database operations 50Datagram 215datagrams 215–223DatagramSocket 215, 218–219, 222DataInput 29DataInputStream 149DataOutput 29

DataOutputStream 153Date 28deadlock, in callback pattern 146debugging 87–88, 90, 128, 261deployment

of RMI registry 59of RMI systems 107

de-serialization 21, 26–30, 41design patterns 39, 46, 143, 148

activatable proxy 157–158adapter 148–150, 209callback 75, 79, 106, 125–126, 145–147,

159, 193–194, 198–199, 201–202, 227deadlock in 146

client-dispatcher-server 159client-server 159proxy 8, 46, 152–159remote factory 39, 161–162remote proxy 156session 160, 164singleton 54, 122, 160–161smart proxy 152smart remote proxy 156virtual proxy 157

DGCclean method 226

DGC see distributed garbage collectiondirectory contexts (JNDI) 171dispatchers 47, 78, 159, 164, 228Distributed Computing Environment

(DCE) 23distributed garbage collection 15, 70,

225–227, 235, 239limitations of

and network partitions 226in distributed cycles 227

not supported by RMI/IIOP 185, 227

E

early versions of RMI 237–239eavesdropping on RMI

conversations 207–208efficiency of RMI 232–233enclaves, firewall 108, 200–201encryption 30, 106, 208–209endpoint factories 212–213Enterprise Edition see J2EEEnterprise Java Beans 180

273

Page 4: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

F–I Index java.rmi

EOFException 30Error 241, 247, 249event notification (JNDI) 171evolution

of classes 32, 34of remote interfaces 163, 251, 253of remote objects 253

Exception 11, 247, 255printStackTrace method 255

exceptionsin JNDI 170, 174–175in RMI 7–9, 14, 17, 22, 26, 45–46,

49–51, 56–58, 67, 70–72, 77, 80, 85–86, 88, 97, 101–102, 116, 124–125, 128–130, 132, 150, 154–155, 158, 174, 194, 201, 220, 226, 241, 255in activation 129listing of 243–254

in serialization 22, 25, 29–30, 35ExecOptionPermission 124–125ExecPermission 124–125execution security 85–94exiting when idle 75, 77, 126, 134ExportException 246exporting remote objects 69eXternal Data Representation (XDR) 23Externalizable 22, 28, 30–31, 34–35, 38,

137, 237changing to Serializable 33constructor required for 31faster than Serializable 31readExternal method 30–31, 237writeExternal method 30–31, 43, 237

F

federation, of naming services (JNDI) 171file system provider (JNDI) 176file transfer protocol (FTP) 105file: protocol 105FileInputStream 150FileOutputStream 154firewalls 74, 105, 107–108, 139, 147,

189–203, 258vendor-specific issues 202

first principles of RMI 6–7flat namespace, of registry 55, 63, 169, 176foundation classes of servers 79–81

G

garbage collection 70, 126–127distributed see distributed garbage collec-

tionGeneral Inter-ORB protocol see GIOPGIOP 179

proxies 199–200

H

Hashtableand de-serialization 27

home pagesfor this book 268Java RMI 267Java Software 267

HTML (Hypertext markup language) 191HTTP 103

lightweight class server 104proxies 107–108, 191, 195–197

system properties for 192tunnelling 193–194, 198–199, 209

limitations of 194http.nonProxyHosts 257http.proxyHost 192, 194–195, 199, 257http.proxyPort 192, 195, 199, 257HTTPS (secure hypertext transfer

protocol) 106https.proxyHost 106https.proxyPort 106HttpServlet 197hypertext transfer protocol see HTTP

I

idempotence 17, 50, 167identity, of party to conversation 205IDL 23, 34, 180, 182–183, 185–186, 188idle, exiting when 75, 77, 126, 134idle-time activity 75IIOP 82, 173, 179–188, 199, 267InetAddress 140InitialContext 183initialization argument, of activatable

remote objects 115InputStream 150

read method 149

274

Page 5: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

java.rmi Index J–L

installationof callbacks 79of clients 32, 103of RMI registry 59of RMI systems 107of servers 32

integrity, of message 206, 209interface definition language see IDLInternet 189–190, 193, 200, 203, 219Internet Inter-ORB protocol see IIOPInterruptedIOException 51introspection 36, 43InvalidClassException 35IOException 25, 150, 154–155, 246, 254IP 215, 219

J

J2EE 104–106, 180, 210Java 2 Enterprise Edition see J2EEJava Naming and Directory Interface see

JNDIJava remote method protocol see JRMPJava Secure Sockets Extension see JSSEjava.content.handler.pkgs 106java.naming.factory.initial 172, 174

for COS Naming provider 173for LDAP provider 173for RMI registry provider 172

java.naming.provider.url 172–173, 175java.rmi.activation.activator.class 257java.rmi.activation.port 258java.rmi.activation.security.class 257java.rmi.activation.security.codebase 257java.rmi.dgc.leaseValue 236, 258java.rmi.server.codebase 60, 96,

101–103, 109–110, 244, 258–259java.rmi.server.disableHttp 198–199,

258java.rmi.server.hostname 142, 236,

258–259java.rmi.server.logCalls 258java.rmi.server.randomIDs 259java.rmi.server.useCodebaseOnly 103,

259java.rmi.server.useLocalHostname 259java.security.debug 88, 259java.security.manager 85, 88, 259java.security.policy 88, 124, 252, 260

javadoc tags, for serialization 43java-rmi CGI script 196JavaSpaces 167JDK versions, interoperability of 238–239Jini 176–177

Discovery Service 176–177Lookup Service 176–177

JNDI 169–177, 183, 225attribute 171context 170COS Naming provider 173, 183directory context 171event notification 171exceptions 170, 174–175federation, of naming services 171file system provider 176initial context 183initial factory property 172jndi.properties file 175LDAP provider 173listener 171operations 170provider 169–171, 176–177

URL property 172rename operation 177RMI registry provider 172, 183service provider interface (SPI) 171setup 175sub-context 170

jndi.properties file 175JRMP 5, 199JSSE 106, 138, 209

L

latency 51LDAP 169, 171, 173

JNDI provider 173Lease 226leaseValue 226, 235Lightweight directory access protocol see

LDAPlist operation

of JNDI 170of registry 55

listen backlog 74listening 70, 72–74, 93, 96, 135, 138,

195–196, 202–203, 215, 231–232load-balancing 122, 159

275

Page 6: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

M–P Index java.rmi

local area network (LAN) 189LocateRegistry 58

createRegistry method 59, 61, 74getRegistry method 57

location transparency 159logCalls 228logging 80, 128, 227–229, 261–263LogStream 228, 258lookup operation

of JNDI 170of registry 55

M

main method 11, 88MalformedURLException 58, 174MarshalException 22, 246, 250–251MarshalledObject 8, 31, 53, 59, 109, 111,

115, 121bootstrap 53, 111get method 31, 111

marshalling 18, 21, 46, 92, 96, 213, 218, 233, 246, 250

message digest 207mobile agents 144mobile code see code mobilitymobile servers 147multicast 66, 219–222MulticastSocket 219, 222multi-homing, of network hosts 140–142multiplexing protocol, of RMI 202

N

name collisions 255names, in registry, and URLs 58namespace, flat, of registry 55, 63, 169, 176Naming 56–58, 200, 242–243, 248, 253

bind method 57–58, 101, 243–244list method 58lookup method 46, 58, 102, 244, 248rebind method 57–58, 243unbind method 57–58, 243, 248

naming services 53–63, 169–176, 186and RMI/IIOP 184federation of 171

NamingException 174–175network analysers (sniffers) 207

NoClassDefFoundError 97, 243, 247NoRouteToHostException 194, 199,

202–203NoSuchObjectException 70, 77, 125,

226, 247, 250NotBoundException 58, 174, 248NotSerializableException 22, 25–26, 28Novell

NetWare 170Network Directory Service 170

O

Object 26, 28, 33clone method 7–8, 67equals method 7–8, 27, 73, 75,

137–138, 140hashCode method 7–8toString method 7–8

object graphs 23–27, 32and portable remote objects 185received and returned by distinct RMI

calls are distinct 27ObjectInput 29ObjectInputStream 149

and RMI/IIOP 35defaultReadObject method 29–30, 37,

237defaultWriteObject method 37readObject method 26

object-oriented databases 54ObjectOutput 29ObjectOutputStream 153

and RMI/IIOP 34annotateClass method 96defaultWriteObject method 29–30, 42,

237writeObject method 25

ObjectStreamField 43–44OperationNotSupportedException 170OptionalDataException 29OutOfMemoryError 237, 241OutputStream 153, 155–156

P

partial failure, in RMI 19, 50–51peer-to-peer communications 160, 215

276

Page 7: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

java.rmi Index R–R

performance of RMI 230–237permissions 51–52, 85–94, 99–100, 249

granted to users 205in RMI registry 243in RMI, table of 91in rmid 124of client and server 205–214to create server sockets 252

persistencein registry 63, 176

implementing 63, 122of references to activatable remote

objects 82, 113point-to-point communications 66policy files 86, 88–90, 94, 99, 120, 124,

252, 260of rmid 123–124

policytool 86, 88polymorphism 40, 97–98, 143, 162–163portable remote objects 82, 180, 185–188,

227and class versioning 185and COS Naming service 173and IIOP 180and naming services 184, 186and object graphs 185and rmic 180, 182cannot extend RemoteServer 185clients of 186defined 82differences from unicast and

activatable 180dual-protocol (JRMP and IIOP) 183exporting 182extending other classes 182extending PortableRemoteObject 181extending RemoteObject 181non-Java clients of 187non-Java implementations of 186port numbers, not supported by 180remote interfaces implemented by 185

casting of 185–186require Objects By Value feature of

CORBA 2.3 183restrictions of 183–185socket factories, not supported by 180stubs and ties 182Unreferenced, not supported by 185writing of 181see also PortableRemoteObject

PortableRemoteObject 82, 180, 183construction of 180exportObject method 180, 182–183extending 181narrow method 185unexportObject method 180see also portable remote objects

principal, in security 206PrintStream 228privacy, of conversation 207privileged blocks 90, 93PrivilegedAction

run method 214Properties 120protection domains 89–90, 94providers, JNDI 172–173, 176proxy, application (in firewall) 191proxy, design pattern 8, 46, 152–159

activatable proxy 157–158remote proxy 156smart proxy 152smart remote proxy 156virtual proxy 157

proxy, GIOP 199proxy, HTTP 107–108, 191, 195–197proxy, SOCKS 192–193

R

readObject method, in serializable class 29–30, 33–34, 37, 237

readResolve method, in serializable class 33, 41

rebind operationof JNDI 170of registry 55

Registry 57–58, 242–243, 248, 253bind method 57–58, 101, 244list method 57–58lookup method 57–58, 102rebind method 57unbind method 57–58

registry 4–5, 8–9, 52–63, 74, 83, 97, 113, 115, 119, 121–123, 136, 158, 160, 162, 180, 184, 186, 225, 227, 236, 242activation system as a 127–128alternatives to 63and CLASSPATH 244–245and code mobility 101–102

277

Page 8: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

R–R Index java.rmi

and persistence 63as UDP service 218configurations 60–61flat namespace of 55, 63, 169, 176hierarchical 176JNDI provider for 172persistence of 176security restrictions of 169, 243servers bound in 127, 161stale 247Sun debugging utility for 63

Remote 7, 9, 45, 54, 121, 185remote exceptions 8, 14, 17, 49–50, 57, 80,

158, 220listing of 243–255

remote factory, design pattern 39, 161–162remote failure 49–50, 254remote input stream 149, 153remote interfaces 4, 6–7, 14–15, 45–47, 49,

55–56, 65, 71, 77, 114, 131, 144, 150, 156and abstract remote pattern 162and ClassCastException 244and NoClassDefFoundError 247and smart proxy pattern 152casting of 244conditions satisfied by 7, 45, 155design of 155, 248evolution of 163, 251, 253implementing methods in 66, 70–71in RMI/IIOP 185

and case of method names 185and IDL mangled names 185casting of 185–186generating IDL from 188inheritance of methods 185origin of 183

internal, in activation 133remote methods 45–46

and idempotence 17and latency 51and object graphs 27and partial failure 50and retrying 17and serialization 21and UnexpectedException 253argument-passing 14as bootstrap 110concurrency of 73debugging 229defined 7

design of 15, 17exception-passing 14implementing 70–72in activatable 115, 129obtaining the client host of 80overhead of 216, 233protocol (JRMP) 5remote exceptions in 241result-passing 14semantics of 14–15, 17syntax of 13

remote objects 4, 6–7, 18–19, 45, 49, 65, 144, 160, 190, 194, 211, 213activatable 82, 115, 157and connection sharing 75and DGC 15, 225and latency 51and marshalling 45–46and method parameters 15and mobile server pattern 147and object graphs 32, 46, 185and port sharing 73–74and registry 53and serialization 81and ServerSocket 136and socket factories 74, 136and stubs 7and threads 73and Unreferenced 75, 125as callbacks 145–146as EJBs 180as factories 161as local objects 7as MarshalledObjects 59broadcast 222call stack in 255casting of 244cloning of 67conditions satisfied by 7, 15, 65declared as RMI parameter or result 244defined 6evolution of 253exiting when idle 76–77, 126exporting 69, 72, 246, 252, 258local garbage collection of 70marshalling of 14multicast 219non-static inner class of 244passed by reference 16portable (IIOP) 82

278

Page 9: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

java.rmi Index S–S

properties of 6secure identifiers for 259semantics of 7, 14, 65–69, 79, 81, 119stale references to 247thousands of 236, 238unexporting 70

forcibly 70unicast 66, 82

and TCP/IP 66unmarshalling of 254

remote output stream 153, 155remote proxy, design pattern 156RemoteCall 251

getResultStream method 251RemoteException 7–9, 45, 56–57, 67,

71–72, 129, 150, 154–155, 174, 201, 241, 245, 248–250, 254–255not throwing 71

RemoteObject 65, 67, 69, 71, 79–81, 117, 119, 181, 185, 248equals method 79–80extending 68getRef method 80hashCode method 79–80remote object semantics of 68, 80toString method 79–80

RemoteRef 115–116, 218RemoteServer 65, 71, 79–80, 117, 119,

181, 185extending 68getClientHost method 65, 80, 251getLog method 65, 80, 228, 258has no abstract methods 80only exports static methods 68remote object semantics of 80setLog method 80

rename operation, of JNDI 170resource conservation, in RMI 231ResourceBundle 104RMI

early versions of 237–239RMI CGI script 195RMI multiplexing protocol 202RMI registry port 190RMI Security Extension 211–214RMI/IIOP 34, 179–188

see also portable remote objectsRMIClassLoader 109–110

bootstrap 109loadClass method 95, 101, 109–110

RMIClientSocketFactory 57, 136, 209, 214, 218createSocket method 136

rmid 63, 115, 123–129, 190, 228, 237, 243, 258, 261debugging 128policy class 124policy file 123–124

RMIHttpToCGISocketFactory 140RMIHttpToXXXSocketFactory 198RMISecurityException 249RMISecurityManager 99, 249, 257RMIServerSocketFactory 136, 209, 214,

218createServerSocket method 136

RMISocketFactory 238createSocket method 236, 238getDefaultFactory method 139, 198setSocketFactory method 92, 135

RMIstat utility 229rollout 39–40, 98, 108, 162Runnable 108, 111

run method 88, 108, 111Runtime 160RuntimeException 124, 155, 241, 251RuntimePermission

setSecurityManager target 86

S

scalability, of RMI 234secure client 214secure code sections 214secure hypertext transfer protocol see

HTTPSsecure impersonation 213secure remote calls 214secure servers 212–214

activatable 213secure sockets layer see SSLsecure stub 212, 214Security

doConstrained method 214security

authentication 205authorization 206credentials 206cryptography 206identity, of party to conversation 205

279

Page 10: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

S–S Index java.rmi

in SSL 209integrity, of message 206, 209message digest 207of conversation 205–214of execution 85–94principal 206subject 206

security managers 51, 85–86, 88, 252, 257, 259and activation 87, 120and applets 86and bootstrapping 109and mobile code 87, 99and non-activatable remote objects 87in JDK 1.1 86, 249

SecurityException 51, 85–86, 88, 124, 249, 259where to catch 88

SecurityManager 85, 99semantics 13

“at least zero” 217, 220, 222“at most once” 15–16, 217, 245–247defined 13of remote method invocation 14of remote objects 14

as RMI parameter or result 14serial version unique identifier see SUIDSerializable 22, 27, 29–30, 137, 233, 237

and RMI/IIOP 35changing to Externalizable 33constructor required for 28declares no methods 27slower than Externalizable 31

serialization 4, 21–44, 67–69, 81, 92, 96, 98, 100, 119–121, 143, 157, 179, 185, 207, 233advanced facilities in 41and javadoc 43and remote objects 81class versioning in, automatic 32, 34constructor required for 28customized 29default 29–30improving the performance of 237overheads of 233via Externalizable 30–31see also class versioning

serialPersistentFields mechanism 33, 43serialVersionUID 22, 36, 233, 237server socket factories 73–74, 136, 246

for multi-homing 140server sockets 135–136, 231

sharing of 73, 231server threads 73, 138, 231ServerCloneException 249ServerError 247, 249ServerException 245, 250ServerNotActiveException 80, 251ServerRuntimeException 251servers 5

installation of 32stateless 160see also activatable remote objects;

HTTP servers; mobile servers; portable remote objects; registry; remote objects; secure servers; stateless ser-vers; unicast remote objects

ServerSocket 72, 74, 93, 135–136, 140, 209, 212, 218, 221, 246accept method 93, 234and permissions 252construction of 140–141

bindAddr parameter 141in multi-homing 140

ServerSocketFactory 246servlet handler 197session, design pattern 160, 164sessions 54, 74, 76

SSL 210sharing

of client sockets 75, 231of server sockets 73, 231

singleton, design pattern 54, 122, 160–161SkeletonMismatchException 250–251SkeletonNotFoundException 251, 255smart proxy, design pattern 152smart remote proxy, design pattern 156sniffers (network analysers) 207Socket 93, 135–136, 193–194, 198, 209,

212, 216, 218, 221, 238setSocketImplFactory method 92setSoTimeout method 236, 238

socket factories 51, 57, 67, 69, 81, 91, 118, 135–142, 236client 51, 73, 75, 136–137, 194,

198–199, 235must be serializable 137

default, in RMI 198, 263equality of 73–75, 137–138for datagrams 218, 221

280

Page 11: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

java.rmi Index S–S

for multi-homing 140for registry 59, 136for Unix domain sockets 230in Java 2 136in JDK 1.1 135in JDK 1.2.2 238in RMI, critique of 142not supported by RMI/IIOP 180, 185server 73–74, 136–137, 246SSL 139, 209uses of 139

sockets see client sockets; server sockets; Unix domain sockets

SocketSecurityException 252SOCKS proxy 192–193socksProxyHost 193, 260socksProxyPort 260SSL 139, 209–210SSLServerSocket 209SSLServerSocketFactory 209SSLSession 164SSLSocket 209SSLSocketFactory 138, 209stateless servers 160static 22, 26, 43String 33, 121, 185StubNotFoundException 250, 252, 255stubs 7–8, 16, 46, 53–54, 80, 133, 157, 211,

223, 258and client socket factories 136and remote objects 7generation of 46, 77, 81of activatable 53, 63, 115, 121, 123–124,

133, 157, 161, 180, 243of datagram 218of multicast 222of portable remote object 182of registry 57of unicast 63, 66properties of 8protocols 47stale 247

sub-context, in JNDI 170Subject 213

doAs method 213subject

client 212–213in security 206

SUID 35–37defining 36

obtaining 37sun.rmi.activation.execPolicy 124, 260sun.rmi.activation.execTimeout 237,

260sun.rmi.activation.snapshotInterval 260sun.rmi.dgc.checkInterval 261sun.rmi.dgc.cleanInterval 261sun.rmi.dgc.client.gcInterval 261sun.rmi.dgc.logLevel 261sun.rmi.dgc.server.gcInterval 261sun.rmi.loader.logLevel 261sun.rmi.log.debug 261sun.rmi.rmid.maxstartgroup 237, 262sun.rmi.server.activation.debugExec 128,

262sun.rmi.server.exceptionTrace 228, 262sun.rmi.server.logLevel 262sun.rmi.transport.connectionTimeout 235

–236, 262sun.rmi.transport.logLevel 262sun.rmi.transport.proxy.connectTimeout

235, 263sun.rmi.transport.proxy.logLevel 263sun.rmi.transport.tcp.connectionTimeout

236sun.rmi.transport.tcp.localHostNameTimeOut

263sun.rmi.transport.tcp.logLevel 263sun.rmi.transport.tcp.readTimeout 235

–236, 263synchronized 71syntax

defined 13of codebase URL 96–97of local method invocation 13of RMI 5, 13of wildcard, in policy file 125

Systemerr member 229gc method 126, 237runFinalization method 126

system properties 257–263and activation 124, 128and applets 86for HTTP proxy configuration 192for JNDI 172–173, 175for RMI DGC 226for RMI logging 228for SOCKS configuration 193in RMI specification 257–260

281

Page 12: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

T–U Index java.rmi

in Sun implementation 260–263security related 87–88

T

TCP/IP 4, 20, 66, 74, 96, 139, 189, 199, 202–203, 207, 212, 232backlogs in listen 75

testingof RMI in a single machine 230of security policies 94

Threadrun method 88

ThreadGroupuncaughtException method 88

threads 72and remote methods 73, 231client 73conservation of 231–232creation overhead 74deadlocks, in callback 146killing of 237, 241listening 74server 73, 138, 231

reducing usage of 235–236thread-safety 73

tie, CORBA 182timeouts 20, 51, 135, 199, 218, 229, 231,

236, 238, 260, 262–263tuning of 235

TLS see transport layer securitytransient 22, 26, 43, 255transport firewalls 190–191transport layer security 209tuning techniques 235–237

U

UDP 190, 215–219, 222unbind operation

of JNDI 170of registry 55

UnexpectedException 253unexporting remote objects 70unicast remote objects 65–82, 113, 117,

125, 179, 215, 228and TCP/IP 66building of 77

changing to activatable 157clients of 129exporting 69, 118

with socket factories 136extending other classes 69extending RemoteObject 68extending RemoteServer 68extending UnicastRemoteObject 66references to, are transient 82, 113secure 212unexporting 70, 248

forcibly 70writing of 66see also UnicastRemoteObject

unicast server see unicast remote objectsUnicastRemoteObject 9, 63, 65–66, 69,

71, 80, 180, 185auto-exported on de-serialization 81cloning of 67, 249construction of 67

with socket factories 136exported on construction 69exportObject method 69, 113, 127, 157,

183with socket factories 136

extending 67, 81, 113, 157not supported in RMI/IIOP 182–183

has only transient data? 81port 81remote object semantics of 67, 80serialization of 67–68, 81socket factory settings 81unexportObject method 70, 248

force parameter 70see also unicast remote objects

uniform resource locator see URLUnix domain sockets 230UnknownGroupException 130, 243, 253UnknownHostException

java.net 194, 199, 202, 253java.rmi 250, 253

UnknownObjectException 130, 243, 254UnmarshalException 17, 22, 51,

101–102, 250–251, 254unmarshalling 18, 21, 92, 96, 102, 213,

218, 233, 250, 254, 261Unreferenced 75–76, 125, 226

RMI/IIOP, not supported in 185unreferenced method 75–77, 125–126,

185, 226, 237, 247

282

Page 13: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup

java.rmi Index V–X

may execute prematurely 226URL 56–58, 89, 95–97, 101–102, 105–106,

109, 111, 115, 121, 167, 172, 174–175, 192, 195–196, 209, 252, 257–258, 260and names in the registry 58

User Datagram Protocol (UDP) 190, 215–219, 222

V

virtual proxy, design pattern 157

W

wide area network (WAN) 189wild-card syntax 125Win32, activation groups in 129writeObject method

in serializable class 34writeObject method, in serializable

class 29–30, 33, 43, 237and RMI/IIOP 34–35

writeReplace method, in serializable class 33, 41–42

X

X.509 certificate chains 205XDR 23

283

Page 14: java.rmi: The Guide to Remote Method Invocation · B–C Index java.rmi 272 registerObject method 121, 133 setActivationDesc method 115, 133 setActivationGroupDesc method 133 unregisterGroup