Java Code Examples for org.omg.CORBA.ORBPackage.InvalidName

The following are top voted examples for showing how to use org.omg.CORBA.ORBPackage.InvalidName. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 2
Project: OpenJSharp   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 3
Project: openjdk-jdk10   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 4
Project: openjdk-jdk10   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 5
Project: openjdk9   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 6
Project: openjdk9   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 7
Project: lookaside_java-1.8.0-openjdk   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 8
Project: lookaside_java-1.8.0-openjdk   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 9
Project: jdk8u_corba   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 10
Project: jdk8u_corba   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 11
Project: javify   File: OrbFunctional.java   View source code 6 votes vote down vote up
/**
 * Find and return the easily accessible CORBA object, addressed by name.
 *
 * @param name the object name.
 * @return the object
 *
 * @throws org.omg.CORBA.ORBPackage.InvalidName if the given name is not
 * associated with the known object.
 */
public org.omg.CORBA.Object resolve_initial_references(String name)
  throws InvalidName
{
  org.omg.CORBA.Object object = null;
  try
    {
      object = (org.omg.CORBA.Object) initial_references.get(name);
      if (object == null && name.equals(NAME_SERVICE))
        {
          object = getDefaultNameService();
          if (object != null)
            initial_references.put(NAME_SERVICE, object);
        }
    }
  catch (Exception ex)
    {
      InvalidName err = new InvalidName(name);
      err.initCause(ex);
      throw err;
    }
  if (object != null)
    return object;
  else
    throw new InvalidName("Not found: '" + name + "'");
}
 
Example 12
Project: jvm-stm   File: OrbFunctional.java   View source code 6 votes vote down vote up
/**
 * Find and return the easily accessible CORBA object, addressed by name.
 *
 * @param name the object name.
 * @return the object
 *
 * @throws org.omg.CORBA.ORBPackage.InvalidName if the given name is not
 * associated with the known object.
 */
public org.omg.CORBA.Object resolve_initial_references(String name)
  throws InvalidName
{
  org.omg.CORBA.Object object = null;
  try
    {
      object = (org.omg.CORBA.Object) initial_references.get(name);
      if (object == null && name.equals(NAME_SERVICE))
        {
          object = getDefaultNameService();
          if (object != null)
            initial_references.put(NAME_SERVICE, object);
        }
    }
  catch (Exception ex)
    {
      InvalidName err = new InvalidName(name);
      err.initCause(ex);
      throw err;
    }
  if (object != null)
    return object;
  else
    throw new InvalidName("Not found: '" + name + "'");
}
 
Example 13
Project: infobip-open-jdk-8   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 14
Project: infobip-open-jdk-8   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 15
Project: openjdk-source-code-learn   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 16
Project: openjdk-source-code-learn   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 17
Project: OLD-OpenJDK8   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 18
Project: OLD-OpenJDK8   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 19
Project: JamVM-PH   File: OrbFunctional.java   View source code 6 votes vote down vote up
/**
 * Find and return the easily accessible CORBA object, addressed by name.
 *
 * @param name the object name.
 * @return the object
 *
 * @throws org.omg.CORBA.ORBPackage.InvalidName if the given name is not
 * associated with the known object.
 */
public org.omg.CORBA.Object resolve_initial_references(String name)
  throws InvalidName
{
  org.omg.CORBA.Object object = null;
  try
    {
      object = (org.omg.CORBA.Object) initial_references.get(name);
      if (object == null && name.equals(NAME_SERVICE))
        {
          object = getDefaultNameService();
          if (object != null)
            initial_references.put(NAME_SERVICE, object);
        }
    }
  catch (Exception ex)
    {
      InvalidName err = new InvalidName(name);
      err.initCause(ex);
      throw err;
    }
  if (object != null)
    return object;
  else
    throw new InvalidName("Not found: '" + name + "'");
}
 
Example 20
Project: openjdk-orb   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 21
Project: openjdk-orb   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 22
Project: classpath   File: OrbFunctional.java   View source code 6 votes vote down vote up
/**
 * Find and return the easily accessible CORBA object, addressed by name.
 *
 * @param name the object name.
 * @return the object
 *
 * @throws org.omg.CORBA.ORBPackage.InvalidName if the given name is not
 * associated with the known object.
 */
