-
1. Re: @Observer does not work in booking example
gavin.king May 18, 2006 5:12 PM (in response to consuelofranky)Please report this in JIRA. Thanks.
-
2. Re: @Observer does not work in booking example
consuelofranky May 18, 2006 6:50 PM (in response to consuelofranky)Excuse me: I do not what is JIRA and how to post a problem in JIRA.
Can you give me a link to JIRA ?
Thanks
Maria Consuelo Franky -
4. Re: @Observer does not work in booking example
consuelofranky May 19, 2006 8:34 PM (in response to consuelofranky)Hi:
I have not reported in JIRA because I have found the cause of the problem that I have shown before.
When in the seam-booking example I changed the datasource Hypersonic by a datasource Postgresql, I oberved 2 problems:
- the word "User" is reserverd in Postgresql; I must changed the name of this table to "Usr"
- when the user registers a new hotel booking, his list of bookings is not refreshed.
Specially the second problem does not happen in the example with Hypersonic.
The solution that I have found and that runs fine in Postgresql is the following:
the method with the @Observer annotation must have also the annotation @TransactionAttribute(REQUIRED)
in order to participate in the same transaction that raises the event
(otherwise the insert effect can not be observed by the select of the list in the database).
Regards
Maria Consuelo Franky
ConsueloFranky@cincosoft.com -
5. Re: @Observer does not work in booking example
kh2ouija May 22, 2006 3:38 AM (in response to consuelofranky)I just noticed that when annotating a method of a SFSB as @Observer for a certain standard event, I can't raise that event in the same bean as the method, as it will cause this:
javax.ejb.EJBException: Application Error: no concurrent calls on stateful beans
. Instead of raising that event, you have to call the observer method specifically.