Package org.jboss.ejb.client.remoting

Examples of org.jboss.ejb.client.remoting.RemotingAttachments


            methodParamTypes = new String[0];
        } else {
            methodParamTypes = signature.split(String.valueOf(METHOD_PARAM_TYPE_SEPARATOR));
        }
        // read the attachments
        final RemotingAttachments attachments = this.readAttachments(input);

        // read the Locator
        final UnMarshaller unMarshaller = MarshallerFactory.createUnMarshaller(this.marshallingStrategy);
        // we use a mutable ClassLoaderProvider, so that we can switch to a different (and correct deployment CL)
        // midway through the unmarshalling of the stream
View Full Code Here


            final String failureMessage = "EJB " + beanName + " is not a Stateful Session bean in app: " + appName + " module: " + moduleName + " distinct name:" + distinctName;
            this.writeInvocationFailure(channel, HEADER_EJB_NOT_STATEFUL, invocationId, failureMessage);
            return;
        }
        // read the attachments
        final RemotingAttachments attachments = this.readAttachments(dataInputStream);

        final StatefulSessionComponent statefulSessionComponent = (StatefulSessionComponent) component;
        // generate the session id and write out the response on a separate thread
        executorService.submit(new SessionIDGeneratorTask(statefulSessionComponent, channel, invocationId, attachments));
View Full Code Here

    protected RemotingAttachments readAttachments(final DataInput input) throws IOException {
        int numAttachments = input.readByte();
        if (numAttachments == 0) {
            return null;
        }
        final RemotingAttachments attachments = new RemotingAttachments();
        for (int i = 0; i < numAttachments; i++) {
            // read attachment id
            final short attachmentId = input.readShort();
            // read attachment data length
            final int dataLength = PackedInteger.readPackedInteger(input);
            // read the data
            final byte[] data = new byte[dataLength];
            input.readFully(data);

            attachments.putPayloadAttachment(attachmentId, data);
        }
        return attachments;
    }
View Full Code Here

     * @return
     * @throws Exception
     */
    @Override
    public Object processInvocation(InterceptorContext context) throws Exception {
        final RemotingAttachments remotingAttachments = context.getPrivateData(RemotingAttachments.class);
        final TransactionManager transactionManager = this.ejbRemoteTransactionsRepository.getTransactionManager();
        Transaction originatingRemoteTx = null;
        if (remotingAttachments != null) {
            // get the transaction attachment
            final byte[] transactionIDBytes = remotingAttachments.getPayloadAttachment(0x0001);
            // A (remote) tx is associated with the invocation, so propogate it appropriately
            if (transactionIDBytes != null) {
                final TransactionID transactionID = TransactionID.createTransactionID(transactionIDBytes);
                // if it's UserTransaction then create or resume the UserTransaction corresponding to the ID
                if (transactionID instanceof UserTransactionID) {
View Full Code Here

TOP

Related Classes of org.jboss.ejb.client.remoting.RemotingAttachments

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.