public org.omg.CORBA.Object resolve_initial_references(String name)
  throws InvalidName
{
  org.omg.CORBA.Object object = null;
  try
    {
      object = (org.omg.CORBA.Object) initial_references.get(name);
      if (object == null && name.equals(NAME_SERVICE))
        {
          object = getDefaultNameService();
          if (object != null)
            initial_references.put(NAME_SERVICE, object);
        }
    }
  catch (Exception ex)
    {
      InvalidName err = new InvalidName(name);
      err.initCause(ex);
      throw err;
    }
  if (object != null)
    return object;
  else
    throw new InvalidName("Not found: '" + name + "'");
}
 
Example 23
Project: openjdk-icedtea7   File: POAFactory.java   View source code 6 votes vote down vote up
public synchronized POA getRootPOA()
{
    if (rootPOA == null) {
        // See if we are trying to getRootPOA while shutting down the ORB.
        if (isShuttingDown) {
            throw omgWrapper.noObjectAdaptor( ) ;
        }

        try {
            Object obj = orb.resolve_initial_references(
                ORBConstants.ROOT_POA_NAME ) ;
            rootPOA = (POAImpl)obj ;
        } catch (InvalidName inv) {
            throw wrapper.cantResolveRootPoa( inv ) ;
        }
    }

    return rootPOA;
}
 
Example 24
Project: openjdk-icedtea7   File: ORBImpl.java   View source code 6 votes vote down vote up
/**
 * Resolve the stringified reference of one of the initially
 * available CORBA services.
 * @param identifier The stringified object reference of the
 * desired service.
 * @return An object reference for the desired service.
 * @exception InvalidName The supplied identifier is not associated
 * with a known service.
 * @exception SystemException One of a fixed set of Corba system exceptions.
 */
public org.omg.CORBA.Object resolve_initial_references(
    String identifier) throws InvalidName
{
    Resolver res ;

    synchronized( this ) {
        checkShutdownState();
        res = resolver ;
    }

    synchronized (resolverLock) {
        org.omg.CORBA.Object result = res.resolve( identifier ) ;

        if (result == null)
            throw new InvalidName() ;
        else
            return result ;
    }
}
 
Example 25
Project: TIDorbJ   File: IIOPCommunicationLayer.java   View source code 6 votes vote down vote up
public CommunicationDelegate createDelegate(String url) throws CommunicationException {

		CommunicationDelegate delegate;
		if ( this.accepts( url ) ){
			IOR ior;
			try {
				if ( url.startsWith( "corbaloc:tidorb:" ) ){
					ior = Corbaloc.getIOR( url );
				} else if(url.startsWith( "corbaloc::" ) || 
				          url.startsWith( "corbaloc:iiop:" )) {
					ior = IIOPCorbaloc.getIOR( url );
				} else {
				    ior = IIOPIOR.fromString(this.orb, url);
				}
			} catch ( InvalidName in ){
				throw new CommunicationException( "Invalid url: " + in.getMessage(), in );
			}
			delegate = createDelegate( ior );
		} else {
			delegate = null;
		}
		return delegate;
	}
 
Example 26
Project: TIDorbJ   File: IIOPCorbaloc.java   View source code 6 votes vote down vote up
/**
 * Simulates an usual ObjectKey, that is marshaled in an Encapsulation, but
 * instead, the url ObjectKey is marshaled as a ulong value (the size) and
 * the char array of the string (without the end of string character *.
 * 
 * @param url
 * @return
 * @throws org.omg.CORBA.ORBPackage.InvalidName
 */
private static ObjectKey createKey(String url_key)
    throws org.omg.CORBA.ORBPackage.InvalidName
{

    CDROutputStream output = 
        new CDROutputStream(null,
                            new byte[url_key.length() + CDR.ULONG_SIZE]);

    char[] url_buffer = url_key.toCharArray();

    output.write_ulong(url_buffer.length);
    output.write_char_array(url_buffer, 0, url_buffer.length);

    CDRInputStream input = (CDRInputStream) output.create_input_stream();

    Encapsulation encap = input.readEncapsulation();

    return new ObjectKey(encap);
}
 
