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

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


     *
     * @param command An object representing a TopLink 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.convertToTopLinkCommand(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


     *
     * @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

     *
     * @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

     *
     * @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

     *
     * @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

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

        this.commandProcessor.startOperationProfile(SessionProfiler.CacheCoordination);
        try {
            if (this.commandConverter != null) {
                // Use the converter if we have one
                Object[] args = { command };
                logDebug("converting_to_toplink_command", args);
                this.commandProcessor.incrementProfile(SessionProfiler.RcmSent);
                newCommand = this.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());
   
            // PERF: Support plugable serialization.
            Serializer serializer = getSerializer();
            byte[] commandBytes = null;
            if (serializer != null) {
                this.commandProcessor.startOperationProfile(SessionProfiler.CacheCoordinationSerialize);
                try {
                    commandBytes = (byte[])serializer.serialize(command, (AbstractSession)getCommandProcessor());
                } finally {
                    this.commandProcessor.endOperationProfile(SessionProfiler.CacheCoordinationSerialize);           
                }
            }
   
            // Propagate the command (synchronously or asynchronously)
            propagator = new CommandPropagator(this, newCommand, commandBytes);
   
            if (shouldPropagateAsynchronously()) {
                propagator.asynchronousPropagateCommand();
            } else {
                propagator.synchronousPropagateCommand();
            }
        } finally {
            this.commandProcessor.endOperationProfile(SessionProfiler.CacheCoordination);           
        }
    }
View Full Code Here

     *
     * @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

     *
     * @param command An object representing a TopLink 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.convertToTopLinkCommand(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

     *
     * @param command An object representing a TopLink 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.convertToTopLinkCommand(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

     *
     * @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.