Package javax.rmi.CORBA

Examples of javax.rmi.CORBA.Stub


      else if (container instanceof EntityContainer)
         me = (EJBObject) getEntityEJBObject(mi.getId());
      else
         return false;
     
      Stub meStub = (Stub) me;
      Stub otherStub = (Stub) other;
      return meStub._is_equivalent(otherStub);
   }
View Full Code Here


                ObjectImpl objectImpl = (ObjectImpl) object;
                objectImpl._get_delegate();
            } catch (BAD_OPERATION e) {
                try {
                    // Reconnect
                    final Stub stub = (Stub) object;
                    final ORB orb = (ORB) new InitialContext().lookup("java:comp/ORB");
                    stub.connect(orb);
                } catch (NamingException ne) {
                    throw EjbLogger.EJB3_LOGGER.failedToLookupORB();
                }
            }
        } else {
View Full Code Here

         return (EJBObject) PortableRemoteObject.narrow(obj, EJBObject.class);

      // Create the stub from the stub class
      try
      {
         Stub stub = (Stub) stubClass.newInstance();
         stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate());
         return (EJBObject) stub;
      }
      catch (Exception e)
      {
         throw new RemoteException("Error creating stub", e);
View Full Code Here

                    case OBJECT:
                        clazz = (Class) in.readObject();
                        obj = in.readObject();
                        if (obj instanceof Stub) {
                            final Stub stub = (Stub) obj;
                            final ORB orb = getORB();
                            stub.connect(orb);
                        }
                        break;
                    default:
                        throw new IOException("Unkown data type: " + type);
                }
View Full Code Here

         catch (BAD_OPERATION e)
         {
            try
            {
               // Reconnect
               Stub stub = (Stub) object;
               ORB orb = (ORB) new InitialContext().lookup("java:comp/ORB");
               stub.connect(orb);
            }
            catch (NamingException ne)
            {
               throw new IOException("Unable to lookup java:comp/ORB");
            }
View Full Code Here

    public ObjRepServer(String [] args) throws Exception
    {
        ORB orb;
        Object objref;
        IPing pinger;
        Stub stub;

        Remote remObj;

        orb = ORB.init(args, null);

        pinger = new PingImpl();

        remObj = new RemoteIPingImpl(pinger);

        POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

        Servant servant = (Servant) Util.getTie(remObj);

        byte[] objID = rootPOA.activate_object (servant );

        rootPOA.the_POAManager().activate();

        stub = TestUtils.toStub(remObj, rootPOA.id_to_reference(objID), RemoteIPing.class);

        objref = stub._duplicate();

        System.out.println("SERVER IOR: " +  orb.object_to_string(objref));
        System.out.flush();

        orb.run();
View Full Code Here

            final String repoID = ids[i];
            final String stubClazzName = newRMIStubName(repoID);

            try
            {
                final Stub stub = newStub(stubClazzName, obj.getClass());

                stub._set_delegate(thisObject._get_delegate());

                return (Remote) stub;
            } catch (ClassNotFoundException e)
            {
                // ignored
View Full Code Here

            final String repoID = ids[i];
            final String stubClazzName = newRMIStubName(repoID);

            try
            {
                final Stub stub = newStub(stubClazzName, obj.getClass());

                stub._set_delegate(thisObject._get_delegate());

                return (Remote) stub;
            } catch (ClassNotFoundException e)
            {
                // ignored
View Full Code Here

        proxyStubClass = stubClass;
    }

    private static RMIConnection shadowIiopStub(Stub stub)
            throws InstantiationException, IllegalAccessException {
        Stub proxyStub = (Stub) proxyStubClass.newInstance();
        proxyStub._set_delegate(stub._get_delegate());
        return (RMIConnection) proxyStub;
    }
View Full Code Here

                    case OBJECT:
                        clazz = (Class) in.readObject();
                        obj = in.readObject();
                        if (obj instanceof Stub) {
                            final Stub stub = (Stub) obj;
                            final ORB orb = getORB();
                            stub.connect(orb);
                        }
                        break;
                    default:
                        throw new IOException("Unkown data type: " + type);
                }
View Full Code Here

TOP

Related Classes of javax.rmi.CORBA.Stub

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.