Package org.apache.openejb.core

Examples of org.apache.openejb.core.Operation


        super(securityService, userTransaction);
    }

    @Override
    public void check(Call call) {
        final Operation operation = ThreadContext.getThreadContext().getCurrentOperation();
        switch (call) {
            case getCallerPrincipal:
            case isCallerInRole:
            case getUserTransaction:
            case getTimerService:
View Full Code Here


        throw new IllegalStateException();
    }

    @Override
    public void check(Call call) {
        final Operation operation = ThreadContext.getThreadContext().getCurrentOperation();

        switch (call) {
            case getUserTransaction:
            case getTimerService:
            case getContextData:
View Full Code Here

        super(securityService);
    }

    @Override
    public void check(Call call) {
        final Operation operation = ThreadContext.getThreadContext().getCurrentOperation();

        switch (call) {
            case getEJBLocalObject:
            case getEJBObject:
            case getBusinessObject:
View Full Code Here

            final InstanceContext context = beanContext.newInstance();

            if (context.getBean() instanceof SessionBean){

                final Operation originalOperation = callContext.getCurrentOperation();
                try {
                    callContext.setCurrentOperation(Operation.CREATE);
                    final Method create = beanContext.getCreateMethod();
                    final InterceptorStack ejbCreate = new InterceptorStack(context.getBean(), create, Operation.CREATE, new ArrayList<InterceptorData>(), new HashMap());
                    ejbCreate.invoke();
View Full Code Here

        ThreadContext threadContext = ThreadContext.getThreadContext();
        return threadContext.getPrimaryKey();
    }

    public void check(Call call) {
        final Operation operation = ThreadContext.getThreadContext().getCurrentOperation();
        switch (call) {
            case getUserTransaction:
            case getContextData:
                throw illegal(call, operation);
            case getPrimaryKey:
View Full Code Here

        super(securityService, userTransaction);
    }

    @Override
    public void check(final Call call) {
        final Operation operation = ThreadContext.getThreadContext().getCurrentOperation();
        switch (call) {
            case getCallerPrincipal:
            case isCallerInRole:
            case getUserTransaction:
            case getTimerService:
View Full Code Here

        throw new InvalidateReferenceException(re);

    }

    protected void logSystemException(Throwable sysException, TransactionContext context) {
        Operation operation = context.callContext.getCurrentOperation();
        if (operation.isCallback()){
            logger.error("startup.beanInstanceSystemExceptionThrown", sysException, sysException.getMessage());
        } else {
            logger.debug("startup.beanInstanceSystemExceptionThrown", sysException, sysException.getMessage());
        }
    }
View Full Code Here

                instanceCount--;
            }
        }

        ThreadContext callContext = ThreadContext.getThreadContext();
        Operation originalOperation = callContext.getCurrentOperation();
        BaseContext.State[] originalAllowedStates = callContext.getCurrentAllowedStates();
        try {
            // call post destroy method
            callContext.setCurrentOperation(Operation.PRE_DESTROY);
            callContext.setCurrentAllowedStates(MdbContext.getStates());
View Full Code Here

        }

        // remember the return value or exception so it can be logged
        Object returnValue = null;
        OpenEJBException openEjbException = null;
        Operation oldOperation = callContext.getCurrentOperation();
        callContext.setCurrentOperation(Operation.BUSINESS);
        BaseContext.State[] originalStates = callContext.setCurrentAllowedStates(MdbContext.getStates());
        try {
            if (logger.isInfoEnabled()) {
                logger.info("invoking method " + method.getName() + " on " + deployInfo.getDeploymentID());
View Full Code Here

    protected MdbContext(TransactionManager transactionManager, SecurityService securityService, UserTransaction userTransaction) {
        super(transactionManager, securityService, userTransaction);
    }

    protected State getState() {
        Operation operation = ThreadContext.getThreadContext().getCurrentOperation();
        State state = states[operation.ordinal()];

        if (state == null) throw new IllegalArgumentException("Invalid operation " + operation + " for this context");

        return state;
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.core.Operation

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.