[JBoss Seam] - Re: Seam Remoting und JMS Topic subscription questions.
by appendix
Hi, thanks for helping me on this topic!
But I'm not sure, if your suggestion would realy help me out, because the channelMessageCallback() method is not always called _before_ the page is refreshed. Actually in my scenario it is never called before the first refresh.
Imagine this timeline:
1) The page is rendered and the subscription takes place
2) The user hits a button on the page triggering some action method
3) The page is re-rendered because of the action triggered in 2)
4) A JMS message is published on the topic ....
At point 3) a new subscription would have taken place ....
But I've noticed this Monday morning, that the exact same code produced a valid subscription AND token in the script at the bottom of the page [see code of posting Fri Oct 13, 2006 02:33 AM](after subscription).
So I thought about a racing condition. After calling Seam.Remoting.subscribe() at the top of the page, your code is generating the token and is putting it into the SubscriptionRegistry. Simultaneously the page is rendered and the script at the bottom of the page is executed. If the token ends up in the registry before that point, everythings fine. But most of the times it won't!
I think I've confirmed the issue by delaying the script at the bottom of the page artificially.
setTimeout('fillTokenField();', 1000);
I'm not sure, if this is the best approach. Assumptions on "how long something usually takes" have a tendency to break code after a while. Is there another way of knowing, if the subscription is completely performed, hence the token is generated?
Thank you again for sticking with me,
Kurt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978454#3978454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978454
19 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - strange Oracle 10g Blob Problem
by georges.goebel
Hi,
I have a strange problem with Oracle 10g ( 10.2.0.1.0). the database and the jdbc driver are both version 10.2.0.1.0. I use JBoss 4.0.4GA and I have a struts web application with ejb3 session and entity beans.
I have a 1-n relation in the ejb part : Command - CommandLine
The CommandLine entity bean has a byte[] filed to store a picture.
When I try to persiste the command I have different scenarios.
1) When the 1st CommandLine has a picture byte[].length>0 an the 2nd commandline has a pictore or not, the 1st commandline is stored in the database !
2) When the 1st CommandLine has NO picture byte[].length == 0 and the 2nd CommandLine has a picture, the 2nd CommandLine Picture is NOT stored in the database !!! I get NO error.
I debugged my application and could not find an error because the same code works for both scenarios correctly for HSQLDB (DefaultDS). Only with Oracle the 2nd scenario does not work.
The work around at the moment is to insert 1 byte as picture in the DB when there is no picture. Then the 2nd scenario works also for Oracle.
I tried the parameters :
property name="hibernate.jdbc.batch_size">0
true
but that didn't help
Does somebody has an answer to the problem ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978450#3978450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978450
19 years, 8 months