Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ConcurrentMethodDescriptor


     * @return the Descriptor subclass that was populated  by reading
     * the source XML file
     */
    public Object getDescriptor() {
        if (descriptor == null) {
            descriptor = (ConcurrentMethodDescriptor) new ConcurrentMethodDescriptor();
        }
        return descriptor;
    }
View Full Code Here


        if (! (descriptor instanceof ConcurrentMethodDescriptor)) {
            throw new IllegalArgumentException(getClass()
                    + " cannot handles descriptors of type " + descriptor.getClass());
        }

        ConcurrentMethodDescriptor desc = (ConcurrentMethodDescriptor) descriptor;

        Node concurrentNode = super.writeDescriptor(parent, nodeName, descriptor);

        MethodNode methodNode = new MethodNode();

        methodNode.writeJavaMethodDescriptor(concurrentNode, EjbTagNames.METHOD,
                desc.getConcurrentMethod());

        if( desc.hasLockMetadata() ) {
            String lockType = desc.isWriteLocked() ? "Write" : "Read";
            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

TOP

Related Classes of com.sun.enterprise.deployment.ConcurrentMethodDescriptor

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.