⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logmgrbean.java

📁 该HttpProxy用于从Applet或Swing界面中访问Ejb和服务端的JavaBean。
💻 JAVA
字号:
package com.nari.pmos.ejb.log;

import java.rmi.RemoteException;
import java.util.Collection;
import java.util.Date;

import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

import com.nari.pmos.log.log.LogMgr;

/**
 * XDoclet-based session bean. The class must be declared public according to
 * the EJB specification.
 * 
 * To generate the EJB related files to this EJB: - Add Standard EJB module to
 * XDoclet project properties - Customize XDoclet configuration for your
 * appserver - Run XDoclet
 * 
 * Below are the xdoclet-related tags needed for this EJB.
 * 
 * @ejb.bean name="Logmgr" display-name="Name for Logmgr"
 *           description="Description for Logmgr" jndi-name="ejb/Logmgr"
 *           type="Stateless" view-type="both"
 */
public class LogmgrBean implements SessionBean {

	/** The session context */
	private SessionContext context;

	private LogMgr logMgr = null;

	public LogmgrBean() {
		// TODO Auto-generated constructor stub
	}

	public void ejbActivate() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	public void ejbPassivate() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	public void ejbRemove() throws EJBException, RemoteException {
		// TODO Auto-generated method stub

	}

	/**
	 * Set the associated session context. The container calls this method after
	 * the instance creation.
	 * 
	 * The enterprise bean instance should store the reference to the context
	 * object in an instance variable.
	 * 
	 * This method is called with no transaction context.
	 * 
	 * @throws EJBException
	 *             Thrown if method fails due to system-level error.
	 */
	public void setSessionContext(SessionContext newContext)
			throws EJBException {
		context = newContext;
	}

	/**
	 * An ejbCreate method as required by the EJB specification.
	 * 
	 * The container calls the instance?s <code>ejbCreate</code> method whose
	 * signature matches the signature of the <code>create</code> method
	 * invoked by the client. The input parameters sent from the client are
	 * passed to the <code>ejbCreate</code> method. Each session bean class
	 * must have at least one <code>ejbCreate</code> method. The number and
	 * signatures of a session bean?s <code>create</code> methods are specific
	 * to each session bean class.
	 * 
	 * @throws CreateException
	 *             Thrown if method fails due to system-level error.
	 * 
	 * @ejb.create-method
	 * 
	 */
	public void ejbCreate() throws CreateException {
		// TODO Add ejbCreate method implementation
		if (logMgr == null) {
			logMgr = new LogMgr();
		}
	}

	public boolean recorde(String log_Type, String user_Account,
			String message, String log_Flag) {
		return logMgr.recorde(log_Type, user_Account, message, log_Flag);
	}

	public boolean recorde(String log_Type, String user_Account, String ejb,
			String method, String message, String log_Flag) {
		return logMgr.recorde(log_Type, user_Account, ejb, method, message,
				log_Flag);
	}

	public Collection find_LogInfo_By_User_Account(String user_Account) {
		return logMgr.find_LogInfo_By_User_Account(user_Account);
	}

	public Collection find_LogInfo_By_Log_Type(String log_Type) {
		return logMgr.find_LogInfo_By_Log_Type(log_Type);
	}

	public Collection find_LogInfo_By_Log_Flag(String log_Flag) {
		return logMgr.find_LogInfo_By_Log_Flag(log_Flag);
	}

	public Collection find_LogInfo_By_Log_Date_Befor(Date log_Date_Befor) {
		return logMgr.find_LogInfo_By_Log_Date_Befor(log_Date_Befor);
	}

	public Collection find_LogInfo_By_Log_Date_After(Date log_Date_After) {
		return logMgr.find_LogInfo_By_Log_Date_After(log_Date_After);
	}

	public Collection find_LogInfo_By_Log_Date_Between(Date log_Date_After,
			Date log_Date_Befor) {
		return logMgr.find_LogInfo_By_Log_Date_Between(log_Date_After,
				log_Date_Befor);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -