Package org.glassfish.ejb.deployment.descriptor

Examples of org.glassfish.ejb.deployment.descriptor.TimeoutValueDescriptor


        appendTextChild(ejbNode, EjbTagNames.SESSION_TYPE, ejbDesc.getSessionType());

        if( ejbDesc.hasStatefulTimeout() ) {

            TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(ejbDesc.getStatefulTimeoutValue());
            timeoutDesc.setUnit(ejbDesc.getStatefulTimeoutUnit());
            timeoutValueNode.writeDescriptor(ejbNode, EjbTagNames.STATEFUL_TIMEOUT,
                timeoutDesc);
           
        }

        MethodNode methodNode = new MethodNode();

        if( ejbDesc.isTimedObject() ) {
            if (ejbDesc.getEjbTimeoutMethod() != null) {

                methodNode.writeJavaMethodDescriptor
                        (ejbNode, EjbTagNames.TIMEOUT_METHOD,
                         ejbDesc.getEjbTimeoutMethod());
            }

            for ( ScheduledTimerDescriptor timerDesc : ejbDesc.getScheduledTimerDescriptors()) {
                ScheduledTimerNode timerNode = new ScheduledTimerNode();
                timerNode.writeDescriptor(ejbNode, EjbTagNames.TIMER, timerDesc);
            }
        }

        if( ejbDesc.isSingleton() ) {
            appendTextChild(ejbNode, EjbTagNames.INIT_ON_STARTUP,
                Boolean.toString(ejbDesc.getInitOnStartup()));
        }

        if( !ejbDesc.isStateless() ) {
            appendTextChild(ejbNode, EjbTagNames.CONCURRENCY_MANAGEMENT_TYPE,
                    ejbDesc.getConcurrencyManagementType().toString());
        }

        for(EjbSessionDescriptor.AccessTimeoutHolder next : ejbDesc.getAccessTimeoutInfo()) {
            ConcurrentMethodDescriptor cDesc = new ConcurrentMethodDescriptor();
            cDesc.setConcurrentMethod(next.method);
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(next.value);
            timeoutDesc.setUnit(next.unit);
            cDesc.setAccessTimeout(timeoutDesc);

            ConcurrentMethodNode cNode = new ConcurrentMethodNode();
            cNode.writeDescriptor(ejbNode, EjbTagNames.CONCURRENT_METHOD, cDesc);
        }
View Full Code Here


        appendTextChild(ejbNode, EjbTagNames.SESSION_TYPE, ejbDesc.getSessionType());

        if (ejbDesc.hasStatefulTimeout()) {

            TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(ejbDesc.getStatefulTimeoutValue());
            timeoutDesc.setUnit(ejbDesc.getStatefulTimeoutUnit());
            timeoutValueNode.writeDescriptor(ejbNode, EjbTagNames.STATEFUL_TIMEOUT,
                    timeoutDesc);

        }

        MethodNode methodNode = new MethodNode();

        if (ejbDesc.isTimedObject()) {
            if (ejbDesc.getEjbTimeoutMethod() != null) {

                methodNode.writeJavaMethodDescriptor
                        (ejbNode, EjbTagNames.TIMEOUT_METHOD,
                                ejbDesc.getEjbTimeoutMethod());
            }

            for (ScheduledTimerDescriptor timerDesc : ejbDesc.getScheduledTimerDescriptors()) {
                ScheduledTimerNode timerNode = new ScheduledTimerNode();
                timerNode.writeDescriptor(ejbNode, EjbTagNames.TIMER, timerDesc);
            }
        }

        if (ejbDesc.isSingleton()) {
            appendTextChild(ejbNode, EjbTagNames.INIT_ON_STARTUP,
                    Boolean.toString(ejbDesc.getInitOnStartup()));
        }

        if (!ejbDesc.isStateless()) {
            appendTextChild(ejbNode, EjbTagNames.CONCURRENCY_MANAGEMENT_TYPE,
                    ejbDesc.getConcurrencyManagementType().toString());
        }

        for (EjbSessionDescriptor.AccessTimeoutHolder next : ejbDesc.getAccessTimeoutInfo()) {
            ConcurrentMethodDescriptor cDesc = new ConcurrentMethodDescriptor();
            cDesc.setConcurrentMethod(next.method);
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(next.value);
            timeoutDesc.setUnit(next.unit);
            cDesc.setAccessTimeout(timeoutDesc);

            ConcurrentMethodNode cNode = new ConcurrentMethodNode();
            cNode.writeDescriptor(ejbNode, EjbTagNames.CONCURRENT_METHOD, cDesc);
        }
