Examples of RequestScope


Examples of de.danet.an.util.logging.RequestScope

     * view-type="remote"
     */
    public de.danet.an.workflow.api.Process lookupProcess
  (String processMgrName, String processKey)
  throws InvalidKeyException {
        RequestScope scope = RequestLog.enterScope
            (this,"lookupProcess",new Object[] { processMgrName, processKey });
        de.danet.an.workflow.api.Process res = null;
  try {
      res = processHome().findByProcessKey(processKey);
  } catch (ObjectNotFoundException onfe) {
      ctx.setRollbackOnly();
            throw new InvalidKeyException
    ("No process of type = " + processMgrName + ", key = "
     + processKey + ": " + onfe.getMessage());
  } catch (ResourceNotAvailableException re) {
      throw new EJBException(re);
  } catch (FinderException fe) {
      throw new EJBException(fe);
  } catch (RemoteException re) {
      throw new EJBException(re);
  } finally {
      scope.leave(res);
  }
  return res;
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * because it is still in progress.
     * @ejb.interface-method view-type="remote"
     */
    public void removeProcess(de.danet.an.workflow.omgcore.WfProcess process)
  throws CannotRemoveException {
        RequestScope scope = RequestLog.enterScope
            (this, "remoceProcess", new Object[] { process });
  try {
      ((WfProcess)process).remove();
  } catch (RemoteException re) {
      throw new CannotRemoveException(re.getMessage());
  } catch (RemoveException re) {
      throw new CannotRemoveException(re.getMessage());
  } finally {
      scope.leave();
  }
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * @ejb.interface-method
     * view-type="remote"
     */
    public Activity lookupActivity (ActivityUniqueKey key)
  throws InvalidKeyException {
        RequestScope scope = RequestLog.enterScope
            (this, "lookupActivity", new Object[] { key });
        Activity res = null;
  try {
      Long pk = Long.valueOf (key.activityKey());
      res = activityHome().findByPrimaryKey(pk);
  } catch (NumberFormatException nex) {
      ctx.setRollbackOnly();
      throw new InvalidKeyException ("Cause: " + nex.getMessage ());
  } catch (FinderException nex) {
      throw new InvalidKeyException ("Cause: " + nex.getMessage ());
  } catch (RemoteException nex) {
      throw new EJBException (nex);
  } finally {
      scope.leave (res);
  }
  return res;
    }   
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * @ejb.interface-method
     * view-type="remote"
     */
    public de.danet.an.workflow.api.Activity.Info lookupActivityInfo
  (ActivityUniqueKey key) throws InvalidKeyException {
        RequestScope scope = RequestLog.enterScope
            (this, "lookupActivityInfo", new Object[] { key });
        de.danet.an.workflow.api.Activity.Info res = null;
  try {
      Long pk = Long.valueOf (key.activityKey());
      res = activityHome().findByPrimaryKey(pk).activityInfo();
  } catch (NumberFormatException nex) {
      ctx.setRollbackOnly();
      throw new InvalidKeyException ("Cause: " + nex.getMessage ());
  } catch (FinderException nex) {
      throw new EJBException (nex);
  } catch (RemoteException nex) {
      throw new EJBException (nex);
  } finally {
      scope.leave (scope);
  }
  return res;
    }   
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * @ejb.interface-method view-type="remote"
     * @ejb.transaction type="Supports"
     */
    public de.danet.an.workflow.api.ProcessDefinitionDirectory
  processDefinitionDirectory () {
        RequestScope scope = RequestLog.enterScope
            (this, "processDefinitionDirectory", new Object[] {});
        de.danet.an.workflow.api.ProcessDefinitionDirectory res = null;
        try {
            res = processDefinitionDirectoryHome().create();
  } catch (CreateException ce) {
      throw new EJBException (ce);
  } catch (RemoteException re) {
      throw new EJBException (re);
  } finally {
      scope.leave (res);
  }
  return res;
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * @return the process directory.
     * @ejb.interface-method view-type="remote"
     * @ejb.transaction type="Supports"
     */
    public ProcessDirectory processDirectory () {
        RequestScope scope = RequestLog.enterScope
            (this, "processDirectory", new Object[] {});
        ProcessDirectory res = null;
  try {
      res = processDirectoryHome().create();
  } catch (CreateException ce) {
      throw new EJBException (ce);
  } catch (RemoteException re) {
      throw new EJBException (re);
  } finally {
      scope.leave (res);
  }
  return res;
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * @return the resource assignment service
     * @ejb.interface-method view-type="local"
     * @ejb.transaction type="Supports"
     */
    public ResourceAssignmentService resourceAssignmentService () {
        RequestScope scope = RequestLog.enterScope
            (this, "resourceAssignmentService", new Object[] {});
        ResourceAssignmentService res = null;
        try {
            res = getRas ();
        } catch (RemoteException e) {
            throw new EJBException (e);
        } finally {
            scope.leave (res);
        }
        return res;
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * As the environment is a concurrent multi user environment,
     * <code>WfResource</code> objects may become invalid.
     */
    public Collection workItems (WfResource resource)
        throws NoSuchResourceException {
        RequestScope scope = RequestLog.enterScope
            (this, "workItems", new Object[] { resource });
        Collection res = null;
        try {
            res = getRas().workItems(resource);
        } catch (RemoteException e) {
            throw new EJBException (e);
        } finally {
            scope.leave (res);
        }
        return res;
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * <code>WfResource</code> objects may become invalid.
     */
    public boolean isMemberOfWorkItems
        (WfResource resource, WfAssignment assignment)
        throws NoSuchResourceException {
        RequestScope scope = RequestLog.enterScope
            (this, "isMemberOfWorkItems",
             new Object[] { resource, assignment });
        boolean res = false;
        try {
            res = getRas().isMemberOfWorkItems(resource, assignment);
        } catch (RemoteException e) {
            throw new EJBException (e);
        } finally {
            scope.leave (new Boolean(res));
        }
        return res;
    }
View Full Code Here

Examples of de.danet.an.util.logging.RequestScope

     * @ejb.interface-method view-type="remote"
     * @ejb.transaction type="Supports"
     */
    public Collection knownResources ()
  throws RemoteException {
        RequestScope scope = RequestLog.enterScope
            (this, "knownResources", new Object[] {});
        Collection res = null;
        try {
            ResourceAssignmentService ras = getRas();
            if (ras == null) {
                throw new UnsupportedOperationException
                    ("No resource assignment service configured.");
            }
            res = ras.knownResources ();
        } finally {
            scope.leave (res);
        }
        return res;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.