コード例 #1
0
 /**
  * ADVANCED: This method will send the command to the remote session for processing
  *
  * @param command RemoteCOmmand Contains a command that will be executed on the remote session
  * @see org.eclipse.persistence.internal.sessions.remote.RemoteCommand
  */
 public void processCommand(RemoteCommand command) {
   try {
     Transporter transporter = new Transporter();
     transporter.setObject(command);
     transporter.prepare(this.session);
     transporter = getRemoteSessionController().processCommand(transporter);
     if (!transporter.wasOperationSuccessful()) {
       throw transporter.getException();
     }
   } catch (RemoteException exception) {
     throw CommunicationException.errorInInvocation(exception);
   }
 }
コード例 #2
0
 /** INTERNAL: Execute the query on the server. */
 public Transporter remoteExecute(DatabaseQuery query) {
   try {
     Transporter transporter = new Transporter();
     transporter.setObject(query);
     transporter.prepare(this.session);
     transporter = getRemoteSessionController().executeQuery(transporter);
     transporter.expand(session);
     if (!transporter.wasOperationSuccessful()) {
       throw transporter.getException();
     }
     return transporter;
   } catch (RemoteException exception) {
     throw CommunicationException.errorInInvocation(exception);
   }
 }
コード例 #3
0
 /** INTERNAL: Commit root unit of work from the client side to the server side. */
 public RemoteUnitOfWork commitRootUnitOfWork(RemoteUnitOfWork theRemoteUnitOfWork) {
   try {
     Transporter transporter = new Transporter();
     transporter.setObject(theRemoteUnitOfWork);
     transporter.prepare(this.session);
     transporter = getRemoteSessionController().commitRootUnitOfWork(transporter);
     transporter.expand(this.session);
     if (!transporter.wasOperationSuccessful()) {
       throw transporter.getException();
     } else {
       return (RemoteUnitOfWork) transporter.getObject();
     }
   } catch (RemoteException exception) {
     throw CommunicationException.errorInInvocation(exception);
   }
 }