Package org.eclipse.persistence.internal.sessions.coordination

Examples of org.eclipse.persistence.internal.sessions.coordination.CommandPropagator


     *
     * @param command An object representing a EclipseLink command
     */
    public void propagateCommand(Object command) {
        Command newCommand;
        CommandPropagator propagator;

        if (commandConverter != null) {
            // Use the converter if we have one
            Object[] args = { command };
            logDebug("converting_to_toplink_command", args);
            //for dms profiling
            if (isCommandProcessorASession()) {
                getCommandProcessor().processCommand(new ProfileMessageSentCommand());
            }
            newCommand = commandConverter.convertToEclipseLinkCommand(command);
        } else if (command instanceof Command) {
            // If converter is not set then maybe it just doesn't need converting
            newCommand = (Command)command;
        } else {
            // We can't convert the thing - we may as well chuck it!
            Object[] args = { command };
            logWarning("missing_converter", args);
            return;
        }

        // Set our service id on the command to indicate that it came from us
        newCommand.setServiceId(getServiceId());

        // Propagate the command (synchronously or asynchronously)
        propagator = new CommandPropagator(this, newCommand);

        if (shouldPropagateAsynchronously()) {
            propagator.asynchronousPropagateCommand();
        } else {
            propagator.synchronousPropagateCommand();
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.sessions.coordination.CommandPropagator

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.