亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? abstractslsbinvokerinterceptor.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.ejb.access;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import javax.naming.NamingException;

import org.aopalliance.intercept.MethodInterceptor;

import org.springframework.jndi.JndiObjectLocator;

/**
 * Base class for AOP interceptors invoking local or remote Stateless Session Beans.
 * Designed for EJB 2.x, but works for EJB 3 Session Beans as well.
 *
 * <p>Such an interceptor must be the last interceptor in the advice chain.
 * In this case, there is no direct target object: The call is handled in a
 * special way, getting executed on an EJB instance retrieved via an EJB home.
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 */
public abstract class AbstractSlsbInvokerInterceptor extends JndiObjectLocator
		implements MethodInterceptor {

	private boolean lookupHomeOnStartup = true;

	private boolean cacheHome = true;

	/**
	 * The EJB's home object, potentially cached.
	 * The type must be Object as it could be either EJBHome or EJBLocalHome.
	 */
	private Object cachedHome;

	/**
	 * The no-arg create() method required on EJB homes, potentially cached.
	 */
	private Method createMethod;

	private final Object homeMonitor = new Object();


	/**
	 * Set whether to look up the EJB home object on startup.
	 * Default is "true".
	 * <p>Can be turned off to allow for late start of the EJB server.
	 * In this case, the EJB home object will be fetched on first access.
	 * @see #setCacheHome
	 */
	public void setLookupHomeOnStartup(boolean lookupHomeOnStartup) {
		this.lookupHomeOnStartup = lookupHomeOnStartup;
	}

	/**
	 * Set whether to cache the EJB home object once it has been located.
	 * Default is "true".
	 * <p>Can be turned off to allow for hot restart of the EJB server.
	 * In this case, the EJB home object will be fetched for each invocation.
	 * @see #setLookupHomeOnStartup
	 */
	public void setCacheHome(boolean cacheHome) {
		this.cacheHome = cacheHome;
	}


	/**
	 * Fetches EJB home on startup, if necessary.
	 * @see #setLookupHomeOnStartup
	 * @see #refreshHome
	 */
	public void afterPropertiesSet() throws NamingException {
		super.afterPropertiesSet();
		if (this.lookupHomeOnStartup) {
			// look up EJB home and create method
			refreshHome();
		}
	}

	/**
	 * Refresh the cached home object, if applicable.
	 * Also caches the create method on the home object.
	 * @throws NamingException if thrown by the JNDI lookup
	 * @see #lookup
	 * @see #getCreateMethod
	 */
	protected void refreshHome() throws NamingException {
		synchronized (this.homeMonitor) {
			Object home = lookup();
			if (this.cacheHome) {
				this.cachedHome = home;
				this.createMethod = getCreateMethod(home);
			}
		}
	}

	/**
	 * Determine the create method of the given EJB home object.
	 * @param home the EJB home object
	 * @return the create method
	 * @throws EjbAccessException if the method couldn't be retrieved
	 */
	protected Method getCreateMethod(Object home) throws EjbAccessException {
		try {
			// Cache the EJB create() method that must be declared on the home interface.
			return home.getClass().getMethod("create", (Class[]) null);
		}
		catch (NoSuchMethodException ex) {
			throw new EjbAccessException("EJB home [" + home + "] has no no-arg create() method");
		}
	}

	/**
	 * Return the EJB home object to use. Called for each invocation.
	 * <p>Default implementation returns the home created on initialization,
	 * if any; else, it invokes lookup to get a new proxy for each invocation.
	 * <p>Can be overridden in subclasses, for example to cache a home object
	 * for a given amount of time before recreating it, or to test the home
	 * object whether it is still alive.
	 * @return the EJB home object to use for an invocation
	 * @throws NamingException if proxy creation failed
	 * @see #lookup
	 * @see #getCreateMethod
	 */
	protected Object getHome() throws NamingException {
		if (!this.cacheHome || (this.lookupHomeOnStartup && !isHomeRefreshable())) {
			return (this.cachedHome != null ? this.cachedHome : lookup());
		}
		else {
			synchronized (this.homeMonitor) {
				if (this.cachedHome == null) {
					this.cachedHome = lookup();
					this.createMethod = getCreateMethod(this.cachedHome);
				}
				return this.cachedHome;
			}
		}
	}

	/**
	 * Return whether the cached EJB home object is potentially
	 * subject to on-demand refreshing. Default is "false".
	 */
	protected boolean isHomeRefreshable() {
		return false;
	}

	/**
	 * Invoke the create() method on the cached EJB home object.
	 * @return a new EJBObject or EJBLocalObject
	 * @throws NamingException if thrown by JNDI
	 * @throws InvocationTargetException if thrown by the create method
	 */
	protected Object create() throws NamingException, InvocationTargetException {
		try {
			Object home = getHome();
			Method createMethodToUse = this.createMethod;
			if (createMethodToUse == null) {
				createMethodToUse = getCreateMethod(home);
			}
			if (createMethodToUse == null) {
				return home;
			}
			// Invoke create() method on EJB home object.
			return createMethodToUse.invoke(home, (Object[]) null);
		}
		catch (IllegalAccessException ex) {
			throw new EjbAccessException("Could not access EJB home create() method", ex);
		}
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人三级伦理片| 日韩精品资源二区在线| 中文字幕第一区二区| 国产一区二区中文字幕| 精品国产免费一区二区三区四区 | 欧美日韩三级视频| 亚洲丶国产丶欧美一区二区三区| 欧美日本免费一区二区三区| 亚洲成人黄色小说| 精品久久人人做人人爽| 91高清视频在线| 国产精品的网站| 91麻豆国产福利精品| 亚洲第一福利一区| 欧美成人一区二区三区在线观看| 国产呦精品一区二区三区网站| 日本一区二区久久| 在线观看成人小视频| 人妖欧美一区二区| 欧美激情艳妇裸体舞| 欧美在线综合视频| 免费成人性网站| 国产精品网曝门| 欧美在线999| 国产最新精品精品你懂的| 自拍偷拍亚洲欧美日韩| 欧美日韩高清在线播放| 国产成人一区在线| 香蕉成人啪国产精品视频综合网 | 日韩视频一区二区三区| 国产综合成人久久大片91| 中文字幕一区二区三区视频| 日本精品视频一区二区三区| 亚洲国产精品一区二区久久 | 午夜视黄欧洲亚洲| 精品少妇一区二区三区在线播放| 丁香亚洲综合激情啪啪综合| 夜夜嗨av一区二区三区| 亚洲精品一区二区三区蜜桃下载| av午夜一区麻豆| 精品一区二区三区欧美| 亚洲精品中文字幕乱码三区| 久久影院午夜片一区| 91丨九色丨黑人外教| 国模娜娜一区二区三区| 亚洲成av人片在www色猫咪| 欧美国产激情一区二区三区蜜月 | 26uuu亚洲婷婷狠狠天堂| 国产在线播精品第三| 国产午夜精品一区二区三区四区| 欧美三级电影在线观看| 成人国产精品免费网站| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲综合丝袜美腿| 中文字幕亚洲区| 久久久99精品免费观看| 欧美一区二区在线不卡| 欧美在线高清视频| av资源网一区| 成人综合婷婷国产精品久久蜜臀 | 久久久精品影视| 欧美一区二区三区视频免费播放| 色综合中文字幕国产 | 欧美无乱码久久久免费午夜一区| 美脚の诱脚舐め脚责91 | 日韩一级黄色大片| 色婷婷综合久色| 成人午夜在线播放| 懂色av一区二区三区免费观看 | 日韩av电影天堂| 亚洲一区在线看| 亚洲欧美日韩一区二区| 国产精品色在线观看| 国产日韩欧美麻豆| 欧美激情在线免费观看| 国产日韩高清在线| 日本一区二区在线不卡| 国产女主播一区| 中文字幕成人网| 国产精品久久夜| 国产精品久久久久影院色老大| 欧美sm极限捆绑bd| 久久嫩草精品久久久精品一| 国产亚洲成年网址在线观看| 欧美婷婷六月丁香综合色| 99久久综合狠狠综合久久| 成人污视频在线观看| 国产91精品久久久久久久网曝门| 福利视频网站一区二区三区| 丁香天五香天堂综合| 成人av小说网| 色综合久久中文字幕综合网| 欧美亚洲丝袜传媒另类| 中文av一区特黄| 精品国产一区二区亚洲人成毛片| 精品精品国产高清a毛片牛牛| 欧美成人aa大片| 久久精品日韩一区二区三区| 亚洲天堂精品视频| 五月天中文字幕一区二区| 久草热8精品视频在线观看| 国产精品一品二品| 99视频在线观看一区三区| 91国偷自产一区二区三区观看| 欧美区在线观看| 欧美三级中文字幕| 欧美变态tickling挠脚心| 国产精品麻豆99久久久久久| 五月综合激情日本mⅴ| 亚洲午夜一二三区视频| 肉色丝袜一区二区| 美女被吸乳得到大胸91| 国产a精品视频| 欧美影视一区在线| 日韩欧美激情在线| 中文字幕一区二区5566日韩| 亚洲成在线观看| 激情综合五月天| 日本高清视频一区二区| 欧美成人精品高清在线播放| 亚洲欧洲国产日本综合| 免费成人av资源网| 99国产麻豆精品| 欧美一二三区在线观看| 一区二区中文字幕在线| 日韩高清国产一区在线| 99久久精品99国产精品| 日韩精品一区二区三区中文不卡| 欧美国产丝袜视频| 日本va欧美va瓶| 99视频有精品| 26uuu国产一区二区三区| 亚洲一区二区综合| 成人午夜电影网站| 日韩免费观看高清完整版在线观看| 国产精品久久久久久久久果冻传媒| 日本欧美一区二区三区| 91久久奴性调教| 久久九九影视网| 毛片基地黄久久久久久天堂| 在线观看不卡视频| 国产精品美女一区二区三区 | 精品国产免费一区二区三区四区| 亚洲精品综合在线| 成人国产精品免费观看| 精品嫩草影院久久| 日本免费新一区视频| 日本高清免费不卡视频| 国产精品美女视频| 国产高清一区日本| 精品国产91洋老外米糕| 日本不卡视频在线| 欧美精品日韩一本| 一区二区三区日韩欧美精品| 成人性生交大片免费看中文 | 国产精品影视在线观看| 日韩精品在线一区二区| 美国av一区二区| 欧美高清dvd| 亚洲成人免费av| 欧美日韩亚洲不卡| 一区二区三国产精华液| 91精品1区2区| 亚洲欧美日韩中文播放 | 色猫猫国产区一区二在线视频| 国产精品视频一二三| 懂色一区二区三区免费观看| 国产午夜精品久久久久久免费视| 国产自产2019最新不卡| 欧美tickling挠脚心丨vk| 久久精品久久久精品美女| 日韩欧美的一区二区| 日本三级韩国三级欧美三级| 日韩视频永久免费| 精品一区二区三区蜜桃| 欧美成人aa大片| 国产乱人伦偷精品视频不卡| 国产亚洲人成网站| 成人理论电影网| 亚洲丝袜另类动漫二区| 99精品偷自拍| 亚洲一区二区免费视频| 欧美另类videos死尸| 青青草国产成人av片免费| 日韩久久久精品| 国产精品伊人色| 最新国产の精品合集bt伙计| 日本韩国欧美国产| 日韩国产欧美一区二区三区| 久久久亚洲精品一区二区三区| 国产999精品久久久久久绿帽| 国产精品久久久久一区二区三区 | 成人av综合一区| 国产精品理伦片| 在线一区二区三区做爰视频网站| 日日摸夜夜添夜夜添精品视频| 日韩免费视频线观看| 国产91高潮流白浆在线麻豆| 亚洲欧美电影一区二区| 69堂精品视频|