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

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

?? localsessionfactory.java

?? spring framework 2.5.4源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Copyright 2002-2008 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.orm.toplink;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import javax.sql.DataSource;

import oracle.toplink.exceptions.TopLinkException;
import oracle.toplink.internal.databaseaccess.DatabasePlatform;
import oracle.toplink.jndi.JNDIConnector;
import oracle.toplink.sessionbroker.SessionBroker;
import oracle.toplink.sessions.DatabaseLogin;
import oracle.toplink.sessions.DatabaseSession;
import oracle.toplink.sessions.SessionLog;
import oracle.toplink.threetier.ServerSession;
import oracle.toplink.tools.sessionconfiguration.XMLLoader;
import oracle.toplink.tools.sessionmanagement.SessionManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.PropertyAccessorFactory;
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ReflectionUtils;

/**
 * Convenient JavaBean-style factory for a TopLink SessionFactory instance.
 * Loads a TopLink <code>sessions.xml</code> file from the class path, exposing a
 * specific TopLink Session defined there (usually a ServerSession).
 *
 * <p>TopLink Session configuration is done using a <code>sessions.xml</code> file.
 * The most convenient way to create the <code>sessions.xml</code> file is to use
 * the Oracle TopLink SessionsEditor workbench. The <code>sessions.xml</code> file
 * contains all runtime configuration and points to a second XML or Class resource
 * from which to load the actual TopLink project metadata (which defines mappings).
 *
 * <p>LocalSessionFactory loads the <code>sessions.xml</code> file during
 * initialization in order to bootstrap the specified TopLink (Server)Session.
 * The name of the actual config resource and the name of the Session to be loaded,
 * if different from <code>sessions.xml</code> and "Session", respectively, can be
 * configured through bean properties.
 *
 * <p>All resources (<code>sessions.xml</code> and Mapping Workbench metadata) are
 * loaded using <code>ClassLoader.getResourceAsStream</code> calls by TopLink, so
 * users may need to configure a ClassLoader with appropriate visibility. This is
 * particularly important in J2EE environments where the TopLink metadata might be
 * deployed to a different location than the Spring configuration. The ClassLoader
 * used to search for the TopLink metadata and to load the persistent classes
 * defined there will default to the the context ClassLoader for the current Thread.
 *
 * <p>TopLink's debug logging can be redirected to Commons Logging by passing a
 * CommonsLoggingSessionLog to the "sessionLog" bean property. Otherwise, TopLink
 * uses it's own DefaultSessionLog, whose levels are configured in the
 * <code>sessions.xml</code> file.
 *
 * <p>This class has been tested against both TopLink 9.0.4 and TopLink 10.1.3.
 * It will automatically adapt to the TopLink version encountered: for example,
 * using an XMLSessionConfigLoader on 10.1.3, but an XMLLoader on 9.0.4.
 *
 * <p><b>NOTE:</b> When defining a TopLink SessionFactory in a Spring application
 * context, you will usually define a bean of type <b>LocalSessionFactoryBean</b>.
 * LocalSessionFactoryBean is a subclass of this factory, which will automatically
 * expose the created TopLink SessionFactory instance as bean reference.
 *
 * @author Juergen Hoeller
 * @author <a href="mailto:james.x.clark@oracle.com">James Clark</a>
 * @since 1.2
 * @see LocalSessionFactoryBean
 * @see TopLinkTemplate#setSessionFactory
 * @see TopLinkTransactionManager#setSessionFactory
 * @see SingleSessionFactory
 * @see ServerSessionFactory
 * @see oracle.toplink.threetier.ServerSession
 * @see oracle.toplink.tools.sessionconfiguration.XMLLoader
 * @see oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader
 */
public class LocalSessionFactory {

	/**
	 * The default location of the <code>sessions.xml</code> TopLink configuration file:
	 * "sessions.xml" in the class path.
	 */
	public static final String DEFAULT_SESSIONS_XML = "sessions.xml";

