Announcement Announcement Module
Collapse
No announcement yet.
BeanFactoryReference release() method and EhCache Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BeanFactoryReference release() method and EhCache

    Hi,

    I'm using ContextSingletonBeanFactoryLocator to have access to my business layer from a class (that is invoked by jBPM3 engine). Everything works fine, I can access my manager, but at the end when I invoke release(), I get a cache error, saying that "Cache is not alive".

    Here's my relevant code:
    Code:
    BeanFactoryLocator locator = ContextSingletonBeanFactoryLocator.getInstance();
    BeanFactoryReference bfr = locator.useBeanFactory("businessLayer-context");
    BeanFactory factory = bfr.getFactory();
    this.userMgr = (UserManager) factory.getBean("userManager");
    ...
    bfr.release();
    I use EhCache for Acegi Security, so when acegi tries to access my user identity, the cache error appears.

    If I do not release() the reference, everything works fine, but as it seems from the docs, I should release the reference.

    What if I don't, will there be a memory loss? Is is true that the release() method will shutdown the cache? Is it a bug?

    Please help me out on this issue.
    Thanks,
    Thomas
Working...
X