Package javax.rmi.CORBA

Examples of javax.rmi.CORBA.Tie


                if (del.orb(stub) != orb)
                    throw wrapper.connectWrongOrb() ;
            } catch (org.omg.CORBA.BAD_OPERATION err) {
                if (ior == null) {
                    // No IOR, can we get a Tie for this stub?
                    Tie tie = (javax.rmi.CORBA.Tie) Utility.getAndForgetTie(proxy);
                    if (tie == null)
                        throw wrapper.connectNoTie() ;

                    // Is the tie already connected?  If it is, check that it's
                    // connected to the same ORB, otherwise connect it.
                    ORB existingOrb = orb ;
                    try {
                        existingOrb = tie.orb();
                    } catch (BAD_OPERATION exc) {
                        // Thrown when tie is an ObjectImpl and its delegate is not set.
                        tie.orb(orb);
                    } catch (BAD_INV_ORDER exc) {
                        // Thrown when tie is a Servant and its delegate is not set.
                        tie.orb(orb);
                    }

                    if (existingOrb != orb)
                        throw wrapper.connectTieWrongOrb() ;
View Full Code Here


  if (stub instanceof DynamicStub)
      return ((DynamicStub)stub).getDelegate() ;
  else if (stub instanceof ObjectImpl)
      return ((ObjectImpl)stub)._get_delegate() ;
  else if (stub instanceof Tie) {
      Tie tie = (Tie)stub ;
      org.omg.CORBA.Object ref = activateTie( tie ) ;
      return getDelegate( ref ) ;
  } else
      throw wrapper.getDelegateRequiresStub() ;
    }
View Full Code Here

            return obj;
        }

        if (obj instanceof Remote) {
            Remote remoteObj = (Remote)obj;
            Tie theTie = Util.getTie(remoteObj);
            if (theTie != null) {
                try {
                    theTie.orb();
                } catch (SystemException okay) {
                    theTie.orb(orb);
                }

                if (convertToStub) {
                    Object result = loadStub(theTie,null,null,true);
                    if (result != null) {
View Full Code Here

    /*
     * Get a new instance of an RMI-IIOP Tie for the
     * given server object.
     */
    public static Tie loadTie(Remote obj) {
        Tie result = null;
        Class objClass = obj.getClass();

        // Have we tried to find this guy before?

        synchronized (tieCache) {
View Full Code Here

        java.util.Map tie_map = tie_map();

        if (tie_map == null)
            return;

        Tie tie = (Tie) tie_map.remove(obj);

        if (tie == null) {
            logger.fine("unexporting unknown instance of "
                    + obj.getClass().getName() + " from "
                    + RMIState.current().getName());
            return;
        } else {
            logger.finer("unexporting instance of " + obj.getClass().getName()
                    + " from " + RMIState.current().getName());
        }

        tie.deactivate();
    }
View Full Code Here

            state.checkShutDown();
        } catch (BAD_INV_ORDER ex) {
            throw new RemoteException("RMIState is deactivated", ex);
        }

        Tie tie = javax.rmi.CORBA.Util.getTie(obj);

        if (tie != null)
            throw new java.rmi.RemoteException("object already exported");

        RMIServant servant = new RMIServant(state);
View Full Code Here

  throws RemoteException {
        try {
      SerialContextProviderImpl impl =
    new RemoteSerialContextProviderImpl(rootContext);

            Tie servantsTie = javax.rmi.CORBA.Util.getTie(impl);
           
            //servantsTie.orb(ORBManager.getORB());
            //org.omg.CORBA.Object provider = servantsTie.thisObject());

      // Create a CORBA objref for SerialContextProviderImpl using a POA
View Full Code Here

        throws Exception
    {
  try {
      DeploymentSession ds = new DeploymentSessionImpl();
      PortableRemoteObject.exportObject(ds);
      Tie servantsTie = javax.rmi.CORBA.Util.getTie(ds);
      servantsTie.orb(ORBManager.getORB());
      return ds;
  } catch (Throwable t) {
      throw new ServerException(localStrings.getLocalString(
    "enterprise.tools.deployment.main.couldnotgetorbforserver",
    "Couldn't get orb for ({0}) {1}",
View Full Code Here

        throws Exception
    {
  try {
      ServerListener listener = new ServerListener(this);
      PortableRemoteObject.exportObject(listener);
      Tie servantsTie = javax.rmi.CORBA.Util.getTie(listener);
      servantsTie.orb(ORBManager.getORB());
      return listener;
  } catch (Throwable t) {
      throw new ServerException(localStrings.getLocalString(
    "enterprise.tools.deployment.main.couldnotgetorbforserver",
    "Couldn't get orb for ({0}) {1}",
View Full Code Here

    protected void exportObject(java.rmi.Remote remote)
    throws java.rmi.RemoteException {
        // create servant and tie
        PortableRemoteObject.exportObject(remote);
        Tie servantsTie = javax.rmi.CORBA.Util.getTie(remote);

        // Note: at this point the Tie doesnt have a delegate inside it,
        // so it is not really "exported".
        // The following call does orb.connect() which is the real exporting
        servantsTie.orb(orb);
    }
View Full Code Here

TOP

Related Classes of javax.rmi.CORBA.Tie

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.