Package org.apache.openejb

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


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

        CallContext call = CallContext.getCallContext();
        RpcContainer c = (RpcContainer) call.getDeploymentInfo().getContainer();

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


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

        CallContext call = CallContext.getCallContext();
        RpcContainer c = (RpcContainer) call.getDeploymentInfo().getContainer();

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

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

        CallContext call = CallContext.getCallContext();
        RpcContainer c = (RpcContainer) call.getDeploymentInfo().getContainer();

        Object result = c.invoke(req.getDeploymentId(),
                req.getInterfaceClass(), req.getMethodInstance(),
                req.getMethodParameters(),
                req.getPrimaryKey()
        );
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(), callInterface, method, arguments, null);

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

        // perform an invocation
        RpcContainer container = (RpcContainer) deploymentInfo.getContainer();

        Method echoMethod = EchoServiceEndpoint.class.getMethod("echo", String.class);

        String value = (String) container.invoke("EchoBean", echoMethod.getDeclaringClass(), echoMethod, args, null);

        assertCalls(Call.values());
        calls.clear();
        assertEquals("Hello world" , value);
       
View Full Code Here

                // call the timeout method
                try {
                    RpcContainer container = (RpcContainer) deployment.getContainer();
                    Method ejbTimeout = deployment.getEjbTimeout();
                    container.invoke(deployment.getDeploymentID(), ejbTimeout.getDeclaringClass(), ejbTimeout, new Object[] {timer}, timerData.getPrimaryKey());
                } catch (RuntimeException e) {
                    // exception from a timer does not necessairly mean failure
                    log.warning("RuntimeException from ejbTimeout on " + deployment.getDeploymentID(), e);
                } catch (OpenEJBException e) {
                    log.warning("Exception from ejbTimeout on " + deployment.getDeploymentID(), e);
View Full Code Here

        @Override
        public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
            final BeanContext beanContext = getBeanContext();
            final RpcContainer container = RpcContainer.class.cast(beanContext.getContainer());

            return container.invoke(beanContext.getDeploymentID(),
                beanContext.getInterfaceType(method.getDeclaringClass()),
                method.getDeclaringClass(), method, args, null);
        }

View Full Code Here

                    if (ejbTimeout == null) {
                        return;
                    }

                    SetAccessible.on(ejbTimeout);
                    container.invoke(deployment.getDeploymentID(),
                        InterfaceType.TIMEOUT,
                        ejbTimeout.getDeclaringClass(),
                        ejbTimeout,
                        new Object[]{timer},
                        timerData.getPrimaryKey());
View Full Code Here

        // perform an invocation
        final RpcContainer container = (RpcContainer) beanContext.getContainer();

        final Method echoMethod = EchoServiceEndpoint.class.getMethod("echo", String.class);

        final String value = (String) container.invoke("EchoBean", InterfaceType.SERVICE_ENDPOINT, echoMethod.getDeclaringClass(), echoMethod, args, null);

        assertCalls(Call.values());
        calls.clear();
        assertEquals("Hello world", value);
View Full Code Here

        // perform an invocation
        final RpcContainer container = (RpcContainer) beanContext.getContainer();

        final Method echoMethod = EchoServiceEndpoint.class.getMethod("echo", String.class);

        final String value = (String) container.invoke("EchoBean", InterfaceType.SERVICE_ENDPOINT, echoMethod.getDeclaringClass(), echoMethod, args, null);

        assertCalls(Call.values());
        calls.clear();
        assertEquals("Hello world", value);
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.