Projects
Eulaceura:Mainline
mx4j
_service:obs_scm:mx4j-3.0.1.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:mx4j-3.0.1.patch of Package mx4j
From ea814e3b378a2305fb1d0e6b7e3a05458178dee6 Mon Sep 17 00:00:00 2001 Subject: [PATCH] --- .../mx4j/remote/resolver/iiop/Resolver.java | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/core/mx4j/remote/resolver/iiop/Resolver.java b/src/core/mx4j/remote/resolver/iiop/Resolver.java index 1666d05..559be34 100644 --- a/src/core/mx4j/remote/resolver/iiop/Resolver.java +++ b/src/core/mx4j/remote/resolver/iiop/Resolver.java @@ -32,6 +32,7 @@ public class Resolver extends mx4j.remote.resolver.rmi.Resolver private static final String IOR_CONTEXT = "/ior/"; private ORB orb; + private static final String ORB_KEY = "java.naming.corba.orb"; //********************************************************************************************************************// @@ -110,19 +111,29 @@ public class Resolver extends mx4j.remote.resolver.rmi.Resolver { if (orb == null) { - Properties props = new Properties(); - // Using putAll() on a Properties is discouraged, since it expects only Strings - for (Iterator i = environment.entrySet().iterator(); i.hasNext();) - { - Map.Entry entry = (Map.Entry)i.next(); - Object key = entry.getKey(); - Object value = entry.getValue(); - if (key instanceof String && value instanceof String) - { - props.setProperty((String)key, (String)value); - } - } - orb = ORB.init((String[])null, props); + Object candidateORB = environment.get(ORB_KEY); + if (candidateORB != null) + { + // Throw as required by the spec + if (!(candidateORB instanceof ORB)) throw new IllegalArgumentException("Property " + ORB_KEY + " must specify a " + ORB.class.getName() + ", not " + candidateORB.getClass().getName()); + orb = (ORB)candidateORB; + } + else + { + Properties props = new Properties(); + // Using putAll() on a Properties is discouraged, since it expects only Strings + for (Iterator i = environment.entrySet().iterator(); i.hasNext();) + { + Map.Entry entry = (Map.Entry)i.next(); + Object key = entry.getKey(); + Object value = entry.getValue(); + if (key instanceof String && value instanceof String) + { + props.setProperty((String)key, (String)value); + } + } + orb = ORB.init((String[])null, props); + } } return orb; } -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2