View Full Code Here

        appendTextChild(ejbNode, EjbTagNames.SESSION_TYPE, ejbDesc.getSessionType());

        if (ejbDesc.hasStatefulTimeout()) {

            TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(ejbDesc.getStatefulTimeoutValue());
            timeoutDesc.setUnit(ejbDesc.getStatefulTimeoutUnit());
            timeoutValueNode.writeDescriptor(ejbNode, EjbTagNames.STATEFUL_TIMEOUT,
                    timeoutDesc);

        }

        MethodNode methodNode = new MethodNode();

        if (ejbDesc.isTimedObject()) {
            if (ejbDesc.getEjbTimeoutMethod() != null) {

                methodNode.writeJavaMethodDescriptor
                        (ejbNode, EjbTagNames.TIMEOUT_METHOD,
                                ejbDesc.getEjbTimeoutMethod());
            }

            for (ScheduledTimerDescriptor timerDesc : ejbDesc.getScheduledTimerDescriptors()) {
                ScheduledTimerNode timerNode = new ScheduledTimerNode();
                timerNode.writeDescriptor(ejbNode, EjbTagNames.TIMER, timerDesc);
            }
        }

        if (ejbDesc.isSingleton()) {
            appendTextChild(ejbNode, EjbTagNames.INIT_ON_STARTUP,
                    Boolean.toString(ejbDesc.getInitOnStartup()));
        }

        if (!ejbDesc.isStateless()) {
            appendTextChild(ejbNode, EjbTagNames.CONCURRENCY_MANAGEMENT_TYPE,
                    ejbDesc.getConcurrencyManagementType().toString());
        }

        for (EjbSessionDescriptor.AccessTimeoutHolder next : ejbDesc.getAccessTimeoutInfo()) {
            ConcurrentMethodDescriptor cDesc = new ConcurrentMethodDescriptor();
            cDesc.setConcurrentMethod(next.method);
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(next.value);
            timeoutDesc.setUnit(next.unit);
            cDesc.setAccessTimeout(timeoutDesc);

            ConcurrentMethodNode cNode = new ConcurrentMethodNode();
            cNode.writeDescriptor(ejbNode, EjbTagNames.CONCURRENT_METHOD, cDesc);
        }
View Full Code Here

    private TimeoutValueDescriptor descriptor = null;

    @Override
    public TimeoutValueDescriptor getDescriptor() {
        if (descriptor == null) descriptor = new TimeoutValueDescriptor();
        return descriptor;
    }
View Full Code Here

            appendTextChild(concurrentNode, EjbTagNames.CONCURRENT_LOCK, lockType);
        }

        if( desc.hasAccessTimeout() ) {
            TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(desc.getAccessTimeoutValue());
            timeoutDesc.setUnit(desc.getAccessTimeoutUnit());
            timeoutValueNode.writeDescriptor(concurrentNode, EjbTagNames.CONCURRENT_ACCESS_TIMEOUT,
                timeoutDesc);
        }

        return concurrentNode;
