ee/src/main/java/org/jboss/as/ee/structure/EJBClientDescriptor12Parser.java
protected void parseRemotingReceiver(final XMLExtendedStreamReader reader,
            final EJBClientDescriptorMetaData ejbClientDescriptorMetaData) throws XMLStreamException {
        String outboundConnectionRef = null;
        final Set<EJBClientDescriptorXMLAttribute> required = EnumSet
                .of(EJBClientDescriptorXMLAttribute.OUTBOUND_CONNECTION_REF);
        final int count = reader.getAttributeCount();
        EJBClientDescriptorMetaData.RemotingReceiverConfiguration remotingReceiverConfiguration = null;
        long connectTimeout = 5000;
        for (int i = 0; i < count; i++) {
            final EJBClientDescriptorXMLAttribute attribute = EJBClientDescriptorXMLAttribute.forName(reader
                    .getAttributeLocalName(i));
            required.remove(attribute);
            final String value = readResolveValue(reader, i);
            switch (attribute) {
                case OUTBOUND_CONNECTION_REF:
                    outboundConnectionRef = value;
                    remotingReceiverConfiguration = ejbClientDescriptorMetaData
                            .addRemotingReceiverConnectionRef(outboundConnectionRef);
                    break;
                case CONNECT_TIMEOUT:
                    connectTimeout = Long.parseLong(value);
                    break;
                default:
                    unexpectedContent(reader);
            }
        }
        if (!required.isEmpty()) {
            missingAttributes(reader.getLocation(), required);
        }
        // set the timeout
        remotingReceiverConfiguration.setConnectionTimeout(connectTimeout);

        while (reader.hasNext()) {
            switch (reader.nextTag()) {
                case END_ELEMENT: {
                    return;
                }
                case START_ELEMENT: {
                    final EJBClientDescriptorXMLElement element = EJBClientDescriptorXMLElement.forName(reader.getLocalName());
                    switch (element) {
                        case CHANNEL_CREATION_OPTIONS:
                            final Properties channelCreationOptions = this.parseChannelCreationOptions(reader);
                            remotingReceiverConfiguration.setChannelCreationOptions(channelCreationOptions);
                            break;
                        default:
                            unexpectedElement(reader);
                    }
                    break;
                }
                default: {
                    unexpectedContent(reader);
                }
            }
        }
        unexpectedEndOfDocument(reader.getLocation());
    }
protected void parseRemotingReceiver(final XMLExtendedStreamReader reader,
            final EJBClientDescriptorMetaData ejbClientDescriptorMetaData) throws XMLStreamException {
        String outboundConnectionRef = null;
        final Set<EJBClientDescriptorXMLAttribute> required = EnumSet
                .of(EJBClientDescriptorXMLAttribute.OUTBOUND_CONNECTION_REF);
        final int count = reader.getAttributeCount();
        EJBClientDescriptorMetaData.RemotingReceiverConfiguration remotingReceiverConfiguration = null;
        long connectTimeout = 5000;
        for (int i = 0; i < count; i++) {
            final EJBClientDescriptorXMLAttribute attribute = EJBClientDescriptorXMLAttribute.forName(reader
                    .getAttributeLocalName(i));
            required.remove(attribute);
            final String value = readResolveValue(reader, i);
            switch (attribute) {
                case OUTBOUND_CONNECTION_REF:
                    outboundConnectionRef = value;
                    remotingReceiverConfiguration = ejbClientDescriptorMetaData
                            .addRemotingReceiverConnectionRef(outboundConnectionRef);
                    break;
                case CONNECT_TIMEOUT:
                    connectTimeout = Long.parseLong(value);
                    break;
                default:
                    unexpectedContent(reader);
            }
        }
        if (!required.isEmpty()) {
            missingAttributes(reader.getLocation(), required);
        }
        // set the timeout
        remotingReceiverConfiguration.setConnectionTimeout(connectTimeout);

        while (reader.hasNext()) {
            switch (reader.nextTag()) {
                case END_ELEMENT: {
                    return;
                }
                case START_ELEMENT: {
                    final EJBClientDescriptorXMLElement element = EJBClientDescriptorXMLElement.forName(reader.getLocalName());
                    switch (element) {
                        case CHANNEL_CREATION_OPTIONS:
                            final Properties channelCreationOptions = this.parseChannelCreationOptions(reader);
                            remotingReceiverConfiguration.setChannelCreationOptions(channelCreationOptions);
                            break;
                        default:
                            unexpectedElement(reader);
                    }
                    break;
                }
                default: {
                    unexpectedContent(reader);
                }
            }
        }
        unexpectedEndOfDocument(reader.getLocation());
    }
protected void parseRemotingReceiver ( final XMLExtendedStreamReader reader , final EJBClientDescriptorMetaData ejbClientDescriptorMetaData ) throws XMLStreamException { String outboundConnectionRef = null ; final Set < EJBClientDescriptorXMLAttribute > required = EnumSet . of ( EJBClientDescriptorXMLAttribute . OUTBOUND_CONNECTION_REF ) ; final int count = reader . getAttributeCount ( ) ; EJBClientDescriptorMetaData . RemotingReceiverConfiguration remotingReceiverConfiguration = null ; long connectTimeout = 5000 ; for ( int i = 0 ; i < count ; i ++ ) { final EJBClientDescriptorXMLAttribute attribute = EJBClientDescriptorXMLAttribute . forName ( reader . getAttributeLocalName ( i ) ) ; required . remove ( attribute ) ; final String value = readResolveValue ( reader , i ) ; switch ( attribute ) { case OUTBOUND_CONNECTION_REF : outboundConnectionRef = value ; remotingReceiverConfiguration = ejbClientDescriptorMetaData . addRemotingReceiverConnectionRef ( outboundConnectionRef ) ; break ; case CONNECT_TIMEOUT : connectTimeout = Long . parseLong ( value ) ; break ; default : unexpectedContent ( reader ) ; } } if ( ! required . isEmpty ( ) ) { missingAttributes ( reader . getLocation ( ) , required ) ; } // set the timeout remotingReceiverConfiguration . setConnectionTimeout ( connectTimeout ) ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { return ; } case START_ELEMENT : { final EJBClientDescriptorXMLElement element = EJBClientDescriptorXMLElement . forName ( reader . getLocalName ( ) ) ; switch ( element ) { case CHANNEL_CREATION_OPTIONS : final Properties channelCreationOptions = this . parseChannelCreationOptions ( reader ) ; remotingReceiverConfiguration . setChannelCreationOptions ( channelCreationOptions ) ; break ; default : unexpectedElement ( reader ) ; } break ; } default : { unexpectedContent ( reader ) ; } } } unexpectedEndOfDocument ( reader . getLocation ( ) ) ; }
connectTimeout added
connectTimeout added