Ejemplo n.º 1
0
 /** INTERNAL: Instantiate remote value holder on the server */
 public Transporter instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder) {
   try {
     Transporter transporter =
         getRemoteSessionController()
             .instantiateRemoteValueHolderOnServer(new Transporter(remoteValueHolder));
     transporter.expand(this.session);
     if (!transporter.wasOperationSuccessful()) {
       throw transporter.getException();
     }
     return transporter;
   } catch (RemoteException exception) {
     throw CommunicationException.errorInInvocation(exception);
   }
 }
Ejemplo n.º 2
0
 /** INTERNAL: Execute query remotely. */
 public Transporter remoteExecuteNamedQuery(String name, Class javaClass, Vector arguments) {
   try {
     Transporter transporter =
         getRemoteSessionController()
             .executeNamedQuery(
                 new Transporter(name), new Transporter(javaClass), new Transporter(arguments));
     transporter.expand(this.session);
     if (!transporter.wasOperationSuccessful()) {
       throw transporter.getException();
     }
     return transporter;
   } catch (RemoteException exception) {
     throw CommunicationException.errorInInvocation(exception);
   }
 }
Ejemplo n.º 3
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);
   }
 }
Ejemplo n.º 4
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);
   }
 }