View Full Code Here

        appendTextChild(ejbNode, EjbTagNames.SESSION_TYPE, ejbDesc.getSessionType());

        if (ejbDesc.hasStatefulTimeout()) {

            TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(ejbDesc.getStatefulTimeoutValue());
            timeoutDesc.setUnit(ejbDesc.getStatefulTimeoutUnit());
            timeoutValueNode.writeDescriptor(ejbNode, EjbTagNames.STATEFUL_TIMEOUT,
                    timeoutDesc);

        }

        MethodNode methodNode = new MethodNode();

        if (ejbDesc.isTimedObject()) {
            if (ejbDesc.getEjbTimeoutMethod() != null) {

                methodNode.writeJavaMethodDescriptor
                        (ejbNode, EjbTagNames.TIMEOUT_METHOD,
                                ejbDesc.getEjbTimeoutMethod());
            }

            for (ScheduledTimerDescriptor timerDesc : ejbDesc.getScheduledTimerDescriptors()) {
                ScheduledTimerNode timerNode = new ScheduledTimerNode();
                timerNode.writeDescriptor(ejbNode, EjbTagNames.TIMER, timerDesc);
            }
        }

        if (ejbDesc.isSingleton()) {
            appendTextChild(ejbNode, EjbTagNames.INIT_ON_STARTUP,
                    Boolean.toString(ejbDesc.getInitOnStartup()));
        }

        if (!ejbDesc.isStateless()) {
            appendTextChild(ejbNode, EjbTagNames.CONCURRENCY_MANAGEMENT_TYPE,
                    ejbDesc.getConcurrencyManagementType().toString());
        }

        for (EjbSessionDescriptor.AccessTimeoutHolder next : ejbDesc.getAccessTimeoutInfo()) {
            ConcurrentMethodDescriptor cDesc = new ConcurrentMethodDescriptor();
            cDesc.setConcurrentMethod(next.method);
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(next.value);
            timeoutDesc.setUnit(next.unit);
            cDesc.setAccessTimeout(timeoutDesc);

            ConcurrentMethodNode cNode = new ConcurrentMethodNode();
            cNode.writeDescriptor(ejbNode, EjbTagNames.CONCURRENT_METHOD, cDesc);
        }
View Full Code Here

        appendTextChild(ejbNode, EjbTagNames.SESSION_TYPE, ejbDesc.getSessionType());

        if (ejbDesc.hasStatefulTimeout()) {

            TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(ejbDesc.getStatefulTimeoutValue());
            timeoutDesc.setUnit(ejbDesc.getStatefulTimeoutUnit());
            timeoutValueNode.writeDescriptor(ejbNode, EjbTagNames.STATEFUL_TIMEOUT,
                    timeoutDesc);

        }

        MethodNode methodNode = new MethodNode();

        if (ejbDesc.isTimedObject()) {
            if (ejbDesc.getEjbTimeoutMethod() != null) {

                methodNode.writeJavaMethodDescriptor
                        (ejbNode, EjbTagNames.TIMEOUT_METHOD,
                                ejbDesc.getEjbTimeoutMethod());
            }

            for (ScheduledTimerDescriptor timerDesc : ejbDesc.getScheduledTimerDescriptors()) {
                ScheduledTimerNode timerNode = new ScheduledTimerNode();
                timerNode.writeDescriptor(ejbNode, EjbTagNames.TIMER, timerDesc);
            }
        }

        if (ejbDesc.isSingleton()) {
            appendTextChild(ejbNode, EjbTagNames.INIT_ON_STARTUP,
                    Boolean.toString(ejbDesc.getInitOnStartup()));
        }

        if (!ejbDesc.isStateless()) {
            appendTextChild(ejbNode, EjbTagNames.CONCURRENCY_MANAGEMENT_TYPE,
                    ejbDesc.getConcurrencyManagementType().toString());
        }

        for (EjbSessionDescriptor.AccessTimeoutHolder next : ejbDesc.getAccessTimeoutInfo()) {
            ConcurrentMethodDescriptor cDesc = new ConcurrentMethodDescriptor();
            cDesc.setConcurrentMethod(next.method);
            TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
            timeoutDesc.setValue(next.value);
            timeoutDesc.setUnit(next.unit);
            cDesc.setAccessTimeout(timeoutDesc);

            ConcurrentMethodNode cNode = new ConcurrentMethodNode();
            cNode.writeDescriptor(ejbNode, EjbTagNames.CONCURRENT_METHOD, cDesc);
        }
View Full Code Here

TOP

Related Classes of org.glassfish.ejb.deployment.descriptor.TimeoutValueDescriptor

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.