?? ejbworkflowcontext.java
字號:
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.workflow.ejb;import com.opensymphony.workflow.WorkflowContext;import javax.ejb.SessionContext;/** * EJB specific workflow context. * The default implementation is to get the caller principal from the * container's SessionContext. If different behaviour is desired, this * class can be subclassed with whatever custom logic in place to look * up the caller. This can be done by specifying a <code>workflowContext</code> * property in the ejb persistence store's properties in osworkflow.xml. * The value of this properly should be the classname of the WorkflowContext * to use. * * @author Hani Suleiman * @version $Revision: 1.6 $ */public class EJBWorkflowContext implements WorkflowContext { //~ Instance fields //////////////////////////////////////////////////////// private SessionContext sessionContext; //~ Methods //////////////////////////////////////////////////////////////// public String getCaller() { return sessionContext.getCallerPrincipal().getName(); } public void setRollbackOnly() { sessionContext.setRollbackOnly(); } public void setSessionContext(SessionContext context) { this.sessionContext = context; } public SessionContext getSessionContext() { return sessionContext; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -