Package javax.ejb

Examples of javax.ejb.EJBObject


                        // If we didn't get any arguments then the parts aren't compatible with the ctor
                        if (compatibleArguments == null)
                            break;
                        // Parts are compatible so invoke the ctor with the compatible set
                       
                        EJBObject obj = fieldPort.getEjbObject();
                        Trc.event(
                            this,
                            "Invoking EJB method ",
                            methods[a],
                            " object ",
View Full Code Here


            Class[] sig, Object[] args) throws NamingException, RemoteException,
            IllegalArgumentException, IllegalAccessException,
            InvocationTargetException, NoSuchMethodException {
        EJBHome home = EJBUtil.lookupEJBHome(homeClass, jndiName);
        EJBMetaData md = home.getEJBMetaData();
        EJBObject remote = (EJBObject)
        invoke(homeClass, home, "create", null, null);
        Class remoteClass = md.getRemoteInterfaceClass();

        return invoke(remoteClass, remote, method, sig, args);
    }
View Full Code Here

      }

      @Override
      protected EJBObject getEjbObjectViaInvoker() throws Exception
      {
         EJBObject ejbObject = super.getEjbObjectViaInvoker();
         gotEjbObjectViaInvoker = true;
         return ejbObject;
      }
View Full Code Here

      }

      @Override
      protected EJBObject getEjbObjectViaJndi() throws RemoteException
      {
         EJBObject ejbObject = super.getEjbObjectViaJndi();
         gotEjbObjectViaJndi = true;
         return ejbObject;
      }
View Full Code Here

        return EJB;
    }

    public Remote getRemoteObject(ImmutableEndpoint endpoint) throws RemoteException, UnknownHostException
    {
        EJBObject remoteObj;

        try
        {
            Object ref = getRemoteRef(endpoint);
View Full Code Here

   * <p>Alternatively, override getSessionBeanInstance and
   * releaseSessionBeanInstance to change EJB instance creation,
   * for example to hold a single shared EJB instance.
   */
  protected Object doInvoke(MethodInvocation invocation) throws Throwable {
    EJBObject ejb = null;
    try {
      ejb = getSessionBeanInstance();
      return RmiClientInterceptorUtils.doInvoke(invocation, ejb);
    }
    catch (NamingException ex) {
View Full Code Here

        } else if( methodName.equals("isIdentical") ) {

            // boolean isIdentical(EJBObject)
            // Convert the param into an EJBObject.          
            EJBObject other = (EJBObject) args[0];

            returnValue = new Boolean(super.isIdentical(other));

        } else if( methodName.equals("remove") ) {
View Full Code Here

        Assert.assertNotNull(ejbHome);

        Handle handle = session.getHandle();
        Assert.assertNotNull(handle);

        EJBObject ejbObject = handle.getEJBObject();
        Assert.assertNotNull(ejbObject);

        ejbHome = ejbObject.getEJBHome();
        Assert.assertNotNull(ejbHome);

        Handle handle1 = ejbObject.getHandle();
        Assert.assertNotNull(handle1);

        StatefulSession30 session1 = (StatefulSession30) home.create();
        Assert.assertFalse(session.isIdentical(session1));
        Assert.assertTrue(session.isIdentical(session));
View Full Code Here

        Assert.assertNotNull(ejbHome);

        Handle handle = session.getHandle();
        Assert.assertNotNull(handle);

        EJBObject ejbObject = handle.getEJBObject();
        Assert.assertNotNull(ejbObject);

        ejbHome = ejbObject.getEJBHome();
        Assert.assertNotNull(ejbHome);

        Handle handle1 = ejbObject.getHandle();
        Assert.assertNotNull(handle1);

        Session30 session1 = (Session30) home.create();
        Assert.assertTrue(session.isIdentical(session1));
    }
View Full Code Here

        ejbObjImpl.setContext(context);

        // connect the EJBObject to the ProtocolManager
        // (creates the client-side stub too)
        byte[] sessionOID = uuidGenerator.keyToByteArray(sessionKey);
        EJBObject ejbStub = (EJBObject)
                remoteHomeRefFactory.createRemoteReference(sessionOID);

        context.setEJBStub(ejbStub);
        ejbObjImpl.setStub(ejbStub);
View Full Code Here

TOP

Related Classes of javax.ejb.EJBObject

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.