Example 27
Project: TIDorbJ   File: SSLIOPCommunicationLayer.java   View source code 6 votes vote down vote up
public CommunicationDelegate createDelegate(String url) throws CommunicationException {
    CommunicationDelegate delegate;
    if ( this.accepts( url ) ){
        IOR ior;
        try {
            if ( url.startsWith( "corbaloc:tidorb:" ) ){
                ior = Corbaloc.getIOR( url );
            } else if ( url.startsWith( "corbaloc:ssliop:" )) {
                ior = SSLIOPCorbaloc.getIOR( url );
            } else if ( url.startsWith( "corbaloc:" )) {
                ior = IIOPCorbaloc.getIOR( url );
            } else {
                ior = IIOPIOR.fromString(this.orb, url);
            }
        } catch ( InvalidName in ){
            throw new CommunicationException( "Invalid url: " + in.getMessage(), in );
        }
        delegate = createDelegate( ior );
    } else {
        delegate = null;
    }
    return delegate;
}
 
Example 28
Project: TIDorbJ   File: SSLIOPCorbaloc.java   View source code 6 votes vote down vote up
/**
 * Simulates an usual ObjectKey, that is marshaled in an Encapsulation, but
 * instead, the url ObjectKey is marshaled as a ulong value (the size) and
 * the char array of the string (without the end of string character *.
 * 
 * @param url
 * @return
 * @throws org.omg.CORBA.ORBPackage.InvalidName
 */
private static ObjectKey createKey(String url_key)
    throws org.omg.CORBA.ORBPackage.InvalidName
{

    CDROutputStream output = 
        new CDROutputStream(null,
                            new byte[url_key.length() + CDR.ULONG_SIZE]);

    char[] url_buffer = url_key.toCharArray();

    output.write_ulong(url_buffer.length);
    output.write_char_array(url_buffer, 0, url_buffer.length);

    CDRInputStream input = (CDRInputStream) output.create_input_stream();

    Encapsulation encap = input.readEncapsulation();

    return new ObjectKey(encap);
}
 
Example 29
Project: OpenJSharp   File: DynAnyImpl.java   View source code 5 votes vote down vote up
protected DynAnyFactory factory() {
    try {
        return (DynAnyFactory)orb.resolve_initial_references(
            ORBConstants.DYN_ANY_FACTORY_NAME );
    } catch (InvalidName in) {
        throw new RuntimeException("Unable to find DynAnyFactory");
    }
}
 
Example 30
Project: OpenJSharp   File: ORBImpl.java   View source code 5 votes vote down vote up
/**
 * If this operation is called with an id, <code>"Y"</code>, and an
 * object, <code>YY</code>, then a subsequent call to
 * <code>ORB.resolve_initial_references( "Y" )</code> will
 * return object <code>YY</code>.
 *
 * @param id The ID by which the initial reference will be known.
 * @param obj The initial reference itself.
 * @throws InvalidName if this operation is called with an empty string id
 *     or this operation is called with an id that is already registered,
 *     including the default names defined by OMG.
 * @throws BAD_PARAM if the obj parameter is null.
 */
public void register_initial_reference(
    String id, org.omg.CORBA.Object obj ) throws InvalidName
{
    CorbaServerRequestDispatcher insnd ;

    synchronized (this) {
        checkShutdownState();
    }

    if ((id == null) || (id.length() == 0))
        throw new InvalidName() ;

    synchronized (this) {
        checkShutdownState();
    }

    synchronized (resolverLock) {
        insnd = insNamingDelegate ;

        java.lang.Object obj2 = localResolver.resolve( id ) ;
        if (obj2 != null)
            throw new InvalidName(id + " already registered") ;

        localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
    }

    synchronized (this) {
        if (StubAdapter.isStub(obj))
            // Make all remote object references available for INS.
            requestDispatcherRegistry.registerServerRequestDispatcher(
                insnd, id ) ;
    }
}
 
