
org.sakaiproject.genericdao.springutil.SetOnceClassLoaderTxProxyFactoryBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of generic-dao Show documentation
Show all versions of generic-dao Show documentation
Generic Dao is a Java package which allows a developer to skip writing
DAOs for their persistence objects when they are using Spring and/or Hibernate.
The package was originally created by Aaron Zeckoski for the Evaluation System
project but was repackaged to make it distributable by request. It is used in the
RSF framework (http://www2.caret.cam.ac.uk/rsfwiki/). Note about the BeanUtils
provided dependency: BeanUtils is not required if you are not using it in your
project. Note about the Hibernate provided dependency: Hibernate is not required
if you are not using it in your project.
The newest version!
/**
* $Id$
* $URL$
* ClassLoaderTxProxyFactoryBean.java - genericdao - May 3, 2008 6:57:09 PM - azeckoski
**************************************************************************
* Copyright (c) 2008 Aaron Zeckoski
* Licensed under the Apache License, Version 2
*
* A copy of the Apache License, Version 2 has been included in this
* distribution and is available at: http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Aaron Zeckoski ([email protected]) ([email protected]) ([email protected])
*/
package org.sakaiproject.genericdao.springutil;
/**
* This is needed to keep the {@link ClassLoader} from getting overwritten after we set it,
* the {@link ClassLoader} can only be set one time using the setter method
*
* @author Aaron Zeckoski ([email protected])
*/
public class SetOnceClassLoaderTxProxyFactoryBean extends CurrentClassLoaderTxProxyFactoryBean {
private static final long serialVersionUID = 1L;
boolean alreadySet = false;
public void setProxyClassLoader(ClassLoader classLoader) {
if (classLoader != null) {
if (! alreadySet) {
this.myClassLoader = classLoader;
alreadySet = true;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy