net.sf.shineframework.web.tx.context.spring
Class PerInstanceUserContextFactoryImpl
java.lang.Object
net.sf.shineframework.web.tx.context.spring.PerInstanceUserContextFactoryImpl
- All Implemented Interfaces:
- UserContextFactory, org.springframework.beans.factory.BeanFactoryAware
public class PerInstanceUserContextFactoryImpl
- extends java.lang.Object
- implements UserContextFactory, org.springframework.beans.factory.BeanFactoryAware
A user context factory implementation that holdes a single user context and
always returns the same instance. Usefull on an environment which you are not
allowed to use ThreadLocal but can create an instances of this factory. Be
carefulll - don't CROSS-TX's using he factory instance (unless you know what
you are doing)
- Author:
- eyal lupu
Field Summary |
protected org.apache.log4j.Logger |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.log4j.Logger logger
PerInstanceUserContextFactoryImpl
public PerInstanceUserContextFactoryImpl()
clearUserContext
public void clearUserContext()
- Description copied from interface:
UserContextFactory
- clears the user context
- Specified by:
clearUserContext
in interface UserContextFactory
getUserContext
public UserContext getUserContext()
- Description copied from interface:
UserContextFactory
- retrieves the user context from the TLS
- Specified by:
getUserContext
in interface UserContextFactory
- Returns:
- the current user context
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
- Specified by:
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
setUserContextClass
public void setUserContextClass(java.lang.String className)
Copyright © 2007 sourceforge.net. All Rights Reserved.