Example 31
Project: openjdk-jdk10   File: DynAnyImpl.java   View source code 5 votes vote down vote up
protected DynAnyFactory factory() {
    try {
        return (DynAnyFactory)orb.resolve_initial_references(
            ORBConstants.DYN_ANY_FACTORY_NAME );
    } catch (InvalidName in) {
        throw new RuntimeException("Unable to find DynAnyFactory");
    }
}
 
Example 32
Project: openjdk-jdk10   File: ORBImpl.java   View source code 5 votes vote down vote up
/**
 * If this operation is called with an id, <code>"Y"</code>, and an
 * object, <code>YY</code>, then a subsequent call to
 * <code>ORB.resolve_initial_references( "Y" )</code> will
 * return object <code>YY</code>.
 *
 * @param id The ID by which the initial reference will be known.
 * @param obj The initial reference itself.
 * @throws InvalidName if this operation is called with an empty string id
 *     or this operation is called with an id that is already registered,
 *     including the default names defined by OMG.
 * @throws BAD_PARAM if the obj parameter is null.
 */
public void register_initial_reference(
    String id, org.omg.CORBA.Object obj ) throws InvalidName
{
    CorbaServerRequestDispatcher insnd ;

    synchronized (this) {
        checkShutdownState();
    }

    if ((id == null) || (id.length() == 0))
        throw new InvalidName() ;

    synchronized (this) {
        checkShutdownState();
    }

    synchronized (resolverLock) {
        insnd = insNamingDelegate ;

        java.lang.Object obj2 = localResolver.resolve( id ) ;
        if (obj2 != null)
            throw new InvalidName(id + " already registered") ;

        localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
    }

    synchronized (this) {
        if (StubAdapter.isStub(obj))
            // Make all remote object references available for INS.
            requestDispatcherRegistry.registerServerRequestDispatcher(
                insnd, id ) ;
    }
}
 
Example 33
Project: openjdk9   File: DynAnyImpl.java   View source code 5 votes vote down vote up
protected DynAnyFactory factory() {
    try {
        return (DynAnyFactory)orb.resolve_initial_references(
            ORBConstants.DYN_ANY_FACTORY_NAME );
    } catch (InvalidName in) {
        throw new RuntimeException("Unable to find DynAnyFactory");
    }
}
 
Example 34
Project: openjdk9   File: ORBImpl.java   View source code 5 votes vote down vote up
/**
 * If this operation is called with an id, <code>"Y"</code>, and an
 * object, <code>YY</code>, then a subsequent call to
 * <code>ORB.resolve_initial_references( "Y" )</code> will
 * return object <code>YY</code>.
 *
 * @param id The ID by which the initial reference will be known.
 * @param obj The initial reference itself.
 * @throws InvalidName if this operation is called with an empty string id
 *     or this operation is called with an id that is already registered,
 *     including the default names defined by OMG.
 * @throws BAD_PARAM if the obj parameter is null.
 */
public void register_initial_reference(
    String id, org.omg.CORBA.Object obj ) throws InvalidName
{
    CorbaServerRequestDispatcher insnd ;

    synchronized (this) {
        checkShutdownState();
    }

    if ((id == null) || (id.length() == 0))
        throw new InvalidName() ;

    synchronized (this) {
        checkShutdownState();
    }

    synchronized (resolverLock) {
        insnd = insNamingDelegate ;

        java.lang.Object obj2 = localResolver.resolve( id ) ;
        if (obj2 != null)
            throw new InvalidName(id + " already registered") ;

        localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
    }

    synchronized (this) {
        if (StubAdapter.isStub(obj))
            // Make all remote object references available for INS.
            requestDispatcherRegistry.registerServerRequestDispatcher(
                insnd, id ) ;
    }
}
 
Example 35
Project: lookaside_java-1.8.0-openjdk   File: DynAnyImpl.java   View source code 5 votes vote down vote up
protected DynAnyFactory factory() {
    try {
        return (DynAnyFactory)orb.resolve_initial_references(
            ORBConstants.DYN_ANY_FACTORY_NAME );
    } catch (InvalidName in) {
        throw new RuntimeException("Unable to find DynAnyFactory");
    }
}
 
