diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-12-13 14:34:57 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-12-13 14:34:57 +0000 |
commit | 769e22f35e9d21344639a36e07ec90ee2656140c (patch) | |
tree | 36ac09ee40ddf18d408736ceaa59ee9f8e05e414 /cs/src/Ice/ObjectAdapterFactory.cs | |
parent | Added support for server logs (diff) | |
download | ice-769e22f35e9d21344639a36e07ec90ee2656140c.tar.bz2 ice-769e22f35e9d21344639a36e07ec90ee2656140c.tar.xz ice-769e22f35e9d21344639a36e07ec90ee2656140c.zip |
Bug 1570 - object adapter configuration
Diffstat (limited to 'cs/src/Ice/ObjectAdapterFactory.cs')
-rwxr-xr-x | cs/src/Ice/ObjectAdapterFactory.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cs/src/Ice/ObjectAdapterFactory.cs b/cs/src/Ice/ObjectAdapterFactory.cs index c3e5df61b6c..b62f73e40a2 100755 --- a/cs/src/Ice/ObjectAdapterFactory.cs +++ b/cs/src/Ice/ObjectAdapterFactory.cs @@ -118,9 +118,25 @@ namespace IceInternal ex.id = name; throw ex; } + + if(name.Length == 0 && (endpoints.Length != 0 || router != null)) + { + Ice.InitializationException ex = new Ice.InitializationException(); + ex.reason = "Cannot configure endpoints or router with nameless object adapter"; + throw ex; + } - adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, name, endpoints, router); - _adapters[name] = adapter; + if(name.Length == 0) + { + string uuid = Ice.Util.generateUUID(); + adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, uuid, "", null, true); + _adapters[uuid] = adapter; + } + else + { + adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, name, endpoints, router, false); + _adapters[name] = adapter; + } return adapter; } } |