Package org.apache.openejb

Examples of org.apache.openejb.RpcContainer.invoke()


                                }
                            } else {
                                try {
                                    Object handleKey = handle.getPrimaryKey();
                                    RpcContainer container = (RpcContainer) ejbDeployment.getContainer();
                                    result = container.invoke(ejbDeployment.getDeploymentId(), method, arguments, handleKey, null);
                                } catch (OpenEJBException e) {
                                    Throwable cause = e.getCause();
                                    if (cause instanceof Exception) {
                                        Exception exception = (Exception) cause;
                                        return Util.writeUserException(method, reply, exception);
View Full Code Here


                        throw new UnsupportedOperationException("unknown method: " + method);
                    }
                } else {
                    try {
                        RpcContainer container = (RpcContainer) ejbDeployment.getContainer();
                        result = container.invoke(ejbDeployment.getDeploymentId(), method, arguments, primaryKey, null);
                        // some methods like create() or find* return ProxyInfo objects.  We need to
                        // turn those into real EJB remote references.
                        if (result instanceof ProxyInfo || method.getName().startsWith("find")) {
                            result = createProxy(result);                   
                        }
View Full Code Here

       
        //This assumes that we are on the ultimate execution thread
        ThreadContextMigratorUtil.performMigrationToThread(Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID,
                                                           axisMsgCtx);       
        try {
            Object res = container.invoke(this.deploymentInfo.getDeploymentID(), InterfaceType.SERVICE_ENDPOINT, callInterface, method, arguments, null);
            // TODO: update response message with new response value?
        } catch (ApplicationException e) {
            if (e.getCause() instanceof AxisFault) {
                throw (AxisFault)e.getCause();
            } else {
View Full Code Here

            RpcContainer container = (RpcContainer) this.deploymentInfo.getContainer();

            Class callInterface = this.deploymentInfo.getServiceEndpointInterface();
            method = getMostSpecificMethod(method, callInterface);
            Object res = container.invoke(this.deploymentInfo.getDeploymentID(), InterfaceType.SERVICE_ENDPOINT, callInterface, method, arguments, null);

            if (exchange.isOneWay()) {
                return null;
            }
View Full Code Here

                                }
                            } else {
                                try {
                                    Object handleKey = handle.getPrimaryKey();
                                    RpcContainer container = (RpcContainer) ejbDeployment.getContainer();
                                    result = container.invoke(ejbDeployment.getDeploymentId(), interfaceType, method.getDeclaringClass(), method, arguments, handleKey);
                                } catch (OpenEJBException e) {
                                    Throwable cause = e.getCause();
                                    if (cause instanceof Exception) {
                                        Exception exception = (Exception) cause;
                                        return Util.writeUserException(method, reply, exception);
View Full Code Here

                        throw new UnsupportedOperationException("unknown method: " + method);
                    }
                } else {
                    try {
                        RpcContainer container = (RpcContainer) ejbDeployment.getContainer();
                        result = container.invoke(ejbDeployment.getDeploymentId(), interfaceType, method.getDeclaringClass(), method, arguments, primaryKey);
                        // some methods like create() or find* return ProxyInfo objects.  We need to
                        // turn those into real EJB remote references.
                        if (result instanceof ProxyInfo || method.getName().startsWith("find")) {
                            result = createProxy(result);
                        }
View Full Code Here

            RpcContainer container = (RpcContainer) this.beanContext.getContainer();

            Class callInterface = this.beanContext.getServiceEndpointInterface();
            method = getMostSpecificMethod(method, callInterface);
            Object res = container.invoke(this.beanContext.getDeploymentID(), InterfaceType.SERVICE_ENDPOINT, callInterface, method, arguments, null);

            if (exchange.isOneWay()) {
                return null;
            }
View Full Code Here

        //This assumes that we are on the ultimate execution thread
        ThreadContextMigratorUtil.performMigrationToThread(Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID,
                                                           axisMsgCtx);
        try {
            Object res = container.invoke(this.beanContext.getDeploymentID(), InterfaceType.SERVICE_ENDPOINT, callInterface, method, arguments, null);
            // TODO: update response message with new response value?
        } catch (ApplicationException e) {
            if (e.getCause() instanceof AxisFault) {
                throw (AxisFault)e.getCause();
            } else {
View Full Code Here

            final EJBDSerializer serializer = daemon.getSerializer();
            if (serializer != null) {
                req.setSerializer(serializer);
            }

            Object result = c.invoke(
                req.getDeploymentId(),
                InterfaceType.EJB_OBJECT,
                req.getInterfaceClass(),
                req.getMethodInstance(),
                req.getMethodParameters(),
View Full Code Here

    protected void doEjbHome_METHOD(final EJBRequest req, final EJBResponse res) throws Exception {

        final CallContext call = CallContext.getCallContext();
        final RpcContainer c = (RpcContainer) call.getBeanContext().getContainer();

        final Object result = c.invoke(
            req.getDeploymentId(),
            InterfaceType.EJB_HOME,
            req.getInterfaceClass(),
            req.getMethodInstance(),
            req.getMethodParameters(),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.