	/**
	 * The default session name to look for in the sessions.xml: "Session".
	 */
	public static final String DEFAULT_SESSION_NAME = "Session";


	protected final Log logger = LogFactory.getLog(getClass());

	/**
	 * The classpath location of the sessions TopLink configuration file.
	 */
	private String configLocation = DEFAULT_SESSIONS_XML;

	/**
	 * The session name to look for in the sessions.xml configuration file.
	 */
	private String sessionName = DEFAULT_SESSION_NAME;

	/**
	 * The ClassLoader to use to load the sessions.xml and project XML files.
	 */
	private ClassLoader sessionClassLoader;

	private DatabaseLogin databaseLogin;

	private final Map loginPropertyMap = new HashMap();

	private DataSource dataSource;

	private DatabasePlatform databasePlatform;

	private SessionLog sessionLog;


	/**
	 * Set the TopLink <code>sessions.xml</code> configuration file that defines
	 * TopLink Sessions, as class path resource location.
	 * <p>The <code>sessions.xml</code> file will usually be placed in the META-INF
	 * directory or root path of a JAR file, or the <code>WEB-INF/classes</code>
	 * directory of a WAR file (specifying "META-INF/toplink-sessions.xml" or
	 * simply "toplink-sessions.xml" as config location, respectively).
	 * <p>The default config location is "sessions.xml" in the root of the class path.
	 * @param configLocation the class path location of the <code>sessions.xml</code> file
	 */
	public void setConfigLocation(String configLocation) {
		this.configLocation = configLocation;
	}

	/**
	 * Set the name of the TopLink Session, as defined in TopLink's
	 * <code>sessions.xml</code> configuration file.
	 * The default session name is "Session".
	 */
	public void setSessionName(String sessionName) {
		this.sessionName = sessionName;
	}

	/**
	 * Set the ClassLoader that should be used to lookup the config resources.
	 * If nothing is set here, then we will try to use the Thread context ClassLoader
	 * and the ClassLoader that loaded this factory class, in that order.
	 * <p>This ClassLoader will be used to load the TopLink configuration files
	 * and the project metadata. Furthermore, the TopLink ConversionManager will
	 * use this ClassLoader to load all TopLink entity classes. If the latter is not
	 * appropriate, users can configure a pre-login SessionEvent to alter the
	 * ConversionManager ClassLoader that TopLink will use at runtime.
	 */
	public void setSessionClassLoader(ClassLoader sessionClassLoader) {
		this.sessionClassLoader = sessionClassLoader;
	}

	/**
	 * Specify the DatabaseLogin instance that carries the TopLink database
	 * configuration to use. This is an alternative to specifying that information
	 * in a &lt;login&gt; tag in the <code>sessions.xml</code> configuration file,
	 * allowing for configuring a DatabaseLogin instance as standard Spring bean
	 * definition (being able to leverage Spring's placeholder mechanism, etc).
	 * <p>The DatabaseLogin instance can either carry traditional JDBC config properties
	 * or hold a nested TopLink Connector instance, pointing to the connection pool to use.
	 * DatabaseLogin also holds the TopLink DatabasePlatform instance that defines the
	 * database product that TopLink is talking to (for example, HSQLPlatform).
	 * <p><b>WARNING:</b> Overriding the Login instance has been reported to not
	 * work on TopLink 10.1.3.0 and 10.1.3.1. Specify {@link #setLoginProperties
	 * "loginProperties"} or {@link #getLoginPropertyMap "loginPropertyMap[...]"}
	 * entries instead, if you prefer to have the login configuration defined
	 * on the Spring LocalSessionFactory.
	 */
	public void setDatabaseLogin(DatabaseLogin databaseLogin) {
		this.databaseLogin = databaseLogin;
	}

