Forgot to post the SpringUtil class:
Code:
package test.spring;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class SpringUtil
{
protected ApplicationContext mContext;
protected static SpringUtil sInstance;
protected SpringUtil() {
mContext = new ClassPathXmlApplicationContext(
new String[] {
"applicationContext.xml"
}
);
}
public synchronized static SpringUtil getInstance() {
if (sInstance == null) {
sInstance = new SpringUtil();
}
return sInstance;
}
public ApplicationContext getContext() {
return mContext;
}
}
Will have to read up on concurrency with thread safe objects. Does anybody have any good links/explanations or references in the documentation from either Spring or Hibernate? Want to get this techinically straight in my head.
/ matthew