This content has been marked as final.
Show 4 replies
-
1. Re: EJB3 in Default configuration does not work in RC4
bill.burke Feb 1, 2006 11:15 PM (in response to lostinspace2011)Hmmmm, anyway you could write a test to reproduce this problem?
-
2. Re: EJB3 in Default configuration does not work in RC4
bill.burke Feb 1, 2006 11:34 PM (in response to lostinspace2011)I think I know the problem.
Does this problem show up when you have lots of stateful session beans? -
3. Re: EJB3 in Default configuration does not work in RC4
bill.burke Feb 2, 2006 12:33 PM (in response to lostinspace2011)Ok, I couldn't reproduce the problem.
Can you give me more information? Do SFSBs not work *AT ALL*??? Or they disappear randomly?
You can always do
@Cache(org.jboss.ejb3.cache.NoPassivationCache.class)
@Stateful
public class MyBean -
4. Re: EJB3 in Default configuration does not work in RC4
lostinspace2011 Feb 3, 2006 6:58 AM (in response to lostinspace2011)I will put a test together. So far I can rule out the theory that it is confinded to the default configuration. I had the same problem with the all configuration. After some searching I found that changing the exception from : EntityNotFound to NoResultException.
Within my session bean i had :log.info("GetMime with Key :"+key); try { MIME mime = (MIME)manager.createQuery("select l from MIME l where l.mimeKey=:mimeKey ").setParameter("mimeKey", key).getSingleResult(); return mime; } catch (EntityNotFoundException enfe) { throw new CIEFacadeException(CIEFacadeException.OBJECT_NOT_FOUND,"MIME with key :"+key+" not found."); }
I changed the code topublic MIME getMIME(String key) throws CIEFacadeException { log.info("GetMime with Key :"+key); try { MIME mime = (MIME)manager.createQuery("select l from MIME l where l.mimeKey=:mimeKey ").setParameter("mimeKey", key).getSingleResult(); return mime; } catch (NoResultException enfe) { throw new CIEFacadeException(CIEFacadeException.OBJECT_NOT_FOUND,"MIME with key :"+key+" not found."); } }
I have a new theory now. Before the NoResultException was not handled and seemed to have resulted in the SessionBean being removed from the cache. I don't know if this makes much sense, but I will put a basic example together and try to reproduce the problem.