	/**
	 * Specify TopLink login properties, to be passed to
	 * the {@link oracle.toplink.sessions.DatabaseLogin} instance.
	 * <p>Can be populated with a String "value" (parsed via PropertiesEditor)
	 * or a "props" element in XML bean definitions.
	 * @see oracle.toplink.sessions.DatabaseLogin
	 */
	public void setLoginProperties(Properties loginProperties) {
		CollectionUtils.mergePropertiesIntoMap(loginProperties, this.loginPropertyMap);
	}

	/**
	 * Specify TopLink login properties as a Map, to be passed to
	 * the {@link oracle.toplink.sessions.DatabaseLogin} instance.
	 * <p>Can be populated with a "map" or "props" element in XML bean definitions.
	 * @see oracle.toplink.sessions.DatabaseLogin
	 */
	public void setLoginPropertyMap(Map loginProperties) {
		if (loginProperties != null) {
			this.loginPropertyMap.putAll(loginProperties);
		}
	}

	/**
	 * Allow Map access to the TopLink login properties to be passed to the
	 * DatabaseLogin instance, with the option to add or override specific entries.
	 * <p>Useful for specifying entries directly, for example via
	 * "loginPropertyMap[tableQualifier]".
	 * @see oracle.toplink.sessions.DatabaseLogin
	 */
	public Map getLoginPropertyMap() {
		return this.loginPropertyMap;
	}