Example 36
Project: lookaside_java-1.8.0-openjdk   File: ORBImpl.java   View source code 5 votes vote down vote up
/**
 * If this operation is called with an id, <code>"Y"</code>, and an
 * object, <code>YY</code>, then a subsequent call to
 * <code>ORB.resolve_initial_references( "Y" )</code> will
 * return object <code>YY</code>.
 *
 * @param id The ID by which the initial reference will be known.
 * @param obj The initial reference itself.
 * @throws InvalidName if this operation is called with an empty string id
 *     or this operation is called with an id that is already registered,
 *     including the default names defined by OMG.
 * @throws BAD_PARAM if the obj parameter is null.
 */
public void register_initial_reference(
    String id, org.omg.CORBA.Object obj ) throws InvalidName
{
    CorbaServerRequestDispatcher insnd ;

    synchronized (this) {
        checkShutdownState();
    }

    if ((id == null) || (id.length() == 0))
        throw new InvalidName() ;

    synchronized (this) {
        checkShutdownState();
    }

    synchronized (resolverLock) {
        insnd = insNamingDelegate ;

        java.lang.Object obj2 = localResolver.resolve( id ) ;
        if (obj2 != null)
            throw new InvalidName(id + " already registered") ;

        localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
    }

    synchronized (this) {
        if (StubAdapter.isStub(obj))
            // Make all remote object references available for INS.
            requestDispatcherRegistry.registerServerRequestDispatcher(
                insnd, id ) ;
    }
}
 
Example 37
Project: jdk8u_corba   File: DynAnyImpl.java   View source code 5 votes vote down vote up
protected DynAnyFactory factory() {
    try {
        return (DynAnyFactory)orb.resolve_initial_references(
            ORBConstants.DYN_ANY_FACTORY_NAME );
    } catch (InvalidName in) {
        throw new RuntimeException("Unable to find DynAnyFactory");
    }
}
 
Example 38
Project: jdk8u_corba   File: ORBImpl.java   View source code 5 votes vote down vote up
/**
 * If this operation is called with an id, <code>"Y"</code>, and an
 * object, <code>YY</code>, then a subsequent call to
 * <code>ORB.resolve_initial_references( "Y" )</code> will
 * return object <code>YY</code>.
 *
 * @param id The ID by which the initial reference will be known.
 * @param obj The initial reference itself.
 * @throws InvalidName if this operation is called with an empty string id
 *     or this operation is called with an id that is already registered,
 *     including the default names defined by OMG.
 * @throws BAD_PARAM if the obj parameter is null.
 */
public void register_initial_reference(
    String id, org.omg.CORBA.Object obj ) throws InvalidName
{
    CorbaServerRequestDispatcher insnd ;

    synchronized (this) {
        checkShutdownState();
    }

    if ((id == null) || (id.length() == 0))
        throw new InvalidName() ;

    synchronized (this) {
        checkShutdownState();
    }

    synchronized (resolverLock) {
        insnd = insNamingDelegate ;

        java.lang.Object obj2 = localResolver.resolve( id ) ;
        if (obj2 != null)
            throw new InvalidName(id + " already registered") ;

        localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
    }

    synchronized (this) {
        if (StubAdapter.isStub(obj))
            // Make all remote object references available for INS.
            requestDispatcherRegistry.registerServerRequestDispatcher(
                insnd, id ) ;
    }
}
 
Example 39
Project: javify   File: ServantDelegateImpl.java   View source code 5 votes vote down vote up
/**
 * Return the ORB's default POA.
 */
public POA default_POA(Servant a_servant)
{
  same(a_servant);
  try
    {
      return POAHelper.narrow(orb(a_servant).resolve_initial_references("RootPOA"));
    }
  catch (InvalidName ex)
    {
      throw new Unexpected(ex);
    }
}
 
Example 40
Project: jvm-stm   File: ServantDelegateImpl.java   View source code 5 votes vote down vote up
/**
 * Return the ORB's default POA.
 */
public POA default_POA(Servant a_servant)
{
  same(a_servant);
  try
    {
      return POAHelper.narrow(orb(a_servant).resolve_initial_references("RootPOA"));
    }
  catch (InvalidName ex)
    {
      throw new Unexpected(ex);
    }
}