	/**
	 * Specify a standard JDBC DataSource that TopLink should use as connection pool.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久动漫 | 久久久久9999亚洲精品| 午夜不卡av在线| 欧美精品视频www在线观看| 国产高清在线观看免费不卡| 欧美精品一区二区三区久久久| 久久超碰97中文字幕| 国产免费成人在线视频| va亚洲va日韩不卡在线观看| 亚洲欧美综合另类在线卡通| 欧洲生活片亚洲生活在线观看| 午夜精品久久久久久久蜜桃app| 欧美一区二区三区播放老司机| 麻豆精品久久精品色综合| 欧美群妇大交群的观看方式| 奇米影视一区二区三区小说| 26uuu久久综合| 不卡av在线免费观看| 亚洲影视在线播放| 日韩三级av在线播放| 国产白丝精品91爽爽久久| 中文字幕中文字幕一区二区| 91福利视频久久久久| 日本不卡中文字幕| 亚洲国产精品二十页| 欧美综合一区二区| 久久99精品久久久久| 中文字幕一区二区日韩精品绯色| 欧美日韩在线播| 国产精品系列在线播放| 亚洲人成小说网站色在线| 欧美日韩五月天| 亚洲视频免费观看| 日本乱人伦一区| 国产精品毛片无遮挡高清| 91免费在线视频观看| 一区二区三区久久| 精品成人一区二区| 在线看不卡av| 国产精品亚洲а∨天堂免在线| 中文字幕一区二区三| 欧美一区二区福利在线| 91首页免费视频| 另类小说综合欧美亚洲| 亚洲欧洲综合另类| 久久伊99综合婷婷久久伊| 欧美亚洲国产一区二区三区va| 国产一区二区伦理片| 日本aⅴ亚洲精品中文乱码| 中文字幕不卡在线播放| 日韩欧美亚洲国产另类| 91国产丝袜在线播放| 国产一区91精品张津瑜| 亚洲成人免费av| 亚洲欧洲精品一区二区三区不卡| 欧美大黄免费观看| 欧美日韩免费观看一区三区| 不卡欧美aaaaa| 国产在线视频精品一区| 视频一区中文字幕国产| 亚洲靠逼com| 国产喷白浆一区二区三区| 欧美一级专区免费大片| 欧美三级一区二区| 99久久久无码国产精品| 日韩一级二级三级| 日韩视频免费观看高清完整版| 美女视频黄免费的久久| 欧美一区二区三区公司| 日韩中文欧美在线| 欧美激情中文字幕一区二区| 久久精品在线免费观看| 成人综合在线观看| 最新高清无码专区| 91精品国产丝袜白色高跟鞋| 亚洲夂夂婷婷色拍ww47| 中文字幕av一区二区三区| 日韩免费观看高清完整版在线观看| 91成人看片片| 91九色02白丝porn| 色悠悠亚洲一区二区| 97久久超碰精品国产| 99久久精品免费精品国产| 国产乱国产乱300精品| 国产成人av影院| 成人动漫中文字幕| 91在线精品一区二区| 972aa.com艺术欧美| 91久久人澡人人添人人爽欧美| 成人午夜碰碰视频| 91在线国产观看| 91国产福利在线| 欧美午夜影院一区| 欧美一级免费观看| 日韩三级中文字幕| 精品国产一区a| 亚洲国产电影在线观看| 亚洲三级小视频| 伊人婷婷欧美激情| 香蕉成人伊视频在线观看| 亚洲mv在线观看| 免费观看一级欧美片| 久久精品国产一区二区三 | 7777精品伊人久久久大香线蕉超级流畅 | 欧美亚洲日本国产| 制服丝袜在线91| 精品成人在线观看| 1024国产精品| 亚洲激情图片一区| 日韩国产欧美在线视频| 国内不卡的二区三区中文字幕 | 奇米888四色在线精品| 久久国产剧场电影| av男人天堂一区| 欧美日韩国产高清一区二区| 欧美一区二区三区的| 中文av一区二区| 亚洲成人综合视频| 久久不见久久见免费视频7| 成人av网在线| 欧美一区二区福利视频| 国产精品久久久久久久蜜臀| 亚洲成av人片一区二区梦乃| 国产精品一二一区| 欧美色国产精品| 日本一区二区免费在线观看视频| 亚洲狼人国产精品| 狠狠色丁香久久婷婷综合丁香| 成人97人人超碰人人99| 日韩午夜小视频| 亚洲女同ⅹxx女同tv| 国产一区二区不卡| 欧美日本国产一区| 日韩一区在线看| 精品一区二区三区在线观看| 色哟哟在线观看一区二区三区| 日韩一区二区在线看片| 亚洲欧美成人一区二区三区| 精品一区二区三区免费| 在线91免费看| 亚洲精品自拍动漫在线| 国产福利不卡视频| 欧美一区二区三区四区视频| 最新欧美精品一区二区三区| 久久91精品久久久久久秒播| 欧美体内she精高潮| 亚洲欧洲成人自拍| 国产高清精品网站| 精品免费视频一区二区| 日日嗨av一区二区三区四区| 色狠狠综合天天综合综合| 欧美激情在线一区二区三区| 久久99久久久久久久久久久| 欧美在线一二三| 亚洲嫩草精品久久| 91啪亚洲精品| 国产精品麻豆99久久久久久| 国内精品国产成人| 欧美电影免费观看高清完整版| 天堂一区二区在线免费观看| 欧美亚洲尤物久久| 亚洲精品国久久99热| 不卡av在线免费观看| 中文字幕在线不卡一区二区三区| 粉嫩一区二区三区性色av| 久久久久国产精品麻豆| 黄网站免费久久| 久久免费国产精品| 国产综合色视频| 亚洲精品一线二线三线| 精品制服美女丁香| 久久久99精品久久| 成人黄色在线视频| 国产精品传媒视频| 91小视频在线观看| 亚洲一区二区在线免费看| 在线亚洲免费视频| 亚洲h在线观看| 日韩视频一区二区三区在线播放| 亚洲成人先锋电影| 日韩西西人体444www| 久99久精品视频免费观看| 久久女同精品一区二区| 国产精品一区二区免费不卡| 中文字幕高清不卡| 91在线观看一区二区| 亚洲自拍偷拍九九九| 欧美美女喷水视频| 久久99国产精品久久| 国产精品情趣视频| 日本高清不卡aⅴ免费网站| 日本视频一区二区三区| 精品国产一区久久| 99精品桃花视频在线观看| 亚洲在线视频网站| 2021中文字幕一区亚洲| 成人免费视频免费观看| 亚洲综合在线视频| 日韩精品专区在线| 色综合天天综合网国产成人综合天|